vendor: 45,033 bytes, lines 1-2
1import{a as Vt,b as lf,c as ot,d as m}from"./chunk-EX7TRSJS.js";var kl=Vt((N2,Il)=>{var at=-1,Z=1,U=0;function Ar(r,t,e,s,n){if(r===t)return r?[[U,r]]:[];if(e!=null){var i=Yg(r,t,e);if(i)return i}var o=jn(r,t),a=r.substring(0,o);r=r.substring(o),t=t.substring(o),o=qs(r,t);var l=r.substring(r.length-o);r=r.substring(0,r.length-o),t=t.substring(0,t.length-o);var u=zg(r,t);return a&&u.unshift([U,a]),l&&u.push([U,l]),Pn(u,n),s&&Gg(u),u}function zg(r,t){var e;if(!r)return[[Z,t]];if(!t)return[[at,r]];var s=r.length>t.length?r:t,n=r.length>t.length?t:r,i=s.indexOf(n);if(i!==-1)return e=[[Z,s.substring(0,i)],[U,n],[Z,s.substring(i+n.length)]],r.length>t.length&&(e[0][0]=e[2][0]=at),e;if(n.length===1)return[[at,r],[Z,t]];var o=Kg(r,t);if(o){var a=o[0],l=o[1],u=o[2],c=o[3],f=o[4],h=Ar(a,u),p=Ar(l,c);return h.concat([[U,f]],p)}return $g(r,t)}function $g(r,t){for(var e=r.length,s=t.length,n=Math.ceil((e+s)/2),i=n,o=2*n,a=new Array(o),l=new Array(o),u=0;u<o;u++)a[u]=-1,l[u]=-1;a[i+1]=0,l[i+1]=0;for(var c=e-s,f=c%2!==0,h=0,p=0,g=0,v=0,A=0;A<n;A++){for(var b=-A+h;b<=A-p;b+=2){var E=i+b,N;b===-A||b!==A&&a[E-1]<a[E+1]?N=a[E+1]:N=a[E-1]+1;for(var w=N-b;N<e&&w<s&&r.charAt(N)===t.charAt(w);)N++,w++;if(a[E]=N,N>e)p+=2;else if(w>s)h+=2;else if(f){var T=i+c-b;if(T>=0&&T<o&&l[T]!==-1){var _=e-l[T];if(N>=_)return Nl(r,t,N,w)}}}for(var Q=-A+g;Q<=A-v;Q+=2){var T=i+Q,_;Q===-A||Q!==A&&l[T-1]<l[T+1]?_=l[T+1]:_=l[T-1]+1;for(var vt=_-Q;_<e&&vt<s&&r.charAt(e-_-1)===t.charAt(s-vt-1);)_++,vt++;if(l[T]=_,_>e)v+=2;else if(vt>s)g+=2;else if(!f){var E=i+c-Q;if(E>=0&&E<o&&a[E]!==-1){var N=a[E],w=i+N-E;if(_=e-_,N>=_)return Nl(r,t,N,w)}}}}return[[at,r],[Z,t]]}function Nl(r,t,e,s){var n=r.substring(0,e),i=t.substring(0,s),o=r.substring(e),a=t.substring(s),l=Ar(n,i),u=Ar(o,a);return l.concat(u)}function jn(r,t){if(!r||!t||r.charAt(0)!==t.charAt(0))return 0;for(var e=0,s=Math.min(r.length,t.length),n=s,i=0;e<n;)r.substring(i,n)==t.substring(i,n)?(e=n,i=e):s=n,n=Math.floor((s-e)/2+e);return Ol(r.charCodeAt(n-1))&&n--,n}function wl(r,t){var e=r.length,s=t.length;if(e==0||s==0)return 0;e>s?r=r.substring(e-s):e<s&&(t=t.substring(0,e));var n=Math.min(e,s);if(r==t)return n;for(var i=0,o=1;;){var a=r.substring(n-o),l=t.indexOf(a);if(l==-1)return i;o+=l,(l==0||r.substring(n-o)==t.substring(0,o))&&(i=o,o++)}}function qs(r,t){if(!r||!t||r.slice(-1)!==t.slice(-1))return 0;for(var e=0,s=Math.min(r.length,t.length),n=s,i=0;e<n;)r.substring(r.length-n,r.length-i)==t.substring(t.length-n,t.length-i)?(e=n,i=e):s=n,n=Math.floor((s-e)/2+e);return ql(r.charCodeAt(r.length-n))&&n--,n}function Kg(r,t){var e=r.length>t.length?r:t,s=r.length>t.length?t:r;if(e.length<4||s.length*2<e.length)return null;function n(p,g,v){for(var A=p.substring(v,v+Math.floor(p.length/4)),b=-1,E="",N,w,T,_;(b=g.indexOf(A,b+1))!==-1;){var Q=jn(p.substring(v),g.substring(b)),vt=qs(p.substring(0,v),g.substring(0,b));E.length<vt+Q&&(E=g.substring(b-vt,b)+g.substring(b,b+Q),N=p.substring(0,v-vt),w=p.substring(v+Q),T=g.substring(0,b-vt),_=g.substring(b+Q))}return E.length*2>=p.length?[N,w,T,_,E]:null}var i=n(e,s,Math.ceil(e.length/4)),o=n(e,s,Math.ceil(e.length/2)),a;if(!i&&!o)return null;o?i?a=i[4].length>o[4].length?i:o:a=o:a=i;var l,u,c,f;r.length>t.length?(l=a[0],u=a[1],c=a[2],f=a[3]):(c=a[0],f=a[1],l=a[2],u=a[3]);var h=a[4];return[l,u,c,f,h]}function Gg(r){for(var t=!1,e=[],s=0,n=null,i=0,o=0,a=0,l=0,u=0;i<r.length;)r[i][0]==U?(e[s++]=i,o=l,a=u,l=0,u=0,n=r[i][1]):(r[i][0]==Z?l+=r[i][1].length:u+=r[i][1].length,n&&n.length<=Math.max(o,a)&&n.length<=Math.max(l,u)&&(r.splice(e[s-1],0,[at,n]),r[e[s-1]+1][0]=Z,s--,s--,i=s>0?e[s-1]:-1,o=0,a=0,l=0,u=0,n=null,t=!0)),i++;for(t&&Pn(r),Zg(r),i=1;i<r.length;){if(r[i-1][0]==at&&r[i][0]==Z){var c=r[i-1][1],f=r[i][1],h=wl(c,f),p=wl(f,c);h>=p?(h>=c.length/2||h>=f.length/2)&&(r.splice(i,0,[U,f.substring(0,h)]),r[i-1][1]=c.substring(0,c.length-h),r[i+1][1]=f.substring(h),i++):(p>=c.length/2||p>=f.length/2)&&(r.splice(i,0,[U,c.substring(0,p)]),r[i-1][0]=Z,r[i-1][1]=f.substring(0,f.length-p),r[i+1][0]=at,r[i+1][1]=c.substring(p),i++),i++}i++}}var Tl=/[^a-zA-Z0-9]/,Sl=/\s/,Ll=/[\r\n]/,Vg=/\n\r?\n$/,Wg=/^\r?\n\r?\n/;function Zg(r){function t(p,g){if(!p||!g)return 6;var v=p.charAt(p.length-1),A=g.charAt(0),b=v.match(Tl),E=A.match(Tl),N=b&&v.match(Sl),w=E&&A.match(Sl),T=N&&v.match(Ll),_=w&&A.match(Ll),Q=T&&p.match(Vg),vt=_&&g.match(Wg);return Q||vt?5:T||_?4:b&&!N&&w?3:N||w?2:b||E?1:0}for(var e=1;e<r.length-1;){if(r[e-1][0]==U&&r[e+1][0]==U){var s=r[e-1][1],n=r[e][1],i=r[e+1][1],o=qs(s,n);if(o){var a=n.substring(n.length-o);s=s.substring(0,s.length-o),n=a+n.substring(0,n.length-o),i=a+i}for(var l=s,u=n,c=i,f=t(s,n)+t(n,i);n.charAt(0)===i.charAt(0);){s+=n.charAt(0),n=n.substring(1)+i.charAt(0),i=i.substring(1);var h=t(s,n)+t(n,i);h>=f&&(f=h,l=s,u=n,c=i)}r[e-1][1]!=l&&(l?r[e-1][1]=l:(r.splice(e-1,1),e--),r[e][1]=u,c?r[e+1][1]=c:(r.splice(e+1,1),e--))}e++}}function Pn(r,t){r.push([U,""]);for(var e=0,s=0,n=0,i="",o="",a;e<r.length;){if(e<r.length-1&&!r[e][1]){r.splice(e,1);continue}switch(r[e][0]){case Z:n++,o+=r[e][1],e++;break;case at:s++,i+=r[e][1],e++;break;case U:var l=e-n-s-1;if(t){if(l>=0&&_l(r[l][1])){var u=r[l][1].slice(-1);if(r[l][1]=r[l][1].slice(0,-1),i=u+i,o=u+o,!r[l][1]){r.splice(l,1),e--;var c=l-1;r[c]&&r[c][0]===Z&&(n++,o=r[c][1]+o,c--),r[c]&&r[c][0]===at&&(s++,i=r[c][1]+i,c--),l=c}}if(Cl(r[e][1])){var u=r[e][1].charAt(0);r[e][1]=r[e][1].slice(1),i+=u,o+=u}}if(e<r.length-1&&!r[e][1]){r.splice(e,1);break}if(i.length>0||o.length>0){i.length>0&&o.length>0&&(a=jn(o,i),a!==0&&(l>=0?r[l][1]+=o.substring(0,a):(r.splice(0,0,[U,o.substring(0,a)]),e++),o=o.substring(a),i=i.substring(a)),a=qs(o,i),a!==0&&(r[e][1]=o.substring(o.length-a)+r[e][1],o=o.substring(0,o.length-a),i=i.substring(0,i.length-a)));var f=n+s;i.length===0&&o.length===0?(r.splice(e-f,f),e=e-f):i.length===0?(r.splice(e-f,f,[Z,o]),e=e-f+1):o.length===0?(r.splice(e-f,f,[at,i]),e=e-f+1):(r.splice(e-f,f,[at,i],[Z,o]),e=e-f+2)}e!==0&&r[e-1][0]===U?(r[e-1][1]+=r[e][1],r.splice(e,1)):e++,n=0,s=0,i="",o="";break}}r[r.length-1][1]===""&&r.pop();var h=!1;for(e=1;e<r.length-1;)r[e-1][0]===U&&r[e+1][0]===U&&(r[e][1].substring(r[e][1].length-r[e-1][1].length)===r[e-1][1]?(r[e][1]=r[e-1][1]+r[e][1].substring(0,r[e][1].length-r[e-1][1].length),r[e+1][1]=r[e-1][1]+r[e+1][1],r.splice(e-1,1),h=!0):r[e][1].substring(0,r[e+1][1].length)==r[e+1][1]&&(r[e-1][1]+=r[e+1][1],r[e][1]=r[e][1].substring(r[e+1][1].length)+r[e+1][1],r.splice(e+1,1),h=!0)),e++;h&&Pn(r,t)}function Ol(r){return r>=55296&&r<=56319}function ql(r){return r>=56320&&r<=57343}function Cl(r){return ql(r.charCodeAt(0))}function _l(r){return Ol(r.charCodeAt(r.length-1))}function Xg(r){for(var t=[],e=0;e<r.length;e++)r[e][1].length>0&&t.push(r[e]);return t}function Dn(r,t,e,s){return _l(r)||Cl(s)?null:Xg([[U,r],[at,t],[Z,e],[U,s]])}function Yg(r,t,e){var s=typeof e=="number"?{index:e,length:0}:e.oldRange,n=typeof e=="number"?null:e.newRange,i=r.length,o=t.length;if(s.length===0&&(n===null||n.length===0)){var a=s.index,l=r.slice(0,a),u=r.slice(a),c=n?n.index:null;t:{var f=a+o-i;if(c!==null&&c!==f||f<0||f>o)break t;var h=t.slice(0,f),p=t.slice(f);if(p!==u)break t;var g=Math.min(a,f),v=l.slice(0,g),A=h.slice(0,g);if(v!==A)break t;var b=l.slice(g),E=h.slice(g);return Dn(v,b,E,u)}t:{if(c!==null&&c!==a)break t;var N=a,h=t.slice(0,N),p=t.slice(N);if(h!==l)break t;var w=Math.min(i-N,o-N),T=u.slice(u.length-w),_=p.slice(p.length-w);if(T!==_)break t;var b=u.slice(0,u.length-w),E=p.slice(0,p.length-w);return Dn(l,b,E,T)}}if(s.length>0&&n&&n.length===0)t:{var v=r.slice(0,s.index),T=r.slice(s.index+s.length),g=v.length,w=T.length;if(o<g+w)break t;var A=t.slice(0,g),_=t.slice(o-w);if(v!==A||T!==_)break t;var b=r.slice(g,i-w),E=t.slice(g,o-w);return Dn(v,b,E,T)}return null}function Cs(r,t,e,s){return Ar(r,t,e,s,!0)}Cs.INSERT=Z;Cs.DELETE=at;Cs.EQUAL=U;Il.exports=Cs});var ti=Vt((Er,Ze)=>{var Qg=200,Kl="__lodash_hash_undefined__",Gl=9007199254740991,Vn="[object Arguments]",Jg="[object Array]",Vl="[object Boolean]",Wl="[object Date]",t1="[object Error]",Wn="[object Function]",Zl="[object GeneratorFunction]",_s="[object Map]",Xl="[object Number]",Zn="[object Object]",Rl="[object Promise]",Yl="[object RegExp]",Is="[object Set]",Ql="[object String]",Jl="[object Symbol]",Fn="[object WeakMap]",tu="[object ArrayBuffer]",ks="[object DataView]",eu="[object Float32Array]",ru="[object Float64Array]",su="[object Int8Array]",nu="[object Int16Array]",iu="[object Int32Array]",ou="[object Uint8Array]",au="[object Uint8ClampedArray]",lu="[object Uint16Array]",uu="[object Uint32Array]",e1=/[\\^$.*+?()[\]{}|]/g,r1=/\w*$/,s1=/^\[object .+?Constructor\]$/,n1=/^(?:0|[1-9]\d*)$/,O={};O[Vn]=O[Jg]=O[tu]=O[ks]=O[Vl]=O[Wl]=O[eu]=O[ru]=O[su]=O[nu]=O[iu]=O[_s]=O[Xl]=O[Zn]=O[Yl]=O[Is]=O[Ql]=O[Jl]=O[ou]=O[au]=O[lu]=O[uu]=!0;O[t1]=O[Wn]=O[Fn]=!1;var i1=typeof global=="object"&&global&&global.Object===Object&&global,o1=typeof self=="object"&&self&&self.Object===Object&&self,Mt=i1||o1||Function("return this")(),cu=typeof Er=="object"&&Er&&!Er.nodeType&&Er,Bl=cu&&typeof Ze=="object"&&Ze&&!Ze.nodeType&&Ze,a1=Bl&&Bl.exports===cu;function l1(r,t){return r.set(t[0],t[1]),r}function u1(r,t){return r.add(t),r}function c1(r,t){for(var e=-1,s=r?r.length:0;++e<s&&t(r[e],e,r)!==!1;);return r}function f1(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function fu(r,t,e,s){var n=-1,i=r?r.length:0;for(s&&i&&(e=r[++n]);++n<i;)e=t(e,r[n],n,r);return e}function h1(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function d1(r,t){return r?.[t]}function hu(r){var t=!1;if(r!=null&&typeof r.toString!="function")try{t=!!(r+"")}catch{}return t}function Ml(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function Xn(r,t){return function(e){return r(t(e))}}function Dl(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var p1=Array.prototype,m1=Function.prototype,Rs=Object.prototype,Un=Mt["__core-js_shared__"],jl=function(){var r=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),du=m1.toString,se=Rs.hasOwnProperty,Bs=Rs.toString,g1=RegExp("^"+du.call(se).replace(e1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pl=a1?Mt.Buffer:void 0,Ul=Mt.Symbol,Fl=Mt.Uint8Array,b1=Xn(Object.getPrototypeOf,Object),y1=Object.create,x1=Rs.propertyIsEnumerable,v1=p1.splice,Hl=Object.getOwnPropertySymbols,A1=Pl?Pl.isBuffer:void 0,E1=Xn(Object.keys,Object),Hn=Qe(Mt,"DataView"),Nr=Qe(Mt,"Map"),zn=Qe(Mt,"Promise"),$n=Qe(Mt,"Set"),Kn=Qe(Mt,"WeakMap"),wr=Qe(Object,"create"),N1=ye(Hn),w1=ye(Nr),T1=ye(zn),S1=ye($n),L1=ye(Kn),zl=Ul?Ul.prototype:void 0,$l=zl?zl.valueOf:void 0;function be(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function O1(){this.__data__=wr?wr(null):{}}function q1(r){return this.has(r)&&delete this.__data__[r]}function C1(r){var t=this.__data__;if(wr){var e=t[r];return e===Kl?void 0:e}return se.call(t,r)?t[r]:void 0}function _1(r){var t=this.__data__;return wr?t[r]!==void 0:se.call(t,r)}function I1(r,t){var e=this.__data__;return e[r]=wr&&t===void 0?Kl:t,this}be.prototype.clear=O1;be.prototype.delete=q1;be.prototype.get=C1;be.prototype.has=_1;be.prototype.set=I1;function Dt(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function k1(){this.__data__=[]}function R1(r){var t=this.__data__,e=Ms(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():v1.call(t,e,1),!0}function B1(r){var t=this.__data__,e=Ms(t,r);return e<0?void 0:t[e][1]}function M1(r){return Ms(this.__data__,r)>-1}function D1(r,t){var e=this.__data__,s=Ms(e,r);return s<0?e.push([r,t]):e[s][1]=t,this}Dt.prototype.clear=k1;Dt.prototype.delete=R1;Dt.prototype.get=B1;Dt.prototype.has=M1;Dt.prototype.set=D1;function Xe(r){var t=-1,e=r?r.length:0;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function j1(){this.__data__={hash:new be,map:new(Nr||Dt),string:new be}}function P1(r){return Ds(this,r).delete(r)}function U1(r){return Ds(this,r).get(r)}function F1(r){return Ds(this,r).has(r)}function H1(r,t){return Ds(this,r).set(r,t),this}Xe.prototype.clear=j1;Xe.prototype.delete=P1;Xe.prototype.get=U1;Xe.prototype.has=F1;Xe.prototype.set=H1;function Ye(r){this.__data__=new Dt(r)}function z1(){this.__data__=new Dt}function $1(r){return this.__data__.delete(r)}function K1(r){return this.__data__.get(r)}function G1(r){return this.__data__.has(r)}function V1(r,t){var e=this.__data__;if(e instanceof Dt){var s=e.__data__;if(!Nr||s.length<Qg-1)return s.push([r,t]),this;e=this.__data__=new Xe(s)}return e.set(r,t),this}Ye.prototype.clear=z1;Ye.prototype.delete=$1;Ye.prototype.get=K1;Ye.prototype.has=G1;Ye.prototype.set=V1;function W1(r,t){var e=Qn(r)||y0(r)?h1(r.length,String):[],s=e.length,n=!!s;for(var i in r)(t||se.call(r,i))&&!(n&&(i=="length"||p0(i,s)))&&e.push(i);return e}function pu(r,t,e){var s=r[t];(!(se.call(r,t)&&yu(s,e))||e===void 0&&!(t in r))&&(r[t]=e)}function Ms(r,t){for(var e=r.length;e--;)if(yu(r[e][0],t))return e;return-1}function Z1(r,t){return r&&mu(t,Jn(t),r)}function Gn(r,t,e,s,n,i,o){var a;if(s&&(a=i?s(r,n,i,o):s(r)),a!==void 0)return a;if(!js(r))return r;var l=Qn(r);if(l){if(a=f0(r),!t)return l0(r,a)}else{var u=ge(r),c=u==Wn||u==Zl;if(v0(r))return e0(r,t);if(u==Zn||u==Vn||c&&!i){if(hu(r))return i?r:{};if(a=h0(c?{}:r),!t)return u0(r,Z1(a,r))}else{if(!O[u])return i?r:{};a=d0(r,u,Gn,t)}}o||(o=new Ye);var f=o.get(r);if(f)return f;if(o.set(r,a),!l)var h=e?c0(r):Jn(r);return c1(h||r,function(p,g){h&&(g=p,p=r[g]),pu(a,g,Gn(p,t,e,s,g,r,o))}),a}function X1(r){return js(r)?y1(r):{}}function Y1(r,t,e){var s=t(r);return Qn(r)?s:f1(s,e(r))}function Q1(r){return Bs.call(r)}function J1(r){if(!js(r)||g0(r))return!1;var t=vu(r)||hu(r)?g1:s1;return t.test(ye(r))}function t0(r){if(!bu(r))return E1(r);var t=[];for(var e in Object(r))se.call(r,e)&&e!="constructor"&&t.push(e);return t}function e0(r,t){if(t)return r.slice();var e=new r.constructor(r.length);return r.copy(e),e}function Yn(r){var t=new r.constructor(r.byteLength);return new Fl(t).set(new Fl(r)),t}function r0(r,t){var e=t?Yn(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}function s0(r,t,e){var s=t?e(Ml(r),!0):Ml(r);return fu(s,l1,new r.constructor)}function n0(r){var t=new r.constructor(r.source,r1.exec(r));return t.lastIndex=r.lastIndex,t}function i0(r,t,e){var s=t?e(Dl(r),!0):Dl(r);return fu(s,u1,new r.constructor)}function o0(r){return $l?Object($l.call(r)):{}}function a0(r,t){var e=t?Yn(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}function l0(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}function mu(r,t,e,s){e||(e={});for(var n=-1,i=t.length;++n<i;){var o=t[n],a=s?s(e[o],r[o],o,e,r):void 0;pu(e,o,a===void 0?r[o]:a)}return e}function u0(r,t){return mu(r,gu(r),t)}function c0(r){return Y1(r,Jn,gu)}function Ds(r,t){var e=r.__data__;return m0(t)?e[typeof t=="string"?"string":"hash"]:e.map}function Qe(r,t){var e=d1(r,t);return J1(e)?e:void 0}var gu=Hl?Xn(Hl,Object):N0,ge=Q1;(Hn&&ge(new Hn(new ArrayBuffer(1)))!=ks||Nr&&ge(new Nr)!=_s||zn&&ge(zn.resolve())!=Rl||$n&&ge(new $n)!=Is||Kn&&ge(new Kn)!=Fn)&&(ge=function(r){var t=Bs.call(r),e=t==Zn?r.constructor:void 0,s=e?ye(e):void 0;if(s)switch(s){case N1:return ks;case w1:return _s;case T1:return Rl;case S1:return Is;case L1:return Fn}return t});function f0(r){var t=r.length,e=r.constructor(t);return t&&typeof r[0]=="string"&&se.call(r,"index")&&(e.index=r.index,e.input=r.input),e}function h0(r){return typeof r.constructor=="function"&&!bu(r)?X1(b1(r)):{}}function d0(r,t,e,s){var n=r.constructor;switch(t){case tu:return Yn(r);case Vl:case Wl:return new n(+r);case ks:return r0(r,s);case eu:case ru:case su:case nu:case iu:case ou:case au:case lu:case uu:return a0(r,s);case _s:return s0(r,s,e);case Xl:case Ql:return new n(r);case Yl:return n0(r);case Is:return i0(r,s,e);case Jl:return o0(r)}}function p0(r,t){return t=t??Gl,!!t&&(typeof r=="number"||n1.test(r))&&r>-1&&r%1==0&&r<t}function m0(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function g0(r){return!!jl&&jl in r}function bu(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Rs;return r===e}function ye(r){if(r!=null){try{return du.call(r)}catch{}try{return r+""}catch{}}return""}function b0(r){return Gn(r,!0,!0)}function yu(r,t){return r===t||r!==r&&t!==t}function y0(r){return x0(r)&&se.call(r,"callee")&&(!x1.call(r,"callee")||Bs.call(r)==Vn)}var Qn=Array.isArray;function xu(r){return r!=null&&A0(r.length)&&!vu(r)}function x0(r){return E0(r)&&xu(r)}var v0=A1||w0;function vu(r){var t=js(r)?Bs.call(r):"";return t==Wn||t==Zl}function A0(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Gl}function js(r){var t=typeof r;return!!r&&(t=="object"||t=="function")}function E0(r){return!!r&&typeof r=="object"}function Jn(r){return xu(r)?W1(r):t0(r)}function N0(){return[]}function w0(){return!1}Ze.exports=b0});var hi=Vt((Tr,tr)=>{var T0=200,fi="__lodash_hash_undefined__",Gs=1,Iu=2,ku=9007199254740991,Ps="[object Arguments]",ni="[object Array]",S0="[object AsyncFunction]",Ru="[object Boolean]",Bu="[object Date]",Mu="[object Error]",Du="[object Function]",L0="[object GeneratorFunction]",Us="[object Map]",ju="[object Number]",O0="[object Null]",Je="[object Object]",Au="[object Promise]",q0="[object Proxy]",Pu="[object RegExp]",Fs="[object Set]",Uu="[object String]",C0="[object Symbol]",_0="[object Undefined]",ii="[object WeakMap]",Fu="[object ArrayBuffer]",Hs="[object DataView]",I0="[object Float32Array]",k0="[object Float64Array]",R0="[object Int8Array]",B0="[object Int16Array]",M0="[object Int32Array]",D0="[object Uint8Array]",j0="[object Uint8ClampedArray]",P0="[object Uint16Array]",U0="[object Uint32Array]",F0=/[\\^$.*+?()[\]{}|]/g,H0=/^\[object .+?Constructor\]$/,z0=/^(?:0|[1-9]\d*)$/,C={};C[I0]=C[k0]=C[R0]=C[B0]=C[M0]=C[D0]=C[j0]=C[P0]=C[U0]=!0;C[Ps]=C[ni]=C[Fu]=C[Ru]=C[Hs]=C[Bu]=C[Mu]=C[Du]=C[Us]=C[ju]=C[Je]=C[Pu]=C[Fs]=C[Uu]=C[ii]=!1;var Hu=typeof global=="object"&&global&&global.Object===Object&&global,$0=typeof self=="object"&&self&&self.Object===Object&&self,jt=Hu||$0||Function("return this")(),zu=typeof Tr=="object"&&Tr&&!Tr.nodeType&&Tr,Eu=zu&&typeof tr=="object"&&tr&&!tr.nodeType&&tr,$u=Eu&&Eu.exports===zu,ei=$u&&Hu.process,Nu=function(){try{return ei&&ei.binding&&ei.binding("util")}catch{}}(),wu=Nu&&Nu.isTypedArray;function K0(r,t){for(var e=-1,s=r==null?0:r.length,n=0,i=[];++e<s;){var o=r[e];t(o,e,r)&&(i[n++]=o)}return i}function G0(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}function V0(r,t){for(var e=-1,s=r==null?0:r.length;++e<s;)if(t(r[e],e,r))return!0;return!1}function W0(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}function Z0(r){return function(t){return r(t)}}function X0(r,t){return r.has(t)}function Y0(r,t){return r?.[t]}function Q0(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function J0(r,t){return function(e){return r(t(e))}}function tb(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var eb=Array.prototype,rb=Function.prototype,Vs=Object.prototype,ri=jt["__core-js_shared__"],Ku=rb.toString,Ot=Vs.hasOwnProperty,Tu=function(){var r=/[^.]+$/.exec(ri&&ri.keys&&ri.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Gu=Vs.toString,sb=RegExp("^"+Ku.call(Ot).replace(F0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Su=$u?jt.Buffer:void 0,zs=jt.Symbol,Lu=jt.Uint8Array,Vu=Vs.propertyIsEnumerable,nb=eb.splice,xe=zs?zs.toStringTag:void 0,Ou=Object.getOwnPropertySymbols,ib=Su?Su.isBuffer:void 0,ob=J0(Object.keys,Object),oi=er(jt,"DataView"),Sr=er(jt,"Map"),ai=er(jt,"Promise"),li=er(jt,"Set"),ui=er(jt,"WeakMap"),Lr=er(Object,"create"),ab=Ee(oi),lb=Ee(Sr),ub=Ee(ai),cb=Ee(li),fb=Ee(ui),qu=zs?zs.prototype:void 0,si=qu?qu.valueOf:void 0;function ve(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function hb(){this.__data__=Lr?Lr(null):{},this.size=0}function db(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}function pb(r){var t=this.__data__;if(Lr){var e=t[r];return e===fi?void 0:e}return Ot.call(t,r)?t[r]:void 0}function mb(r){var t=this.__data__;return Lr?t[r]!==void 0:Ot.call(t,r)}function gb(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Lr&&t===void 0?fi:t,this}ve.prototype.clear=hb;ve.prototype.delete=db;ve.prototype.get=pb;ve.prototype.has=mb;ve.prototype.set=gb;function Pt(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function bb(){this.__data__=[],this.size=0}function yb(r){var t=this.__data__,e=Ws(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():nb.call(t,e,1),--this.size,!0}function xb(r){var t=this.__data__,e=Ws(t,r);return e<0?void 0:t[e][1]}function vb(r){return Ws(this.__data__,r)>-1}function Ab(r,t){var e=this.__data__,s=Ws(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}Pt.prototype.clear=bb;Pt.prototype.delete=yb;Pt.prototype.get=xb;Pt.prototype.has=vb;Pt.prototype.set=Ab;function Ae(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}function Eb(){this.size=0,this.__data__={hash:new ve,map:new(Sr||Pt),string:new ve}}function Nb(r){var t=Zs(this,r).delete(r);return this.size-=t?1:0,t}function wb(r){return Zs(this,r).get(r)}function Tb(r){return Zs(this,r).has(r)}function Sb(r,t){var e=Zs(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}Ae.prototype.clear=Eb;Ae.prototype.delete=Nb;Ae.prototype.get=wb;Ae.prototype.has=Tb;Ae.prototype.set=Sb;function $s(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new Ae;++t<e;)this.add(r[t])}function Lb(r){return this.__data__.set(r,fi),this}function Ob(r){return this.__data__.has(r)}$s.prototype.add=$s.prototype.push=Lb;$s.prototype.has=Ob;function ie(r){var t=this.__data__=new Pt(r);this.size=t.size}function qb(){this.__data__=new Pt,this.size=0}function Cb(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}function _b(r){return this.__data__.get(r)}function Ib(r){return this.__data__.has(r)}function kb(r,t){var e=this.__data__;if(e instanceof Pt){var s=e.__data__;if(!Sr||s.length<T0-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new Ae(s)}return e.set(r,t),this.size=e.size,this}ie.prototype.clear=qb;ie.prototype.delete=Cb;ie.prototype.get=_b;ie.prototype.has=Ib;ie.prototype.set=kb;function Rb(r,t){var e=Ks(r),s=!e&&Zb(r),n=!e&&!s&&ci(r),i=!e&&!s&&!n&&tc(r),o=e||s||n||i,a=o?W0(r.length,String):[],l=a.length;for(var u in r)(t||Ot.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$b(u,l)))&&a.push(u);return a}function Ws(r,t){for(var e=r.length;e--;)if(Xu(r[e][0],t))return e;return-1}function Bb(r,t,e){var s=t(r);return Ks(r)?s:G0(s,e(r))}function qr(r){return r==null?r===void 0?_0:O0:xe&&xe in Object(r)?Hb(r):Wb(r)}function Cu(r){return Or(r)&&qr(r)==Ps}function Wu(r,t,e,s,n){return r===t?!0:r==null||t==null||!Or(r)&&!Or(t)?r!==r&&t!==t:Mb(r,t,e,s,Wu,n)}function Mb(r,t,e,s,n,i){var o=Ks(r),a=Ks(t),l=o?ni:ne(r),u=a?ni:ne(t);l=l==Ps?Je:l,u=u==Ps?Je:u;var c=l==Je,f=u==Je,h=l==u;if(h&&ci(r)){if(!ci(t))return!1;o=!0,c=!1}if(h&&!c)return i||(i=new ie),o||tc(r)?Zu(r,t,e,s,n,i):Ub(r,t,l,e,s,n,i);if(!(e&Gs)){var p=c&&Ot.call(r,"__wrapped__"),g=f&&Ot.call(t,"__wrapped__");if(p||g){var v=p?r.value():r,A=g?t.value():t;return i||(i=new ie),n(v,A,e,s,i)}}return h?(i||(i=new ie),Fb(r,t,e,s,n,i)):!1}function Db(r){if(!Ju(r)||Gb(r))return!1;var t=Yu(r)?sb:H0;return t.test(Ee(r))}function jb(r){return Or(r)&&Qu(r.length)&&!!C[qr(r)]}function Pb(r){if(!Vb(r))return ob(r);var t=[];for(var e in Object(r))Ot.call(r,e)&&e!="constructor"&&t.push(e);return t}function Zu(r,t,e,s,n,i){var o=e&Gs,a=r.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(r);if(u&&i.get(t))return u==t;var c=-1,f=!0,h=e&Iu?new $s:void 0;for(i.set(r,t),i.set(t,r);++c<a;){var p=r[c],g=t[c];if(s)var v=o?s(g,p,c,t,r,i):s(p,g,c,r,t,i);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!V0(t,function(A,b){if(!X0(h,b)&&(p===A||n(p,A,e,s,i)))return h.push(b)})){f=!1;break}}else if(!(p===g||n(p,g,e,s,i))){f=!1;break}}return i.delete(r),i.delete(t),f}function Ub(r,t,e,s,n,i,o){switch(e){case Hs:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Fu:return!(r.byteLength!=t.byteLength||!i(new Lu(r),new Lu(t)));case Ru:case Bu:case ju:return Xu(+r,+t);case Mu:return r.name==t.name&&r.message==t.message;case Pu:case Uu:return r==t+"";case Us:var a=Q0;case Fs:var l=s&Gs;if(a||(a=tb),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=Iu,o.set(r,t);var c=Zu(a(r),a(t),s,n,i,o);return o.delete(r),c;case C0:if(si)return si.call(r)==si.call(t)}return!1}function Fb(r,t,e,s,n,i){var o=e&Gs,a=_u(r),l=a.length,u=_u(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:Ot.call(t,h)))return!1}var p=i.get(r);if(p&&i.get(t))return p==t;var g=!0;i.set(r,t),i.set(t,r);for(var v=o;++f<l;){h=a[f];var A=r[h],b=t[h];if(s)var E=o?s(b,A,h,t,r,i):s(A,b,h,r,t,i);if(!(E===void 0?A===b||n(A,b,e,s,i):E)){g=!1;break}v||(v=h=="constructor")}if(g&&!v){var N=r.constructor,w=t.constructor;N!=w&&"constructor"in r&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof w=="function"&&w instanceof w)&&(g=!1)}return i.delete(r),i.delete(t),g}function _u(r){return Bb(r,Qb,zb)}function Zs(r,t){var e=r.__data__;return Kb(t)?e[typeof t=="string"?"string":"hash"]:e.map}function er(r,t){var e=Y0(r,t);return Db(e)?e:void 0}function Hb(r){var t=Ot.call(r,xe),e=r[xe];try{r[xe]=void 0;var s=!0}catch{}var n=Gu.call(r);return s&&(t?r[xe]=e:delete r[xe]),n}var zb=Ou?function(r){return r==null?[]:(r=Object(r),K0(Ou(r),function(t){return Vu.call(r,t)}))}:Jb,ne=qr;(oi&&ne(new oi(new ArrayBuffer(1)))!=Hs||Sr&&ne(new Sr)!=Us||ai&&ne(ai.resolve())!=Au||li&&ne(new li)!=Fs||ui&&ne(new ui)!=ii)&&(ne=function(r){var t=qr(r),e=t==Je?r.constructor:void 0,s=e?Ee(e):"";if(s)switch(s){case ab:return Hs;case lb:return Us;case ub:return Au;case cb:return Fs;case fb:return ii}return t});function $b(r,t){return t=t??ku,!!t&&(typeof r=="number"||z0.test(r))&&r>-1&&r%1==0&&r<t}function Kb(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}function Gb(r){return!!Tu&&Tu in r}function Vb(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Vs;return r===e}function Wb(r){return Gu.call(r)}function Ee(r){if(r!=null){try{return Ku.call(r)}catch{}try{return r+""}catch{}}return""}function Xu(r,t){return r===t||r!==r&&t!==t}var Zb=Cu(function(){return arguments}())?Cu:function(r){return Or(r)&&Ot.call(r,"callee")&&!Vu.call(r,"callee")},Ks=Array.isArray;function Xb(r){return r!=null&&Qu(r.length)&&!Yu(r)}var ci=ib||ty;function Yb(r,t){return Wu(r,t)}function Yu(r){if(!Ju(r))return!1;var t=qr(r);return t==Du||t==L0||t==S0||t==q0}function Qu(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ku}function Ju(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}function Or(r){return r!=null&&typeof r=="object"}var tc=wu?Z0(wu):jb;function Qb(r){return Xb(r)?Rb(r):Pb(r)}function Jb(){return[]}function ty(){return!1}tr.exports=Yb});var ec=Vt(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});var ey=ti(),ry=hi(),di;(function(r){function t(i={},o={},a=!1){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let l=ey(o);a||(l=Object.keys(l).reduce((u,c)=>(l[c]!=null&&(u[c]=l[c]),u),{}));for(let u in i)i[u]!==void 0&&o[u]===void 0&&(l[u]=i[u]);return Object.keys(l).length>0?l:void 0}r.compose=t;function e(i={},o={}){typeof i!="object"&&(i={}),typeof o!="object"&&(o={});let a=Object.keys(i).concat(Object.keys(o)).reduce((l,u)=>(ry(i[u],o[u])||(l[u]=o[u]===void 0?null:o[u]),l),{});return Object.keys(a).length>0?a:void 0}r.diff=e;function s(i={},o={}){i=i||{};let a=Object.keys(o).reduce((l,u)=>(o[u]!==i[u]&&i[u]!==void 0&&(l[u]=o[u]),l),{});return Object.keys(i).reduce((l,u)=>(i[u]!==o[u]&&o[u]===void 0&&(l[u]=null),l),a)}r.invert=s;function n(i,o,a=!1){if(typeof i!="object")return o;if(typeof o!="object")return;if(!a)return o;let l=Object.keys(o).reduce((u,c)=>(i[c]===void 0&&(u[c]=o[c]),u),{});return Object.keys(l).length>0?l:void 0}r.transform=n})(di||(di={}));pi.default=di});var bi=Vt(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});var mi;(function(r){function t(e){return typeof e.delete=="number"?e.delete:typeof e.retain=="number"?e.retain:typeof e.retain=="object"&&e.retain!==null?1:typeof e.insert=="string"?e.insert.length:1}r.length=t})(mi||(mi={}));gi.default=mi});var sc=Vt(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});var rc=bi(),yi=class{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);let e=this.ops[this.index];if(e){let s=this.offset,n=rc.default.length(e);if(t>=n-s?(t=n-s,this.index+=1,this.offset=0):this.offset+=t,typeof e.delete=="number")return{delete:t};{let i={};return e.attributes&&(i.attributes=e.attributes),typeof e.retain=="number"?i.retain=t:typeof e.retain=="object"&&e.retain!==null?i.retain=e.retain:typeof e.insert=="string"?i.insert=e.insert.substr(s,t):i.insert=e.insert,i}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?rc.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let t=this.ops[this.index];return t?typeof t.delete=="number"?"delete":typeof t.retain=="number"||typeof t.retain=="object"&&t.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let t=this.offset,e=this.index,s=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[s].concat(n)}}else return[]}};xi.default=yi});var lt=Vt((Ft,Ys)=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.AttributeMap=Ft.OpIterator=Ft.Op=void 0;var Xs=kl(),sy=ti(),vi=hi(),Ne=ec();Ft.AttributeMap=Ne.default;var Ut=bi();Ft.Op=Ut.default;var pt=sc();Ft.OpIterator=pt.default;var ny="\0",nc=(r,t)=>{if(typeof r!="object"||r===null)throw new Error(`cannot retain a ${typeof r}`);if(typeof t!="object"||t===null)throw new Error(`cannot retain a ${typeof t}`);let e=Object.keys(r)[0];if(!e||e!==Object.keys(t)[0])throw new Error(`embed types not matched: ${e} != ${Object.keys(t)[0]}`);return[e,r[e],t[e]]},Ht=class r{constructor(t){Array.isArray(t)?this.ops=t:t!=null&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){let e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}insert(t,e){let s={};return typeof t=="string"&&t.length===0?this:(s.insert=t,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(s.attributes=e),this.push(s))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if(typeof t=="number"&&t<=0)return this;let s={retain:t};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(s.attributes=e),this.push(s)}push(t){let e=this.ops.length,s=this.ops[e-1];if(t=sy(t),typeof s=="object"){if(typeof t.delete=="number"&&typeof s.delete=="number")return this.ops[e-1]={delete:s.delete+t.delete},this;if(typeof s.delete=="number"&&t.insert!=null&&(e-=1,s=this.ops[e-1],typeof s!="object"))return this.ops.unshift(t),this;if(vi(t.attributes,s.attributes)){if(typeof t.insert=="string"&&typeof s.insert=="string")return this.ops[e-1]={insert:s.insert+t.insert},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this;if(typeof t.retain=="number"&&typeof s.retain=="number")return this.ops[e-1]={retain:s.retain+t.retain},typeof t.attributes=="object"&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){let t=this.ops[this.ops.length-1];return t&&typeof t.retain=="number"&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){let e=[],s=[];return this.forEach(n=>{(t(n)?e:s).push(n)}),[e,s]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce((t,e)=>e.insert?t+Ut.default.length(e):e.delete?t-e.delete:t,0)}length(){return this.reduce((t,e)=>t+Ut.default.length(e),0)}slice(t=0,e=1/0){let s=[],n=new pt.default(this.ops),i=0;for(;i<e&&n.hasNext();){let o;i<t?o=n.next(t-i):(o=n.next(e-i),s.push(o)),i+=Ut.default.length(o)}return new r(s)}compose(t){let e=new pt.default(this.ops),s=new pt.default(t.ops),n=[],i=s.peek();if(i!=null&&typeof i.retain=="number"&&i.attributes==null){let a=i.retain;for(;e.peekType()==="insert"&&e.peekLength()<=a;)a-=e.peekLength(),n.push(e.next());i.retain-a>0&&s.next(i.retain-a)}let o=new r(n);for(;e.hasNext()||s.hasNext();)if(s.peekType()==="insert")o.push(s.next());else if(e.peekType()==="delete")o.push(e.next());else{let a=Math.min(e.peekLength(),s.peekLength()),l=e.next(a),u=s.next(a);if(u.retain){let c={};if(typeof l.retain=="number")c.retain=typeof u.retain=="number"?a:u.retain;else if(typeof u.retain=="number")l.retain==null?c.insert=l.insert:c.retain=l.retain;else{let h=l.retain==null?"insert":"retain",[p,g,v]=nc(l[h],u.retain),A=r.getHandler(p);c[h]={[p]:A.compose(g,v,h==="retain")}}let f=Ne.default.compose(l.attributes,u.attributes,typeof l.retain=="number");if(f&&(c.attributes=f),o.push(c),!s.hasNext()&&vi(o.ops[o.ops.length-1],c)){let h=new r(e.rest());return o.concat(h).chop()}}else typeof u.delete=="number"&&(typeof l.retain=="number"||typeof l.retain=="object"&&l.retain!==null)&&o.push(u)}return o.chop()}concat(t){let e=new r(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e}diff(t,e){if(this.ops===t.ops)return new r;let s=[this,t].map(l=>l.map(u=>{if(u.insert!=null)return typeof u.insert=="string"?u.insert:ny;let c=l===t?"on":"with";throw new Error("diff() called "+c+" non-document")}).join("")),n=new r,i=Xs(s[0],s[1],e,!0),o=new pt.default(this.ops),a=new pt.default(t.ops);return i.forEach(l=>{let u=l[1].length;for(;u>0;){let c=0;switch(l[0]){case Xs.INSERT:c=Math.min(a.peekLength(),u),n.push(a.next(c));break;case Xs.DELETE:c=Math.min(u,o.peekLength()),o.next(c),n.delete(c);break;case Xs.EQUAL:c=Math.min(o.peekLength(),a.peekLength(),u);let f=o.next(c),h=a.next(c);vi(f.insert,h.insert)?n.retain(c,Ne.default.diff(f.attributes,h.attributes)):n.push(h).delete(c);break}u-=c}}),n.chop()}eachLine(t,e=` 2`){let s=new pt.default(this.ops),n=new r,i=0;for(;s.hasNext();){if(s.peekType()!=="insert")return;let o=s.peek(),a=Ut.default.length(o)-s.peekLength(),l=typeof o.insert=="string"?o.insert.indexOf(e,a)-a:-1;if(l<0)n.push(s.next());else if(l>0)n.push(s.next(l));else{if(t(n,s.next(1).attributes||{},i)===!1)return;i+=1,n=new r}}n.length()>0&&t(n,{},i)}invert(t){let e=new r;return this.reduce((s,n)=>{if(n.insert)e.delete(Ut.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return e.retain(n.retain),s+n.retain;if(n.delete||typeof n.retain=="number"){let i=n.delete||n.retain;return t.slice(s,s+i).forEach(a=>{n.delete?e.push(a):n.retain&&n.attributes&&e.retain(Ut.default.length(a),Ne.default.invert(n.attributes,a.attributes))}),s+i}else if(typeof n.retain=="object"&&n.retain!==null){let i=t.slice(s,s+1),o=new pt.default(i.ops).next(),[a,l,u]=nc(n.retain,o.insert),c=r.getHandler(a);return e.retain({[a]:c.invert(l,u)},Ne.default.invert(n.attributes,o.attributes)),s+1}}return s},0),e.chop()}transform(t,e=!1){if(e=!!e,typeof t=="number")return this.transformPosition(t,e);let s=t,n=new pt.default(this.ops),i=new pt.default(s.ops),o=new r;for(;n.hasNext()||i.hasNext();)if(n.peekType()==="insert"&&(e||i.peekType()!=="insert"))o.retain(Ut.default.length(n.next()));else if(i.peekType()==="insert")o.push(i.next());else{let a=Math.min(n.peekLength(),i.peekLength()),l=n.next(a),u=i.next(a);if(l.delete)continue;if(u.delete)o.push(u);else{let c=l.retain,f=u.retain,h=typeof f=="object"&&f!==null?f:a;if(typeof c=="object"&&c!==null&&typeof f=="object"&&f!==null){let p=Object.keys(c)[0];if(p===Object.keys(f)[0]){let g=r.getHandler(p);g&&(h={[p]:g.transform(c[p],f[p],e)})}}o.retain(h,Ne.default.transform(l.attributes,u.attributes,e))}}return o.chop()}transformPosition(t,e=!1){e=!!e;let s=new pt.default(this.ops),n=0;for(;s.hasNext()&&n<=t;){let i=s.peekLength(),o=s.peekType();if(s.next(),o==="delete"){t-=Math.min(i,t-n);continue}else o==="insert"&&(n<t||!e)&&(t+=i);n+=i}return t}};Ht.Op=Ut.default;Ht.OpIterator=pt.default;Ht.AttributeMap=Ne.default;Ht.handlers={};Ft.default=Ht;typeof Ys=="object"&&(Ys.exports=Ht,Ys.exports.default=Ht)});var ac=Vt((G2,Ti)=>{"use strict";var iy=Object.prototype.hasOwnProperty,X="~";function _r(){}Object.create&&(_r.prototype=Object.create(null),new _r().__proto__||(X=!1));function oy(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function oc(r,t,e,s,n){if(typeof e!="function")throw new TypeError("The listener must be a function");var i=new oy(e,s||r,n),o=X?X+t:t;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],i]:r._events[o].push(i):(r._events[o]=i,r._eventsCount++),r}function Qs(r,t){--r._eventsCount===0?r._events=new _r:delete r._events[t]}function G(){this._events=new _r,this._eventsCount=0}G.prototype.eventNames=function(){var t=[],e,s;if(this._eventsCount===0)return t;for(s in e=this._events)iy.call(e,s)&&t.push(X?s.slice(1):s);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};G.prototype.listeners=function(t){var e=X?X+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,i=s.length,o=new Array(i);n<i;n++)o[n]=s[n].fn;return o};G.prototype.listenerCount=function(t){var e=X?X+t:t,s=this._events[e];return s?s.fn?1:s.length:0};G.prototype.emit=function(t,e,s,n,i,o){var a=X?X+t:t;if(!this._events[a])return!1;var l=this._events[a],u=arguments.length,c,f;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,s),!0;case 4:return l.fn.call(l.context,e,s,n),!0;case 5:return l.fn.call(l.context,e,s,n,i),!0;case 6:return l.fn.call(l.context,e,s,n,i,o),!0}for(f=1,c=new Array(u-1);f<u;f++)c[f-1]=arguments[f];l.fn.apply(l.context,c)}else{var h=l.length,p;for(f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),u){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,s);break;case 4:l[f].fn.call(l[f].context,e,s,n);break;default:if(!c)for(p=1,c=new Array(u-1);p<u;p++)c[p-1]=arguments[p];l[f].fn.apply(l[f].context,c)}}return!0};G.prototype.on=function(t,e,s){return oc(this,t,e,s,!1)};G.prototype.once=function(t,e,s){return oc(this,t,e,s,!0)};G.prototype.removeListener=function(t,e,s,n){var i=X?X+t:t;if(!this._events[i])return this;if(!e)return Qs(this,i),this;var o=this._events[i];if(o.fn)o.fn===e&&(!n||o.once)&&(!s||o.context===s)&&Qs(this,i);else{for(var a=0,l=[],u=o.length;a<u;a++)(o[a].fn!==e||n&&!o[a].once||s&&o[a].context!==s)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:Qs(this,i)}return this};G.prototype.removeAllListeners=function(t){var e;return t?(e=X?X+t:t,this._events[e]&&Qs(this,e)):(this._events=new _r,this._eventsCount=0),this};G.prototype.off=G.prototype.removeListener;G.prototype.addListener=G.prototype.on;G.prefixed=X;G.EventEmitter=G;typeof Ti<"u"&&(Ti.exports=G)});var uf=typeof global=="object"&&global&&global.Object===Object&&global,ss=uf;var cf=typeof self=="object"&&self&&self.Object===Object&&self,ff=ss||cf||Function("return this")(),D=ff;var hf=D.Symbol,ht=hf;var uo=Object.prototype,df=uo.hasOwnProperty,pf=uo.toString,hr=ht?ht.toStringTag:void 0;function mf(r){var t=df.call(r,hr),e=r[hr];try{r[hr]=void 0;var s=!0}catch{}var n=pf.call(r);return s&&(t?r[hr]=e:delete r[hr]),n}var co=mf;var gf=Object.prototype,bf=gf.toString;function yf(r){return bf.call(r)}var fo=yf;var xf="[object Null]",vf="[object Undefined]",ho=ht?ht.toStringTag:void 0;function Af(r){return r==null?r===void 0?vf:xf:ho&&ho in Object(r)?co(r):fo(r)}var At=Af;function Ef(r){return r!=null&&typeof r=="object"}var H=Ef;var Nf=Array.isArray,dt=Nf;function wf(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var z=wf;function Tf(r){return r}var ns=Tf;var Sf="[object AsyncFunction]",Lf="[object Function]",Of="[object GeneratorFunction]",qf="[object Proxy]";function Cf(r){if(!z(r))return!1;var t=At(r);return t==Lf||t==Of||t==Sf||t==qf}var Oe=Cf;var _f=D["__core-js_shared__"],is=_f;var po=function(){var r=/[^.]+$/.exec(is&&is.keys&&is.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function If(r){return!!po&&po in r}var mo=If;var kf=Function.prototype,Rf=kf.toString;function Bf(r){if(r!=null){try{return Rf.call(r)}catch{}try{return r+""}catch{}}return""}var _t=Bf;var Mf=/[\\^$.*+?()[\]{}|]/g,Df=/^\[object .+?Constructor\]$/,jf=Function.prototype,Pf=Object.prototype,Uf=jf.toString,Ff=Pf.hasOwnProperty,Hf=RegExp("^"+Uf.call(Ff).replace(Mf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zf(r){if(!z(r)||mo(r))return!1;var t=Oe(r)?Hf:Df;return t.test(_t(r))}var go=zf;function $f(r,t){return r?.[t]}var bo=$f;function Kf(r,t){var e=bo(r,t);return go(e)?e:void 0}var J=Kf;var Gf=J(D,"WeakMap"),os=Gf;var yo=Object.create,Vf=function(){function r(){}return function(t){if(!z(t))return{};if(yo)return yo(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),xo=Vf;function Wf(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var vo=Wf;function Zf(r,t){var e=-1,s=r.length;for(t||(t=Array(s));++e<s;)t[e]=r[e];return t}var as=Zf;var Xf=800,Yf=16,Qf=Date.now;function Jf(r){var t=0,e=0;return function(){var s=Qf(),n=Yf-(s-e);if(e=s,n>0){if(++t>=Xf)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var Ao=Jf;function th(r){return function(){return r}}var Eo=th;var eh=function(){try{var r=J(Object,"defineProperty");return r({},"",{}),r}catch{}}(),qe=eh;var rh=qe?function(r,t){return qe(r,"toString",{configurable:!0,enumerable:!1,value:Eo(t),writable:!0})}:ns,No=rh;var sh=Ao(No),wo=sh;function nh(r,t){for(var e=-1,s=r==null?0:r.length;++e<s&&t(r[e],e,r)!==!1;);return r}var To=nh;var ih=9007199254740991,oh=/^(?:0|[1-9]\d*)$/;function ah(r,t){var e=typeof r;return t=t??ih,!!t&&(e=="number"||e!="symbol"&&oh.test(r))&&r>-1&&r%1==0&&r<t}var ls=ah;function lh(r,t,e){t=="__proto__"&&qe?qe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var Ce=lh;function uh(r,t){return r===t||r!==r&&t!==t}var wt=uh;var ch=Object.prototype,fh=ch.hasOwnProperty;function hh(r,t,e){var s=r[t];(!(fh.call(r,t)&&wt(s,e))||e===void 0&&!(t in r))&&Ce(r,t,e)}var us=hh;function dh(r,t,e,s){var n=!e;e||(e={});for(var i=-1,o=t.length;++i<o;){var a=t[i],l=s?s(e[a],r[a],a,e,r):void 0;l===void 0&&(l=r[a]),n?Ce(e,a,l):us(e,a,l)}return e}var Tt=dh;var So=Math.max;function ph(r,t,e){return t=So(t===void 0?r.length-1:t,0),function(){for(var s=arguments,n=-1,i=So(s.length-t,0),o=Array(i);++n<i;)o[n]=s[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=s[n];return a[t]=e(o),vo(r,this,a)}}var Lo=ph;function mh(r,t){return wo(Lo(r,t,ns),r+"")}var Oo=mh;var gh=9007199254740991;function bh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=gh}var cs=bh;function yh(r){return r!=null&&cs(r.length)&&!Oe(r)}var Wt=yh;function xh(r,t,e){if(!z(e))return!1;var s=typeof t;return(s=="number"?Wt(e)&&ls(t,e.length):s=="string"&&t in e)?wt(e[t],r):!1}var qo=xh;function vh(r){return Oo(function(t,e){var s=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=r.length>3&&typeof i=="function"?(n--,i):void 0,o&&qo(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++s<n;){var a=e[s];a&&r(t,a,s,i)}return t})}var Co=vh;var Ah=Object.prototype;function Eh(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Ah;return r===e}var _e=Eh;function Nh(r,t){for(var e=-1,s=Array(r);++e<r;)s[e]=t(e);return s}var _o=Nh;var wh="[object Arguments]";function Th(r){return H(r)&&At(r)==wh}var Nn=Th;var Io=Object.prototype,Sh=Io.hasOwnProperty,Lh=Io.propertyIsEnumerable,Oh=Nn(function(){return arguments}())?Nn:function(r){return H(r)&&Sh.call(r,"callee")&&!Lh.call(r,"callee")},dr=Oh;function qh(){return!1}var ko=qh;var Mo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=Mo&&typeof module=="object"&&module&&!module.nodeType&&module,Ch=Ro&&Ro.exports===Mo,Bo=Ch?D.Buffer:void 0,_h=Bo?Bo.isBuffer:void 0,Ih=_h||ko,It=Ih;var kh="[object Arguments]",Rh="[object Array]",Bh="[object Boolean]",Mh="[object Date]",Dh="[object Error]",jh="[object Function]",Ph="[object Map]",Uh="[object Number]",Fh="[object Object]",Hh="[object RegExp]",zh="[object Set]",$h="[object String]",Kh="[object WeakMap]",Gh="[object ArrayBuffer]",Vh="[object DataView]",Wh="[object Float32Array]",Zh="[object Float64Array
2]",Xh="[object Int8Array]",Yh="[object Int16Array]",Qh="[object Int32Array]",Jh="[object Uint8Array]",td="[object Uint8ClampedArray]",ed="[object Uint16Array]",rd="[object Uint32Array]",q={};q[Wh]=q[Zh]=q[Xh]=q[Yh]=q[Qh]=q[Jh]=q[td]=q[ed]=q[rd]=!0;q[kh]=q[Rh]=q[Gh]=q[Bh]=q[Vh]=q[Mh]=q[Dh]=q[jh]=q[Ph]=q[Uh]=q[Fh]=q[Hh]=q[zh]=q[$h]=q[Kh]=!1;function sd(r){return H(r)&&cs(r.length)&&!!q[At(r)]}var Do=sd;function nd(r){return function(t){return r(t)}}var Ie=nd;var jo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pr=jo&&typeof module=="object"&&module&&!module.nodeType&&module,id=pr&&pr.exports===jo,wn=id&&ss.process,od=function(){try{var r=pr&&pr.require&&pr.require("util").types;return r||wn&&wn.binding&&wn.binding("util")}catch{}}(),kt=od;var Po=kt&&kt.isTypedArray,ad=Po?Ie(Po):Do,ke=ad;var ld=Object.prototype,ud=ld.hasOwnProperty;function cd(r,t){var e=dt(r),s=!e&&dr(r),n=!e&&!s&&It(r),i=!e&&!s&&!n&&ke(r),o=e||s||n||i,a=o?_o(r.length,String):[],l=a.length;for(var u in r)(t||ud.call(r,u))&&!(o&&(u=="length"||n&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ls(u,l)))&&a.push(u);return a}var fs=cd;function fd(r,t){return function(e){return r(t(e))}}var hs=fd;var hd=hs(Object.keys,Object),Uo=hd;var dd=Object.prototype,pd=dd.hasOwnProperty;function md(r){if(!_e(r))return Uo(r);var t=[];for(var e in Object(r))pd.call(r,e)&&e!="constructor"&&t.push(e);return t}var Fo=md;function gd(r){return Wt(r)?fs(r):Fo(r)}var Re=gd;function bd(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Ho=bd;var yd=Object.prototype,xd=yd.hasOwnProperty;function vd(r){if(!z(r))return Ho(r);var t=_e(r),e=[];for(var s in r)s=="constructor"&&(t||!xd.call(r,s))||e.push(s);return e}var zo=vd;function Ad(r){return Wt(r)?fs(r,!0):zo(r)}var St=Ad;var Ed=J(Object,"create"),Rt=Ed;function Nd(){this.__data__=Rt?Rt(null):{},this.size=0}var $o=Nd;function wd(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Ko=wd;var Td="__lodash_hash_undefined__",Sd=Object.prototype,Ld=Sd.hasOwnProperty;function Od(r){var t=this.__data__;if(Rt){var e=t[r];return e===Td?void 0:e}return Ld.call(t,r)?t[r]:void 0}var Go=Od;var qd=Object.prototype,Cd=qd.hasOwnProperty;function _d(r){var t=this.__data__;return Rt?t[r]!==void 0:Cd.call(t,r)}var Vo=_d;var Id="__lodash_hash_undefined__";function kd(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Rt&&t===void 0?Id:t,this}var Wo=kd;function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}Be.prototype.clear=$o;Be.prototype.delete=Ko;Be.prototype.get=Go;Be.prototype.has=Vo;Be.prototype.set=Wo;var Tn=Be;function Rd(){this.__data__=[],this.size=0}var Zo=Rd;function Bd(r,t){for(var e=r.length;e--;)if(wt(r[e][0],t))return e;return-1}var Zt=Bd;var Md=Array.prototype,Dd=Md.splice;function jd(r){var t=this.__data__,e=Zt(t,r);if(e<0)return!1;var s=t.length-1;return e==s?t.pop():Dd.call(t,e,1),--this.size,!0}var Xo=jd;function Pd(r){var t=this.__data__,e=Zt(t,r);return e<0?void 0:t[e][1]}var Yo=Pd;function Ud(r){return Zt(this.__data__,r)>-1}var Qo=Ud;function Fd(r,t){var e=this.__data__,s=Zt(e,r);return s<0?(++this.size,e.push([r,t])):e[s][1]=t,this}var Jo=Fd;function Me(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}Me.prototype.clear=Zo;Me.prototype.delete=Xo;Me.prototype.get=Yo;Me.prototype.has=Qo;Me.prototype.set=Jo;var Xt=Me;var Hd=J(D,"Map"),Yt=Hd;function zd(){this.size=0,this.__data__={hash:new Tn,map:new(Yt||Xt),string:new Tn}}var ta=zd;function $d(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var ea=$d;function Kd(r,t){var e=r.__data__;return ea(t)?e[typeof t=="string"?"string":"hash"]:e.map}var Qt=Kd;function Gd(r){var t=Qt(this,r).delete(r);return this.size-=t?1:0,t}var ra=Gd;function Vd(r){return Qt(this,r).get(r)}var sa=Vd;function Wd(r){return Qt(this,r).has(r)}var na=Wd;function Zd(r,t){var e=Qt(this,r),s=e.size;return e.set(r,t),this.size+=e.size==s?0:1,this}var ia=Zd;function De(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var s=r[t];this.set(s[0],s[1])}}De.prototype.clear=ta;De.prototype.delete=ra;De.prototype.get=sa;De.prototype.has=na;De.prototype.set=ia;var ds=De;function Xd(r,t){for(var e=-1,s=t.length,n=r.length;++e<s;)r[n+e]=t[e];return r}var ps=Xd;var Yd=hs(Object.getPrototypeOf,Object),je=Yd;var Qd="[object Object]",Jd=Function.prototype,tp=Object.prototype,oa=Jd.toString,ep=tp.hasOwnProperty,rp=oa.call(Object);function sp(r){if(!H(r)||At(r)!=Qd)return!1;var t=je(r);
vendor: 124,416 bytes, lines 2-49
2if(t===null)return!0;var e=ep.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&oa.call(e)==rp}var aa=sp;function np(){this.__data__=new Xt,this.size=0}var la=np;function ip(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var ua=ip;function op(r){return this.__data__.get(r)}var ca=op;function ap(r){return this.__data__.has(r)}var fa=ap;var lp=200;function up(r,t){var e=this.__data__;if(e instanceof Xt){var s=e.__data__;if(!Yt||s.length<lp-1)return s.push([r,t]),this.size=++e.size,this;e=this.__data__=new ds(s)}return e.set(r,t),this.size=e.size,this}var ha=up;function Pe(r){var t=this.__data__=new Xt(r);this.size=t.size}Pe.prototype.clear=la;Pe.prototype.delete=ua;Pe.prototype.get=ca;Pe.prototype.has=fa;Pe.prototype.set=ha;var Jt=Pe;function cp(r,t){return r&&Tt(t,Re(t),r)}var da=cp;function fp(r,t){return r&&Tt(t,St(t),r)}var pa=fp;var ya=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ma=ya&&typeof module=="object"&&module&&!module.nodeType&&module,hp=ma&&ma.exports===ya,ga=hp?D.Buffer:void 0,ba=ga?ga.allocUnsafe:void 0;function dp(r,t){if(t)return r.slice();var e=r.length,s=ba?ba(e):new r.constructor(e);return r.copy(s),s}var ms=dp;function pp(r,t){for(var e=-1,s=r==null?0:r.length,n=0,i=[];++e<s;){var o=r[e];t(o,e,r)&&(i[n++]=o)}return i}var xa=pp;function mp(){return[]}var gs=mp;var gp=Object.prototype,bp=gp.propertyIsEnumerable,va=Object.getOwnPropertySymbols,yp=va?function(r){return r==null?[]:(r=Object(r),xa(va(r),function(t){return bp.call(r,t)}))}:gs,Ue=yp;function xp(r,t){return Tt(r,Ue(r),t)}var Aa=xp;var vp=Object.getOwnPropertySymbols,Ap=vp?function(r){for(var t=[];r;)ps(t,Ue(r)),r=je(r);return t}:gs,bs=Ap;function Ep(r,t){return Tt(r,bs(r),t)}var Ea=Ep;function Np(r,t,e){var s=t(r);return dt(r)?s:ps(s,e(r))}var ys=Np;function wp(r){return ys(r,Re,Ue)}var mr=wp;function Tp(r){return ys(r,St,bs)}var Na=Tp;var Sp=J(D,"DataView"),xs=Sp;var Lp=J(D,"Promise"),vs=Lp;var Op=J(D,"Set"),As=Op;var wa="[object Map]",qp="[object Object]",Ta="[object Promise]",Sa="[object Set]",La="[object WeakMap]",Oa="[object DataView]",Cp=_t(xs),_p=_t(Yt),Ip=_t(vs),kp=_t(As),Rp=_t(os),de=At;(xs&&de(new xs(new ArrayBuffer(1)))!=Oa||Yt&&de(new Yt)!=wa||vs&&de(vs.resolve())!=Ta||As&&de(new As)!=Sa||os&&de(new os)!=La)&&(de=function(r){var t=At(r),e=t==qp?r.constructor:void 0,s=e?_t(e):"";if(s)switch(s){case Cp:return Oa;case _p:return wa;case Ip:return Ta;case kp:return Sa;case Rp:return La}return t});var Bt=de;var Bp=Object.prototype,Mp=Bp.hasOwnProperty;function Dp(r){var t=r.length,e=new r.constructor(t);return t&&typeof r[0]=="string"&&Mp.call(r,"index")&&(e.index=r.index,e.input=r.input),e}var qa=Dp;var jp=D.Uint8Array,Fe=jp;function Pp(r){var t=new r.constructor(r.byteLength);return new Fe(t).set(new Fe(r)),t}var He=Pp;function Up(r,t){var e=t?He(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}var Ca=Up;var Fp=/\w*$/;function Hp(r){var t=new r.constructor(r.source,Fp.exec(r));return t.lastIndex=r.lastIndex,t}var _a=Hp;var Ia=ht?ht.prototype:void 0,ka=Ia?Ia.valueOf:void 0;function zp(r){return ka?Object(ka.call(r)):{}}var Ra=zp;function $p(r,t){var e=t?He(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Es=$p;var Kp="[object Boolean]",Gp="[object Date]",Vp="[object Map]",Wp="[object Number]",Zp="[object RegExp]",Xp="[object Set]",Yp="[object String]",Qp="[object Symbol]",Jp="[object ArrayBuffer]",tm="[object DataView]",em="[object Float32Array]",rm="[object Float64Array]",sm="[object Int8Array]",nm="[object Int16Array]",im="[object Int32Array]",om="[object Uint8Array]",am="[object Uint8ClampedArray]",lm="[object Uint16Array]",um="[object Uint32Array]";function cm(r,t,e){var s=r.constructor;switch(t){case Jp:return He(r);case Kp:case Gp:return new s(+r);case tm:return Ca(r,e);case em:case rm:case sm:case nm:case im:case om:case am:case lm:case um:return Es(r,e);case Vp:return new s;case Wp:case Yp:return new s(r);case Zp:return _a(r);case Xp:return new s;case Qp:return Ra(r)}}var Ba=cm;function fm(r){return typeof r.constructor=="function"&&!_e(r)?xo(je(r)):{}}var Ns=fm;var hm="[object Map]";function dm(r){return H(r)&&Bt(r)==hm}var Ma=dm;var Da=kt&&kt.isMap,pm=Da?Ie(Da):Ma,ja=pm;var mm="[object Set]";function gm(r){return H(r)&&Bt(r)==mm}var Pa=gm;var Ua=kt&&kt.isSet,bm=Ua?Ie(Ua):Pa,Fa=bm;var ym=1,xm=2,vm=4,Ha="[object Arguments]",Am="[object Array]",Em="[object Boolean]",Nm="[object Date]",wm="[object Error]",za="[object Function]",Tm="[object GeneratorFunction]",Sm="[object Map]",Lm="[object Number]",$a="[object Object]",Om="[object RegExp]",qm="[object Set]",Cm="[object String]",_m="[object Symbol]",Im="[object WeakMap]",km="[object ArrayBuffer]",Rm="[object DataView]",Bm="[object Float32Array]",Mm="[object Float64Array]",Dm="[object Int8Array]",jm="[object Int16Array]",Pm="[object Int32Array]",Um="[object Uint8Array]",Fm="[object Uint8ClampedArray]",Hm="[object Uint16Array]",zm="[object Uint32Array]",L={};L[Ha]=L[Am]=L[km]=L[Rm]=L[Em]=L[Nm]=L[Bm]=L[Mm]=L[Dm]=L[jm]=L[Pm]=L[Sm]=L[Lm]=L[$a]=L[Om]=L[qm]=L[Cm]=L[_m]=L[Um]=L[Fm]=L[Hm]=L[zm]=!0;L[wm]=L[za]=L[Im]=!1;function ws(r,t,e,s,n,i){var o,a=t&ym,l=t&xm,u=t&vm;if(e&&(o=n?e(r,s,n,i):e(r)),o!==void 0)return o;if(!z(r))return r;var c=dt(r);if(c){if(o=qa(r),!a)return as(r,o)}else{var f=Bt(r),h=f==za||f==Tm;if(It(r))return ms(r,a);if(f==$a||f==Ha||h&&!n){if(o=l||h?{}:Ns(r),!a)return l?Ea(r,pa(o,r)):Aa(r,da(o,r))}else{if(!L[f])return n?r:{};o=Ba(r,f,a)}}i||(i=new Jt);var p=i.get(r);if(p)return p;i.set(r,o),Fa(r)?r.forEach(function(A){o.add(ws(A,t,e,A,r,i))}):ja(r)&&r.forEach(function(A,b){o.set(b,ws(A,t,e,b,r,i))});var g=u?l?Na:mr:l?St:Re,v=c?void 0:g(r);return To(v||r,function(A,b){v&&(b=A,A=r[b]),us(o,b,ws(A,t,e,b,r,i))}),o}var Ka=ws;var $m=1,Km=4;function Gm(r){return Ka(r,$m|Km)}var Lt=Gm;var Vm="__lodash_hash_undefined__";function Wm(r){return this.__data__.set(r,Vm),this}var Ga=Wm;function Zm(r){return this.__data__.has(r)}var Va=Zm;function Ts(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new ds;++t<e;)this.add(r[t])}Ts.prototype.add=Ts.prototype.push=Ga;Ts.prototype.has=Va;var Wa=Ts;function Xm(r,t){for(var e=-1,s=r==null?0:r.length;++e<s;)if(t(r[e],e,r))return!0;return!1}var Za=Xm;function Ym(r,t){return r.has(t)}var Xa=Ym;var Qm=1,Jm=2;function tg(r,t,e,s,n,i){var o=e&Qm,a=r.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var u=i.get(r),c=i.get(t);if(u&&c)return u==t&&c==r;var f=-1,h=!0,p=e&Jm?new Wa:void 0;for(i.set(r,t),i.set(t,r);++f<a;){var g=r[f],v=t[f];if(s)var A=o?s(v,g,f,t,r,i):s(g,v,f,r,t,i);if(A!==void 0){if(A)continue;h=!1;break}if(p){if(!Za(t,function(b,E){if(!Xa(p,E)&&(g===b||n(g,b,e,s,i)))return p.push(E)})){h=!1;break}}else if(!(g===v||n(g,v,e,s,i))){h=!1;break}}return i.delete(r),i.delete(t),h}var Ss=tg;function eg(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}var Ya=eg;function rg(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var Qa=rg;var sg=1,ng=2,ig="[object Boolean]",og="[object Date]",ag="[object Error]",lg="[object Map]",ug="[object Number]",cg="[object RegExp]",fg="[object Set]",hg="[object String]",dg="[object Symbol]",pg="[object ArrayBuffer]",mg="[object DataView]",Ja=ht?ht.prototype:void 0,Sn=Ja?Ja.valueOf:void 0;function gg(r,t,e,s,n,i,o){switch(e){case mg:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case pg:return!(r.byteLength!=t.byteLength||!i(new Fe(r),new Fe(t)));case ig:case og:case ug:return wt(+r,+t);case ag:return r.name==t.name&&r.message==t.message;case cg:case hg:return r==t+"";case lg:var a=Ya;case fg:var l=s&sg;if(a||(a=Qa),r.size!=t.size&&!l)return!1;var u=o.get(r);if(u)return u==t;s|=ng,o.set(r,t);var c=Ss(a(r),a(t),s,n,i,o);return o.delete(r),c;case dg:if(Sn)return Sn.call(r)==Sn.call(t)}return!1}var tl=gg;var bg=1,yg=Object.prototype,xg=yg.hasOwnProperty;function vg(r,t,e,s,n,i){var o=e&bg,a=mr(r),l=a.length,u=mr(t),c=u.length;if(l!=c&&!o)return!1;for(var f=l;f--;){var h=a[f];if(!(o?h in t:xg.call(t,h)))return!1}var p=i.get(r),g=i.get(t);if(p&&g)return p==t&&g==r;var v=!0;i.set(r,t),i.set(t,r);for(var A=o;++f<l;){h=a[f];var b=r[h],E=t[h];if(s)var N=o?s(E,b,h,t,r,i):s(b,E,h,r,t,i);if(!(N===void 0?b===E||n(b,E,e,s,i):N)){v=!1;break}A||(A=h=="constructor")}if(v&&!A){var w=r.constructor,T=t.constructor;w!=T&&"constructor"in r&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof T=="function"&&T instanceof T)&&(v=!1)}return i.delete(r),i.delete(t),v}var el=vg;var Ag=1,rl="[object Arguments]",sl="[object Array]",Ls="[object Object]",Eg=Object.prototype,nl=Eg.hasOwnProperty;function Ng(r,t,e,s,n,i){var o=dt(r),a=dt(t),l=o?sl:Bt(r),u=a?sl:Bt(t);l=l==rl?Ls:l,u=u==rl?Ls:u;var c=l==Ls,f=u==Ls,h=l==u;if(h&&It(r)){if(!It(t))return!1;o=!0,c=!1}if(h&&!c)return i||(i=new Jt),o||ke(r)?Ss(r,t,e,s,n,i):tl(r,t,l,e,s,n,i);if(!(e&Ag)){var p=c&&nl.call(r,"__wrapped__"),g=f&&nl.call(t,"__wrapped__");if(p||g){var v=p?r.value():r,A=g?t.value():t;return i||(i=new Jt),n(v,A,e,s,i)}}return h?(i||(i=new Jt),el(r,t,e,s,n,i)):!1}var il=Ng;function ol(r,t,e,s,n){return r===t?!0:r==null||t==null||!H(r)&&!H(t)?r!==r&&t!==t:il(r,t,e,s,ol,n)}var al=ol;function wg(r){return function(t,e,s){for(var n=-1,i=Object(t),o=s(t),a=o.length;a--;){var l=o[r?a:++n];if(e(i[l],l,i)===!1)break}return t}}var ll=wg;var Tg=ll(),ul=Tg;function Sg(r,t,e){(e!==void 0&&!wt(r[t],e)||e===void 0&&!(t in r))&&Ce(r,t,e)}var gr=Sg;function Lg(r){return H(r)&&Wt(r)}var cl=Lg;function Og(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var br=Og;function qg(r){return Tt(r,St(r))}var fl=qg;function Cg(r,t,e,s,n,i,o){var a=br(r,e),l=br(t,e),u=o.get(l);if(u){gr(r,e,u);return}var c=i?i(a,l,e+"",r,t,o):void 0,f=c===void 0;if(f){var h=dt(l),p=!h&&It(l),g=!h&&!p&&ke(l);c=l,h||p||g?dt(a)?c=a:cl(a)?c=as(a):p?(f=!1,c=ms(l,!0)):g?(f=!1,c=Es(l,!0)):c=[]:aa(l)||dr(l)?(c=a,dr(a)?c=fl(a):(!z(a)||Oe(a))&&(c=Ns(l))):f=!1}f&&(o.set(l,c),n(c,l,s,i,o),o.delete(l)),gr(r,e,c)}var hl=Cg;function dl(r,t,e,s,n){r!==t&&ul(t,function(i,o){if(n||(n=new Jt),z(i))hl(r,t,o,e,dl,s,n);else{var a=s?s(br(r,o),i,o+"",r,t,n):void 0;a===void 0&&(a=i),gr(r,o,a)}},St)}var pl=dl;function _g(r,t){return al(r,t)}var pe=_g;var Ig=Co(function(r,t,e){pl(r,t,e)}),tt=Ig;var vr={};lf(vr,{Attributor:()=>W,AttributorStore:()=>yr,BlockBlot:()=>me,ClassAttributor:()=>j,ContainerBlot:()=>Ve,EmbedBlot:()=>I,InlineBlot:()=>Os,LeafBlot:()=>P,ParentBlot:()=>et,Registry:()=>re,Scope:()=>y,ScrollBlot:()=>xr,StyleAttributor:()=>rt,TextBlot:()=>We});var y=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(y||{}),W=class{constructor(t,e,s={}){this.attrName=t,this.keyName=e;let n=y.TYPE&y.ATTRIBUTE;this.scope=s.scope!=null?s.scope&y.LEVEL|n:y.ATTRIBUTE,s.whitelist!=null&&(this.whitelist=s.whitelist)}static keys(t){return Array.from(t.attributes).map(e=>e.name)}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){let e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}},ee=class extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}},bl=class On{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let s=null;try{s=t.parentNode}catch{return null}return this.find(s,e)}return null}create(t,e,s){let n=this.query(e);if(n==null)throw new ee(`Unable to create ${e} blot`);let i=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:i.create(s),a=new i(t,o,s);return On.blots.set(a.domNode,a),a}find(t,e=!1){return On.find(t,e)}query(t,e=y.ANY){let s;return typeof t=="string"?s=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?s=this.types.text:typeof t=="number"?t&y.LEVEL&y.BLOCK?s=this.types.block:t&y.LEVEL&y.INLINE&&(s=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(n=>(s=this.classes[n],!!s)),s=s||this.tags[t.tagName]),s==null?null:"scope"in s&&e&y.LEVEL&s.scope&&e&y.TYPE&s.scope?s:null}register(...t){return t.map(e=>{let s="blotName"in e,n="attrName"in e;if(!s&&!n)throw new ee("Invalid definition");if(s&&e.blotName==="abstract")throw new ee("Cannot register abstract class");let i=s?e.blotName:n?e.attrName:void 0;return this.types[i]=e,n?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):s&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(o=>o.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(o=>{(this.tags[o]==null||e.className==null)&&(this.tags[o]=e)}))),e})}};bl.blots=new WeakMap;var re=bl;function ml(r,t){return(r.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}var qn=class extends W{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}remove(t){ml(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){let e=(ml(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}},j=qn;function Ln(r){let t=r.split("-"),e=t.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return t[0]+e}var Cn=class extends W{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[Ln(this.keyName)]=e,!0):!1}remove(t){t.style[Ln(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){let e=t.style[Ln(this.keyName)];return this.canAdd(t,e)?e:""}},rt=Cn,_n=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};let t=re.find(this.domNode);if(t==null)return;let e=W.keys(this.domNode),s=j.keys(this.domNode),n=rt.keys(this.domNode);e.concat(s).concat(n).forEach(i=>{let o=t.scroll.query(i,y.ATTRIBUTE);o instanceof W&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(e=>{let s=this.attributes[e].value(this.domNode);t.format(e,s)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t),{})}},yr=_n,yl=class{constructor(t,e){this.scroll=t,this.domNode=e,re.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new ee("Blot definition missing tagName");let e,s;return Array.isArray(this.tagName)?(typeof t=="string"?(s=t.toUpperCase(),parseInt(s,10).toString()===s&&(s=parseInt(s,10))):typeof t=="number"&&(s=t),typeof s=="number"?e=document.createElement(this.tagName[s-1]):s&&this.tagName.indexOf(s)>-1?e=document.createElement(s):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){let t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),re.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,s,n){let i=this.isolate(t,e);if(this.scroll.query(s,y.BLOT)!=null&&n)i.wrap(s,n);else if(this.scroll.query(s,y.ATTRIBUTE)!=null){let o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(s,n)}}insertAt(t,e,s){let n=s==null?this.scroll.create("text",e):this.scroll.create(e,s),i=this.split(t);this.parent.insertBefore(n,i||void 0)}isolate(t,e){let s=this.split(t);if(s==null)throw new Error("Attempt to isolate at end");return s.split(e),s}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){let s=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(s,this.next||void 0),this.remove()),s}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){let s=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(s,this.next||void 0),typeof s.appendChild!="function")throw new ee(`Cannot wrap ${t}`);return s.appendChild(this),s}};yl.blotName="abstract";var xl=yl,vl=class extends xl{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let s=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(s+=1),[this.parent.domNode,s]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};vl.scope=y.INLINE_BLOT;var kg=vl,P=kg,In=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){let e=t.slice(1);this.append(...e)}}at(t){let e=this.iterator(),s=e();for(;s&&t>0;)t-=1,s=e();return s}contains(t){let e=this.iterator(),s=e();for(;s;){if(s===t)return!0;s=e()}return!1}indexOf(t){let e=this.iterator(),s=e(),n=0;for(;s;){if(s===t)return n;n+=1,s=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,s=this.head;for(;s!=null;){if(s===t)return e;e+=s.length(),s=s.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{let e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){let s=this.iterator(),n=s();for(;n;){let i=n.length();if(t<i||e&&t===i&&(n.next==null||n.next.length()!==0))return[n,t];t-=i,n=s()}return[null,0]}forEach(t){let e=this.iterator(),s=e();for(;s;)t(s),s=e()}forEachAt(t,e,s){if(e<=0)return;let[n,i]=this.find(t),o=t-i,a=this.iterator(n),l=a();for(;l&&o<t+e;){let u=l.length();t>o?s(l,t-o,Math.min(e,o+u-t)):s(l,0,Math.min(u,t+e-o)),o+=u,l=a()}}map(t){return this.reduce((e,s)=>(e.push(t(s)),e),[])}reduce(t,e){let s=this.iterator(),n=s();for(;n;)e=t(e,n),n=s();return e}};function gl(r,t){let e=t.find(r);if(e)return e;try{return t.create(r)}catch{let s=t.create(y.INLINE);return Array.from(r.childNodes).forEach(n=>{s.domNode.appendChild(n)}),r.parentNode&&r.parentNode.replaceChild(s.domNode,r),s.attach(),s}}var Al=class te extends xl{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,te.uiClass&&this.uiNode.classList.add(te.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new In,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{let e=gl(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof ee)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(s,n,i)=>{s.deleteAt(n,i)})}descendant(t,e=0){let[s,n]=this.children.find(e);return t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t?[s,n]:s instanceof te?s.descendant(t,n):[null,-1]}descendants(t,e=0,s=Number.MAX_VALUE){let n=[],i=s;return this.children.forEachAt(e,s,(o,a,l)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&n.push(o),o instanceof te&&(n=n.concat(o.descendants(t,a,i))),i-=l}),n}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(s=>e instanceof s)||(e.statics.scope===y.BLOCK_BLOT?(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev),e.parent.unwrap(),t=!0):e instanceof te?e.unwrap():e.remove())})}formatAt(t,e,s,n){this.children.forEachAt(t,e,(i,o,a)=>{i.formatAt(o,a,s,n)})}insertAt(t,e,s){let[n,i]=this.children.find(t);if(n)n.insertAt(i,e,s);else{let o=s==null?this.scroll.create("text",e):this.scroll.create(e,s);this.appendChild(o)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let s=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(s=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==s)&&this.domNode.insertBefore(t.domNode,s),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(s=>{t.insertBefore(s,e)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,e=!1){let[s,n]=this.children.find(t,e),i=[[this,t]];return s instanceof te?i.concat(s.path(n,e)):(s!=null&&i.push([s,n]),i)}removeChild(t){this.children.remove(t)}replaceWith(t,e){let s=typeof t=="string"?this.scroll.create(t,e):t;return s instanceof te&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}let s=this.clone();return this.parent&&this.parent.insertBefore(s,this.next||void 0),this.children.forEachAt(t,this.length(),(n,i,o)=>{let a=n.split(i,e);a!=null&&s.appendChild(a)}),s}splitAfter(t){let e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){let s=[],n=[];t.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(s.push(...i.addedNodes),n.push(...i.removedNodes))}),n.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let o=this.scroll.find(i);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),s.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,o)=>i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let o=null;i.nextSibling!=null&&(o=this.scroll.find(i.nextSibling));let a=gl(i,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Al.uiClass="";var Rg=Al,et=Rg;function Bg(r,t){if(Object.keys(r).length!==Object.keys(t).length)return!1;for(let e in r)if(r[e]!==t[e])return!1;return!0}var ze=class $e extends et{static create(t){return super.create(t)}static formats(t,e){let s=e.query($e.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new yr(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(s=>{s instanceof $e||(s=s.wrap($e.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{let s=this.scroll.query(t,y.INLINE);if(s==null)return;s instanceof W?this.attributes.attribute(s,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){let t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.formats()[s]!=null||this.scroll.query(s,y.ATTRIBUTE)?this.isolate(t,e).format(s,n):super.formatAt(t,e,s,n)}optimize(t){super.optimize(t);let e=this.formats();if(Object.keys(e).length===0)return this.unwrap();let s=this.next;s instanceof $e&&s.prev===this&&Bg(e,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){let s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}wrap(t,e){let s=super.wrap(t,e);return s instanceof $e&&this.attributes.move(s),s}};ze.allowedChildren=[ze,P],ze.blotName="inline",ze.scope=y.INLINE_BLOT,ze.tagName="SPAN";var Mg=ze,Os=Mg,Ke=class kn extends et{static create(t){return super.create(t)}static formats(t,e){let s=e.query(kn.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new yr(this.domNode)}format(t,e){let s=this.scroll.query(t,y.BLOCK);s!=null&&(s instanceof W?this.attributes.attribute(s,e):t===this.statics.blotName&&!e?this.replaceWith(kn.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){let t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.scroll.query(s,y.BLOCK)!=null?this.format(s,n):super.formatAt(t,e,s,n)}insertAt(t,e,s){if(s==null||this.scroll.query(e,y.INLINE)!=null)super.insertAt(t,e,s);else{let n=this.split(t);if(n!=null){let i=this.scroll.create(e,s);n.parent.insertBefore(i,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){let s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}};Ke.blotName="block",Ke.scope=y.BLOCK_BLOT,Ke.tagName="P",Ke.allowedChildren=[Os,Ke,P];var Dg=Ke,me=Dg,Rn=class extends et{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.enforceAllowedChildren()}insertAt(t,e,s){super.insertAt(t,e,s),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Rn.blotName="container",Rn.scope=y.BLOCK_BLOT;var jg=Rn,Ve=jg,Bn=class extends P{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,s,n){t===0&&e===this.length()?this.format(s,n):super.formatAt(t,e,s,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},I=Bn,Pg={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Ug=100,Ge=class extends et{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(s=>{this.update(s)}),this.observer.observe(this.domNode,Pg),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){let s=this.registry.find(t,e);return s?s.scroll===this?s:e?this.find(s.scroll.domNode.parentNode,!0):null:null}query(t,e=y.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach(s=>{s.remove()}):super.deleteAt(t,e)}formatAt(t,e,s,n){this.update(),super.formatAt(t,e,s,n)}insertAt(t,e,s){this.update(),super.insertAt(t,e,s)}optimize(t=[],e={}){super.optimize(e);let s=e.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());let i=(l,u=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(s.has(l.domNode)||s.set(l.domNode,[]),u&&i(l.parent))},o=l=>{s.has(l.domNode)&&(l instanceof et&&l.children.forEach(o),s.delete(l.domNode),l.optimize(e))},a=t;for(let l=0;a.length>0;l+=1){if(l>=Ug)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(u=>{let c=this.find(u.target,!0);c!=null&&(c.domNode===u.target&&(u.type==="childList"?(i(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{let h=this.find(f,!1);i(h,!1),h instanceof et&&h.children.forEach(p=>{i(p,!1)})})):u.type==="attributes"&&i(c.prev)),i(c))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),n=a.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();let s=new WeakMap;t.map(n=>{let i=this.find(n.target,!0);return i==null?null:s.has(i.domNode)?(s.get(i.domNode).push(n),null):(s.set(i.domNode,[n]),i)}).forEach(n=>{n!=null&&n!==this&&s.has(n.domNode)&&n.update(s.get(n.domNode)||[],e)}),e.mutationsMap=s,s.has(this.domNode)&&super.update(s.get(this.domNode),e),this.optimize(t,e)}};Ge.blotName="scroll",Ge.defaultChild=me,Ge.allowedChildren=[me,Ve],Ge.scope=y.BLOCK_BLOT,Ge.tagName="DIV";var Fg=Ge,xr=Fg,Mn=class El extends P{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,s){s==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,s)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof El&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}let s=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(s,this.next||void 0),this.text=this.statics.value(this.domNode),s}update(t,e){t.some(s=>s.type==="characterData"&&s.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Mn.blotName="text",Mn.scope=y.INLINE_BLOT;var Hg=Mn,We=Hg;var ae=ot(lt(),1);var k=ot(lt(),1);var Ei=ot(lt(),1);var Cr=class extends I{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};Cr.blotName="break";Cr.tagName="BR";var $=Cr;var B=class extends We{};function we(r){return r.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var qt=class qt extends Os{static compare(t,e){let s=qt.order.indexOf(t),n=qt.order.indexOf(e);return s>=0||n>=0?s-n:t===e?0:t<e?-1:1}formatAt(t,e,s,n){if(qt.compare(this.statics.blotName,s)<0&&this.scroll.query(s,y.BLOT)){let i=this.isolate(t,e);n&&i.wrap(s,n)}else super.formatAt(t,e,s,n)}optimize(t){if(super.optimize(t),this.parent instanceof qt&&qt.compare(this.statics.blotName,this.parent.statics.blotName)>0){let e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}};m(qt,"allowedChildren",[qt,$,I,B]),m(qt,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var Ai=qt,K=Ai;var ic=1,S=class extends me{constructor(){super(...arguments);m(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Ni(this)),this.cache.delta}deleteAt(e,s){super.deleteAt(e,s),this.cache={}}formatAt(e,s,n,i){s<=0||(this.scroll.query(n,y.BLOCK)?e+s===this.length()&&this.format(n,i):super.formatAt(e,Math.min(s,this.length()-e-1),n,i),this.cache={})}insertAt(e,s,n){if(n!=null){super.insertAt(e,s,n),this.cache={};return}if(s.length===0)return;let i=s.split(` 3`),o=i.shift();o.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((l,u)=>(a=a.split(l,!0),a.insertAt(0,u),u.length),e+o.length)}insertBefore(e,s){let{head:n}=this.children;super.insertBefore(e,s),n instanceof $&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+ic),this.cache.length}moveChildren(e,s){super.moveChildren(e,s),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(s&&(e===0||e>=this.length()-ic)){let i=this.clone();return e===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}let n=super.split(e,s);return this.cache={},n}};S.blotName="block";S.tagName="P";S.defaultChild=$;S.allowedChildren=[$,K,I,B];var F=class extends I{attach(){super.attach(),this.attributes=new yr(this.domNode)}delta(){return new Ei.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){let s=this.scroll.query(t,y.BLOCK_ATTRIBUTE);s!=null&&this.attributes.attribute(s,e)}formatAt(t,e,s,n){this.format(s,n)}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s);return}let n=e.split(` 4`),i=n.pop(),o=n.map(l=>{let u=this.scroll.create(S.blotName);return u.insertAt(0,l),u}),a=this.split(t);o.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}};F.scope=y.BLOCK_BLOT;function Ni(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(P).reduce((e,s)=>s.length()===0?e:e.insert(s.value(),st(s,{},t)),new Ei.default).insert(` 5`,st(r))}function st(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(t={...t,...r.formats()},e&&delete t["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?t:st(r.parent,t,e)}var mt=class mt extends I{static value(){}constructor(t,e,s){super(t,e),this.selection=s,this.textNode=document.createTextNode(mt.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let s=this,n=0;for(;s!=null&&s.statics.scope!==y.BLOCK_BLOT;)n+=s.offset(s.parent),s=s.parent;s!=null&&(this.savedLength=mt.CONTENTS.length,s.optimize(),s.formatAt(n,mt.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let e=this.prev instanceof B?this.prev:null,s=e?e.length():0,n=this.next instanceof B?this.next:null,i=n?n.text:"",{textNode:o}=this,a=o.data.split(mt.CONTENTS).join("");o.data=mt.CONTENTS;let l;if(e)l=e,(a||n)&&(e.insertAt(e.length(),a+i),n&&n.remove());else if(n)l=n,n.insertAt(0,a);else{let u=document.createTextNode(a);l=this.scroll.create(u),this.parent.insertBefore(l,this)}if(this.remove(),t){let u=(h,p)=>e&&h===e.domNode?p:h===o?s+p-1:n&&h===n.domNode?s+a.length+p:null,c=u(t.start.node,t.start.offset),f=u(t.end.node,t.end.offset);if(c!==null&&f!==null)return{startNode:l.domNode,startOffset:c,endNode:l.domNode,endOffset:f}}return null}update(t,e){if(t.some(s=>s.type==="characterData"&&s.target===this.textNode)){let s=this.restore();s&&(e.range=s)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=mt.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}};m(mt,"blotName","cursor"),m(mt,"className","ql-cursor"),m(mt,"tagName","span"),m(mt,"CONTENTS","\uFEFF");var wi=mt,oe=wi;var Si=ot(ac(),1);var Ir=new WeakMap;var Li=["error","warn","log","info"],Oi="warn";function lc(r){if(Oi&&Li.indexOf(r)<=Li.indexOf(Oi)){for(var t=arguments.length,e=new Array(t>1?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];console[r](...e)}}function qi(r){return Li.reduce((t,e)=>(t[e]=lc.bind(console,e,r),t),{})}qi.level=r=>{Oi=r};lc.level=qi.level;var ut=qi;var Ci=ut("quill:events"),ay=["selectionchange","mousedown","mouseup","click"];ay.forEach(r=>{document.addEventListener(r,function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let i=Ir.get(n);i&&i.emitter&&i.emitter.handleDOM(...e)})})});var kr=class extends Si.default{constructor(){super(),this.domListeners={},this.on("error",Ci.error)}emit(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return Ci.log.call(Ci,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];(this.domListeners[t.type]||[]).forEach(i=>{let{node:o,handler:a}=i;(t.target===o||o.contains(t.target))&&a(t,...s)})}listenDOM(t,e,s){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:s})}};m(kr,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),m(kr,"sources",{API:"api",SILENT:"silent",USER:"user"});var x=kr;var _i=ut("quill:selection"),Y=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}},ki=class{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Y(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,x.sources.USER),1)}),this.emitter.on(x.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(x.events.SCROLL_UPDATE,(n,i)=>{try{this.root.contains(s.start.node)&&this.root.contains(s.end.node)&&this.setNativeRange(s.start.node,s.start.offset,s.end.node,s.end.offset);let o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?x.sources.SILENT:n)}catch{}})}),this.emitter.on(x.events.SCROLL_OPTIMIZE,(s,n)=>{if(n.range){let{startNode:i,startOffset:o,endNode:a,endOffset:l}=n.range;this.setNativeRange(i,o,a,l),this.update(x.sources.SILENT)}}),this.update(x.sources.SILENT)}handleComposition(){this.emitter.on(x.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(x.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(x.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();let s=this.getNativeRange();if(!(s==null||!s.native.collapsed||this.scroll.query(t,y.BLOCK))){if(s.start.node!==this.cursor.textNode){let n=this.scroll.find(s.start.node,!1);if(n==null)return;if(n instanceof P){let i=n.split(s.start.offset);n.parent.insertBefore(this.cursor,i)}else n.insertBefore(this.cursor,s.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=this.scroll.length();t=Math.min(t,s-1),e=Math.min(t+e,s-1)-t;let n,[i,o]=this.scroll.leaf(t);if(i==null)return null;if(e>0&&o===i.length()){let[c]=this.scroll.leaf(t+1);if(c){let[f]=this.scroll.line(t),[h]=this.scroll.line(t+1);f===h&&(i=c,o=0)}}[n,o]=i.position(o,!0);let a=document.createRange();if(e>0)return a.setStart(n,o),[i,o]=this.scroll.leaf(t+e),i==null?null:([n,o]=i.position(o,!0),a.setEnd(n,o),a.getBoundingClientRect());let l="left",u;if(n instanceof Text){if(!n.data.length)return null;o<n.data.length?(a.setStart(n,o),a.setEnd(n,o+1)):(a.setStart(n,o-1),a.setEnd(n,o),l="right"),u=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;u=i.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:u.top+u.height,height:u.height,left:u[l],right:u[l],top:u.top,width:0}}getNativeRange(){let t=document.getSelection();if(t==null||t.rangeCount<=0)return null;let e=t.getRangeAt(0);if(e==null)return null;let s=this.normalizeNative(e);return _i.info("getNativeRange",s),s}getRange(){let t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];let e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Ii(this.root,document.activeElement)}normalizedToRange(t){let e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);let s=e.map(o=>{let[a,l]=o,u=this.scroll.find(a,!0),c=u.offset(this.scroll);return l===0?c:u instanceof P?c+u.index(a,l):c+u.length()}),n=Math.min(Math.max(...s),this.scroll.length()-1),i=Math.min(n,...s);return new Y(i,n-i)}normalizeNative(t){if(!Ii(this.root,t.startContainer)||!t.collapsed&&!Ii(this.root,t.endContainer))return null;let e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(s=>{let{node:n,offset:i}=s;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>i)n=n.childNodes[i],i=0;else if(n.childNodes.length===i)n=n.lastChild,n instanceof Text?i=n.data.length:n.childNodes.length>0?i=n.childNodes.length:i=n.childNodes.length+1;else break;s.node=n,s.offset=i}),e}rangeToNative(t){let e=this.scroll.length(),s=(n,i)=>{n=Math.min(e-1,n);let[o,a]=this.scroll.leaf(n);return o?o.position(a,i):[null,-1]};return[...s(t.index,!1),...s(t.index+t.length,!0)]}setNativeRange(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(_i.info("setNativeRange",t,e,s,n),t!=null&&(this.root.parentNode==null||t.parentNode==null||s.parentNode==null))return;let o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:a}=this.getNativeRange()||{};if(a==null||i||t!==a.startContainer||e!==a.startOffset||s!==a.endContainer||n!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),s instanceof Element&&s.tagName==="BR"&&(n=Array.from(s.parentNode.childNodes).indexOf(s),s=s.parentNode);let l=document.createRange();l.setStart(t,e),l.setEnd(s,n),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.sources.API;if(typeof e=="string"&&(s=e,e=!1),_i.info("setRange",t),t!=null){let n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(s)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.sources.USER,e=this.lastRange,[s,n]=this.getRange();if(this.lastRange=s,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!pe(e,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}let i=[x.events.SELECTION_CHANGE,Lt(this.lastRange),Lt(e),t];this.emitter.emit(x.events.EDITOR_CHANGE,...i),t!==x.sources.SILENT&&this.emitter.emit(...i)}}};function Ii(r,t){try{t.parentNode}catch{return!1}return r.contains(t)}var uc=ki;var ly=/^[ -~]*$/,Bi=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();let s=cc(t),n=new k.default;return cy(s.ops.slice()).reduce((o,a)=>{let l=k.Op.length(a),u=a.attributes||{},c=!1,f=!1;if(a.insert!=null){if(n.retain(l),typeof a.insert=="string"){let g=a.insert;f=!g.endsWith(` 6`)&&(e<=o||!!this.scroll.descendant(F,o)[0]),this.scroll.insertAt(o,g);let[v,A]=this.scroll.line(o),b=tt({},st(v));if(v instanceof S){let[E]=v.descendant(P,A);E&&(b=tt(b,st(E)))}u=k.AttributeMap.diff(b,u)||{}}else if(typeof a.insert=="object"){let g=Object.keys(a.insert)[0];if(g==null)return o;let v=this.scroll.query(g,y.INLINE)!=null;if(v)(e<=o||this.scroll.descendant(F,o)[0])&&(f=!0);else if(o>0){let[A,b]=this.scroll.descendant(P,o-1);A instanceof B?A.value()[b]!==` 7`&&(c=!0):A instanceof I&&A.statics.scope===y.INLINE_BLOT&&(c=!0)}if(this.scroll.insertAt(o,g,a.insert[g]),v){let[A]=this.scroll.descendant(P,o);if(A){let b=tt({},st(A));u=k.AttributeMap.diff(b,u)||{}}}}e+=l}else if(n.push(a),a.retain!==null&&typeof a.retain=="object"){let g=Object.keys(a.retain)[0];if(g==null)return o;this.scroll.updateEmbedAt(o,g,a.retain[g])}Object.keys(u).forEach(g=>{this.scroll.formatAt(o,l,g,u[g])});let h=c?1:0,p=f?1:0;return e+=h+p,n.retain(h),n.delete(p),o+l+h+p},0),n.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+k.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(s)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new k.default().retain(t).delete(e))}formatLine(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(s).forEach(i=>{this.scroll.lines(t,Math.max(e,1)).forEach(o=>{o.format(i,s[i])})}),this.scroll.optimize();let n=new k.default().retain(t).retain(e,Lt(s));return this.update(n)}formatText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(s).forEach(i=>{this.scroll.formatAt(t,e,i,s[i])});let n=new k.default().retain(t).retain(e,Lt(s));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new k.default)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],n=[];e===0?this.scroll.path(t).forEach(a=>{let[l]=a;l instanceof S?s.push(l):l instanceof P&&n.push(l)}):(s=this.scroll.lines(t,e),n=this.scroll.descendants(P,t,e));let[i,o]=[s,n].map(a=>{let l=a.shift();if(l==null)return{};let u=st(l);for(;Object.keys(u).length>0;){let c=a.shift();if(c==null)return u;u=uy(st(c),u)}return u});return{...i,...o}}getHTML(t,e){let[s,n]=this.scroll.line(t);if(s){let i=s.length();return s.length()>=n+e&&!(n===0&&e===i)?Rr(s,n,e,!0):Rr(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(s=>typeof s.insert=="string").map(s=>s.insert).join("")}insertContents(t,e){let s=cc(e),n=new k.default().retain(t).concat(s);return this.scroll.insertContents(t,s),this.update(n)}insertEmbed(t,e,s){return this.scroll.insertAt(t,e,s),this.update(new k.default().retain(t).insert({[e]:s}))}insertText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,` 8`).replace(/\r/g,` 9`),this.scroll.insertAt(t,e),Object.keys(s).forEach(n=>{this.scroll.formatAt(t,e.length,n,s[n])}),this.update(new k.default().retain(t).insert(e,Lt(s)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let t=this.scroll.children.head;if(t?.statics.blotName!==S.blotName)return!1;let e=t;return e.children.length>1?!1:e.children.head instanceof $}removeFormat(t,e){let s=this.getText(t,e),[n,i]=this.scroll.line(t+e),o=0,a=new k.default;n!=null&&(o=n.length()-i,a=n.delta().slice(i,i+o-1).insert(` 10`));let u=this.getContents(t,e+o).diff(new k.default().insert(s).concat(a)),c=new k.default().retain(t).concat(u);return this.applyDelta(c)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(ly)&&this.scroll.find(e[0].target)){let i=this.scroll.find(e[0].target),o=st(i),a=i.offset(this.scroll),l=e[0].oldValue.replace(oe.CONTENTS,""),u=new k.default().insert(l),c=new k.default().insert(i.value()),f=s&&{oldRange:fc(s.oldRange,-a),newRange:fc(s.newRange,-a)};t=new k.default().retain(a).concat(u.diff(c,f)).reduce((p,g)=>g.insert?p.insert(g.insert,o):p.push(g),new k.default),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!pe(n.compose(t),this.delta))&&(t=n.diff(this.delta,s));return t}};function rr(r,t,e){if(r.length===0){let[p]=Ri(e.pop());return t<=0?`</li></${p}>`:`</li></${p}>${rr([],t-1,e)}`}let[{child:s,offset:n,length:i,indent:o,type:a},...l]=r,[u,c]=Ri(a);if(o>t)return e.push(a),o===t+1?`<${u}><li${c}>${Rr(s,n,i)}${rr(l,o,e)}`:`<${u}><li>${rr(r,t+1,e)}`;let f=e[e.length-1];if(o===t&&a===f)return`</li><li${c}>${Rr(s,n,i)}${rr(l,o,e)}`;let[h]=Ri(e.pop());return`</li></${h}>${rr(r,t-1,e)}`}function Rr(r,t,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(t,e);if(r instanceof B)return we(r.value().slice(t,t+e));if(r instanceof et){if(r.statics.blotName==="list-container"){let u=[];return r.children.forEachAt(t,e,(c,f,h)=>{let p="formats"in c&&typeof c.formats=="function"?c.formats():{};u.push({child:c,offset:f,length:h,indent:p.indent||0,type:p.list})}),rr(u,-1,[])}let n=[];if(r.children.forEachAt(t,e,(u,c,f)=>{n.push(Rr(u,c,f))}),s||r.statics.blotName==="list")return n.join("");let{outerHTML:i,innerHTML:o}=r.domNode,[a,l]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${l}`:`${a}>${n.join("")}<${l}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function uy(r,t){return Object.keys(t).reduce((e,s)=>{if(r[s]==null)return e;let n=t[s];return n===r[s]?e[s]=n:Array.isArray(n)?n.indexOf(r[s])<0?e[s]=n.concat([r[s]]):e[s]=n:e[s]=[n,r[s]],e},{})}function Ri(r){let t=r==="ordered"?"ol":"ul";switch(r){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function cc(r){return r.reduce((t,e)=>{if(typeof e.insert=="string"){let s=e.insert.replace(/\r\n/g,` 11`).replace(/\r/g,` 12`);return t.insert(s,e.attributes)}return t.push(e)},new k.default)}function fc(r,t){let{index:e,length:s}=r;return new Y(e+t,s)}function cy(r){let t=[];return r.forEach(e=>{typeof e.insert=="string"?e.insert.split(` 13`).forEach((n,i)=>{i&&t.push({insert:` 14`,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}var hc=Bi;var Js=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}};m(Js,"DEFAULTS",{});var R=Js;var tn="\uFEFF",Mi=class extends I{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(s=>{this.contentNode.appendChild(s)}),this.leftGuard=document.createTextNode(tn),this.rightGuard=document.createTextNode(tn),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,s,n=t.data.split(tn).join("");if(t===this.leftGuard)if(this.prev instanceof B){let i=this.prev.length();this.prev.insertAt(i,n),e={startNode:this.prev.domNode,startOffset:i+n.length}}else s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this),e={startNode:s,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof B?(this.next.insertAt(0,n),e={startNode:this.next.domNode,startOffset:n.length}):(s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this.next),e={startNode:s,startOffset:n.length}));return t.data=tn,e}update(t,e){t.forEach(s=>{if(s.type==="characterData"&&(s.target===this.leftGuard||s.target===this.rightGuard)){let n=this.restore(s.target);n&&(e.range=n)}})}},sr=Mi;var Di=class{constructor(t,e){m(this,"isComposing",!1);this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){let e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof sr)&&(this.emitter.emit(x.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(x.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(x.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(x.events.COMPOSITION_END,t),this.isComposing=!1}},dc=Di;var Br=class Br{constructor(t,e){m(this,"modules",{});this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){let e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}};m(Br,"DEFAULTS",{modules:{}}),m(Br,"themes",{default:Br});var ji=Br,nr=ji;var fy=r=>r.parentElement||r.getRootNode().host||null,hy=r=>{let t=r.getBoundingClientRect(),e="offsetWidth"in r&&Math.abs(t.width)/r.offsetWidth||1,s="offsetHeight"in r&&Math.abs(t.height)/r.offsetHeight||1;return{top:t.top,right:t.left+r.clientWidth*e,bottom:t.top+r.clientHeight*s,left:t.left}},en=r=>{let t=parseInt(r,10);return Number.isNaN(t)?0:t},pc=(r,t,e,s,n,i)=>r<e&&t>s?0:r<e?-(e-r+n):t>s?t-r>s-e?r+n-e:t-s+i:0,dy=(r,t)=>{let e=r.ownerDocument,s=t,n=r;for(;n;){let i=n===e.body,o=i?{top:0,right:window.visualViewport?.width??e.documentElement.clientWidth,bottom:window.visualViewport?.height??e.documentElement.clientHeight,left:0}:hy(n),a=getComputedStyle(n),l=pc(s.left,s.right,o.left,o.right,en(a.scrollPaddingLeft),en(a.scrollPaddingRight)),u=pc(s.top,s.bottom,o.top,o.bottom,en(a.scrollPaddingTop),en(a.scrollPaddingBottom));if(l||u)if(i)e.defaultView?.scrollBy(l,u);else{let{scrollLeft:c,scrollTop:f}=n;u&&(n.scrollTop+=u),l&&(n.scrollLeft+=l);let h=n.scrollLeft-c,p=n.scrollTop-f;s={left:s.left-h,top:s.top-p,right:s.right-h,bottom:s.bottom-p}}n=i||a.position==="fixed"?null:fy(n)}},mc=dy;var py=100,my=["block","break","cursor","inline","scroll","text"],gy=(r,t,e)=>{let s=new re;return my.forEach(n=>{let i=t.query(n);i&&s.register(i)}),r.forEach(n=>{let i=t.query(n);i||e.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(s.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>py){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),s},gc=gy;var ir=ut("quill"),rn=new re;et.uiClass="ql-ui";var Nt=class Nt{static debug(t){t===!0&&(t="log"),ut.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ir.get(t)||rn.find(t,e)}static import(t){return this.imports[t]==null&&ir.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),s="attrName"in t?t.attrName:t.blotName;typeof s=="string"?this.register(`formats/${s}`,t,e):Object.keys(t).forEach(n=>{this.register(n,t[n],e)})}else{let t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],s=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!s&&ir.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&rn.register(e),typeof e.register=="function"&&e.register(rn)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=by(t,e),this.container=this.options.container,this.container==null){ir.error("Invalid Quill container",t);return}this.options.debug&&Nt.debug(this.options.debug);let s=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Ir.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new x;let n=xr.blotName,i=this.options.registry.query(n);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new hc(this.scroll),this.selection=new uc(this.scroll,this.emitter),this.composition=new dc(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(x.events.EDITOR_CHANGE,o=>{o===x.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(x.events.SCROLL_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;Et.call(this,()=>this.editor.update(null,a,c),o)}),this.emitter.on(x.events.SCROLL_EMBED_UPDATE,(o,a)=>{let l=this.selection.lastRange,[u]=this.selection.getRange(),c=l&&u?{oldRange:l,newRange:u}:void 0;Et.call(this,()=>{let f=new ae.default().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(f,[],c)},Nt.sources.USER)}),s){let o=this.clipboard.convert({html:`${s}<p><br></p>`,text:` 15`});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){let s=t;t=document.createElement("div"),t.classList.add(s)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,s){return[t,e,,s]=zt(t,e,s),Et.call(this,()=>this.editor.deleteText(t,e),s,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;let e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.sources.API;return Et.call(this,()=>{let n=this.getSelection(!0),i=new ae.default;if(n==null)return i;if(this.scroll.query(t,y.BLOCK))i=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(n.length===0)return this.selection.format(t,e),i;i=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,x.sources.SILENT),i},s)}formatLine(t,e,s,n,i){let o;return[t,e,o,i]=zt(t,e,s,n,i),Et.call(this,()=>this.editor.formatLine(t,e,o),i,t,0)}formatText(t,e,s,n,i){let o;return[t,e,o,i]=zt(t,e,s,n,i),Et.call(this,()=>this.editor.formatText(t,e,o),i,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=null;if(typeof t=="number"?s=this.selection.getBounds(t,e):s=this.selection.getBounds(t.index,t.length),!s)return null;let n=this.container.getBoundingClientRect();return{bottom:s.bottom-n.top,height:s.height,left:s.left-n.left,right:s.right-n.left,top:s.top-n.top,width:s.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=zt(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=zt(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=zt(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,s){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Nt.sources.API;return Et.call(this,()=>this.editor.insertEmbed(t,e,s),n,t)}insertText(t,e,s,n,i){let o;return[t,,o,i]=zt(t,0,s,n,i),Et.call(this,()=>this.editor.insertText(t,e,o),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,s){return[t,e,,s]=zt(t,e,s),Et.call(this,()=>this.editor.removeFormat(t,e),s,t)}scrollRectIntoView(t){mc(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.sources.API;return Et.call(this,()=>{t=new ae.default(t);let s=this.getLength(),n=this.editor.deleteText(0,s),i=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return n.compose(i).compose(o)},e)}setSelection(t,e,s){t==null?this.selection.setRange(null,e||Nt.sources.API):([t,e,,s]=zt(t,e,s),this.selection.setRange(new Y(Math.max(0,t),e),s),s!==x.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.sources.API,s=new ae.default().insert(t);return this.setContents(s,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.sources.API;return Et.call(this,()=>(t=new ae.default(t),this.editor.applyDelta(t)),e,!0)}};m(Nt,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:rn,theme:"default"}),m(Nt,"events",x.events),m(Nt,"sources",x.sources),m(Nt,"version","2.0.2"),m(Nt,"imports",{delta:ae.default,parchment:vr,"core/module":R,"core/theme":nr});var d=Nt;function bc(r){return typeof r=="string"?document.querySelector(r):r}function Pi(r){return Object.entries(r??{}).reduce((t,e)=>{let[s,n]=e;return{...t,[s]:n===!0?{}:n}},{})}function yc(r){return Object.fromEntries(Object.entries(r).filter(t=>t[1]!==void 0))}function by(r,t){let e=bc(r);if(!e)throw new Error("Invalid Quill container");let n=!t.theme||t.theme===d.DEFAULTS.theme?nr:d.import(`themes/${t.theme}`);if(!n)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);let{modules:i,...o}=d.DEFAULTS,{modules:a,...l}=n.DEFAULTS,u=Pi(t.modules);u!=null&&u.toolbar&&u.toolbar.constructor!==Object&&(u={...u,toolbar:{container:u.toolbar}});let c=tt({},Pi(i),Pi(a),u),f={...o,...yc(l),...yc(t)},h=t.registry;return h?t.formats&&ir.warn('Ignoring "formats" option because "registry" is specified'):h=t.formats?gc(t.formats,f.registry,ir):f.registry,{...f,registry:h,container:e,theme:n,modules:Object.entries(c).reduce((p,g)=>{let[v,A]=g;if(!A)return p;let b=d.import(`modules/${v}`);return b==null?(ir.error(`Cannot load ${v} module. Are you sure you registered it?`),p):{...p,[v]:tt({},b.DEFAULTS||{},A)}},{}),bounds:bc(f.bounds)}}function Et(r,t,e,s){if(!this.isEnabled()&&t===x.sources.USER&&!this.allowReadOnlyEdits)return new ae.default;let n=e==null?null:this.getSelection(),i=this.editor.delta,o=r();if(n!=null&&(e===!0&&(e=n.index),s==null?n=xc(n,o,t):s!==0&&(n=xc(n,e,s,t)),this.setSelection(n,x.sources.SILENT)),o.length()>0){let a=[x.events.TEXT_CHANGE,o,i,t];this.emitter.emit(x.events.EDITOR_CHANGE,...a),t!==x.sources.SILENT&&this.emitter.emit(...a)}return o}function zt(r,t,e,s,n){let i={};return typeof r.index=="number"&&typeof r.length=="number"?typeof t!="number"?(n=s,s=e,e=t,t=r.length,r=r.index):(t=r.length,r=r.index):typeof t!="number"&&(n=s,s=e,e=t,t=0),typeof e=="object"?(i=e,n=s):typeof e=="string"&&(s!=null?i[e]=s:n=e),n=n||x.sources.API,[r,t,i,n]}function xc(r,t,e,s){let n=typeof e=="number"?e:0;if(r==null)return null;let i,o;return t&&typeof t.transformPosition=="function"?[i,o]=[r.index,r.index+r.length].map(a=>t.transformPosition(a,s!==x.sources.USER)):[i,o]=[r.index,r.index+r.length].map(a=>a<t||a===t&&s===x.sources.USER?a:n>=0?a+n:Math.max(t,a+n)),new Y(i,o-i)}var Ui=class extends Ve{},gt=Ui;var bt=ot(lt(),1);function vc(r){return r instanceof S||r instanceof F}function Ac(r){return typeof r.updateContent=="function"}var le=class extends xr{constructor(t,e,s){let{emitter:n}=s;super(t,e),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(x.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(x.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(x.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){let[s,n]=this.line(t),[i]=this.line(t+e);if(super.deleteAt(t,e),i!=null&&s!==i&&n>0){if(s instanceof F||i instanceof F){this.optimize();return}let o=i.children.head instanceof $?null:i.children.head;s.moveChildren(i,o),s.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.optimize()}insertAt(t,e,s){if(t>=this.length())if(s==null||this.scroll.query(e,y.BLOCK)==null){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),s==null&&e.endsWith(` 16`)?n.insertAt(0,e.slice(0,-1),s):n.insertAt(0,e,s)}else{let n=this.scroll.create(e,s);this.appendChild(n)}else super.insertAt(t,e,s);this.optimize()}insertBefore(t,e){if(t.statics.scope===y.INLINE_BLOT){let s=this.scroll.create(this.statics.defaultChild.blotName);s.appendChild(t),super.insertBefore(s,e)}else super.insertBefore(t,e)}insertContents(t,e){let s=this.deltaToRenderBlocks(e.concat(new bt.default().insert(` 17`))),n=s.pop();if(n==null)return;this.batchStart();let i=s.shift();if(i){let l=i.type==="block"&&(i.delta.length()===0||!this.descendant(F,t)[0]&&t<this.length()),u=i.type==="block"?i.delta:new bt.default().insert({[i.key]:i.value});Fi(this,t,u);let c=i.type==="block"?1:0,f=t+u.length()+c;l&&this.insertAt(f-1,` 18`);let h=st(this.line(t)[0]),p=bt.AttributeMap.diff(h,i.attributes)||{};Object.keys(p).forEach(g=>{this.formatAt(f-1,1,g,p[g])}),t=f}let[o,a]=this.children.find(t);if(s.length&&(o&&(o=o.split(a),a=0),s.forEach(l=>{if(l.type==="block"){let u=this.createBlock(l.attributes,o||void 0);Fi(u,0,l.delta)}else{let u=this.create(l.key,l.value);this.insertBefore(u,o||void 0),Object.keys(l.attributes).forEach(c=>{u.format(c,l.attributes[c])})}})),n.type==="block"&&n.delta.length()){let l=o?o.offset(o.scroll)+a:this.length();Fi(this,l,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){let e=this.path(t).pop();if(!e)return[null,-1];let[s,n]=e;return s instanceof P?[s,n]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(vc,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,s=(n,i,o)=>{let a=[],l=o;return n.children.forEachAt(i,o,(u,c,f)=>{vc(u)?a.push(u):u instanceof Ve&&(a=a.concat(s(u,c,l))),l-=f}),a};return s(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(x.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=x.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(s=>{let{target:n}=s,i=this.find(n,!0);return i&&!Ac(i)}),t.length>0&&this.emitter.emit(x.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(x.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,s){let[n]=this.descendant(i=>i instanceof F,t);n&&n.statics.blotName===e&&Ac(n)&&n.updateContent(s)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){let e=[],s=new bt.default;return t.forEach(n=>{let i=n?.insert;if(i)if(typeof i=="string"){let o=i.split(` 19`);o.slice(0,-1).forEach(l=>{s.insert(l,n.attributes),e.push({type:"block",delta:s,attributes:n.attributes??{}}),s=new bt.default});let a=o[o.length-1];a&&s.insert(a,n.attributes)}else{let o=Object.keys(i)[0];if(!o)return;this.query(o,y.INLINE)?s.push(n):(s.length()&&e.push({type:"block",delta:s,attributes:{}}),s=new bt.default,e.push({type:"blockEmbed",key:o,value:i[o],attributes:n.attributes??{}}))}}),s.length()&&e.push({type:"block",delta:s,attributes:{}}),e}createBlock(t,e){let s,n={};Object.entries(t).forEach(a=>{let[l,u]=a;this.query(l,y.BLOCK&y.BLOT)!=null?s=l:n[l]=u});let i=this.create(s||this.statics.defaultChild.blotName,s?t[s]:void 0);this.insertBefore(i,e||void 0);let o=i.length();return Object.entries(n).forEach(a=>{let[l,u]=a;i.formatAt(0,o,l,u)}),i}};m(le,"blotName","scroll"),m(le,"className","ql-editor"),m(le,"tagName","DIV"),m(le,"defaultChild",S),m(le,"allowedChildren",[S,F,gt]);function Fi(r,t,e){e.reduce((s,n)=>{let i=bt.Op.length(n),o=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){let a=n.insert;r.insertAt(s,a);let[l]=r.descendant(P,s),u=st(l);o=bt.AttributeMap.diff(u,o)||{}}else if(typeof n.insert=="object"){let a=Object.keys(n.insert)[0];if(a==null)return s;if(r.insertAt(s,a,n.insert[a]),r.scroll.query(a,y.INLINE)!=null){let[u]=r.descendant(P,s),c=st(u);o=bt.AttributeMap.diff(c,o)||{}}}}return Object.keys(o).forEach(a=>{r.formatAt(s,i,a,o[a])}),s+i},t)}var Ec=le;var nt=ot(lt(),1);var Hi={scope:y.BLOCK,whitelist:["right","center","justify"]},Nc=new W("align","align",Hi),zi=new j("align","ql-align",Hi),sn=new rt("align","text-align",Hi);var Mr=class extends rt{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):e}},wc=new j("color","ql-color",{scope:y.INLINE}),Dr=new Mr("color","color",{scope:y.INLINE});var Tc=new j("background","ql-bg",{scope:y.INLINE}),jr=new Mr("background","background-color",{scope:y.INLINE});var Ct=class extends gt{static create(t){let e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(s=>s.length()<=1?"":s.domNode.innerText).join(` 20`).slice(t,t+e)}html(t,e){return`<pre> 21${we(this.code(t,e))} 22</pre>`}},M=class extends S{static register(){d.register(Ct)}};m(M,"TAB"," ");var or=class extends K{};or.blotName="code";or.tagName="CODE";M.blotName="code-block";M.className="ql-code-block";M.tagName="DIV";Ct.blotName="code-block-container";Ct.className="ql-code-block-container";Ct.tagName="DIV";Ct.allowedChildren=[M];M.allowedChildren=[B,$,oe];M.requiredContainer=Ct;var $i={scope:y.BLOCK,whitelist:["rtl"]},nn=new W("direction","dir",$i),Ki=new j("direction","ql-direction",$i),on=new rt("direction","direction",$i);var Sc={scope:y.INLINE,whitelist:["serif","monospace"]},Vi=new j("font","ql-font",Sc),Gi=class extends rt{value(t){return super.value(t).replace(/["']/g,"")}},an=new Gi("font","font-family",Sc);var Wi=new j("size","ql-size",{scope:y.INLINE,whitelist:["small","large","huge"]}),ln=new rt("size","font-size",{scope:y.INLINE,whitelist:["10px","18px","32px"]});var V=ot(lt(),1);var yy=ut("quill:keyboard"),xy=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",Pr=class r extends R{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(s=>!!e[s]!==t[s]&&e[s]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(s=>{this.options.bindings[s]&&this.addBinding(this.options.bindings[s])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ay(t);if(n==null){yy.warn("Attempted to add invalid keyboard binding",n);return}typeof e=="function"&&(e={handler:e}),typeof s=="function"&&(s={handler:s}),(Array.isArray(n.key)?n.key:[n.key]).forEach(o=>{let a={...n,key:o,...e,...s};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;let n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(b=>r.match(t,b));if(n.length===0)return;let i=d.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;let o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;let[a,l]=this.quill.getLine(o.index),[u,c]=this.quill.getLeaf(o.index),[f,h]=o.length===0?[u,c]:this.quill.getLeaf(o.index+o.length),p=u instanceof We?u.value().slice(0,c):"",g=f instanceof We?f.value().slice(h):"",v={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:l,prefix:p,suffix:g,event:t};n.some(b=>{if(b.collapsed!=null&&b.collapsed!==v.collapsed||b.empty!=null&&b.empty!==v.empty||b.offset!=null&&b.offset!==v.offset)return!1;if(Array.isArray(b.format)){if(b.format.every(E=>v.format[E]==null))return!1}else if(typeof b.format=="object"&&!Object.keys(b.format).every(E=>b.format[E]===!0?v.format[E]!=null:b.format[E]===!1?v.format[E]==null:pe(b.format[E],v.format[E])))return!1;return b.prefix!=null&&!b.prefix.test(v.prefix)||b.suffix!=null&&!b.suffix.test(v.suffix)?!1:b.handler.call(this,o,v,b)!==!0})&&t.preventDefault()})}handleBackspace(t,e){let s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={},[i]=this.quill.getLine(t.index),o=new V.default().retain(t.index-s).delete(s);if(e.offset===0){let[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){let u=i.formats(),c=this.quill.getFormat(t.index-1,1);if(n=V.AttributeMap.diff(u,c)||{},Object.keys(n).length>0){let f=new V.default().retain(t.index+i.length()-2).retain(1,n);o=o.compose(f)}}}this.quill.updateContents(o,d.sources.USER),this.quill.focus()}handleDelete(t,e){let s=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-s)return;let n={},[i]=this.quill.getLine(t.index),o=new V.default().retain(t.index).delete(s);if(e.offset>=i.length()-1){let[a]=this.quill.getLine(t.index+1);if(a){let l=i.formats(),u=this.quill.getFormat(t.index,1);n=V.AttributeMap.diff(l,u)||{},Object.keys(n).length>0&&(o=o.retain(a.length()-1).retain(1,n))}}this.quill.updateContents(o,d.sources.USER),this.quill.focus()}handleDeleteRange(t){Ur({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){let s=Object.keys(e.format).reduce((i,o)=>(this.quill.scroll.query(o,y.BLOCK)&&!Array.isArray(e.format[o])&&(i[o]=e.format[o]),i),{}),n=new V.default().retain(t.index).delete(t.length).insert(` 23`,s);this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(t.index+1,d.sources.SILENT),this.quill.focus()}},vy={bindings:{bold:Zi("bold"),italic:Zi("italic"),underline:Zi("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",d.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",d.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,t){t.format.indent!=null?this.quill.format("indent","-1",d.sources.USER):t.format.list!=null&&this.quill.format("list",!1,d.sources.USER)}},"indent code-block":Lc(!0),"outdent code-block":Lc(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,d.sources.USER)}},tab:{key:"Tab",handler(r,t){if(t.format.table)return!0;this.quill.history.cutoff();let e=new V.default().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(e,d.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,d.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,d.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,t){let e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(r.index,r.length,e,d.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){let[t,e]=this.quill.getLine(r.index),s={...t.formats(),list:"checked"},n=new V.default().retain(r.index).insert(` 24`,s).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(r.index+1,d.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,t){let[e,s]=this.quill.getLine(r.index),n=new V.default().retain(r.index).insert(` 25`,t.format).retain(e.length()-s-1).retain(1,{header:null});this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(r.index+1,d.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){let t=this.quill.getModule("table");if(t){let[e,s,n,i]=t.getTable(r),o=Ey(e,s,n,i);if(o==null)return;let a=e.offset();if(o<0){let l=new V.default().retain(a).insert(` 26`);this.quill.updateContents(l,d.sources.USER),this.quill.setSelection(r.index+1,r.length,d.sources.SILENT)}else if(o>0){a+=e.length();let l=new V.default().retain(a).insert(` 27`);this.quill.updateContents(l,d.sources.USER),this.quill.setSelection(a,d.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,t){let{event:e,line:s}=t,n=s.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(n-1,d.sources.USER):this.quill.setSelection(n+s.length(),d.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,t){if(this.quill.scroll.query("list")==null)return!0;let{length:e}=t.prefix,[s,n]=this.quill.getLine(r.index);if(n>e)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(r.index," ",d.sources.USER),this.quill.history.cutoff();let o=new V.default().retain(r.index-n).delete(e+1).retain(s.length()-2-n).retain(1,{list:i});return this.quill.updateContents(o,d.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-e,d.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){let[t,e]=this.quill.getLine(r.index),s=2,n=t;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,s-=1,s<=0){let i=new V.default().retain(r.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,d.sources.USER),this.quill.setSelection(r.index-1,d.sources.SILENT),!1}return!0}},"embed left":un("ArrowLeft",!1),"embed left shift":un("ArrowLeft",!0),"embed right":un("ArrowRight",!1),"embed right shift":un("ArrowRight",!0),"table down":Oc(!1),"table up":Oc(!0)}};Pr.DEFAULTS=vy;function Lc(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(t,e){let{event:s}=e,n=this.quill.scroll.query("code-block"),{TAB:i}=n;if(t.length===0&&!s.shiftKey){this.quill.insertText(t.index,i,d.sources.USER),this.quill.setSelection(t.index+i.length,d.sources.SILENT);return}let o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t),{index:a,length:l}=t;o.forEach((u,c)=>{r?(u.insertAt(0,i),c===0?a+=i.length:l+=i.length):u.domNode.textContent.startsWith(i)&&(u.deleteAt(0,i.length),c===0?a-=i.length:l-=i.length)}),this.quill.update(d.sources.USER),this.quill.setSelection(a,l,d.sources.SILENT)}}}function un(r,t){return{key:r,shiftKey:t,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(s){let{index:n}=s;r==="ArrowRight"&&(n+=s.length+1);let[i]=this.quill.getLeaf(n);return i instanceof I?(r==="ArrowLeft"?t?this.quill.setSelection(s.index-1,s.length+1,d.sources.USER):this.quill.setSelection(s.index-1,d.sources.USER):t?this.quill.setSelection(s.index,s.length+1,d.sources.USER):this.quill.setSelection(s.index+s.length+1,d.sources.USER),!1):!0}}}function Zi(r){return{key:r[0],shortKey:!0,handler(t,e){this.quill.format(r,!e.format[r],d.sources.USER)}}}function Oc(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){let s=r?"prev":"next",n=e.line,i=n.parent[s];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=n;for(;a.prev!=null;)a=a.prev,o=o.next;let l=o.offset(this.quill.scroll)+Math.min(e.offset,o.length()-1);this.quill.setSelection(l,0,d.sources.USER)}}else{let o=n.table()[s];o!=null&&(r?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,d.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,d.sources.USER))}return!1}}}function Ay(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=Lt(r);else return null;return r.shortKey&&(r[xy]=r.shortKey,delete r.shortKey),r}function Ur(r){let{quill:t,range:e}=r,s=t.getLines(e),n={};if(s.length>1){let i=s[0].formats(),o=s[s.length-1].formats();n=V.AttributeMap.diff(o,i)||{}}t.deleteText(e,d.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,d.sources.USER),t.setSelection(e.index,d.sources.SILENT)}function Ey(r,t,e,s){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?s===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}var Ny=/font-weight:\s*normal/,wy=["P","OL","UL"],qc=r=>r&&wy.includes(r.tagName),Ty=r=>{Array.from(r.querySelectorAll("br")).filter(t=>qc(t.previousElementSibling)&&qc(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},Sy=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(Ny)).forEach(t=>{let e=r.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})};function Xi(r){r.querySelector('[id^="docs-internal-guid-"]')&&(Sy(r),Ty(r))}var Ly=/\bmso-list:[^;]*ignore/i,Oy=/\bmso-list:[^;]*\bl(\d+)/i,qy=/\bmso-list:[^;]*\blevel(\d+)/i,Cy=(r,t)=>{let e=r.getAttribute("style"),s=e?.match(Oy);if(!s)return null;let n=Number(s[1]),i=e?.match(qy),o=i?Number(i[1]):1,a=new RegExp(`@list l${n}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=t.match(a),u=l&&l[1]==="bullet"?"bullet":"ordered";return{id:n,indent:o,type:u,element:r}},_y=r=>{let t=Array.from(r.querySelectorAll("[style*=mso-list]")),e=[],s=[];t.forEach(o=>{(o.getAttribute("style")||"").match(Ly)?e.push(o):s.push(o)}),e.forEach(o=>o.parentNode?.removeChild(o));let n=r.documentElement.innerHTML,i=s.map(o=>Cy(o,n)).filter(o=>o);for(;i.length;){let o=[],a=i.shift();for(;a;)o.push(a),a=i.length&&i[0]?.element===a.element.nextElementSibling&&i[0].id===a.id?i.shift():null;let l=document.createElement("ul");o.forEach(f=>{let h=document.createElement("li");h.setAttribute("data-list",f.type),f.indent>1&&h.setAttribute("class",`ql-indent-${f.indent-1}`),h.innerHTML=f.element.innerHTML,l.appendChild(h)});let u=o[0]?.element,{parentNode:c}=u??{};u&&c?.replaceChild(l,u),o.slice(1).forEach(f=>{let{element:h}=f;c?.removeChild(h)})}};function Yi(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&_y(r)}var Iy=[Yi,Xi],ky=r=>{r.documentElement&&Iy.forEach(t=>{t(r)})},Cc=ky;var Ry=ut("quill:clipboard"),By=[[Node.TEXT_NODE,Vy],[Node.TEXT_NODE,Ic],["br",Uy],[Node.ELEMENT_NODE,Ic],[Node.ELEMENT_NODE,Py],[Node.ELEMENT_NODE,jy],[Node.ELEMENT_NODE,Ky],["li",zy],["ol, ul",$y],["pre",Fy],["tr",Gy],["b",Qi("bold")],["i",Qi("italic")],["strike",Qi("strike")],["style",Hy]],My=[Nc,nn].reduce((r,t)=>(r[t.keyName]=t,r),{}),_c=[sn,jr,Dr,on,an,ln].reduce((r,t)=>(r[t.keyName]=t,r),{}),Fr=class extends R{constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",s=>this.onCaptureCopy(s,!1)),this.quill.root.addEventListener("cut",s=>this.onCaptureCopy(s,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],By.concat(this.options.matchers??[]).forEach(s=>{let[n,i]=s;this.addMatcher(n,i)})}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:s}=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[M.blotName])return new nt.default().insert(s||"",{[M.blotName]:n[M.blotName]});if(!e)return new nt.default().insert(s||"",n);let i=this.convertHTML(e);return Hr(i,` 28`)&&(i.ops[i.ops.length-1].attributes==null||n.table)?i.compose(new nt.default().retain(i.length()-1).delete(1)):i}normalizeHTML(t){Cc(t)}convertHTML(t){let e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);let s=e.body,n=new WeakMap,[i,o]=this.prepareMatching(s,n);return fn(this.quill.scroll,s,i,o,n)}dangerouslyPasteHTML(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d.sources.API;if(typeof t=="string"){let n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,d.sources.SILENT)}else{let n=this.convert({html:e,text:""});this.quill.updateContents(new nt.default().retain(t).concat(n),s),this.quill.setSelection(t+n.length(),d.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();let[s]=this.quill.selection.getRange();if(s==null)return;let{html:n,text:i}=this.onCopy(s,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",n),e&&Ur({range:s,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(` 29`)}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();let e=this.quill.getSelection(!0);if(e==null)return;let s=t.clipboardData?.getData("text/html"),n=t.clipboardData?.getData("text/plain");if(!s&&!n){let o=t.clipboardData?.getData("text/uri-list");o&&(n=this.normalizeURIList(o))}let i=Array.from(t.clipboardData?.files||[]);if(!s&&i.length>0){this.quill.uploader.upload(e,i);return}if(s&&i.length>0){let o=new DOMParser().parseFromString(s,"text/html");if(o.body.childElementCount===1&&o.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(e,i);return}}this.onPaste(e,{html:s,text:n})}onCopy(t){let e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:s,html:n}=e,i=this.quill.getFormat(t.index),o=this.convert({text:s,html:n},i);Ry.log("onPaste",o,{text:s,html:n});let a=new nt.default().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,d.sources.USER),this.quill.setSelection(a.length()-t.length,d.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){let s=[],n=[];return this.matchers.forEach(i=>{let[o,a]=i;switch(o){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:s.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(l=>{e.has(l)?e.get(l)?.push(a):e.set(l,[a])});break}}),[s,n]}};m(Fr,"DEFAULTS",{matchers:[]});function Te(r,t,e,s){return s.query(t)?r.reduce((n,i)=>{if(!i.insert)return n;if(i.attributes&&i.attributes[t])return n.push(i);let o=e?{[t]:e}:{};return n.insert(i.insert,{...o,...i.attributes})},new nt.default):r}function Hr(r,t){let e="";for(let s=r.ops.length-1;s>=0&&e.length<t.length;--s){let n=r.ops[s];if(typeof n.insert!="string")break;e=n.insert+e}return e.slice(-1*t.length)===t}function ue(r,t){if(!(r instanceof Element))return!1;let e=t.query(r);return e&&e.prototype instanceof I?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function Dy(r,t){return r.previousElementSibling&&r.nextElementSibling&&!ue(r.previousElementSibling,t)&&!ue(r.nextElementSibling,t)}var cn=new WeakMap;function kc(r){return r==null?!1:(cn.has(r)||(r.tagName==="PRE"?cn.set(r,!0):cn.set(r,kc(r.parentNode))),cn.get(r))}function fn(r,t,e,s,n){return t.nodeType===t.TEXT_NODE?s.reduce((i,o)=>o(t,i,r),new nt.default):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,o)=>{let a=fn(r,o,e,s,n);return o.nodeType===t.ELEMENT_NODE&&(a=e.reduce((l,u)=>u(o,l,r),a),a=(n.get(o)||[]).reduce((l,u)=>u(o,l,r),a)),i.concat(a)},new nt.default):new nt.default}function Qi(r){return(t,e,s)=>Te(e,r,!0,s)}function jy(r,t,e){let s=W.keys(r),n=j.keys(r),i=rt.keys(r),o={};return s.concat(n).concat(i).forEach(a=>{let l=e.query(a,y.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(r),o[l.attrName])||(l=My[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(r)||void 0),l=_c[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=_c[a],o[l.attrName]=l.value(r)||void 0))}),Object.entries(o).reduce((a,l)=>{let[u,c]=l;return Te(a,u,c,e)},t)}function Py(r,t,e){let s=e.query(r);if(s==null)return t;if(s.prototype instanceof I){let n={},i=s.value(r);if(i!=null)return n[s.blotName]=i,new nt.default().insert(n,s.formats(r,e))}else if(s.prototype instanceof me&&!Hr(t,` 30`)&&t.insert(` 31`),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return Te(t,s.blotName,s.formats(r,e),e);return t}function Uy(r,t){return Hr(t,` 32`)||t.insert(` 33`),t}function Fy(r,t,e){let s=e.query("code-block"),n=s&&"formats"in s&&typeof s.formats=="function"?s.formats(r,e):!0;return Te(t,"code-block",n,e)}function Hy(){return new nt.default}function zy(r,t,e){let s=e.query(r);if(s==null||s.blotName!=="list"||!Hr(t,` 34`))return t;let n=-1,i=r.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(n+=1),i=i.parentNode;return n<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:n,...a.attributes||{}}):o,new nt.default)}function $y(r,t,e){let s=r,n=s.tagName==="OL"?"ordered":"bullet",i=s.getAttribute("data-checked");return i&&(n=i==="true"?"checked":"unchecked"),Te(t,"list",n,e)}function Ic(r,t,e){if(!Hr(t,` 35`)){if(ue(r,e)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return t.insert(` 36`);if(t.length()>0&&r.nextSibling){let s=r.nextSibling;for(;s!=null;){if(ue(s,e))return t.insert(` 37`);let n=e.query(s);if(n&&n.prototype instanceof F)return t.insert(` 38`);s=s.firstChild}}}return t}function Ky(r,t,e){let s={},n=r.style||{};return n.fontStyle==="italic"&&(s.italic=!0),n.textDecoration==="underline"&&(s.underline=!0),n.textDecoration==="line-through"&&(s.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(s.bold=!0),t=Object.entries(s).reduce((i,o)=>{let[a,l]=o;return Te(i,a,l,e)},t),parseFloat(n.textIndent||0)>0?new nt.default().insert(" ").concat(t):t}function Gy(r,t,e){let s=r.parentElement?.tagName==="TABLE"?r.parentElement:r.parentElement?.parentElement;if(s!=null){let i=Array.from(s.querySelectorAll("tr")).indexOf(r)+1;return Te(t,"table",i,e)}return t}function Vy(r,t,e){let s=r.data;if(r.parentElement?.tagName==="O:P")return t.insert(s.trim());if(!kc(r)){if(s.trim().length===0&&s.includes(` 39`)&&!Dy(r,e))return t;let n=(i,o)=>{let a=o.replace(/[^\u00a0]/g,"");return a.length<1&&i?" ":a};s=s.replace(/\r\n/g," ").replace(/\n/g," "),s=s.replace(/\s\s+/g,n.bind(n,!0)),(r.previousSibling==null&&r.parentElement!=null&&ue(r.parentElement,e)||r.previousSibling instanceof Element&&ue(r.previousSibling,e))&&(s=s.replace(/^\s+/,n.bind(n,!1))),(r.nextSibling==null&&r.parentElement!=null&&ue(r.parentElement,e)||r.nextSibling instanceof Element&&ue(r.nextSibling,e))&&(s=s.replace(/\s+$/,n.bind(n,!1)))}return t.insert(s)}var zr=class extends R{constructor(e,s){super(e,s);m(this,"lastRecorded",0);m(this,"ignoreChange",!1);m(this,"stack",{undo:[],redo:[]});m(this,"currentRange",null);this.quill.on(d.events.EDITOR_CHANGE,(n,i,o,a)=>{n===d.events.SELECTION_CHANGE?i&&a!==d.sources.SILENT&&(this.currentRange=i):n===d.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===d.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=Ji(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(e,s){if(this.stack[e].length===0)return;let n=this.stack[e].pop();if(!n)return;let i=this.quill.getContents(),o=n.delta.invert(i);this.stack[s].push({delta:o,range:Ji(n.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,d.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,s){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(s),i=this.currentRange,o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){let a=this.stack.undo.pop();a&&(n=n.compose(a.delta),i=a.range)}else this.lastRecorded=o;n.length()!==0&&(this.stack.undo.push({delta:n,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Rc(this.stack.undo,e),Rc(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,d.sources.USER);else{let s=Zy(this.quill.scroll,e.delta);this.quill.setSelection(s,d.sources.USER)}}};m(zr,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Rc(r,t){let e=t;for(let s=r.length-1;s>=0;s-=1){let n=r[s];r[s]={delta:e.transform(n.delta,!0),range:n.range&&Ji(n.range,e)},e=n.delta.transform(e),r[s].delta.length()===0&&r.splice(s,1)}}function Wy(r,t){let e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(` 40`):e.attributes!=null?Object.keys(e.attributes).some(s=>r.query(s,y.BLOCK)!=null):!1}function Zy(r,t){let e=t.reduce((n,i)=>n+(i.delete||0),0),s=t.length()-e;return Wy(r,t)&&(s-=1),s}function Ji(r,t){if(!r)return r;let e=t.transformPosition(r.index),s=t.transformPosition(r.index+r.length);return{index:e,length:s-e}}var Bc=ot(lt(),1);var hn=class extends R{constructor(t,e){super(t,e),t.root.addEventListener("drop",s=>{s.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(s.clientX,s.clientY);else if(document.caretPositionFromPoint){let o=document.caretPositionFromPoint(s.clientX,s.clientY);n=document.createRange(),n.setStart(o.offsetNode,o.offset),n.setEnd(o.offsetNode,o.offset)}let i=n&&t.selection.normalizeNative(n);if(i){let o=t.selection.normalizedToRange(i);s.dataTransfer?.files&&this.upload(o,s.dataTransfer.files)}})}upload(t,e){let s=[];Array.from(e).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&s.push(n)}),s.length>0&&this.options.handler.call(this,t,s)}};hn.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,t){if(!this.quill.scroll.query("image"))return;let e=t.map(s=>new Promise(n=>{let i=new FileReader;i.onload=()=>{n(i.result)},i.readAsDataURL(s)}));Promise.all(e).then(s=>{let n=s.reduce((i,o)=>i.insert({image:o}),new Bc.default().retain(r.index).delete(r.length));this.quill.updateContents(n,x.sources.USER),this.quill.setSelection(r.index+s.length,x.sources.SILENT)})}};var Mc=hn;var dn=ot(lt(),1);var Dc=ot(lt(),1);var Xy=["insertText","insertReplacementText"],to=class extends R{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||t.on(d.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){Ur({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){let s=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new Dc.default().retain(t.index).insert(e,s),d.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,d.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Xy.includes(t.inputType))return;let e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;let s=Yy(t);if(s==null)return;let n=this.quill.selection.normalizeNative(e),i=n?this.quill.selection.normalizedToRange(n):null;i&&this.replaceText(i,s)&&t.preventDefault()}handleCompositionStart(){let t=this.quill.getSelection();t&&this.replaceText(t)}};function Yy(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}var jc=to;var Qy=/Mac/i.test(navigator.platform),Jy=100,tx=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Qy&&r.key==="a"&&r.ctrlKey===!0),eo=class extends R{constructor(e,s){super(e,s);m(this,"isListening",!1);m(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,s){let{line:n,event:i}=s;if(!(n instanceof et)||!n.uiNode)return!0;let o=getComputedStyle(n.domNode).direction==="rtl";return o&&i.key!=="ArrowRight"||!o&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(i.shiftKey?1:0),d.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&tx(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Jy,this.isListening)return;this.isListening=!0;let e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){let e=document.getSelection();if(!e)return;let s=e.getRangeAt(0);if(s.collapsed!==!0||s.startOffset!==0)return;let n=this.quill.scroll.find(s.startContainer);if(!(n instanceof et)||!n.uiNode)return;let i=document.createRange();i.setStartAfter(n.uiNode),i.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(i)}},Pc=eo;d.register({"blots/block":S,"blots/block/embed":F,"blots/break":$,"blots/container":gt,"blots/cursor":oe,"blots/embed":sr,"blots/inline":K,"blots/scroll":Ec,"blots/text":B,"modules/clipboard":Fr,"modules/history":zr,"modules/keyboard":Pr,"modules/uploader":Mc,"modules/input":jc,"modules/uiNode":Pc});var pn=d;var ro=class extends j{add(t,e){let s=0;if(e==="+1"||e==="-1"){let n=this.value(t)||0;s=e==="+1"?n+1:n-1}else typeof e=="number"&&(s=e);return s===0?(this.remove(t),!0):super.add(t,s.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}},ex=new ro("indent","ql-indent",{scope:y.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),Uc=ex;var $r=class extends S{};m($r,"blotName","blockquote"),m($r,"tagName","blockquote");var Fc=$r;var Kr=class extends S{static formats(t){return this.tagName.indexOf(t.tagName)+1}};m(Kr,"blotName","header"),m(Kr,"tagName",["H1","H2","H3","H4","H5","H6"]);var Hc=Kr;var Se=class extends gt{};Se.blotName="list-container";Se.tagName="OL";var ce=class extends S{static create(t){let e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){d.register(Se)}constructor(t,e){super(t,e);let s=e.ownerDocument.createElement("span"),n=i=>{if(!t.isEnabled())return;let o=this.statics.formats(e,t);o==="checked"?(this.format("list","unchecked"),i.preventDefault()):o==="unchecked"&&(this.format("list","checked"),i.preventDefault())};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),this.attachUI(s)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}};ce.blotName="list";ce.tagName="LI";Se.allowedChildren=[ce];ce.requiredContainer=Se;var Gr=class extends K{static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};m(Gr,"blotName","bold"),m(Gr,"tagName",["STRONG","B"]);var ar=Gr;var Vr=class extends ar{};m(Vr,"blotName","italic"),m(Vr,"tagName",["EM","I"]);var zc=Vr;var ct=class extends K{static create(t){let e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return so(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t!==this.statics.blotName||!e?super.format(t,e):this.domNode.setAttribute("href",this.constructor.sanitize(e))}};m(ct,"blotName","link"),m(ct,"tagName","A"),m(ct,"SANITIZED_URL","about:blank"),m(ct,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function so(r,t){let e=document.createElement("a");e.href=r;let s=e.href.slice(0,e.href.indexOf(":"));return t.indexOf(s)>-1}var Wr=class extends K{static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}};m(Wr,"blotName","script"),m(Wr,"tagName",["SUB","SUP"]);var $c=Wr;var Zr=class extends ar{};m(Zr,"blotName","strike"),m(Zr,"tagName",["S","STRIKE"]);var Kc=Zr;var Xr=class extends K{};m(Xr,"blotName","underline"),m(Xr,"tagName","U");var Gc=Xr;var lr=class extends sr{static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let e=super.create(t);return typeof t=="string"&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){let{formula:t}=this.value();return`<span>${t}</span>`}};m(lr,"blotName","formula"),m(lr,"className","ql-formula"),m(lr,"tagName","SPAN");var Vc=lr;var Wc=["alt","height","width"],Yr=class extends I{static create(t){let e=super.create(t);return typeof t=="string"&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return Wc.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return so(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){Wc.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}};m(Yr,"blotName","image"),m(Yr,"tagName","IMG");var Zc=Yr;var Xc=["height","width"],ur=class extends F{static create(t){let e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return Xc.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static sanitize(t){return ct.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){Xc.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){let{video:t}=this.value();return`<a href="${t}">${t}</a>`}};m(ur,"blotName","video"),m(ur,"className","ql-video"),m(ur,"tagName","IFRAME");var Yc=ur;var mn=ot(lt(),1);var Qr=new j("code-token","hljs",{scope:y.INLINE}),$t=class r extends K{static formats(t,e){for(;t!=null&&t!==e.domNode;){if(t.classList&&t.classList.contains(M.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,s){super(t,e,s),Qr.add(this.domNode,s)}format(t,e){t!==r.blotName?super.format(t,e):e?Qr.add(this.domNode,e):(Qr.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Qr.value(this.domNode)||this.unwrap()}};$t.blotName="code-token";$t.className="ql-token";var it=class extends M{static create(t){let e=super.create(t);return typeof t=="string"&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),$t.blotName,!1),super.replaceWith(t,e)}},Le=class extends Ct{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===it.blotName&&(this.forceNext=!0,this.children.forEach(s=>{s.format(t,e)}))}formatAt(t,e,s,n){s===it.blotName&&(this.forceNext=!0),super.formatAt(t,e,s,n)}highlight(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(` 41`)} 42`,i=it.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let o=this.children.reduce((l,u)=>l.concat(Ni(u,!1)),new mn.default),a=t(n,i);o.diff(a).reduce((l,u)=>{let{retain:c,attributes:f}=u;return c?(f&&Object.keys(f).forEach(h=>{[it.blotName,$t.blotName].includes(h)&&this.formatAt(l,c,h,f[h])}),l+c):l},0)}this.cachedText=n,this.forceNext=!1}}html(t,e){let[s]=this.children.find(t);return`<pre data-language="${s?it.formats(s.domNode):"plain"}"> 43${we(this.code(t,e))} 44</pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){let e=it.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}};Le.allowedChildren=[it];it.requiredContainer=Le;it.allowedChildren=[$t,oe,B,$];var rx=(r,t,e)=>{if(typeof r.versionString=="string"){let s=r.versionString.split(".")[0];if(parseInt(s,10)>=11)return r.highlight(e,{language:t}).value}return r.highlight(t,e).value},Jr=class extends R{static register(){d.register($t,!0),d.register(it,!0),d.register(Le,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((s,n)=>{let{key:i}=n;return s[i]=!0,s},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(d.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof Le))return;let e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(s=>{let{key:n,label:i}=s,o=e.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",n),e.appendChild(o)}),e.addEventListener("change",()=>{t.format(it.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=it.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(d.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(d.sources.USER);let s=this.quill.getSelection();(t==null?this.quill.scroll.descendants(Le):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update(d.sources.SILENT),s!=null&&this.quill.setSelection(s,d.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return we(t).split(` 45`).reduce((n,i,o)=>(o!==0&&n.insert(` 46`,{[M.blotName]:e}),n.insert(i)),new mn.default);let s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(M.className),s.innerHTML=rx(this.options.hljs,e,t),fn(this.quill.scroll,s,[(n,i)=>{let o=Qr.value(n);return o?i.compose(new mn.default().retain(i.length(),{[$t.blotName]:o})):i}],[(n,i)=>n.data.split(` 47`).reduce((o,a,l)=>(l!==0&&o.insert(` 48`,{[M.blotName]:e}),o.insert(a)),i)],new WeakMap)}};Jr.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var Qc=ot(lt(),1);var ts=class ts extends S{static create(t){let e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",gn()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===ts.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};m(ts,"blotName","table"),m(ts,"tagName","TD");var yt=ts,xt=class extends gt{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let t=this.children.head.formats(),e=this.children.tail.formats(),s=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.table===e.table&&t.table===s.table&&t.table===n.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;let s=e.formats(),n=e.next.formats();if(s.table!==n.table){let i=this.splitAfter(e);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}};m(xt,"blotName","table-row"),m(xt,"tagName","TR");var ft=class extends gt{};m(ft,"blotName","table-body"),m(ft,"tagName","TBODY");var Kt=class extends gt{balanceCells(){let t=this.descendants(xt),e=t.reduce((s,n)=>Math.max(n.children.length,s),0);t.forEach(s=>{new Array(e-s.children.length).fill(0).forEach(()=>{let n;s.children.head!=null&&(n=yt.formats(s.children.head.domNode));let i=this.scroll.create(yt.blotName,n);s.appendChild(i),i.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){let[e]=this.descendant(ft);e==null||e.children.head==null||e.children.forEach(s=>{let n=s.children.at(t);n?.remove()})}insertColumn(t){let[e]=this.descendant(ft);e==null||e.children.head==null||e.children.forEach(s=>{let n=s.children.at(t),i=yt.formats(s.children.head.domNode),o=this.scroll.create(yt.blotName,i);s.insertBefore(o,n)})}insertRow(t){let[e]=this.descendant(ft);if(e==null||e.children.head==null)return;let s=gn(),n=this.scroll.create(xt.blotName);e.children.head.children.forEach(()=>{let o=this.scroll.create(yt.blotName,s);n.appendChild(o)});let i=e.children.at(t);e.insertBefore(n,i)}rows(){let t=this.children.head;return t==null?[]:t.children.map(e=>e)}};m(Kt,"blotName","table-container"),m(Kt,"tagName","TABLE");Kt.allowedChildren=[ft];ft.requiredContainer=Kt;ft.allowedChildren=[xt];xt.requiredContainer=ft;xt.allowedChildren=[yt];yt.requiredContainer=xt;function gn(){return`row-${Math.random().toString(36).slice(2,6)}`}var no=class extends R{static register(){d.register(yt),d.register(xt),d.register(ft),d.register(Kt)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Kt).forEach(t=>{t.balanceCells()})}deleteColumn(){let[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(d.sources.USER))}deleteRow(){let[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(d.sources.USER))}deleteTable(){let[t]=this.getTable();if(t==null)return;let e=t.offset();t.remove(),this.quill.update(d.sources.USER),this.quill.setSelection(e,d.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];let[e,s]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==yt.blotName)return[null,null,null,-1];let n=e.parent;return[n.parent.parent,n,e,s]}insertColumn(t){let e=this.quill.getSelection();if(!e)return;let[s,n,i]=this.getTable(e);if(i==null)return;let o=i.cellOffset();s.insertColumn(o+t),this.quill.update(d.sources.USER);let a=n.rowOffset();t===0&&(a+=1),this.quill.setSelection(e.index+a,e.length,d.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){let e=this.quill.getSelection();if(!e)return;let[s,n,i]=this.getTable(e);if(i==null)return;let o=n.rowOffset();s.insertRow(o+t),this.quill.update(d.sources.USER),t>0?this.quill.setSelection(e,d.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,d.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){let s=this.quill.getSelection();if(s==null)return;let n=new Array(t).fill(0).reduce(i=>{let o=new Array(e).fill(` 49`).join("");return i.insert(o,{table:gn()})},new Qc.default().retain(s.index));this.quill.updateContents(n,d.sources.USER),this.quill.setSelection(s.index,d.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(d.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(d.events.TEXT_CHANGE,(s,n,i)=>{i===d.sources.USER&&this.balanceTables()}),!0):!1)})}},Jc=no;var rf=ot(lt(),1);var tf=ut("quill:toolbar"),cr=class extends R{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){let s=document.createElement("div");s.setAttribute("role","toolbar"),sx(s,this.options.container),t.container?.parentNode?.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){tf.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{let n=this.options.handlers?.[s];n&&this.addHandler(s,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(d.events.EDITOR_CHANGE,()=>{let[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(n=>n.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){tf.warn("ignoring attaching to nonexistent format",e,t);return}let s=t.tagName==="SELECT"?"change":"click";t.addEventListener(s,n=>{let i;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;let a=t.options[t.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else t.classList.contains("ql-active")?i=!1:i=t.value||!t.hasAttribute("value"),n.preventDefault();this.quill.focus();let[o]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,i);else if(this.quill.scroll.query(e).prototype instanceof I){if(i=prompt(`Enter ${e}`),!i)return;this.quill.updateContents(new rf.default().retain(o.index).delete(o.length).insert({[e]:i}),d.sources.USER)}else this.quill.format(e,i,d.sources.USER);this.update(o)}),this.controls.push([e,t])}update(t){let e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(s=>{let[n,i]=s;if(i.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(e[n]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(e[n])){let a=e[n];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(t==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){let o=e[n],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{let o=e[n]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}};cr.DEFAULTS={};function ef(r,t,e){let s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${t}`),s.setAttribute("aria-pressed","false"),e!=null?(s.value=e,s.setAttribute("aria-label",`${t}: ${e}`)):s.setAttribute("aria-label",t),r.appendChild(s)}function sx(r,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{let s=document.createElement("span");s.classList.add("ql-formats"),e.forEach(n=>{if(typeof n=="string")ef(s,n);else{let i=Object.keys(n)[0],o=n[i];Array.isArray(o)?nx(s,i,o):ef(s,i,o)}}),r.appendChild(s)})}function nx(r,t,e){let s=document.createElement("select");s.classList.add(`ql-${t}`),e.forEach(n=>{let i=document.createElement("option");n!==!1?i.setAttribute("value",String(n)):i.setAttribute("selected","selected"),s.appendChild(i)}),r.appendChild(s)}cr.DEFAULTS={container:null,handlers:{clean(){let r=this.quill.getSelection();if(r!=null)if(r.length===0){let t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,y.INLINE)!=null&&this.quill.format(e,!1,d.sources.USER)})}else this.quill.removeFormat(r.index,r.length,d.sources.USER)},direction(r){let{align:t}=this.quill.getFormat();r==="rtl"&&t==null?this.quill.format("align","right",d.sources.USER):!r&&t==="right"&&this.quill.format("align",!1,d.sources.USER),this.quill.format("direction",r,d.sources.USER)},indent(r){let t=this.quill.getSelection(),e=this.quill.getFormat(t),s=parseInt(e.indent||0,10);if(r==="+1"||r==="-1"){let n=r==="+1"?1:-1;e.direction==="rtl"&&(n*=-1),this.quill.format("indent",s+n,d.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,d.sources.USER)},list(r){let t=this.quill.getSelection(),e=this.quill.getFormat(t);r==="check"?e.list==="checked"||e.list==="unchecked"?this.quill.format("list",!1,d.sources.USER):this.quill.format("list","unchecked",d.sources.USER):this.quill.format("list",r,d.sources.USER)}}};var ix='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',ox='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',ax='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',lx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',ux='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/>
49<path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',cx='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',fx='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',hx='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',sf='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',dx='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',px='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',mx='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',gx='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',bx='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',yx='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',xx='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816
49H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',vx='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',Ax='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Ex='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Nx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',wx='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Tx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',Sx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',Lx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Ox='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',qx='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Cx='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/>
49<path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',_x='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Ix='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',kx='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Rx='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',Bx='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',Mx='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',fe={align:{"":ix,center:ox,right:ax,justify:lx},background:ux,blockquote:cx,bold:fx,clean:hx,code:sf,"code-block":sf,color:dx,direction:{"":px,rtl:mx},formula:gx,header:{1:bx,2:yx,3:xx,4:vx,5:Ax,6:Ex},italic:Nx,image:wx,indent:{"+1":Tx,"-1":Sx},link:Lx,list:{bullet:Ox,check:qx,ordered:Cx},script:{sub:_x,super:Ix},strike:kx,table:Rx,underline:Bx,video:Mx};var Dx='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',nf=0;function of(r,t){r.setAttribute(t,`${r.getAttribute(t)!=="true"}`)}var io=class{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),of(this.label,"aria-expanded"),of(this.options,"aria-hidden")}buildItem(t){let e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");let s=t.getAttribute("value");return s&&e.setAttribute("data-value",s),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",()=>{this.selectItem(e,!0)}),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(e,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),e}buildLabel(){let t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=Dx,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","fal
49se"),this.container.appendChild(t),t}buildOptions(){let t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${nf}`,nf+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(e=>{let s=this.buildItem(e);t.appendChild(s),e.selected===!0&&this.selectItem(s)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=this.container.querySelector(".ql-selected");t!==s&&(s?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){let s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);let e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}},he=io;var oo=class extends he{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(s=>{s.classList.add("ql-primary")})}buildItem(t){let e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);let s=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";s&&(s.tagName==="line"?s.style.stroke=n:s.style.fill=n)}},bn=oo;var ao=class extends he{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(s=>{s.innerHTML=e[s.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);let s=t||this.defaultItem;if(s!=null){if(this.label.innerHTML===s.innerHTML)return;this.label.innerHTML=s.innerHTML}}},yn=ao;var jx=r=>{let{overflowY:t}=getComputedStyle(r,null);return t!=="visible"&&t!=="clip"},lo=class{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,jx(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){let e=t.left+t.width/2-this.root.offsetWidth/2,s=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${s}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect(),o=0;if(i.right>n.right&&(o=n.right-i.right,this.root.style.left=`${e+o}px`),i.left<n.left&&(o=n.left-i.left,this.root.style.left=`${e+o}px`),i.bottom>n.bottom){let a=i.bottom-i.top,l=t.bottom-t.top+a;this.root.style.top=`${s-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},xn=lo;var Px=[!1,"center","right","justify"],Ux=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Fx=[!1,"serif","monospace"],Hx=["1","2","3",!1],zx=["small",!1,"large","huge"],Gt=class extends nr{constructor(t,e){super(t,e);let s=n=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",
vendor: 9,390 bytes, line 49
49s);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(n.target)||i.close()})};t.emitter.listenDOM("click",document.body,s)}addModule(t){let e=super.addModule(t);return t==="toolbar"&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach(s=>{(s.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),e[i]!=null))if(i==="direction")s.innerHTML=e[i][""]+e[i].rtl;else if(typeof e[i]=="string")s.innerHTML=e[i];else{let o=s.value||"";o!=null&&e[i][o]&&(s.innerHTML=e[i][o])}})})}buildPickers(t,e){this.pickers=Array.from(t).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&es(n,Px),typeof e.align=="object"))return new yn(n,e.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let i=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&es(n,Ux,i==="background"?"#ffffff":"#000000"),new bn(n,e[i])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?es(n,Fx):n.classList.contains("ql-header")?es(n,Hx):n.classList.contains("ql-size")&&es(n,zx)),new he(n)});let s=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(x.events.EDITOR_CHANGE,s)}};Gt.DEFAULTS=tt({},nr.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{let t=this.quill.getSelection(!0);this.quill.uploader.upload(t,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var fr=class extends xn{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;e!=null?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let s=this.quill.getBounds(this.quill.selection.savedRange);s!=null&&this.position(s),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,x.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,x.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=$x(t);case"formula":{if(!t)break;let e=this.quill.getSelection(!0);if(e!=null){let s=e.index+e.length;this.quill.insertEmbed(s,this.root.getAttribute("data-mode"),t,x.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",x.sources.USER),this.quill.setSelection(s+2,x.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function $x(r){let t=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:r}function es(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(s=>{let n=document.createElement("option");s===e?n.setAttribute("selected","selected"):n.setAttribute("value",String(s)),r.appendChild(n)})}var Kx=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],vn=class extends fr{constructor(t,e){super(t,e),this.quill.on(x.events.EDITOR_CHANGE,(s,n,i,o)=>{if(s===x.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&o===x.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let a=this.quill.getLines(n.index,n.length);if(a.length===1){let l=this.quill.getBounds(n);l!=null&&this.position(l)}else{let l=a[a.length-1],u=this.quill.getIndex(l),c=Math.min(l.length()-1,n.index+n.length-u),f=this.quill.getBounds(new Y(u,c));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(x.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let t=this.quill.getSelection();if(t!=null){let e=this.quill.getBounds(t);e!=null&&this.position(e)}},1)})}cancel(){this.show()}position(t){let e=super.position(t),s=this.root.querySelector(".ql-tooltip-arrow");return s.style.marginLeft="",e!==0&&(s.style.marginLeft=`${-1*e-s.offsetWidth/2}px`),e}};m(vn,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var rs=class extends Gt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=Kx),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new vn(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),fe),this.buildPickers(t.container.querySelectorAll("select"),fe))}};rs.DEFAULTS=tt({},Gt.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,d.sources.USER)}}}}});var Gx=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],An=class extends fr{constructor(){super(...arguments);m(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(this.linkRange!=null){let s=this.linkRange;this.restoreFocus(),this.quill.formatText(s,"link",!1,x.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(x.events.SELECTION_CHANGE,(e,s,n)=>{if(e!=null){if(e.length===0&&n===x.sources.USER){let[i,o]=this.quill.scroll.descendant(ct,e.index);if(i!=null){this.linkRange=new Y(e.index-o,i.length());let a=ct.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();let l=this.quill.getBounds(this.linkRange);l!=null&&this.position(l);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};m(An,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var En=class extends Gt{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=Gx),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),fe),this.buildPickers(t.container.querySelectorAll("select"),fe),this.tooltip=new An(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(e,s)=>{t.handlers.link.call(t,!s.format.link)}))}};En.DEFAULTS=tt({},Gt.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){let t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0&&(e=`mailto:${e}`);let{tooltip:s}=this.quill.theme;s.edit("link",e)}else this.quill.format("link",!1,d.sources.USER)}}}}});var af=En;pn.register({"attributors/attribute/direction":nn,"attributors/class/align":zi,"attributors/class/background":Tc,"attributors/class/color":wc,"attributors/class/direction":Ki,"attributors/class/font":Vi,"attributors/class/size":Wi,"attributors/style/align":sn,"attributors/style/background":jr,"attributors/style/color":Dr,"attributors/style/direction":on,"attributors/style/font":an,"attributors/style/size":ln},!0);pn.register({"formats/align":zi,"formats/direction":Ki,"formats/indent":Uc,"formats/background":jr,"formats/color":Dr,"formats/font":Vi,"formats/size":Wi,"formats/blockquote":Fc,"formats/code-block":M,"formats/header":Hc,"formats/list":ce,"formats/bold":ar,"formats/code":or,"formats/ital
49ic":zc,"formats/link":ct,"formats/script":$c,"formats/strike":Kc,"formats/underline":Gc,"formats/formula":Vc,"formats/image":Zc,"formats/video":Yc,"modules/syntax":Jr,"modules/table":Jc,"modules/toolbar":cr,"themes/bubble":rs,"themes/snow":af,"ui/icons":fe,"ui/picker":he,"ui/icon-picker":yn,"ui/color-picker":bn,"ui/tooltip":xn},!0);var K3=pn;export{R as Module,vr as Parchment,Y as Range,K3 as default}; 50/*! Bundled license information: 51 52lodash-es/lodash.js: 53 (** 54 * @license 55 * Lodash (Custom Build) <https://lodash.com/> 56 * Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./` 57 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> 58 * Released under MIT license <https://lodash.com/license> 59 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> 60 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 61 *) 62*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.