No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

2 líneas
202 KiB

  1. (self["webpackChunkTruckShop"]=self["webpackChunkTruckShop"]||[]).push([[7882],{680:function(t,e,n){n(4114);var r=-1,i=1,s=0;function o(t,e,n,r,i){if(t===e)return t?[[s,t]]:[];if(null!=n){var o=L(t,e,n);if(o)return o}var a=u(t,e),c=t.substring(0,a);t=t.substring(a),e=e.substring(a),a=d(t,e);var h=t.substring(t.length-a);t=t.substring(0,t.length-a),e=e.substring(0,e.length-a);var f=l(t,e);return c&&f.unshift([s,c]),h&&f.push([s,h]),N(f,i),r&&p(f),f}function l(t,e){var n;if(!t)return[[i,e]];if(!e)return[[r,t]];var l=t.length>e.length?t:e,c=t.length>e.length?e:t,u=l.indexOf(c);if(-1!==u)return n=[[i,l.substring(0,u)],[s,c],[i,l.substring(u+c.length)]],t.length>e.length&&(n[0][0]=n[2][0]=r),n;if(1===c.length)return[[r,t],[i,e]];var h=f(t,e);if(h){var d=h[0],p=h[1],g=h[2],m=h[3],b=h[4],v=o(d,g),y=o(p,m);return v.concat([[s,b]],y)}return a(t,e)}function a(t,e){for(var n=t.length,s=e.length,o=Math.ceil((n+s)/2),l=o,a=2*o,u=new Array(a),h=new Array(a),d=0;d<a;d++)u[d]=-1,h[d]=-1;u[l+1]=0,h[l+1]=0;for(var f=n-s,p=f%2!==0,g=0,m=0,b=0,v=0,y=0;y<o;y++){for(var x=-y+g;x<=y-m;x+=2){var N=l+x;_=x===-y||x!==y&&u[N-1]<u[N+1]?u[N+1]:u[N-1]+1;var w=_-x;while(_<n&&w<s&&t.charAt(_)===e.charAt(w))_++,w++;if(u[N]=_,_>n)m+=2;else if(w>s)g+=2;else if(p){var E=l+f-x;if(E>=0&&E<a&&-1!==h[E]){var A=n-h[E];if(_>=A)return c(t,e,_,w)}}}for(var q=-y+b;q<=y-v;q+=2){E=l+q;A=q===-y||q!==y&&h[E-1]<h[E+1]?h[E+1]:h[E-1]+1;var k=A-q;while(A<n&&k<s&&t.charAt(n-A-1)===e.charAt(s-k-1))A++,k++;if(h[E]=A,A>n)v+=2;else if(k>s)b+=2;else if(!p){N=l+f-q;if(N>=0&&N<a&&-1!==u[N]){var _=u[N];w=l+_-N;if(A=n-A,_>=A)return c(t,e,_,w)}}}}return[[r,t],[i,e]]}function c(t,e,n,r){var i=t.substring(0,n),s=e.substring(0,r),l=t.substring(n),a=e.substring(r),c=o(i,s),u=o(l,a);return c.concat(u)}function u(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;var n=0,r=Math.min(t.length,e.length),i=r,s=0;while(n<i)t.substring(s,i)==e.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return w(t.charCodeAt(i-1))&&i--,i}function h(t,e){var n=t.length,r=e.length;if(0==n||0==r)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;var s=0,o=1;while(1){var l=t.substring(i-o),a=e.indexOf(l);if(-1==a)return s;o+=a,0!=a&&t.substring(i-o)!=e.substring(0,o)||(s=o,o++)}}function d(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;var n=0,r=Math.min(t.length,e.length),i=r,s=0;while(n<i)t.substring(t.length-i,t.length-s)==e.substring(e.length-i,e.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return E(t.charCodeAt(t.length-i))&&i--,i}function f(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function i(t,e,n){var r,i,s,o,l=t.substring(n,n+Math.floor(t.length/4)),a=-1,c="";while(-1!==(a=e.indexOf(l,a+1))){var h=u(t.substring(n),e.substring(a)),f=d(t.substring(0,n),e.substring(0,a));c.length<f+h&&(c=e.substring(a-f,a)+e.substring(a,a+h),r=t.substring(0,n-f),i=t.substring(n+h),s=e.substring(0,a-f),o=e.substring(a+h))}return 2*c.length>=t.length?[r,i,s,o,c]:null}var s,o,l,a,c,h=i(n,r,Math.ceil(n.length/4)),f=i(n,r,Math.ceil(n.length/2));if(!h&&!f)return null;s=f?h&&h[4].length>f[4].length?h:f:h,t.length>e.length?(o=s[0],l=s[1],a=s[2],c=s[3]):(a=s[0],c=s[1],o=s[2],l=s[3]);var p=s[4];return[o,l,a,c,p]}function p(t){var e=!1,n=[],o=0,l=null,a=0,c=0,u=0,d=0,f=0;while(a<t.length)t[a][0]==s?(n[o++]=a,c=d,u=f,d=0,f=0,l=t[a][1]):(t[a][0]==i?d+=t[a][1].length:f+=t[a][1].length,l&&l.length<=Math.max(c,u)&&l.length<=Math.max(d,f)&&(t.splice(n[o-1],0,[r,l]),t[n[o-1]+1][0]=i,o--,o--,a=o>0?n[o-1]:-1,c=0,u=0,d=0,f=0,l=null,e=!0)),a++;e&&N(t),x(t),a=1;while(a<t.length){if(t[a-1][0]==r&&t[a][0]==i){var p=t[a-1][1],g=t[a][1],m=h(p,g),b=h(g,p);m>=b?(m>=p.length/2||m>=g.length/2)&&(t.splice(a,0,[s,g.substring(0,m)]),t[a-1][1]=p.substring(0,p.length-m),t[a+1][1]=g.substring(m),a++):(b>=p.length/2||b>=g.length/2)&&(t.splice(a,0,[s,p.substring(0,b)]),t[a-1][0]=i,t[a-1][1]=g.substring(0,g.length-b),t[a+1][0]=r,t[a+1][1]=p.substring(b),a++),a++}a++}}var g=/[^a-zA-Z0-9]/,m=/\s/,b=/[\r\n]/,v=/\n\r?\n$/,y=/^\r?\n\r?\n/;function x(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),i=n.match(g),s=r.match(g),o=i&&n.match(m),l=s&&r.match(m),a=o&&n.match(b),c=l&&r.match(b),u=a&&t.match(v),h=c&&e.match(y);return u||h?5:a||c?4:i&&!o&&l?3:o||l?2:i||s?1:0}var n=1;while(n<t.length-1){if(t[n-1][0]==s&&t[n+1][0]==s){var r=t[n-1][1],i=t[n][1],o=t[n+1][1],l=d(r,i);if(l){var a=i.substring(i.length-l);r=r.substring(0,r.length-l),i=a+i.substring(0,i.length-l),o=a+o}var c=r,u=i,h=o,f=e(r,i)+e(i,o);while(i.charAt(0)===o.charAt(0)){r+=i.charAt(0),i=i.substring(1)+o.charAt(0),o=o.substring(1);var p=e(r,i)+e(i,o);p>=f&&(f=p,c=r,u=i,h=o)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,h?t[n+1][1]=h:(t.splice(n+1,1),n--))}n++}}function N(t,e){t.push([s,""]);var n,o=0,l=0,a=0,c="",h="";while(o<t.length)if(o<t.length-1&&!t[o][1])t.splice(o,1);else switch(t[o][0]){case i:a++,h+=t[o][1],o++;break;case r:l++,c+=t[o][1],o++;break;case s:var f=o-a-l-1;if(e){if(f>=0&&q(t[f][1])){var p=t[f][1].slice(-1);if(t[f][1]=t[f][1].slice(0,-1),c=p+c,h=p+h,!t[f][1]){t.splice(f,1),o--;var g=f-1;t[g]&&t[g][0]===i&&(a++,h=t[g][1]+h,g--),t[g]&&t[g][0]===r&&(l++,c=t[g][1]+c,g--),f=g}}if(A(t[o][1])){p=t[o][1].charAt(0);t[o][1]=t[o][1].slice(1),c+=p,h+=p}}if(o<t.length-1&&!t[o][1]){t.splice(o,1);break}if(c.length>0||h.length>0){c.length>0&&h.length>0&&(n=u(h,c),0!==n&&(f>=0?t[f][1]+=h.substring(0,n):(t.splice(0,0,[s,h.substring(0,n)]),o++),h=h.substring(n),c=c.substring(n)),n=d(h,c),0!==n&&(t[o][1]=h.substring(h.length-n)+t[o][1],h=h.substring(0,h.length-n),c=c.substring(0,c.length-n)));var m=a+l;0===c.length&&0===h.length?(t.splice(o-m,m),o-=m):0===c.length?(t.splice(o-m,m,[i,h]),o=o-m+1):0===h.length?(t.splice(o-m,m,[r,c]),o=o-m+1):(t.splice(o-m,m,[r,c],[i,h]),o=o-m+2)}0!==o&&t[o-1][0]===s?(t[o-1][1]+=t[o][1],t.splice(o,1)):o++,a=0,l=0,c="",h="";break}""===t[t.length-1][1]&&t.pop();var b=!1;o=1;while(o<t.length-1)t[o-1][0]===s&&t[o+1][0]===s&&(t[o][1].substring(t[o][1].length-t[o-1][1].length)===t[o-1][1]?(t[o][1]=t[o-1][1]+t[o][1].substring(0,t[o][1].length-t[o-1][1].length),t[o+1][1]=t[o-1][1]+t[o+1][1],t.splice(o-1,1),b=!0):t[o][1].substring(0,t[o+1][1].length)==t[o+1][1]&&(t[o-1][1]+=t[o+1][1],t[o][1]=t[o][1].substring(t[o+1][1].length)+t[o+1][1],t.splice(o+1,1),b=!0)),o++;b&&N(t,e)}function w(t){return t>=55296&&t<=56319}function E(t){return t>=56320&&t<=57343}function A(t){return E(t.charCodeAt(0))}function q(t){return w(t.charCodeAt(t.length-1))}function k(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function _(t,e,n,o){return q(t)||A(o)?null:k([[s,t],[r,e],[i,n],[s,o]])}function L(t,e,n){var r="number"===typeof n?{index:n,length:0}:n.oldRange,i="number"===typeof n?null:n.newRange,s=t.length,o=e.length;if(0===r.length&&(null===i||0===i.length)){var l=r.index,a=t.slice(0,l),c=t.slice(l),u=i?i.index:null,h=l+o-s;if((null===u||u===h)&&!(h<0||h>o)){var d=e.slice(0,h),f=e.slice(h);if(f===c){var p=Math.min(l,h),g=a.slice(0,p),m=d.slice(0,p);if(g===m){var b=a.slice(p),v=d.slice(p);return _(g,b,v,c)}}}if(null===u||u===l){var y=l;d=e.slice(0,y),f=e.slice(y);if(d===a){var x=Math.min(s-y,o-y),N=c.slice(c.length-x),w=f.slice(f.length-x);if(N===w){b=c.slice(0,c.length-x),v=f.slice(0,f.length-x);return _(a,b,v,N)}}}}if(r.length>0&&i&&0===i.length){g=t.slice(0,r.index),N=t.slice(r.index+r.length),p=g.length,x=N.length;if(!(o<p+x)){m=e.slice(0,p),w=e.slice(o-x);if(g===m&&N===w){b=t.slice(p,s-x),v=e.slice(p,o-x);return _(g,b,v,N)}}}return null}function O(t,e,n,r){return o(t,e,n,r,!0)}O.INSERT=i,O.DELETE=r,O.EQUAL=s,t.exports=O},1029:function(t,e,n){t=n.nmd(t),n(4114),n(8111),n(7588),n(1701);var r=200,i="__lodash_hash_undefined__",s=1,o=2,l=9007199254740991,a="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",v="[object Null]",y="[object Object]",x="[object Promise]",N="[object Proxy]",w="[object RegExp]",E="[object Set]",A="[object String]",q="[object Symbol]",k="[object Undefined]",_="[object WeakMap]",L="[object ArrayBuffer]",O="[object DataView]",S="[object Float32Array]",T="[object Float64Array]",j="[object Int8Array]",C="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",M="[object Uint8ClampedArray]",B="[object Uint16Array]",D="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,P=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,F={};F[S]=F[T]=F[j]=F[C]=F[R]=F[I]=F[M]=F[B]=F[D]=!0,F[a]=F[c]=F[L]=F[h]=F[O]=F[d]=F[f]=F[p]=F[m]=F[b]=F[y]=F[w]=F[E]=F[A]=F[_]=!1;var H="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,$="object"==typeof self&&self&&self.Object===Object&&self,V=H||$||Function("return this")(),K=e&&!e.nodeType&&e,W=K&&t&&!t.nodeType&&t,Z=W&&W.exports===K,G=Z&&H.process,X=function(){try{return G&&G.binding&&G.binding("util")}catch(t){}}(),Y=X&&X.isTypedArray;function Q(t,e){var n=-1,r=null==t?0:t.length,i=0,s=[];while(++n<r){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function J(t,e){var n=-1,r=e.length,i=t.length;while(++n<r)t[i+n]=e[n];return t}function tt(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(e(t[n],n,t))return!0;return!1}function et(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}function nt(t){return function(e){return t(e)}}function rt(t,e){return t.has(e)}function it(t,e){return null==t?void 0:t[e]}function st(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ot(t,e){return function(n){return t(e(n))}}function lt(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var at=Array.prototype,ct=Function.prototype,ut=Object.prototype,ht=V["__core-js_shared__"],dt=ct.toString,ft=ut.hasOwnProperty,pt=function(){var t=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),gt=ut.toString,mt=RegExp("^"+dt.call(ft).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=Z?V.Buffer:void 0,vt=V.Symbol,yt=V.Uint8Array,xt=ut.propertyIsEnumerable,Nt=at.splice,wt=vt?vt.toStringTag:void 0,Et=Object.getOwnPropertySymbols,At=bt?bt.isBuffer:void 0,qt=ot(Object.keys,Object),kt=_e(V,"DataView"),_t=_e(V,"Map"),Lt=_e(V,"Promise"),Ot=_e(V,"Set"),St=_e(V,"WeakMap"),Tt=_e(Object,"create"),jt=Me(kt),Ct=Me(_t),Rt=Me(Lt),It=Me(Ot),Mt=Me(St),Bt=vt?vt.prototype:void 0,Dt=Bt?Bt.valueOf:void 0;function Ut(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Pt(){this.__data__=Tt?Tt(null):{},this.size=0}function zt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ft(t){var e=this.__data__;if(Tt){var n=e[t];return n===i?void 0:n}return ft.call(e,t)?e[t]:void 0}function Ht(t){var e=this.__data__;return Tt?void 0!==e[t]:ft.call(e,t)}function $t(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tt&&void 0===e?i:e,this}function Vt(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Kt(){this.__data__=[],this.size=0}function Wt(t){var e=this.__data__,n=fe(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Nt.call(e,n,1),--this.size,!0}function Zt(t){var e=this.__data__,n=fe(e,t);return n<0?void 0:e[n][1]}function Gt(t){return fe(this.__data__,t)>-1}function Xt(t,e){var n=this.__data__,r=fe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Yt(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Qt(){this.size=0,this.__data__={hash:new Ut,map:new(_t||Vt),string:new Ut}}function Jt(t){var e=ke(this,t)["delete"](t);return this.size-=e?1:0,e}function te(t){return ke(this,t).get(t)}function ee(t){return ke(this,t).has(t)}function ne(t,e){var n=ke(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function re(t){var e=-1,n=null==t?0:t.length;this.__data__=new Yt;while(++e<n)this.add(t[e])}function ie(t){return this.__data__.set(t,i),this}function se(t){return this.__data__.has(t)}function oe(t){var e=this.__data__=new Vt(t);this.size=e.size}function le(){this.__data__=new Vt,this.size=0}function ae(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function ce(t){return this.__data__.get(t)}function ue(t){return this.__data__.has(t)}function he(t,e){var n=this.__data__;if(n instanceof Vt){var i=n.__data__;if(!_t||i.length<r-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Yt(i)}return n.set(t,e),this.size=n.size,this}function de(t,e){var n=Ue(t),r=!n&&De(t),i=!n&&!r&&ze(t),s=!n&&!r&&!i&&We(t),o=n||r||i||s,l=o?et(t.length,String):[],a=l.length;for(var c in t)!e&&!ft.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Te(c,a))||l.push(c);return l}function fe(t,e){var n=t.length;while(n--)if(Be(t[n][0],e))return n;return-1}function pe(t,e,n){var r=e(t);return Ue(t)?r:J(r,n(t))}function ge(t){return null==t?void 0===t?k:v:wt&&wt in Object(t)?Le(t):Ie(t)}function me(t){return Ke(t)&&ge(t)==a}function be(t,e,n,r,i){return t===e||(null==t||null==e||!Ke(t)&&!Ke(e)?t!==t&&e!==e:ve(t,e,n,r,be,i))}function ve(t,e,n,r,i,o){var l=Ue(t),u=Ue(e),h=l?c:Se(t),d=u?c:Se(e);h=h==a?y:h,d=d==a?y:d;var f=h==y,p=d==y,g=h==d;if(g&&ze(t)){if(!ze(e))return!1;l=!0,f=!1}if(g&&!f)return o||(o=new oe),l||We(t)?we(t,e,n,r,i,o):Ee(t,e,h,n,r,i,o);if(!(n&s)){var m=f&&ft.call(t,"__wrapped__"),b=p&&ft.call(e,"__wrapped__");if(m||b){var v=m?t.value():t,x=b?e.value():e;return o||(o=new oe),i(v,x,n,r,o)}}return!!g&&(o||(o=new oe),Ae(t,e,n,r,i,o))}function ye(t){if(!Ve(t)||Ce(t))return!1;var e=He(t)?mt:P;return e.test(Me(t))}function xe(t){return Ke(t)&&$e(t.length)&&!!F[ge(t)]}function Ne(t){if(!Re(t))return qt(t);var e=[];for(var n in Object(t))ft.call(t,n)&&"constructor"!=n&&e.push(n);return e}function we(t,e,n,r,i,l){var a=n&s,c=t.length,u=e.length;if(c!=u&&!(a&&u>c))return!1;var h=l.get(t);if(h&&l.get(e))return h==e;var d=-1,f=!0,p=n&o?new re:void 0;l.set(t,e),l.set(e,t);while(++d<c){var g=t[d],m=e[d];if(r)var b=a?r(m,g,d,e,t,l):r(g,m,d,t,e,l);if(void 0!==b){if(b)continue;f=!1;break}if(p){if(!tt(e,(function(t,e){if(!rt(p,e)&&(g===t||i(g,t,n,r,l)))return p.push(e)}))){f=!1;break}}else if(g!==m&&!i(g,m,n,r,l)){f=!1;break}}return l["delete"](t),l["delete"](e),f}function Ee(t,e,n,r,i,l,a){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case L:return!(t.byteLength!=e.byteLength||!l(new yt(t),new yt(e)));case h:case d:case b:return Be(+t,+e);case f:return t.name==e.name&&t.message==e.message;case w:case A:return t==e+"";case m:var c=st;case E:var u=r&s;if(c||(c=lt),t.size!=e.size&&!u)return!1;var p=a.get(t);if(p)return p==e;r|=o,a.set(t,e);var g=we(c(t),c(e),r,i,l,a);return a["delete"](t),g;case q:if(Dt)return Dt.call(t)==Dt.call(e)}return!1}function Ae(t,e,n,r,i,o){var l=n&s,a=qe(t),c=a.length,u=qe(e),h=u.length;if(c!=h&&!l)return!1;var d=c;while(d--){var f=a[d];if(!(l?f in e:ft.call(e,f)))return!1}var p=o.get(t);if(p&&o.get(e))return p==e;var g=!0;o.set(t,e),o.set(e,t);var m=l;while(++d<c){f=a[d];var b=t[f],v=e[f];if(r)var y=l?r(v,b,f,e,t,o):r(b,v,f,t,e,o);if(!(void 0===y?b===v||i(b,v,n,r,o):y)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var x=t.constructor,N=e.constructor;x==N||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof N&&N instanceof N||(g=!1)}return o["delete"](t),o["delete"](e),g}function qe(t){return pe(t,Ze,Oe)}function ke(t,e){var n=t.__data__;return je(e)?n["string"==typeof e?"string":"hash"]:n.map}function _e(t,e){var n=it(t,e);return ye(n)?n:void 0}function Le(t){var e=ft.call(t,wt),n=t[wt];try{t[wt]=void 0;var r=!0}catch(s){}var i=gt.call(t);return r&&(e?t[wt]=n:delete t[wt]),i}Ut.prototype.clear=Pt,Ut.prototype["delete"]=zt,Ut.prototype.get=Ft,Ut.prototype.has=Ht,Ut.prototype.set=$t,Vt.prototype.clear=Kt,Vt.prototype["delete"]=Wt,Vt.prototype.get=Zt,Vt.prototype.has=Gt,Vt.prototype.set=Xt,Yt.prototype.clear=Qt,Yt.prototype["delete"]=Jt,Yt.prototype.get=te,Yt.prototype.has=ee,Yt.prototype.set=ne,re.prototype.add=re.prototype.push=ie,re.prototype.has=se,oe.prototype.clear=le,oe.prototype["delete"]=ae,oe.prototype.get=ce,oe.prototype.has=ue,oe.prototype.set=he;var Oe=Et?function(t){return null==t?[]:(t=Object(t),Q(Et(t),(function(e){return xt.call(t,e)})))}:Ge,Se=ge;function Te(t,e){return e=null==e?l:e,!!e&&("number"==typeof t||z.test(t))&&t>-1&&t%1==0&&t<e}function je(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Ce(t){return!!pt&&pt in t}function Re(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ut;return t===n}function Ie(t){return gt.call(t)}function Me(t){if(null!=t){try{return dt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Be(t,e){return t===e||t!==t&&e!==e}(kt&&Se(new kt(new ArrayBuffer(1)))!=O||_t&&Se(new _t)!=m||Lt&&Se(Lt.resolve())!=x||Ot&&Se(new Ot)!=E||St&&Se(new St)!=_)&&(Se=function(t){var e=ge(t),n=e==y?t.constructor:void 0,r=n?Me(n):"";if(r)switch(r){case jt:return O;case Ct:return m;case Rt:return x;case It:return E;case Mt:return _}return e});var De=me(function(){return arguments}())?me:function(t){return Ke(t)&&ft.call(t,"callee")&&!xt.call(t,"callee")},Ue=Array.isArray;function Pe(t){return null!=t&&$e(t.length)&&!He(t)}var ze=At||Xe;function Fe(t,e){return be(t,e)}function He(t){if(!Ve(t))return!1;var e=ge(t);return e==p||e==g||e==u||e==N}function $e(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Ve(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ke(t){return null!=t&&"object"==typeof t}var We=Y?nt(Y):xe;function Ze(t){return Pe(t)?de(t):Ne(t)}function Ge(){return[]}function Xe(){return!1}t.exports=Fe},1193:function(t,e,n){"use strict";n.d(e,{Ay:function(){return sp}});var r={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function s(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function o(t){var e=s(t,"string");return"symbol"==i(e)?e:e+""}function l(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(r),n.d(r,{Attributor:function(){return Si},AttributorStore:function(){return zi},BlockBlot:function(){return is},ClassAttributor:function(){return Mi},ContainerBlot:function(){return ls},EmbedBlot:function(){return cs},InlineBlot:function(){return es},LeafBlot:function(){return Ki},ParentBlot:function(){return Yi},Registry:function(){return Ci},Scope:function(){return Oi},ScrollBlot:function(){return ps},StyleAttributor:function(){return Ui},TextBlot:function(){return bs}});n(8111),n(2489),n(116),n(7588),n(8237);function a(){this.__data__=[],this.size=0}var c=a;function u(t,e){return t===e||t!==t&&e!==e}var h=u;function d(t,e){var n=t.length;while(n--)if(h(t[n][0],e))return n;return-1}var f=d,p=Array.prototype,g=p.splice;function m(t){var e=this.__data__,n=f(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():g.call(e,n,1),--this.size,!0}var b=m;function v(t){var e=this.__data__,n=f(e,t);return n<0?void 0:e[n][1]}var y=v;function x(t){return f(this.__data__,t)>-1}var N=x;n(4114);function w(t,e){var n=this.__data__,r=f(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var E=w;function A(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}A.prototype.clear=c,A.prototype["delete"]=b,A.prototype.get=y,A.prototype.has=N,A.prototype.set=E;var q=A;function k(){this.__data__=new q,this.size=0}var _=k;function L(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}var O=L;function S(t){return this.__data__.get(t)}var T=S;function j(t){return this.__data__.has(t)}var C=j,R="object"==typeof global&&global&&global.Object===Object&&global,I=R,M="object"==typeof self&&self&&self.Object===Object&&self,B=I||M||Function("return this")(),D=B,U=D.Symbol,P=U,z=Object.prototype,F=z.hasOwnProperty,H=z.toString,$=P?P.toStringTag:void 0;function V(t){var e=F.call(t,$),n=t[$];try{t[$]=void 0;var r=!0}catch(s){}var i=H.call(t);return r&&(e?t[$]=n:delete t[$]),i}var K=V,W=Object.prototype,Z=W.toString;function G(t){return Z.call(t)}var X=G,Y="[object Null]",Q="[object Undefined]",J=P?P.toStringTag:void 0;function tt(t){return null==t?void 0===t?Q:Y:J&&J in Object(t)?K(t):X(t)}var et=tt;function nt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var rt=nt,it="[object AsyncFunction]",st="[object Function]",ot="[object GeneratorFunction]",lt="[object Proxy]";function at(t){if(!rt(t))return!1;var e=et(t);return e==st||e==ot||e==it||e==lt}var ct=at,ut=D["__core-js_shared__"],ht=ut,dt=function(){var t=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ft(t){return!!dt&&dt in t}var pt=ft,gt=Function.prototype,mt=gt.toString;function bt(t){if(null!=t){try{return mt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var vt=bt,yt=/[\\^$.*+?()[\]{}|]/g,xt=/^\[object .+?Constructor\]$/,Nt=Function.prototype,wt=Object.prototype,Et=Nt.toString,At=wt.hasOwnProperty,qt=RegExp("^"+Et.call(At).replace(yt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kt(t){if(!rt(t)||pt(t))return!1;var e=ct(t)?qt:xt;return e.test(vt(t))}var _t=kt;function Lt(t,e){return null==t?void 0:t[e]}var Ot=Lt;function St(t,e){var n=Ot(t,e);return _t(n)?n:void 0}var Tt=St,jt=Tt(D,"Map"),Ct=jt,Rt=Tt(Object,"create"),It=Rt;function Mt(){this.__data__=It?It(null):{},this.size=0}var Bt=Mt;function Dt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Ut=Dt,Pt="__lodash_hash_undefined__",zt=Object.prototype,Ft=zt.hasOwnProperty;function Ht(t){var e=this.__data__;if(It){var n=e[t];return n===Pt?void 0:n}return Ft.call(e,t)?e[t]:void 0}var $t=Ht,Vt=Object.prototype,Kt=Vt.hasOwnProperty;function Wt(t){var e=this.__data__;return It?void 0!==e[t]:Kt.call(e,t)}var Zt=Wt,Gt="__lodash_hash_undefined__";function Xt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=It&&void 0===e?Gt:e,this}var Yt=Xt;function Qt(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}Qt.prototype.clear=Bt,Qt.prototype["delete"]=Ut,Qt.prototype.get=$t,Qt.prototype.has=Zt,Qt.prototype.set=Yt;var Jt=Qt;function te(){this.size=0,this.__data__={hash:new Jt,map:new(Ct||q),string:new Jt}}var ee=te;n(1701);function ne(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var re=ne;function ie(t,e){var n=t.__data__;return re(e)?n["string"==typeof e?"string":"hash"]:n.map}var se=ie;function oe(t){var e=se(this,t)["delete"](t);return this.size-=e?1:0,e}var le=oe;function ae(t){return se(this,t).get(t)}var ce=ae;function ue(t){return se(this,t).has(t)}var he=ue;function de(t,e){var n=se(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var fe=de;function pe(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}pe.prototype.clear=ee,pe.prototype["delete"]=le,pe.prototype.get=ce,pe.prototype.has=he,pe.prototype.set=fe;var ge=pe,me=200;function be(t,e){var n=this.__data__;if(n instanceof q){var r=n.__data__;if(!Ct||r.length<me-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ge(r)}return n.set(t,e),this.size=n.size,this}var ve=be;function ye(t){var e=this.__data__=new q(t);this.size=e.size}ye.prototype.clear=_,ye.prototype["delete"]=O,ye.prototype.get=T,ye.prototype.has=C,ye.prototype.set=ve;var xe=ye,Ne=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),we=Ne;function Ee(t,e,n){"__proto__"==e&&we?we(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Ae=Ee;function qe(t,e,n){(void 0!==n&&!h(t[e],n)||void 0===n&&!(e in t))&&Ae(t,e,n)}var ke=qe;function _e(t){return function(e,n,r){var i=-1,s=Object(e),o=r(e),l=o.length;while(l--){var a=o[t?l:++i];if(!1===n(s[a],a,s))break}return e}}var Le=_e,Oe=Le(),Se=Oe,Te="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Te&&"object"==typeof module&&module&&!module.nodeType&&module,Ce=je&&je.exports===Te,Re=Ce?D.Buffer:void 0,Ie=Re?Re.allocUnsafe:void 0;function Me(t,e){if(e)return t.slice();var n=t.length,r=Ie?Ie(n):new t.constructor(n);return t.copy(r),r}var Be=Me,De=D.Uint8Array,Ue=De;function Pe(t){var e=new t.constructor(t.byteLength);return new Ue(e).set(new Ue(t)),e}var ze=Pe;function Fe(t,e){var n=e?ze(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var He=Fe;function $e(t,e){var n=-1,r=t.length;e||(e=Array(r));while(++n<r)e[n]=t[n];return e}var Ve=$e,Ke=Object.create,We=function(){function t(){}return function(e){if(!rt(e))return{};if(Ke)return Ke(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Ze=We;function Ge(t,e){return function(n){return t(e(n))}}var Xe=Ge,Ye=Xe(Object.getPrototypeOf,Object),Qe=Ye,Je=Object.prototype;function tn(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Je;return t===n}var en=tn;function nn(t){return"function"!=typeof t.constructor||en(t)?{}:Ze(Qe(t))}var rn=nn;function sn(t){return null!=t&&"object"==typeof t}var on=sn,ln="[object Arguments]";function an(t){return on(t)&&et(t)==ln}var cn=an,un=Object.prototype,hn=un.hasOwnProperty,dn=un.propertyIsEnumerable,fn=cn(function(){return arguments}())?cn:function(t){return on(t)&&hn.call(t,"callee")&&!dn.call(t,"callee")},pn=fn,gn=Array.isArray,mn=gn,bn=9007199254740991;function vn(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=bn}var yn=vn;function xn(t){return null!=t&&yn(t.length)&&!ct(t)}var Nn=xn;function wn(t){return on(t)&&Nn(t)}var En=wn;function An(){return!1}var qn=An,kn="object"==typeof exports&&exports&&!exports.nodeType&&exports,_n=kn&&"object"==typeof module&&module&&!module.nodeType&&module,Ln=_n&&_n.exports===kn,On=Ln?D.Buffer:void 0,Sn=On?On.isBuffer:void 0,Tn=Sn||qn,jn=Tn,Cn="[object Object]",Rn=Function.prototype,In=Object.prototype,Mn=Rn.toString,Bn=In.hasOwnProperty,Dn=Mn.call(Object);function Un(t){if(!on(t)||et(t)!=Cn)return!1;var e=Qe(t);if(null===e)return!0;var n=Bn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Mn.call(n)==Dn}var Pn=Un,zn="[object Arguments]",Fn="[object Array]",Hn="[object Boolean]",$n="[object Date]",Vn="[object Error]",Kn="[object Function]",Wn="[object Map]",Zn="[object Number]",Gn="[object Object]",Xn="[object RegExp]",Yn="[object Set]",Qn="[object String]",Jn="[object WeakMap]",tr="[object ArrayBuffer]",er="[object DataView]",nr="[object Float32Array]",rr="[object Float64Array]",ir="[object Int8Array]",sr="[object Int16Array]",or="[object Int32Array]",lr="[object Uint8Array]",ar="[object Uint8ClampedArray]",cr="[object Uint16Array]",ur="[object Uint32Array]",hr={};function dr(t){return on(t)&&yn(t.length)&&!!hr[et(t)]}hr[nr]=hr[rr]=hr[ir]=hr[sr]=hr[or]=hr[lr]=hr[ar]=hr[cr]=hr[ur]=!0,hr[zn]=hr[Fn]=hr[tr]=hr[Hn]=hr[er]=hr[$n]=hr[Vn]=hr[Kn]=hr[Wn]=hr[Zn]=hr[Gn]=hr[Xn]=hr[Yn]=hr[Qn]=hr[Jn]=!1;var fr=dr;function pr(t){return function(e){return t(e)}}var gr=pr,mr="object"==typeof exports&&exports&&!exports.nodeType&&exports,br=mr&&"object"==typeof module&&module&&!module.nodeType&&module,vr=br&&br.exports===mr,yr=vr&&I.process,xr=function(){try{var t=br&&br.require&&br.require("util").types;return t||yr&&yr.binding&&yr.binding("util")}catch(e){}}(),Nr=xr,wr=Nr&&Nr.isTypedArray,Er=wr?gr(wr):fr,Ar=Er;function qr(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}var kr=qr,_r=Object.prototype,Lr=_r.hasOwnProperty;function Or(t,e,n){var r=t[e];Lr.call(t,e)&&h(r,n)&&(void 0!==n||e in t)||Ae(t,e,n)}var Sr=Or;function Tr(t,e,n,r){var i=!n;n||(n={});var s=-1,o=e.length;while(++s<o){var l=e[s],a=r?r(n[l],t[l],l,n,t):void 0;void 0===a&&(a=t[l]),i?Ae(n,l,a):Sr(n,l,a)}return n}var jr=Tr;function Cr(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}var Rr=Cr,Ir=9007199254740991,Mr=/^(?:0|[1-9]\d*)$/;function Br(t,e){var n=typeof t;return e=null==e?Ir:e,!!e&&("number"==n||"symbol"!=n&&Mr.test(t))&&t>-1&&t%1==0&&t<e}var Dr=Br,Ur=Object.prototype,Pr=Ur.hasOwnProperty;function zr(t,e){var n=mn(t),r=!n&&pn(t),i=!n&&!r&&jn(t),s=!n&&!r&&!i&&Ar(t),o=n||r||i||s,l=o?Rr(t.length,String):[],a=l.length;for(var c in t)!e&&!Pr.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Dr(c,a))||l.push(c);return l}var Fr=zr;function Hr(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}var $r=Hr,Vr=Object.prototype,Kr=Vr.hasOwnProperty;function Wr(t){if(!rt(t))return $r(t);var e=en(t),n=[];for(var r in t)("constructor"!=r||!e&&Kr.call(t,r))&&n.push(r);return n}var Zr=Wr;function Gr(t){return Nn(t)?Fr(t,!0):Zr(t)}var Xr=Gr;function Yr(t){return jr(t,Xr(t))}var Qr=Yr;function Jr(t,e,n,r,i,s,o){var l=kr(t,n),a=kr(e,n),c=o.get(a);if(c)ke(t,n,c);else{var u=s?s(l,a,n+"",t,e,o):void 0,h=void 0===u;if(h){var d=mn(a),f=!d&&jn(a),p=!d&&!f&&Ar(a);u=a,d||f||p?mn(l)?u=l:En(l)?u=Ve(l):f?(h=!1,u=Be(a,!0)):p?(h=!1,u=He(a,!0)):u=[]:Pn(a)||pn(a)?(u=l,pn(l)?u=Qr(l):rt(l)&&!ct(l)||(u=rn(a))):h=!1}h&&(o.set(a,u),i(u,a,r,s,o),o["delete"](a)),ke(t,n,u)}}var ti=Jr;function ei(t,e,n,r,i){t!==e&&Se(e,(function(s,o){if(i||(i=new xe),rt(s))ti(t,e,o,n,ei,r,i);else{var l=r?r(kr(t,o),s,o+"",t,e,i):void 0;void 0===l&&(l=s),ke(t,o,l)}}),Xr)}var ni=ei;function ri(t){return t}var ii=ri;function si(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var oi=si,li=Math.max;function ai(t,e,n){return e=li(void 0===e?t.length-1:e,0),function(){var r=arguments,i=-1,s=li(r.length-e,0),o=Array(s);while(++i<s)o[i]=r[e+i];i=-1;var l=Array(e+1);while(++i<e)l[i]=r[i];return l[e]=n(o),oi(t,this,l)}}var ci=ai;function ui(t){return function(){return t}}var hi=ui,di=we?function(t,e){return we(t,"toString",{configurable:!0,enumerable:!1,value:hi(e),writable:!0})}:ii,fi=di,pi=800,gi=16,mi=Date.now;function bi(t){var e=0,n=0;return function(){var r=mi(),i=gi-(r-n);if(n=r,i>0){if(++e>=pi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var vi=bi,yi=vi(fi),xi=yi;function Ni(t,e){return xi(ci(t,e,ii),t+"")}var wi=Ni;function Ei(t,e,n){if(!rt(n))return!1;var r=typeof e;return!!("number"==r?Nn(n)&&Dr(e,n.length):"string"==r&&e in n)&&h(n[e],t)}var Ai=Ei;function qi(t){return wi((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;s=t.length>3&&"function"==typeof s?(i--,s):void 0,o&&Ai(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);while(++r<i){var l=n[r];l&&t(e,l,r,s)}return e}))}var ki=qi,_i=ki((function(t,e,n){ni(t,e,n)})),Li=_i,Oi=(n(3579),(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(Oi||{}));class Si{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const r=Oi.TYPE&Oi.ATTRIBUTE;this.scope=null!=n.scope?n.scope&Oi.LEVEL|r:Oi.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}canAdd(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class Ti extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const ji=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,e)}return null}create(e,n,r){const i=this.query(n);if(null==i)throw new Ti(`Unable to create ${n} blot`);const s=i,o=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:s.create(r),l=new s(e,o,r);return t.blots.set(l.domNode,l),l}find(e,n=!1){return t.find(e,n)}query(t,e=Oi.ANY){let n;return"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&Oi.LEVEL&Oi.BLOCK?n=this.types.block:t&Oi.LEVEL&Oi.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(n=this.classes[t],!!n))),n=n||this.tags[t.tagName]),null==n?null:"scope"in n&&e&Oi.LEVEL&n.scope&&e&Oi.TYPE&n.scope?n:null}register(...t){return t.map((t=>{const e="blotName"in t,n="attrName"in t;if(!e&&!n)throw new Ti("Invalid definition");if(e&&"abstract"===t.blotName)throw new Ti("Cannot register abstract class");const r=e?t.blotName:n?t.attrName:void 0;return this.types[r]=t,n?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(null==this.tags[e]||null==t.className)&&(this.tags[e]=t)})))),t}))}};ji.blots=new WeakMap;let Ci=ji;function Ri(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}class Ii extends Si{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0)}remove(t){Ri(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(Ri(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const Mi=Ii;function Bi(t){const e=t.split("-"),n=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+n}class Di extends Si{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[Bi(this.keyName)]=e,!0)}remove(t){t.style[Bi(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[Bi(this.keyName)];return this.canAdd(t,e)?e:""}}const Ui=Di;class Pi{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Ci.find(this.domNode);if(null==t)return;const e=Si.keys(this.domNode),n=Mi.keys(this.domNode),r=Ui.keys(this.domNode);e.concat(n).concat(r).forEach((e=>{const n=t.scroll.query(e,Oi.ATTRIBUTE);n instanceof Si&&(this.attributes[n.attrName]=n)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const n=this.attributes[e].value(this.domNode);t.format(e,n)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}}const zi=Pi,Fi=class{constructor(t,e){this.scroll=t,this.domNode=e,Ci.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new Ti("Blot definition missing tagName");let e,n;return Array.isArray(this.tagName)?("string"==typeof t?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof t&&(n=t),e="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):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(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),Ci.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,r){const i=this.isolate(t,e);if(null!=this.scroll.query(n,Oi.BLOT)&&r)i.wrap(n,r);else if(null!=this.scroll.query(n,Oi.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);i.wrap(t),t.format(n,r)}}insertAt(t,e,n){const r=null==n?this.scroll.create("text",e):this.scroll.create(e,n),i=this.split(t);this.parent.insertBefore(r,i||void 0)}isolate(t,e){const n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n}length(){return 1}offset(t=this.parent){return null==this.parent||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(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,e){return 0===t?this:this.next}update(t,e){}wrap(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new Ti(`Cannot wrap ${t}`);return n.appendChild(this),n}};Fi.blotName="abstract";let Hi=Fi;const $i=class extends Hi{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 n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};$i.scope=Oi.INLINE_BLOT;let Vi=$i;const Ki=Vi;class Wi{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let n=e();for(;n&&t>0;)t-=1,n=e();return n}contains(t){const e=this.iterator();let n=e();for(;n;){if(n===t)return!0;n=e()}return!1}indexOf(t){const e=this.iterator();let n=e(),r=0;for(;n;){if(n===t)return r;r+=1,n=e()}return-1}insertBefore(t,e){null!=t&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(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,n=this.head;for(;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(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()=>{const e=t;return null!=t&&(t=t.next),e}}find(t,e=!1){const n=this.iterator();let r=n();for(;r;){const i=r.length();if(t<i||e&&t===i&&(null==r.next||0!==r.next.length()))return[r,t];t-=i,r=n()}return[null,0]}forEach(t){const e=this.iterator();let n=e();for(;n;)t(n),n=e()}forEachAt(t,e,n){if(e<=0)return;const[r,i]=this.find(t);let s=t-i;const o=this.iterator(r);let l=o();for(;l&&s<t+e;){const r=l.length();t>s?n(l,t-s,Math.min(e,s+r-t)):n(l,0,Math.min(r,t+e-s)),s+=r,l=o()}}map(t){return this.reduce(((e,n)=>(e.push(t(n)),e)),[])}reduce(t,e){const n=this.iterator();let r=n();for(;r;)e=t(e,r),r=n();return e}}function Zi(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const n=e.create(Oi.INLINE);return Array.from(t.childNodes).forEach((t=>{n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const Gi=class t extends Hi{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(e){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Wi,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=Zi(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof Ti)return;throw e}}))}deleteAt(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,n)=>{t.deleteAt(e,n)}))}descendant(e,n=0){const[r,i]=this.children.find(n);return null==e.blotName&&e(r)||null!=e.blotName&&r instanceof e?[r,i]:r instanceof t?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],s=r;return this.children.forEachAt(n,r,((n,r,o)=>{(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,r,s))),s-=o})),i}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((n=>{e||this.statics.allowedChildren.some((t=>n instanceof t))||(n.statics.scope===Oi.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof t?n.unwrap():n.remove())}))}formatAt(t,e,n,r){this.children.forEachAt(t,e,((t,e,i)=>{t.formatAt(e,i,n,r)}))}insertAt(t,e,n){const[r,i]=this.children.find(t);if(r)r.insertAt(i,e,n);else{const t=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(t)}}insertBefore(t,e){null!=t.parent&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((n=>{t.insertBefore(n,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),s=[[this,e]];return r instanceof t?s.concat(r.path(i,n)):(null!=r&&s.push([r,i]),s)}removeChild(t){this.children.remove(t)}replaceWith(e,n){const r="string"==typeof e?this.scroll.create(e,n):e;return r instanceof t&&this.moveChildren(r),super.replaceWith(r)}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),((t,r,i)=>{const s=t.split(r,e);null!=s&&n.appendChild(s)})),n}splitAfter(t){const e=this.clone();for(;null!=t.next;)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){const n=[],r=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(n.push(...t.addedNodes),r.push(...t.removedNodes))})),r.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);null!=e&&(null==e.domNode.parentNode||e.domNode.parentNode===this.domNode)&&e.detach()})),n.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;null!=t.nextSibling&&(e=this.scroll.find(t.nextSibling));const n=Zi(t,this.scroll);(n.next!==e||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,e||void 0))})),this.enforceAllowedChildren()}};Gi.uiClass="";let Xi=Gi;const Yi=Xi;function Qi(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const Ji=class t extends Yi{static create(t){return super.create(t)}static formats(e,n){const r=n.query(t.blotName);if(null==r||e.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new zi(this.domNode)}format(e,n){if(e!==this.statics.blotName||n){const t=this.scroll.query(e,Oi.INLINE);if(null==t)return;t instanceof Si?this.attributes.attribute(t,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}else this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap()}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,r){null!=this.formats()[n]||this.scroll.query(n,Oi.ATTRIBUTE)?this.isolate(t,e).format(n,r):super.formatAt(t,e,n,r)}optimize(e){super.optimize(e);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const r=this.next;r instanceof t&&r.prev===this&&Qi(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof t&&this.attributes.move(r),r}};Ji.allowedChildren=[Ji,Ki],Ji.blotName="inline",Ji.scope=Oi.INLINE_BLOT,Ji.tagName="SPAN";let ts=Ji;const es=ts,ns=class t extends Yi{static create(t){return super.create(t)}static formats(e,n){const r=n.query(t.blotName);if(null==r||e.tagName!==r.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new zi(this.domNode)}format(e,n){const r=this.scroll.query(e,Oi.BLOCK);null!=r&&(r instanceof Si?this.attributes.attribute(r,n):e!==this.statics.blotName||n?n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,r){null!=this.scroll.query(n,Oi.BLOCK)?this.format(n,r):super.formatAt(t,e,n,r)}insertAt(t,e,n){if(null==n||null!=this.scroll.query(e,Oi.INLINE))super.insertAt(t,e,n);else{const r=this.split(t);if(null==r)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,n);r.parent.insertBefore(t,r)}}}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};ns.blotName="block",ns.scope=Oi.BLOCK_BLOT,ns.tagName="P",ns.allowedChildren=[es,ns,Ki];let rs=ns;const is=rs,ss=class extends Yi{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,n,r){super.formatAt(t,e,n,r),this.enforceAllowedChildren()}insertAt(t,e,n){super.insertAt(t,e,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};ss.blotName="container",ss.scope=Oi.BLOCK_BLOT;let os=ss;const ls=os;class as extends Ki{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,r){0===t&&e===this.length()?this.format(n,r):super.formatAt(t,e,n,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const cs=as,us={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},hs=100,ds=class extends Yi{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,us),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,e=Oi.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,n,r){this.update(),super.formatAt(t,e,n,r)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let r=Array.from(this.observer.takeRecords());for(;r.length>0;)t.push(r.pop());const i=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(n.has(t.domNode)||n.set(t.domNode,[]),e&&i(t.parent))},s=t=>{n.has(t.domNode)&&(t instanceof Yi&&t.children.forEach(s),n.delete(t.domNode),t.optimize(e))};let o=t;for(let l=0;o.length>0;l+=1){if(l>=hs)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((t=>{const e=this.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(i(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);i(e,!1),e instanceof Yi&&e.children.forEach((t=>{i(t,!1)}))}))):"attributes"===t.type&&i(e.prev)),i(e))})),this.children.forEach(s),o=Array.from(this.observer.takeRecords()),r=o.slice();r.length>0;)t.push(r.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const n=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return null==e?null:n.has(e.domNode)?(n.get(e.domNode).push(t),null):(n.set(e.domNode,[t]),e)})).forEach((t=>{null!=t&&t!==this&&n.has(t.domNode)&&t.update(n.get(t.domNode)||[],e)})),e.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),e),this.optimize(t,e)}};ds.blotName="scroll",ds.defaultChild=is,ds.allowedChildren=[is,ls],ds.scope=Oi.BLOCK_BLOT,ds.tagName="DIV";let fs=ds;const ps=fs,gs=class t extends Ki{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,n){null==n?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&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(0===t)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,e){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};gs.blotName="text",gs.scope=Oi.INLINE_BLOT;let ms=gs;const bs=ms;var vs=n(2502);function ys(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(!1===e(t[n],n,t))break;return t}var xs=ys,Ns=Xe(Object.keys,Object),ws=Ns,Es=Object.prototype,As=Es.hasOwnProperty;function qs(t){if(!en(t))return ws(t);var e=[];for(var n in Object(t))As.call(t,n)&&"constructor"!=n&&e.push(n);return e}var ks=qs;function _s(t){return Nn(t)?Fr(t):ks(t)}var Ls=_s;function Os(t,e){return t&&jr(e,Ls(e),t)}var Ss=Os;function Ts(t,e){return t&&jr(e,Xr(e),t)}var js=Ts;function Cs(t,e){var n=-1,r=null==t?0:t.length,i=0,s=[];while(++n<r){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}var Rs=Cs;function Is(){return[]}var Ms=Is,Bs=Object.prototype,Ds=Bs.propertyIsEnumerable,Us=Object.getOwnPropertySymbols,Ps=Us?function(t){return null==t?[]:(t=Object(t),Rs(Us(t),(function(e){return Ds.call(t,e)})))}:Ms,zs=Ps;function Fs(t,e){return jr(t,zs(t),e)}var Hs=Fs;function $s(t,e){var n=-1,r=e.length,i=t.length;while(++n<r)t[i+n]=e[n];return t}var Vs=$s,Ks=Object.getOwnPropertySymbols,Ws=Ks?function(t){var e=[];while(t)Vs(e,zs(t)),t=Qe(t);return e}:Ms,Zs=Ws;function Gs(t,e){return jr(t,Zs(t),e)}var Xs=Gs;function Ys(t,e,n){var r=e(t);return mn(t)?r:Vs(r,n(t))}var Qs=Ys;function Js(t){return Qs(t,Ls,zs)}var to=Js;function eo(t){return Qs(t,Xr,Zs)}var no=eo,ro=Tt(D,"DataView"),io=ro,so=Tt(D,"Promise"),oo=so,lo=Tt(D,"Set"),ao=lo,co=Tt(D,"WeakMap"),uo=co,ho="[object Map]",fo="[object Object]",po="[object Promise]",go="[object Set]",mo="[object WeakMap]",bo="[object DataView]",vo=vt(io),yo=vt(Ct),xo=vt(oo),No=vt(ao),wo=vt(uo),Eo=et;(io&&Eo(new io(new ArrayBuffer(1)))!=bo||Ct&&Eo(new Ct)!=ho||oo&&Eo(oo.resolve())!=po||ao&&Eo(new ao)!=go||uo&&Eo(new uo)!=mo)&&(Eo=function(t){var e=et(t),n=e==fo?t.constructor:void 0,r=n?vt(n):"";if(r)switch(r){case vo:return bo;case yo:return ho;case xo:return po;case No:return go;case wo:return mo}return e});var Ao=Eo,qo=Object.prototype,ko=qo.hasOwnProperty;function _o(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ko.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Lo=_o;function Oo(t,e){var n=e?ze(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var So=Oo,To=/\w*$/;function jo(t){var e=new t.constructor(t.source,To.exec(t));return e.lastIndex=t.lastIndex,e}var Co=jo,Ro=P?P.prototype:void 0,Io=Ro?Ro.valueOf:void 0;function Mo(t){return Io?Object(Io.call(t)):{}}var Bo=Mo,Do="[object Boolean]",Uo="[object Date]",Po="[object Map]",zo="[object Number]",Fo="[object RegExp]",Ho="[object Set]",$o="[object String]",Vo="[object Symbol]",Ko="[object ArrayBuffer]",Wo="[object DataView]",Zo="[object Float32Array]",Go="[object Float64Array]",Xo="[object Int8Array]",Yo="[object Int16Array]",Qo="[object Int32Array]",Jo="[object Uint8Array]",tl="[object Uint8ClampedArray]",el="[object Uint16Array]",nl="[object Uint32Array]";function rl(t,e,n){var r=t.constructor;switch(e){case Ko:return ze(t);case Do:case Uo:return new r(+t);case Wo:return So(t,n);case Zo:case Go:case Xo:case Yo:case Qo:case Jo:case tl:case el:case nl:return He(t,n);case Po:return new r;case zo:case $o:return new r(t);case Fo:return Co(t);case Ho:return new r;case Vo:return Bo(t)}}var il=rl,sl="[object Map]";function ol(t){return on(t)&&Ao(t)==sl}var ll=ol,al=Nr&&Nr.isMap,cl=al?gr(al):ll,ul=cl,hl="[object Set]";function dl(t){return on(t)&&Ao(t)==hl}var fl=dl,pl=Nr&&Nr.isSet,gl=pl?gr(pl):fl,ml=gl,bl=1,vl=2,yl=4,xl="[object Arguments]",Nl="[object Array]",wl="[object Boolean]",El="[object Date]",Al="[object Error]",ql="[object Function]",kl="[object GeneratorFunction]",_l="[object Map]",Ll="[object Number]",Ol="[object Object]",Sl="[object RegExp]",Tl="[object Set]",jl="[object String]",Cl="[object Symbol]",Rl="[object WeakMap]",Il="[object ArrayBuffer]",Ml="[object DataView]",Bl="[object Float32Array]",Dl="[object Float64Array]",Ul="[object Int8Array]",Pl="[object Int16Array]",zl="[object Int32Array]",Fl="[object Uint8Array]",Hl="[object Uint8ClampedArray]",$l="[object Uint16Array]",Vl="[object Uint32Array]",Kl={};function Wl(t,e,n,r,i,s){var o,l=e&bl,a=e&vl,c=e&yl;if(n&&(o=i?n(t,r,i,s):n(t)),void 0!==o)return o;if(!rt(t))return t;var u=mn(t);if(u){if(o=Lo(t),!l)return Ve(t,o)}else{var h=Ao(t),d=h==ql||h==kl;if(jn(t))return Be(t,l);if(h==Ol||h==xl||d&&!i){if(o=a||d?{}:rn(t),!l)return a?Xs(t,js(o,t)):Hs(t,Ss(o,t))}else{if(!Kl[h])return i?t:{};o=il(t,h,l)}}s||(s=new xe);var f=s.get(t);if(f)return f;s.set(t,o),ml(t)?t.forEach((function(r){o.add(Wl(r,e,n,r,t,s))})):ul(t)&&t.forEach((function(r,i){o.set(i,Wl(r,e,n,i,t,s))}));var p=c?a?no:to:a?Xr:Ls,g=u?void 0:p(t);return xs(g||t,(function(r,i){g&&(i=r,r=t[i]),Sr(o,i,Wl(r,e,n,i,t,s))})),o}Kl[xl]=Kl[Nl]=Kl[Il]=Kl[Ml]=Kl[wl]=Kl[El]=Kl[Bl]=Kl[Dl]=Kl[Ul]=Kl[Pl]=Kl[zl]=Kl[_l]=Kl[Ll]=Kl[Ol]=Kl[Sl]=Kl[Tl]=Kl[jl]=Kl[Cl]=Kl[Fl]=Kl[Hl]=Kl[$l]=Kl[Vl]=!0,Kl[Al]=Kl[ql]=Kl[Rl]=!1;var Zl=Wl,Gl=1,Xl=4;function Yl(t){return Zl(t,Gl|Xl)}var Ql=Yl,Jl="__lodash_hash_undefined__";function ta(t){return this.__data__.set(t,Jl),this}var ea=ta;function na(t){return this.__data__.has(t)}var ra=na;function ia(t){var e=-1,n=null==t?0:t.length;this.__data__=new ge;while(++e<n)this.add(t[e])}ia.prototype.add=ia.prototype.push=ea,ia.prototype.has=ra;var sa=ia;function oa(t,e){var n=-1,r=null==t?0:t.length;while(++n<r)if(e(t[n],n,t))return!0;return!1}var la=oa;function aa(t,e){return t.has(e)}var ca=aa,ua=1,ha=2;function da(t,e,n,r,i,s){var o=n&ua,l=t.length,a=e.length;if(l!=a&&!(o&&a>l))return!1;var c=s.get(t),u=s.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=n&ha?new sa:void 0;s.set(t,e),s.set(e,t);while(++h<l){var p=t[h],g=e[h];if(r)var m=o?r(g,p,h,e,t,s):r(p,g,h,t,e,s);if(void 0!==m){if(m)continue;d=!1;break}if(f){if(!la(e,(function(t,e){if(!ca(f,e)&&(p===t||i(p,t,n,r,s)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,s)){d=!1;break}}return s["delete"](t),s["delete"](e),d}var fa=da;function pa(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}var ga=pa;function ma(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var ba=ma,va=1,ya=2,xa="[object Boolean]",Na="[object Date]",wa="[object Error]",Ea="[object Map]",Aa="[object Number]",qa="[object RegExp]",ka="[object Set]",_a="[object String]",La="[object Symbol]",Oa="[object ArrayBuffer]",Sa="[object DataView]",Ta=P?P.prototype:void 0,ja=Ta?Ta.valueOf:void 0;function Ca(t,e,n,r,i,s,o){switch(n){case Sa:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Oa:return!(t.byteLength!=e.byteLength||!s(new Ue(t),new Ue(e)));case xa:case Na:case Aa:return h(+t,+e);case wa:return t.name==e.name&&t.message==e.message;case qa:case _a:return t==e+"";case Ea:var l=ga;case ka:var a=r&va;if(l||(l=ba),t.size!=e.size&&!a)return!1;var c=o.get(t);if(c)return c==e;r|=ya,o.set(t,e);var u=fa(l(t),l(e),r,i,s,o);return o["delete"](t),u;case La:if(ja)return ja.call(t)==ja.call(e)}return!1}var Ra=Ca,Ia=1,Ma=Object.prototype,Ba=Ma.hasOwnProperty;function Da(t,e,n,r,i,s){var o=n&Ia,l=to(t),a=l.length,c=to(e),u=c.length;if(a!=u&&!o)return!1;var h=a;while(h--){var d=l[h];if(!(o?d in e:Ba.call(e,d)))return!1}var f=s.get(t),p=s.get(e);if(f&&p)return f==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);var m=o;while(++h<a){d=l[h];var b=t[d],v=e[d];if(r)var y=o?r(v,b,d,e,t,s):r(b,v,d,t,e,s);if(!(void 0===y?b===v||i(b,v,n,r,s):y)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var x=t.constructor,N=e.constructor;x==N||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof N&&N instanceof N||(g=!1)}return s["delete"](t),s["delete"](e),g}var Ua=Da,Pa=1,za="[object Arguments]",Fa="[object Array]",Ha="[object Object]",$a=Object.prototype,Va=$a.hasOwnProperty;function Ka(t,e,n,r,i,s){var o=mn(t),l=mn(e),a=o?Fa:Ao(t),c=l?Fa:Ao(e);a=a==za?Ha:a,c=c==za?Ha:c;var u=a==Ha,h=c==Ha,d=a==c;if(d&&jn(t)){if(!jn(e))return!1;o=!0,u=!1}if(d&&!u)return s||(s=new xe),o||Ar(t)?fa(t,e,n,r,i,s):Ra(t,e,a,n,r,i,s);if(!(n&Pa)){var f=u&&Va.call(t,"__wrapped__"),p=h&&Va.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,m=p?e.value():e;return s||(s=new xe),i(g,m,n,r,s)}}return!!d&&(s||(s=new xe),Ua(t,e,n,r,i,s))}var Wa=Ka;function Za(t,e,n,r,i){return t===e||(null==t||null==e||!on(t)&&!on(e)?t!==t&&e!==e:Wa(t,e,n,r,Za,i))}var Ga=Za;function Xa(t,e){return Ga(t,e)}var Ya=Xa;class Qa extends cs{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Qa.blotName="break",Qa.tagName="BR";var Ja=Qa;class tc extends bs{}const ec={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function nc(t){return t.replace(/[&<>"']/g,(t=>ec[t]))}var rc;class ic extends es{static compare(t,e){const n=ic.order.indexOf(t),r=ic.order.indexOf(e);return n>=0||r>=0?n-r:t===e?0:t<e?-1:1}formatAt(t,e,n,r){if(ic.compare(this.statics.blotName,n)<0&&this.scroll.query(n,Oi.BLOT)){const i=this.isolate(t,e);r&&i.wrap(n,r)}else super.formatAt(t,e,n,r)}optimize(t){if(super.optimize(t),this.parent instanceof ic&&ic.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}rc=ic,l(ic,"allowedChildren",[rc,Ja,cs,tc]),l(ic,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var sc=ic;const oc=1;class lc extends is{constructor(...t){super(...t),l(this,"cache",{})}delta(){return null==this.cache.delta&&(this.cache.delta=cc(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,r){e<=0||(this.scroll.query(n,Oi.BLOCK)?t+e===this.length()&&this.format(n,r):super.formatAt(t,Math.min(e,this.length()-t-1),n,r),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const r=e.split("\n"),i=r.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let s=this;r.reduce(((t,e)=>(s=s.split(t,!0),s.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof Ja&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+oc),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-oc)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}lc.blotName="block",lc.tagName="P",lc.defaultChild=Ja,lc.allowedChildren=[Ja,sc,cs,tc];class ac extends cs{attach(){super.attach(),this.attributes=new zi(this.domNode)}delta(){return(new vs).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,Oi.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,r){this.format(n,r)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const r=e.split("\n"),i=r.pop(),s=r.map((t=>{const e=this.scroll.create(lc.blotName);return e.insertAt(0,t),e})),o=this.split(t);s.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function cc(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(Ki).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),uc(n,{},e))),new vs).insert("\n",uc(t))}function uc(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"===typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:uc(t.parent,e,n))}ac.scope=Oi.BLOCK_BLOT;class hc extends cs{static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(hc.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,r=0;while(null!=n&&n.statics.scope!==Oi.BLOCK_BLOT)r+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=hc.CONTENTS.length,n.optimize(),n.formatAt(r,hc.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||null==this.parent)return null;const t=this.selection.getNativeRange();while(null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof tc?this.prev:null,n=e?e.length():0,r=this.next instanceof tc?this.next:null,i=r?r.text:"",{textNode:s}=this,o=s.data.split(hc.CONTENTS).join("");let l;if(s.data=hc.CONTENTS,e)l=e,(o||r)&&(e.insertAt(e.length(),o+i),r&&r.remove());else if(r)l=r,r.insertAt(0,o);else{const t=document.createTextNode(o);l=this.scroll.create(t),this.parent.insertBefore(l,this)}if(this.remove(),t){const i=(t,i)=>e&&t===e.domNode?i:t===s?n+i-1:r&&t===r.domNode?n+o.length+i:null,a=i(t.start.node,t.start.offset),c=i(t.end.node,t.end.offset);if(null!==a&&null!==c)return{startNode:l.domNode,startOffset:a,endNode:l.domNode,endOffset:c}}return null}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(e.range=t)}}optimize(t){super.optimize(t);let{parent:e}=this;while(e){if("A"===e.domNode.tagName){this.savedLength=hc.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}l(hc,"blotName","cursor"),l(hc,"className","ql-cursor"),l(hc,"tagName","span"),l(hc,"CONTENTS","\ufeff");var dc=hc,fc=n(6590),pc=new WeakMap;const gc=["error","warn","log","info"];let mc="warn";function bc(t){if(mc&&gc.indexOf(t)<=gc.indexOf(mc)){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];console[t](...n)}}function vc(t){return gc.reduce(((e,n)=>(e[n]=bc.bind(console,n,t),e)),{})}vc.level=t=>{mc=t},bc.level=vc.level;var yc=vc;const xc=yc("quill:events"),Nc=["selectionchange","mousedown","mouseup","click"];Nc.forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];Array.from(document.querySelectorAll(".ql-container")).forEach((t=>{const n=pc.get(t);n&&n.emitter&&n.emitter.handleDOM(...e)}))}))}));class wc extends fc{constructor(){super(),this.domListeners={},this.on("error",xc.error)}emit(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return xc.log.call(xc,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.domListeners[t.type]||[]).forEach((e=>{let{node:r,handler:i}=e;(t.target===r||r.contains(t.target))&&i(t,...n)}))}listenDOM(t,e,n){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:n})}}l(wc,"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"}),l(wc,"sources",{API:"api",SILENT:"silent",USER:"user"});var Ec=wc;const Ac=yc("quill:selection");class qc{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}class kc{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 qc(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,Ec.sources.USER),1)})),this.emitter.on(Ec.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(Ec.events.SCROLL_UPDATE,((e,n)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const r=n.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(r?Ec.sources.SILENT:e)}catch(r){}}))})),this.emitter.on(Ec.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:r,endOffset:i}=e.range;this.setNativeRange(t,n,r,i),this.update(Ec.sources.SILENT)}})),this.update(Ec.sources.SILENT)}handleComposition(){this.emitter.on(Ec.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(Ec.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const 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(Ec.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,Oi.BLOCK)){if(n.start.node!==this.cursor.textNode){const t=this.scroll.find(n.start.node,!1);if(null==t)return;if(t instanceof Ki){const e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.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&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let r;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let[i,s]=this.scroll.leaf(t);if(null==i)return null;if(e>0&&s===i.length()){const[e]=this.scroll.leaf(t+1);if(e){const[n]=this.scroll.line(t),[r]=this.scroll.line(t+1);n===r&&(i=e,s=0)}}[r,s]=i.position(s,!0);const o=document.createRange();if(e>0)return o.setStart(r,s),[i,s]=this.scroll.leaf(t+e),null==i?null:([r,s]=i.position(s,!0),o.setEnd(r,s),o.getBoundingClientRect());let l,a="left";if(r instanceof Text){if(!r.data.length)return null;s<r.data.length?(o.setStart(r,s),o.setEnd(r,s+1)):(o.setStart(r,s-1),o.setEnd(r,s),a="right"),l=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;l=i.domNode.getBoundingClientRect(),s>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const t=document.getSelection();if(null==t||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(null==e)return null;const n=this.normalizeNative(e);return Ac.info("getNativeRange",n),n}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();if(null==e)return[null,null];const n=this.normalizedToRange(e);return[n,e]}hasFocus(){return document.activeElement===this.root||null!=document.activeElement&&_c(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const n=e.map((t=>{const[e,n]=t,r=this.scroll.find(e,!0),i=r.offset(this.scroll);return 0===n?i:r instanceof Ki?i+r.index(e,n):i+r.length()})),r=Math.min(Math.max(...n),this.scroll.length()-1),i=Math.min(r,...n);return new qc(i,r-i)}normalizeNative(t){if(!_c(this.root,t.startContainer)||!t.collapsed&&!_c(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((t=>{let{node:e,offset:n}=t;while(!(e instanceof Text)&&e.childNodes.length>0)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}rangeToNative(t){const e=this.scroll.length(),n=(t,n)=>{t=Math.min(e-1,t);const[r,i]=this.scroll.leaf(t);return r?r.position(i,n):[null,-1]};return[...n(t.index,!1),...n(t.index+t.length,!0)]}setNativeRange(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(Ac.info("setNativeRange",t,e,n,r),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==n.parentNode))return;const s=document.getSelection();if(null!=s)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};if(null==o||i||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||r!==o.endOffset){t instanceof Element&&"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),n instanceof Element&&"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);const i=document.createRange();i.setStart(t,e),i.setEnd(n,r),s.removeAllRanges(),s.addRange(i)}}else s.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ec.sources.API;if("string"===typeof e&&(n=e,e=!1),Ac.info("setRange",t),null!=t){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(n)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ec.sources.USER;const e=this.lastRange,[n,r]=this.getRange();if(this.lastRange=n,this.lastNative=r,null!=this.lastRange&&(this.savedRange=this.lastRange),!Ya(e,this.lastRange)){if(!this.composing&&null!=r&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const n=[Ec.events.SELECTION_CHANGE,Ql(this.lastRange),Ql(e),t];this.emitter.emit(Ec.events.EDITOR_CHANGE,...n),t!==Ec.sources.SILENT&&this.emitter.emit(...n)}}}function _c(t,e){try{e.parentNode}catch(n){return!1}return t.contains(e)}var Lc=kc;const Oc=/^[ -~]*$/;class Sc{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const n=Ic(t),r=new vs,i=Bc(n.ops.slice());return i.reduce(((t,n)=>{const i=vs.Op.length(n);let s=n.attributes||{},o=!1,l=!1;if(null!=n.insert){if(r.retain(i),"string"===typeof n.insert){const r=n.insert;l=!r.endsWith("\n")&&(e<=t||!!this.scroll.descendant(ac,t)[0]),this.scroll.insertAt(t,r);const[i,o]=this.scroll.line(t);let a=Li({},uc(i));if(i instanceof lc){const[t]=i.descendant(Ki,o);t&&(a=Li(a,uc(t)))}s=vs.AttributeMap.diff(a,s)||{}}else if("object"===typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return t;const i=null!=this.scroll.query(r,Oi.INLINE);if(i)(e<=t||this.scroll.descendant(ac,t)[0])&&(l=!0);else if(t>0){const[e,n]=this.scroll.descendant(Ki,t-1);if(e instanceof tc){const t=e.value();"\n"!==t[n]&&(o=!0)}else e instanceof cs&&e.statics.scope===Oi.INLINE_BLOT&&(o=!0)}if(this.scroll.insertAt(t,r,n.insert[r]),i){const[e]=this.scroll.descendant(Ki,t);if(e){const t=Li({},uc(e));s=vs.AttributeMap.diff(t,s)||{}}}}e+=i}else if(r.push(n),null!==n.retain&&"object"===typeof n.retain){const e=Object.keys(n.retain)[0];if(null==e)return t;this.scroll.updateEmbedAt(t,e,n.retain[e])}Object.keys(s).forEach((e=>{this.scroll.formatAt(t,i,e,s[e])}));const a=o?1:0,c=l?1:0;return e+=a+c,r.retain(a),r.delete(c),t+i+a+c}),0),r.reduce(((t,e)=>"number"===typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+vs.Op.length(e)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new vs).retain(t).delete(e))}formatLine(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((r=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(r,n[r])}))})),this.scroll.optimize();const r=(new vs).retain(t).retain(e,Ql(n));return this.update(r)}formatText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((r=>{this.scroll.formatAt(t,e,r,n[r])}));const r=(new vs).retain(t).retain(e,Ql(n));return this.update(r)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new vs)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof lc?n.push(e):e instanceof Ki&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(Ki,t,e));const[i,s]=[n,r].map((t=>{const e=t.shift();if(null==e)return{};let n=uc(e);while(Object.keys(n).length>0){const e=t.shift();if(null==e)return n;n=Cc(uc(e),n)}return n}));return{...i,...s}}getHTML(t,e){const[n,r]=this.scroll.line(t);if(n){const i=n.length(),s=n.length()>=r+e;return!s||0===r&&e===i?jc(this.scroll,t,e,!0):jc(n,r,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter((t=>"string"===typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,e){const n=Ic(e),r=(new vs).retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(r)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new vs).retain(t).insert({[e]:n}))}insertText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(n).forEach((r=>{this.scroll.formatAt(t,e.length,r,n[r])})),this.update((new vs).retain(t).insert(e,Ql(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==lc.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof Ja}removeFormat(t,e){const n=this.getText(t,e),[r,i]=this.scroll.line(t+e);let s=0,o=new vs;null!=r&&(s=r.length()-i,o=r.delta().slice(i,i+s-1).insert("\n"));const l=this.getContents(t,e+s),a=l.diff((new vs).insert(n).concat(o)),c=(new vs).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(Oc)&&this.scroll.find(e[0].target)){const i=this.scroll.find(e[0].target),s=uc(i),o=i.offset(this.scroll),l=e[0].oldValue.replace(dc.CONTENTS,""),a=(new vs).insert(l),c=(new vs).insert(i.value()),u=n&&{oldRange:Mc(n.oldRange,-o),newRange:Mc(n.newRange,-o)},h=(new vs).retain(o).concat(a.diff(c,u));t=h.reduce(((t,e)=>e.insert?t.insert(e.insert,s):t.push(e)),new vs),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&Ya(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}function Tc(t,e,n){if(0===t.length){const[t]=Rc(n.pop());return e<=0?`</li></${t}>`:`</li></${t}>${Tc([],e-1,n)}`}const[{child:r,offset:i,length:s,indent:o,type:l},...a]=t,[c,u]=Rc(l);if(o>e)return n.push(l),o===e+1?`<${c}><li${u}>${jc(r,i,s)}${Tc(a,o,n)}`:`<${c}><li>${Tc(t,e+1,n)}`;const h=n[n.length-1];if(o===e&&l===h)return`</li><li${u}>${jc(r,i,s)}${Tc(a,o,n)}`;const[d]=Rc(n.pop());return`</li></${d}>${Tc(t,e-1,n)}`}function jc(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"===typeof t.html)return t.html(e,n);if(t instanceof tc){const r=nc(t.value().slice(e,e+n));return r.replaceAll(" ","&nbsp;")}if(t instanceof Yi){if("list-container"===t.statics.blotName){const r=[];return t.children.forEachAt(e,n,((t,e,n)=>{const i="formats"in t&&"function"===typeof t.formats?t.formats():{};r.push({child:t,offset:e,length:n,indent:i.indent||0,type:i.list})})),Tc(r,-1,[])}const i=[];if(t.children.forEachAt(e,n,((t,e,n)=>{i.push(jc(t,e,n))})),r||"list"===t.statics.blotName)return i.join("");const{outerHTML:s,innerHTML:o}=t.domNode,[l,a]=s.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${i.join("")}<${a}`:`${l}>${i.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function Cc(t,e){return Object.keys(e).reduce(((n,r)=>{if(null==t[r])return n;const i=e[r];return i===t[r]?n[r]=i:Array.isArray(i)?i.indexOf(t[r])<0?n[r]=i.concat([t[r]]):n[r]=i:n[r]=[i,t[r]],n}),{})}function Rc(t){const e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function Ic(t){return t.reduce(((t,e)=>{if("string"===typeof e.insert){const n=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(n,e.attributes)}return t.push(e)}),new vs)}function Mc(t,e){let{index:n,length:r}=t;return new qc(n+e,r)}function Bc(t){const e=[];return t.forEach((t=>{if("string"===typeof t.insert){const n=t.insert.split("\n");n.forEach(((n,r)=>{r&&e.push({insert:"\n",attributes:t.attributes}),n&&e.push({insert:n,attributes:t.attributes})}))}else e.push(t)})),e}var Dc=Sc;class Uc{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}}l(Uc,"DEFAULTS",{});var Pc=Uc;const zc="\ufeff";class Fc extends cs{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(zc),this.rightGuard=document.createTextNode(zc),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,n=null;const r=t.data.split(zc).join("");if(t===this.leftGuard)if(this.prev instanceof tc){const t=this.prev.length();this.prev.insertAt(t,r),n={startNode:this.prev.domNode,startOffset:t+r.length}}else e=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(e),this),n={startNode:e,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof tc?(this.next.insertAt(0,r),n={startNode:this.next.domNode,startOffset:r.length}):(e=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(e),this.next),n={startNode:e,startOffset:r.length}));return t.data=zc,n}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const n=this.restore(t.target);n&&(e.range=n)}}))}}var Hc=Fc;class $c{constructor(t,e){l(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){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;!e||e instanceof Hc||(this.emitter.emit(Ec.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(Ec.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(Ec.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(Ec.events.COMPOSITION_END,t),this.isComposing=!1}}var Vc,Kc=$c;class Wc{constructor(t,e){l(this,"modules",{}),this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}Vc=Wc,l(Wc,"DEFAULTS",{modules:{}}),l(Wc,"themes",{default:Vc});var Zc=Wc;const Gc=t=>t.parentElement||t.getRootNode().host||null,Xc=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,r="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*n,bottom:e.top+t.clientHeight*r,left:e.left}},Yc=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},Qc=(t,e,n,r,i,s)=>t<n&&e>r?0:t<n?-(n-t+i):e>r?e-t>r-n?t+i-n:e-r+s:0,Jc=(t,e)=>{const n=t.ownerDocument;let r=e,i=t;while(i){const t=i===n.body,e=t?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:Xc(i),s=getComputedStyle(i),o=Qc(r.left,r.right,e.left,e.right,Yc(s.scrollPaddingLeft),Yc(s.scrollPaddingRight)),l=Qc(r.top,r.bottom,e.top,e.bottom,Yc(s.scrollPaddingTop),Yc(s.scrollPaddingBottom));if(o||l)if(t)n.defaultView?.scrollBy(o,l);else{const{scrollLeft:t,scrollTop:e}=i;l&&(i.scrollTop+=l),o&&(i.scrollLeft+=o);const n=i.scrollLeft-t,s=i.scrollTop-e;r={left:r.left-n,top:r.top-s,right:r.right-n,bottom:r.bottom-s}}i=t||"fixed"===s.position?null:Gc(i)}};var tu=Jc;const eu=100,nu=["block","break","cursor","inline","scroll","text"],ru=(t,e,n)=>{const r=new Ci;return nu.forEach((t=>{const n=e.query(t);n&&r.register(n)})),t.forEach((t=>{let i=e.query(t);i||n.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let s=0;while(i)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,s+=1,s>eu){n.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),r};var iu=ru;const su=yc("quill"),ou=new Ci;Yi.uiClass="ql-ui";class lu{static debug(t){!0===t&&(t="log"),yc.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return pc.get(t)||ou.find(t,e)}static import(t){return null==this.imports[t]&&su.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!==typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],e=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in t?t.attrName:t.blotName;"string"===typeof n?this.register(`formats/${n}`,t,e):Object.keys(t).forEach((n=>{this.register(n,t[n],e)}))}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||n||su.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!==typeof e&&"abstract"!==e.blotName&&ou.register(e),"function"===typeof e.register&&e.register(ou)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=hu(t,e),this.container=this.options.container,null==this.container)return void su.error("Invalid Quill container",t);this.options.debug&&lu.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",pc.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Ec;const r=ps.blotName,i=this.options.registry.query(r);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Dc(this.scroll),this.selection=new Lc(this.scroll,this.emitter),this.composition=new Kc(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(Ec.events.EDITOR_CHANGE,(t=>{t===Ec.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(Ec.events.SCROLL_UPDATE,((t,e)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),i=n&&r?{oldRange:n,newRange:r}:void 0;du.call(this,(()=>this.editor.update(null,e,i)),t)})),this.emitter.on(Ec.events.SCROLL_EMBED_UPDATE,((t,e)=>{const n=this.selection.lastRange,[r]=this.selection.getRange(),i=n&&r?{oldRange:n,newRange:r}:void 0;du.call(this,(()=>{const n=(new vs).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(n,[],i)}),lu.sources.USER)})),n){const t=this.clipboard.convert({html:`${n}<p><br></p>`,text:"\n"});this.setContents(t)}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&&void 0!==arguments[1]?arguments[1]:null;if("string"===typeof t){const e=t;t=document.createElement("div"),t.classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=fu(t,e,n),du.call(this,(()=>this.editor.deleteText(t,e)),n,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ec.sources.API;return du.call(this,(()=>{const n=this.getSelection(!0);let r=new vs;if(null==n)return r;if(this.scroll.query(t,Oi.BLOCK))r=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),r;r=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,Ec.sources.SILENT),r}),n)}formatLine(t,e,n,r,i){let s;return[t,e,s,i]=fu(t,e,n,r,i),du.call(this,(()=>this.editor.formatLine(t,e,s)),i,t,0)}formatText(t,e,n,r,i){let s;return[t,e,s,i]=fu(t,e,n,r,i),du.call(this,(()=>this.editor.formatText(t,e,s)),i,t,0)}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"===typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length),!n)return null;const r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,e]=fu(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"===typeof t?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&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!==typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"===typeof t&&(e=e??this.getLength()-t),[t,e]=fu(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"===typeof t&&(e=e??this.getLength()-t),[t,e]=fu(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:lu.sources.API;return du.call(this,(()=>this.editor.insertEmbed(t,e,n)),r,t)}insertText(t,e,n,r,i){let s;return[t,,s,i]=fu(t,0,n,r,i),du.call(this,(()=>this.editor.insertText(t,e,s)),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,n){return[t,e,,n]=fu(t,e,n),du.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollRectIntoView(t){tu(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(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ec.sources.API;return du.call(this,(()=>{t=new vs(t);const e=this.getLength(),n=this.editor.deleteText(0,e),r=this.editor.insertContents(0,t),i=this.editor.deleteText(this.getLength()-1,1);return n.compose(r).compose(i)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||lu.sources.API):([t,e,,n]=fu(t,e,n),this.selection.setRange(new qc(Math.max(0,t),e),n),n!==Ec.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ec.sources.API;const n=(new vs).insert(t);return this.setContents(n,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ec.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ec.sources.API;return du.call(this,(()=>(t=new vs(t),this.editor.applyDelta(t))),e,!0)}}function au(t){return"string"===typeof t?document.querySelector(t):t}function cu(t){return Object.entries(t??{}).reduce(((t,e)=>{let[n,r]=e;return{...t,[n]:!0===r?{}:r}}),{})}function uu(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function hu(t,e){const n=au(t);if(!n)throw new Error("Invalid Quill container");const r=!e.theme||e.theme===lu.DEFAULTS.theme,i=r?Zc:lu.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:s,...o}=lu.DEFAULTS,{modules:l,...a}=i.DEFAULTS;let c=cu(e.modules);null!=c&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const u=Li({},cu(s),cu(l),c),h={...o,...uu(a),...uu(e)};let d=e.registry;return d?e.formats&&su.warn('Ignoring "formats" option because "registry" is specified'):d=e.formats?iu(e.formats,h.registry,su):h.registry,{...h,registry:d,container:n,theme:i,modules:Object.entries(u).reduce(((t,e)=>{let[n,r]=e;if(!r)return t;const i=lu.import(`modules/${n}`);return null==i?(su.error(`Cannot load ${n} module. Are you sure you registered it?`),t):{...t,[n]:Li({},i.DEFAULTS||{},r)}}),{}),bounds:au(h.bounds)}}function du(t,e,n,r){if(!this.isEnabled()&&e===Ec.sources.USER&&!this.allowReadOnlyEdits)return new vs;let i=null==n?null:this.getSelection();const s=this.editor.delta,o=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=pu(i,o,e):0!==r&&(i=pu(i,n,r,e)),this.setSelection(i,Ec.sources.SILENT)),o.length()>0){const t=[Ec.events.TEXT_CHANGE,o,s,e];this.emitter.emit(Ec.events.EDITOR_CHANGE,...t),e!==Ec.sources.SILENT&&this.emitter.emit(...t)}return o}function fu(t,e,n,r,i){let s={};return"number"===typeof t.index&&"number"===typeof t.length?"number"!==typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!==typeof e&&(i=r,r=n,n=e,e=0),"object"===typeof n?(s=n,i=r):"string"===typeof n&&(null!=r?s[n]=r:i=n),i=i||Ec.sources.API,[t,e,s,i]}function pu(t,e,n,r){const i="number"===typeof n?n:0;if(null==t)return null;let s,o;return e&&"function"===typeof e.transformPosition?[s,o]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,r!==Ec.sources.USER))):[s,o]=[t.index,t.index+t.length].map((t=>t<e||t===e&&r===Ec.sources.USER?t:i>=0?t+i:Math.max(e,t+i))),new qc(s,o-s)}l(lu,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:ou,theme:"default"}),l(lu,"events",Ec.events),l(lu,"sources",Ec.sources),l(lu,"version","2.0.3"),l(lu,"imports",{delta:vs,parchment:r,"core/module":Pc,"core/theme":Zc});class gu extends ls{}var mu=gu;function bu(t){return t instanceof lc||t instanceof ac}function vu(t){return"function"===typeof t.updateContent}class yu extends ps{constructor(t,e,n){let{emitter:r}=n;super(t,e),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(Ec.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(Ec.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(Ec.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[n,r]=this.line(t),[i]=this.line(t+e);if(super.deleteAt(t,e),null!=i&&n!==i&&r>0){if(n instanceof ac||i instanceof ac)return void this.optimize();const t=i.children.head instanceof Ja?null:i.children.head;n.moveChildren(i,t),n.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,n,r){super.formatAt(t,e,n,r),this.optimize()}insertAt(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,Oi.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==n&&e.endsWith("\n")?t.insertAt(0,e.slice(0,-1),n):t.insertAt(0,e,n)}else{const t=this.scroll.create(e,n);this.appendChild(t)}else super.insertAt(t,e,n);this.optimize()}insertBefore(t,e){if(t.statics.scope===Oi.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(t),super.insertBefore(n,e)}else super.insertBefore(t,e)}insertContents(t,e){const n=this.deltaToRenderBlocks(e.concat((new vs).insert("\n"))),r=n.pop();if(null==r)return;this.batchStart();const i=n.shift();if(i){const e="block"===i.type&&(0===i.delta.length()||!this.descendant(ac,t)[0]&&t<this.length()),n="block"===i.type?i.delta:(new vs).insert({[i.key]:i.value});xu(this,t,n);const r="block"===i.type?1:0,s=t+n.length()+r;e&&this.insertAt(s-1,"\n");const o=uc(this.line(t)[0]),l=vs.AttributeMap.diff(o,i.attributes)||{};Object.keys(l).forEach((t=>{this.formatAt(s-1,1,t,l[t])})),t=s}let[s,o]=this.children.find(t);if(n.length&&(s&&(s=s.split(o),o=0),n.forEach((t=>{if("block"===t.type){const e=this.createBlock(t.attributes,s||void 0);xu(e,0,t.delta)}else{const e=this.create(t.key,t.value);this.insertBefore(e,s||void 0),Object.keys(t.attributes).forEach((n=>{e.format(n,t.attributes[n])}))}}))),"block"===r.type&&r.delta.length()){const t=s?s.offset(s.scroll)+o:this.length();xu(this,t,r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[n,r]=e;return n instanceof Ki?[n,r]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(bu,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(t,e,r)=>{let i=[],s=r;return t.children.forEachAt(e,r,((t,e,r)=>{bu(t)?i.push(t):t instanceof ls&&(i=i.concat(n(t,e,s))),s-=r})),i};return n(this,t,e)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(Ec.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let e=Ec.sources.USER;"string"===typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter((t=>{let{target:e}=t;const n=this.find(e,!0);return n&&!vu(n)})),t.length>0&&this.emitter.emit(Ec.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(Ec.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[r]=this.descendant((t=>t instanceof ac),t);r&&r.statics.blotName===e&&vu(r)&&r.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new vs;return t.forEach((t=>{const r=t?.insert;if(r)if("string"===typeof r){const i=r.split("\n");i.slice(0,-1).forEach((r=>{n.insert(r,t.attributes),e.push({type:"block",delta:n,attributes:t.attributes??{}}),n=new vs}));const s=i[i.length-1];s&&n.insert(s,t.attributes)}else{const i=Object.keys(r)[0];if(!i)return;this.query(i,Oi.INLINE)?n.push(t):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new vs,e.push({type:"blockEmbed",key:i,value:r[i],attributes:t.attributes??{}}))}})),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const r={};Object.entries(t).forEach((t=>{let[e,i]=t;const s=null!=this.query(e,Oi.BLOCK&Oi.BLOT);s?n=e:r[e]=i}));const i=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(i,e||void 0);const s=i.length();return Object.entries(r).forEach((t=>{let[e,n]=t;i.formatAt(0,s,e,n)})),i}}function xu(t,e,n){n.reduce(((e,n)=>{const r=vs.Op.length(n);let i=n.attributes||{};if(null!=n.insert)if("string"===typeof n.insert){const r=n.insert;t.insertAt(e,r);const[s]=t.descendant(Ki,e),o=uc(s);i=vs.AttributeMap.diff(o,i)||{}}else if("object"===typeof n.insert){const r=Object.keys(n.insert)[0];if(null==r)return e;t.insertAt(e,r,n.insert[r]);const s=null!=t.scroll.query(r,Oi.INLINE);if(s){const[n]=t.descendant(Ki,e),r=uc(n);i=vs.AttributeMap.diff(r,i)||{}}}return Object.keys(i).forEach((n=>{t.formatAt(e,r,n,i[n])})),e+r}),e)}l(yu,"blotName","scroll"),l(yu,"className","ql-editor"),l(yu,"tagName","DIV"),l(yu,"defaultChild",lc),l(yu,"allowedChildren",[lc,ac,mu]);var Nu=yu;const wu={scope:Oi.BLOCK,whitelist:["right","center","justify"]},Eu=new Si("align","align",wu),Au=new Mi("align","ql-align",wu),qu=new Ui("align","text-align",wu);class ku extends Ui{value(t){let e=super.value(t);if(!e.startsWith("rgb("))return e;e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");const n=e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("");return`#${n}`}}const _u=new Mi("color","ql-color",{scope:Oi.INLINE}),Lu=new ku("color","color",{scope:Oi.INLINE}),Ou=new Mi("background","ql-bg",{scope:Oi.INLINE}),Su=new ku("background","background-color",{scope:Oi.INLINE});class Tu extends mu{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${nc(this.code(t,e))}\n</pre>`}}class ju extends lc{static register(){lu.register(Tu)}}l(ju,"TAB"," ");class Cu extends sc{}Cu.blotName="code",Cu.tagName="CODE",ju.blotName="code-block",ju.className="ql-code-block",ju.tagName="DIV",Tu.blotName="code-block-container",Tu.className="ql-code-block-container",Tu.tagName="DIV",Tu.allowedChildren=[ju],ju.allowedChildren=[tc,Ja,dc],ju.requiredContainer=Tu;const Ru={scope:Oi.BLOCK,whitelist:["rtl"]},Iu=new Si("direction","dir",Ru),Mu=new Mi("direction","ql-direction",Ru),Bu=new Ui("direction","direction",Ru),Du={scope:Oi.INLINE,whitelist:["serif","monospace"]},Uu=new Mi("font","ql-font",Du);class Pu extends Ui{value(t){return super.value(t).replace(/["']/g,"")}}const zu=new Pu("font","font-family",Du),Fu=new Mi("size","ql-size",{scope:Oi.INLINE,whitelist:["small","large","huge"]}),Hu=new Ui("size","font-size",{scope:Oi.INLINE,whitelist:["10px","18px","32px"]});n(1148);const $u=yc("quill:keyboard"),Vu=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Ku extends Pc{static match(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!e[n]!==t[n]&&null!==e[n]))&&(e.key===t.key||e.key===t.which)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),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&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qu(t);if(null==r)return void $u.warn("Attempted to add invalid keyboard binding",r);"function"===typeof e&&(e={handler:e}),"function"===typeof n&&(n={handler:n});const i=Array.isArray(r.key)?r.key:[r.key];i.forEach((t=>{const i={...r,key:t,...e,...n};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}))}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;const e=229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key);if(e)return;const n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]),r=n.filter((e=>Ku.match(t,e)));if(0===r.length)return;const i=lu.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const s=this.quill.getSelection();if(null==s||!this.quill.hasFocus())return;const[o,l]=this.quill.getLine(s.index),[a,c]=this.quill.getLeaf(s.index),[u,h]=0===s.length?[a,c]:this.quill.getLeaf(s.index+s.length),d=a instanceof bs?a.value().slice(0,c):"",f=u instanceof bs?u.value().slice(h):"",p={collapsed:0===s.length,empty:0===s.length&&o.length()<=1,format:this.quill.getFormat(s),line:o,offset:l,prefix:d,suffix:f,event:t},g=r.some((t=>{if(null!=t.collapsed&&t.collapsed!==p.collapsed)return!1;if(null!=t.empty&&t.empty!==p.empty)return!1;if(null!=t.offset&&t.offset!==p.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==p.format[t])))return!1}else if("object"===typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=p.format[e]:!1===t.format[e]?null==p.format[e]:Ya(t.format[e],p.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(p.prefix))&&(!(null!=t.suffix&&!t.suffix.test(p.suffix))&&!0!==t.handler.call(this,s,p,t))}));g&&t.preventDefault()}))}handleBackspace(t,e){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let r={};const[i]=this.quill.getLine(t.index);let s=(new vs).retain(t.index-n).delete(n);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e){const n="block"===e.statics.blotName&&e.length()<=1;if(!n){const e=i.formats(),n=this.quill.getFormat(t.index-1,1);if(r=vs.AttributeMap.diff(e,n)||{},Object.keys(r).length>0){const e=(new vs).retain(t.index+i.length()-2).retain(1,r);s=s.compose(e)}}}}this.quill.updateContents(s,lu.sources.USER),this.quill.focus()}handleDelete(t,e){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let r={};const[i]=this.quill.getLine(t.index);let s=(new vs).retain(t.index).delete(n);if(e.offset>=i.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const n=i.formats(),o=this.quill.getFormat(t.index,1);r=vs.AttributeMap.diff(n,o)||{},Object.keys(r).length>0&&(s=s.retain(e.length()-1).retain(1,r))}}this.quill.updateContents(s,lu.sources.USER),this.quill.focus()}handleDeleteRange(t){Ju({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const n=Object.keys(e.format).reduce(((t,n)=>(this.quill.scroll.query(n,Oi.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{}),r=(new vs).retain(t.index).delete(t.length).insert("\n",n);this.quill.updateContents(r,lu.sources.USER),this.quill.setSelection(t.index+1,lu.sources.SILENT),this.quill.focus()}}const Wu={bindings:{bold:Xu("bold"),italic:Xu("italic"),underline:Xu("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",lu.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",lu.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){null!=e.format.indent?this.quill.format("indent","-1",lu.sources.USER):null!=e.format.list&&this.quill.format("list",!1,lu.sources.USER)}},"indent code-block":Zu(!0),"outdent code-block":Zu(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,lu.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=(new vs).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,lu.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,lu.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,lu.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,lu.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),r={...e.formats(),list:"checked"},i=(new vs).retain(t.index).insert("\n",r).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(i,lu.sources.USER),this.quill.setSelection(t.index+1,lu.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,r]=this.quill.getLine(t.index),i=(new vs).retain(t.index).insert("\n",e.format).retain(n.length()-r-1).retain(1,{header:null});this.quill.updateContents(i,lu.sources.USER),this.quill.setSelection(t.index+1,lu.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(t){const e=this.quill.getModule("table");if(e){const[n,r,i,s]=e.getTable(t),o=th(n,r,i,s);if(null==o)return;let l=n.offset();if(o<0){const e=(new vs).retain(l).insert("\n");this.quill.updateContents(e,lu.sources.USER),this.quill.setSelection(t.index+1,t.length,lu.sources.SILENT)}else if(o>0){l+=n.length();const t=(new vs).retain(l).insert("\n");this.quill.updateContents(t,lu.sources.USER),this.quill.setSelection(l,lu.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:r}=e,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,lu.sources.USER):this.quill.setSelection(i+r.length(),lu.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=e.prefix,[r,i]=this.quill.getLine(t.index);if(i>n)return!0;let s;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",lu.sources.USER),this.quill.history.cutoff();const o=(new vs).retain(t.index-i).delete(n+1).retain(r.length()-2-i).retain(1,{list:s});return this.quill.updateContents(o,lu.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,lu.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,n]=this.quill.getLine(t.index);let r=2,i=e;while(null!=i&&i.length()<=1&&i.formats()["code-block"])if(i=i.prev,r-=1,r<=0){const r=(new vs).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(r,lu.sources.USER),this.quill.setSelection(t.index-1,lu.sources.SILENT),!1}return!0}},"embed left":Gu("ArrowLeft",!1),"embed left shift":Gu("ArrowLeft",!0),"embed right":Gu("ArrowRight",!1),"embed right shift":Gu("ArrowRight",!0),"table down":Yu(!1),"table up":Yu(!0)}};function Zu(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:r}=n;const i=this.quill.scroll.query("code-block"),{TAB:s}=i;if(0===e.length&&!r.shiftKey)return this.quill.insertText(e.index,s,lu.sources.USER),void this.quill.setSelection(e.index+s.length,lu.sources.SILENT);const o=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:l,length:a}=e;o.forEach(((e,n)=>{t?(e.insertAt(0,s),0===n?l+=s.length:a+=s.length):e.domNode.textContent.startsWith(s)&&(e.deleteAt(0,s.length),0===n?l-=s.length:a-=s.length)})),this.quill.update(lu.sources.USER),this.quill.setSelection(l,a,lu.sources.SILENT)}}}function Gu(t,e){const n="ArrowLeft"===t?"prefix":"suffix";return{key:t,shiftKey:e,altKey:null,[n]:/^$/,handler(n){let{index:r}=n;"ArrowRight"===t&&(r+=n.length+1);const[i]=this.quill.getLeaf(r);return!(i instanceof cs)||("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,lu.sources.USER):this.quill.setSelection(n.index-1,lu.sources.USER):e?this.quill.setSelection(n.index,n.length+1,lu.sources.USER):this.quill.setSelection(n.index+n.length+1,lu.sources.USER),!1)}}}function Xu(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],lu.sources.USER)}}}function Yu(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const r=t?"prev":"next",i=n.line,s=i.parent[r];if(null!=s){if("table-row"===s.statics.blotName){let t=s.children.head,e=i;while(null!=e.prev)e=e.prev,t=t.next;const r=t.offset(this.quill.scroll)+Math.min(n.offset,t.length()-1);this.quill.setSelection(r,0,lu.sources.USER)}}else{const e=i.table()[r];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,lu.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,lu.sources.USER))}return!1}}}function Qu(t){if("string"===typeof t||"number"===typeof t)t={key:t};else{if("object"!==typeof t)return null;t=Ql(t)}return t.shortKey&&(t[Vu]=t.shortKey,delete t.shortKey),t}function Ju(t){let{quill:e,range:n}=t;const r=e.getLines(n);let i={};if(r.length>1){const t=r[0].formats(),e=r[r.length-1].formats();i=vs.AttributeMap.diff(e,t)||{}}e.deleteText(n,lu.sources.USER),Object.keys(i).length>0&&e.formatLine(n.index,1,i,lu.sources.USER),e.setSelection(n.index,lu.sources.SILENT)}function th(t,e,n,r){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}Ku.DEFAULTS=Wu;const eh=/font-weight:\s*normal/,nh=["P","OL","UL"],rh=t=>t&&nh.includes(t.tagName),ih=t=>{Array.from(t.querySelectorAll("br")).filter((t=>rh(t.previousElementSibling)&&rh(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))},sh=t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(eh))).forEach((e=>{const n=t.createDocumentFragment();n.append(...e.childNodes),e.parentNode?.replaceChild(n,e)}))};function oh(t){t.querySelector('[id^="docs-internal-guid-"]')&&(sh(t),ih(t))}const lh=/\bmso-list:[^;]*ignore/i,ah=/\bmso-list:[^;]*\bl(\d+)/i,ch=/\bmso-list:[^;]*\blevel(\d+)/i,uh=(t,e)=>{const n=t.getAttribute("style"),r=n?.match(ah);if(!r)return null;const i=Number(r[1]),s=n?.match(ch),o=s?Number(s[1]):1,l=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l),c=a&&"bullet"===a[1]?"bullet":"ordered";return{id:i,indent:o,type:c,element:t}},hh=t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],r=[];e.forEach((t=>{const e=(t.getAttribute("style")||"").match(lh);e?n.push(t):r.push(t)})),n.forEach((t=>t.parentNode?.removeChild(t)));const i=t.documentElement.innerHTML,s=r.map((t=>uh(t,i))).filter((t=>t));while(s.length){const t=[];let e=s.shift();while(e)t.push(e),e=s.length&&s[0]?.element===e.element.nextElementSibling&&s[0].id===e.id?s.shift():null;const n=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type),t.indent>1&&e.setAttribute("class","ql-indent-"+(t.indent-1)),e.innerHTML=t.element.innerHTML,n.appendChild(e)}));const r=t[0]?.element,{parentNode:i}=r??{};r&&i?.replaceChild(n,r),t.slice(1).forEach((t=>{let{element:e}=t;i?.removeChild(e)}))}};function dh(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&hh(t)}const fh=[dh,oh],ph=t=>{t.documentElement&&fh.forEach((e=>{e(t)}))};var gh=ph;const mh=yc("quill:clipboard"),bh=[[Node.TEXT_NODE,Uh],[Node.TEXT_NODE,Mh],["br",Th],[Node.ELEMENT_NODE,Mh],[Node.ELEMENT_NODE,Sh],[Node.ELEMENT_NODE,Oh],[Node.ELEMENT_NODE,Bh],["li",Rh],["ol, ul",Ih],["pre",jh],["tr",Dh],["b",Lh("bold")],["i",Lh("italic")],["strike",Lh("strike")],["style",Ch]],vh=[Eu,Iu].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),yh=[qu,Su,Lu,Bu,zu,Hu].reduce(((t,e)=>(t[e.keyName]=e,t)),{});class xh extends Pc{constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],bh.concat(this.options.matchers??[]).forEach((t=>{let[e,n]=t;this.addMatcher(e,n)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:n}=t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[ju.blotName])return(new vs).insert(n||"",{[ju.blotName]:r[ju.blotName]});if(!e)return(new vs).insert(n||"",r);const i=this.convertHTML(e);return wh(i,"\n")&&(null==i.ops[i.ops.length-1].attributes||r.table)?i.compose((new vs).retain(i.length()-1).delete(1)):i}normalizeHTML(t){gh(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,r=new WeakMap,[i,s]=this.prepareMatching(n,r);return _h(this.quill.scroll,n,i,s,r)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:lu.sources.API;if("string"===typeof t){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,lu.sources.SILENT)}else{const r=this.convert({html:e,text:""});this.quill.updateContents((new vs).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),lu.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:r,text:i}=this.onCopy(n,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",r),e&&Ju({range:n,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(null==e)return;const n=t.clipboardData?.getData("text/html");let r=t.clipboardData?.getData("text/plain");if(!n&&!r){const e=t.clipboardData?.getData("text/uri-list");e&&(r=this.normalizeURIList(e))}const i=Array.from(t.clipboardData?.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(e,i);else{if(n&&i.length>0){const t=(new DOMParser).parseFromString(n,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:n,text:r})}}onCopy(t){const e=this.quill.getText(t),n=this.quill.getSemanticHTML(t);return{html:n,text:e}}onPaste(t,e){let{text:n,html:r}=e;const i=this.quill.getFormat(t.index),s=this.convert({text:n,html:r},i);mh.log("onPaste",s,{text:n,html:r});const o=(new vs).retain(t.index).delete(t.length).concat(s);this.quill.updateContents(o,lu.sources.USER),this.quill.setSelection(o.length()-t.length,lu.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],r=[];return this.matchers.forEach((i=>{const[s,o]=i;switch(s){case Node.TEXT_NODE:r.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(t.querySelectorAll(s)).forEach((t=>{if(e.has(t)){const n=e.get(t);n?.push(o)}else e.set(t,[o])}));break}})),[n,r]}}function Nh(t,e,n,r){return r.query(e)?t.reduce(((t,r)=>{if(!r.insert)return t;if(r.attributes&&r.attributes[e])return t.push(r);const i=n?{[e]:n}:{};return t.insert(r.insert,{...i,...r.attributes})}),new vs):t}function wh(t,e){let n="";for(let r=t.ops.length-1;r>=0&&n.length<e.length;--r){const e=t.ops[r];if("string"!==typeof e.insert)break;n=e.insert+n}return n.slice(-1*e.length)===e}function Eh(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return!(n&&n.prototype instanceof cs)&&["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(t.tagName.toLowerCase())}function Ah(t,e){return t.previousElementSibling&&t.nextElementSibling&&!Eh(t.previousElementSibling,e)&&!Eh(t.nextElementSibling,e)}l(xh,"DEFAULTS",{matchers:[]});const qh=new WeakMap;function kh(t){return null!=t&&(qh.has(t)||("PRE"===t.tagName?qh.set(t,!0):qh.set(t,kh(t.parentNode))),qh.get(t))}function _h(t,e,n,r,i){return e.nodeType===e.TEXT_NODE?r.reduce(((n,r)=>r(e,n,t)),new vs):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((s,o)=>{let l=_h(t,o,n,r,i);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce(((e,n)=>n(o,e,t)),l),l=(i.get(o)||[]).reduce(((e,n)=>n(o,e,t)),l)),s.concat(l)}),new vs):new vs}function Lh(t){return(e,n,r)=>Nh(n,t,!0,r)}function Oh(t,e,n){const r=Si.keys(t),i=Mi.keys(t),s=Ui.keys(t),o={};return r.concat(i).concat(s).forEach((e=>{let r=n.query(e,Oi.ATTRIBUTE);null!=r&&(o[r.attrName]=r.value(t),o[r.attrName])||(r=vh[e],null==r||r.attrName!==e&&r.keyName!==e||(o[r.attrName]=r.value(t)||void 0),r=yh[e],null==r||r.attrName!==e&&r.keyName!==e||(r=yh[e],o[r.attrName]=r.value(t)||void 0))})),Object.entries(o).reduce(((t,e)=>{let[r,i]=e;return Nh(t,r,i,n)}),e)}function Sh(t,e,n){const r=n.query(t);if(null==r)return e;if(r.prototype instanceof cs){const e={},i=r.value(t);if(null!=i)return e[r.blotName]=i,(new vs).insert(e,r.formats(t,n))}else if(r.prototype instanceof is&&!wh(e,"\n")&&e.insert("\n"),"blotName"in r&&"formats"in r&&"function"===typeof r.formats)return Nh(e,r.blotName,r.formats(t,n),n);return e}function Th(t,e){return wh(e,"\n")||e.insert("\n"),e}function jh(t,e,n){const r=n.query("code-block"),i=!r||!("formats"in r)||"function"!==typeof r.formats||r.formats(t,n);return Nh(e,"code-block",i,n)}function Ch(){return new vs}function Rh(t,e,n){const r=n.query(t);if(null==r||"list"!==r.blotName||!wh(e,"\n"))return e;let i=-1,s=t.parentNode;while(null!=s)["OL","UL"].includes(s.tagName)&&(i+=1),s=s.parentNode;return i<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"===typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:i,...e.attributes||{}}):t),new vs)}function Ih(t,e,n){const r=t;let i="OL"===r.tagName?"ordered":"bullet";const s=r.getAttribute("data-checked");return s&&(i="true"===s?"checked":"unchecked"),Nh(e,"list",i,n)}function Mh(t,e,n){if(!wh(e,"\n")){if(Eh(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let r=t.nextSibling;while(null!=r){if(Eh(r,n))return e.insert("\n");const t=n.query(r);if(t&&t.prototype instanceof ac)return e.insert("\n");r=r.firstChild}}}return e}function Bh(t,e,n){const r={},i=t.style||{};return"italic"===i.fontStyle&&(r.italic=!0),"underline"===i.textDecoration&&(r.underline=!0),"line-through"===i.textDecoration&&(r.strike=!0),(i.fontWeight?.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce(((t,e)=>{let[r,i]=e;return Nh(t,r,i,n)}),e),parseFloat(i.textIndent||0)>0?(new vs).insert("\t").concat(e):e}function Dh(t,e,n){const r="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;if(null!=r){const i=Array.from(r.querySelectorAll("tr")),s=i.indexOf(t)+1;return Nh(e,"table",s,n)}return e}function Uh(t,e,n){let r=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(r.trim());if(!kh(t)){if(0===r.trim().length&&r.includes("\n")&&!Ah(t,n))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(null==t.previousSibling&&null!=t.parentElement&&Eh(t.parentElement,n)||t.previousSibling instanceof Element&&Eh(t.previousSibling,n))&&(r=r.replace(/^ /,"")),(null==t.nextSibling&&null!=t.parentElement&&Eh(t.parentElement,n)||t.nextSibling instanceof Element&&Eh(t.nextSibling,n))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class Ph extends Pc{constructor(t,e){super(t,e),l(this,"lastRecorded",0),l(this,"ignoreChange",!1),l(this,"stack",{undo:[],redo:[]}),l(this,"currentRange",null),this.quill.on(lu.events.EDITOR_CHANGE,((t,e,n,r)=>{t===lu.events.SELECTION_CHANGE?e&&r!==lu.sources.SILENT&&(this.currentRange=e):t===lu.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&r!==lu.sources.USER?this.transform(e):this.record(e,n)),this.currentRange=$h(this.currentRange,e))})),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",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,e){if(0===this.stack[t].length)return;const n=this.stack[t].pop();if(!n)return;const r=this.quill.getContents(),i=n.delta.invert(r);this.stack[e].push({delta:i,range:$h(n.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,lu.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let n=t.invert(e),r=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(n=n.compose(t.delta),r=t.range)}else this.lastRecorded=i;0!==n.length()&&(this.stack.undo.push({delta:n,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){zh(this.stack.undo,t),zh(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,lu.sources.USER);else{const e=Hh(this.quill.scroll,t.delta);this.quill.setSelection(e,lu.sources.USER)}}}function zh(t,e){let n=e;for(let r=t.length-1;r>=0;r-=1){const e=t[r];t[r]={delta:n.transform(e.delta,!0),range:e.range&&$h(e.range,n)},n=e.delta.transform(n),0===t[r].delta.length()&&t.splice(r,1)}}function Fh(t,e){const n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"===typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((e=>null!=t.query(e,Oi.BLOCK))))}function Hh(t,e){const n=e.reduce(((t,e)=>t+(e.delete||0)),0);let r=e.length()-n;return Fh(t,e)&&(r-=1),r}function $h(t,e){if(!t)return t;const n=e.transformPosition(t.index),r=e.transformPosition(t.index+t.length);return{index:n,length:r-n}}l(Ph,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});class Vh extends Pc{constructor(t,e){super(t,e),t.root.addEventListener("drop",(e=>{e.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(e.clientX,e.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);n=document.createRange(),n.setStart(t.offsetNode,t.offset),n.setEnd(t.offsetNode,t.offset)}const r=n&&t.selection.normalizeNative(n);if(r){const n=t.selection.normalizedToRange(r);e.dataTransfer?.files&&this.upload(n,e.dataTransfer.files)}}))}upload(t,e){const n=[];Array.from(e).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&n.push(t)})),n.length>0&&this.options.handler.call(this,t,n)}}Vh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const n=e.map((t=>new Promise((e=>{const n=new FileReader;n.onload=()=>{e(n.result)},n.readAsDataURL(t)}))));Promise.all(n).then((e=>{const n=e.reduce(((t,e)=>t.insert({image:e})),(new vs).retain(t.index).delete(t.length));this.quill.updateContents(n,Ec.sources.USER),this.quill.setSelection(t.index+e.length,Ec.sources.SILENT)}))}};var Kh=Vh;const Wh=["insertText","insertReplacementText"];class Zh extends Pc{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(lu.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){Ju({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(e){const n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new vs).retain(t.index).insert(e,n),lu.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,lu.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Wh.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const n=Gh(t);if(null==n)return;const r=this.quill.selection.normalizeNative(e),i=r?this.quill.selection.normalizedToRange(r):null;i&&this.replaceText(i,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function Gh(t){return"string"===typeof t.data?t.data:t.dataTransfer?.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}var Xh=Zh;const Yh=/Mac/i.test(navigator.platform),Qh=100,Jh=t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!Yh||"a"!==t.key||!0!==t.ctrlKey);class td extends Pc{constructor(t,e){super(t,e),l(this,"isListening",!1),l(this,"selectionChangeDeadline",0),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:n,event:r}=e;if(!(n instanceof Yi)||!n.uiNode)return!0;const i="rtl"===getComputedStyle(n.domNode)["direction"];return!!(i&&"ArrowRight"!==r.key||!i&&"ArrowLeft"!==r.key)||(this.quill.setSelection(t.index-1,t.length+(r.shiftKey?1:0),lu.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&Jh(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Qh,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(!0!==e.collapsed||0!==e.startOffset)return;const n=this.quill.scroll.find(e.startContainer);if(!(n instanceof Yi)||!n.uiNode)return;const r=document.createRange();r.setStartAfter(n.uiNode),r.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(r)}}var ed=td;lu.register({"blots/block":lc,"blots/block/embed":ac,"blots/break":Ja,"blots/container":mu,"blots/cursor":dc,"blots/embed":Hc,"blots/inline":sc,"blots/scroll":Nu,"blots/text":tc,"modules/clipboard":xh,"modules/history":Ph,"modules/keyboard":Ku,"modules/uploader":Kh,"modules/input":Xh,"modules/uiNode":ed});var nd=lu;class rd extends Mi{add(t,e){let n=0;if("+1"===e||"-1"===e){const r=this.value(t)||0;n="+1"===e?r+1:r-1}else"number"===typeof e&&(n=e);return 0===n?(this.remove(t),!0):super.add(t,n.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}}const id=new rd("indent","ql-indent",{scope:Oi.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});var sd=id;class od extends lc{}l(od,"blotName","blockquote"),l(od,"tagName","blockquote");var ld=od;class ad extends lc{static formats(t){return this.tagName.indexOf(t.tagName)+1}}l(ad,"blotName","header"),l(ad,"tagName",["H1","H2","H3","H4","H5","H6"]);var cd=ad;class ud extends mu{}ud.blotName="list-container",ud.tagName="OL";class hd extends lc{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){lu.register(ud)}constructor(t,e){super(t,e);const n=e.ownerDocument.createElement("span"),r=n=>{if(!t.isEnabled())return;const r=this.statics.formats(e,t);"checked"===r?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===r&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r),this.attachUI(n)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}hd.blotName="list",hd.tagName="LI",ud.allowedChildren=[hd],hd.requiredContainer=ud;class dd extends sc{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)}}l(dd,"blotName","bold"),l(dd,"tagName",["STRONG","B"]);var fd=dd;class pd extends fd{}l(pd,"blotName","italic"),l(pd,"tagName",["EM","I"]);var gd=pd;class md extends sc{static create(t){const 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 bd(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("href",this.constructor.sanitize(e)):super.format(t,e)}}function bd(t,e){const n=document.createElement("a");n.href=t;const r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}l(md,"blotName","link"),l(md,"tagName","A"),l(md,"SANITIZED_URL","about:blank"),l(md,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);class vd extends sc{static create(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):super.create(t)}static formats(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}l(vd,"blotName","script"),l(vd,"tagName",["SUB","SUP"]);var yd=vd;class xd extends fd{}l(xd,"blotName","strike"),l(xd,"tagName",["S","STRIKE"]);var Nd=xd;class wd extends sc{}l(wd,"blotName","underline"),l(wd,"tagName","U");var Ed=wd;class Ad extends Hc{static create(t){if(null==window.katex)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return"string"===typeof t&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}l(Ad,"blotName","formula"),l(Ad,"className","ql-formula"),l(Ad,"tagName","SPAN");var qd=Ad;const kd=["alt","height","width"];class _d extends cs{static create(t){const e=super.create(t);return"string"===typeof t&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return kd.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return bd(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){kd.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}l(_d,"blotName","image"),l(_d,"tagName","IMG");var Ld=_d;const Od=["height","width"];class Sd extends ac{static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return Od.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static sanitize(t){return md.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){Od.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}l(Sd,"blotName","video"),l(Sd,"className","ql-video"),l(Sd,"tagName","IFRAME");var Td=Sd;const jd=new Mi("code-token","hljs",{scope:Oi.INLINE});class Cd extends sc{static formats(t,e){while(null!=t&&t!==e.domNode){if(t.classList&&t.classList.contains(ju.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,n){super(t,e,n),jd.add(this.domNode,n)}format(t,e){t!==Cd.blotName?super.format(t,e):e?jd.add(this.domNode,e):(jd.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),jd.value(this.domNode)||this.unwrap()}}Cd.blotName="code-token",Cd.className="ql-token";class Rd extends ju{static create(t){const e=super.create(t);return"string"===typeof t&&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(),Cd.blotName,!1),super.replaceWith(t,e)}}class Id extends Tu{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===Rd.blotName&&(this.forceNext=!0,this.children.forEach((n=>{n.format(t,e)})))}formatAt(t,e,n,r){n===Rd.blotName&&(this.forceNext=!0),super.formatAt(t,e,n,r)}highlight(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==this.children.head)return;const n=Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)),r=`${n.map((t=>t.textContent)).join("\n")}\n`,i=Rd.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==r){if(r.trim().length>0||null==this.cachedText){const e=this.children.reduce(((t,e)=>t.concat(cc(e,!1))),new vs),n=t(r,i);e.diff(n).reduce(((t,e)=>{let{retain:n,attributes:r}=e;return n?(r&&Object.keys(r).forEach((e=>{[Rd.blotName,Cd.blotName].includes(e)&&this.formatAt(t,n,e,r[e])})),t+n):t}),0)}this.cachedText=r,this.forceNext=!1}}html(t,e){const[n]=this.children.find(t),r=n?Rd.formats(n.domNode):"plain";return`<pre data-language="${r}">\n${nc(this.code(t,e))}\n</pre>`}optimize(t){if(super.optimize(t),null!=this.parent&&null!=this.children.head&&null!=this.uiNode){const t=Rd.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}Id.allowedChildren=[Rd],Rd.requiredContainer=Id,Rd.allowedChildren=[Cd,dc,tc,Ja];const Md=(t,e,n)=>{if("string"===typeof t.versionString){const r=t.versionString.split(".")[0];if(parseInt(r,10)>=11)return t.highlight(n,{language:e}).value}return t.highlight(e,n).value};class Bd extends Pc{static register(){lu.register(Cd,!0),lu.register(Rd,!0),lu.register(Id,!0)}constructor(t,e){if(super(t,e),null==this.options.hljs)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce(((t,e)=>{let{key:n}=e;return t[n]=!0,t}),{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(lu.events.SCROLL_BLOT_MOUNT,(t=>{if(!(t instanceof Id))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach((t=>{let{key:n,label:r}=t;const i=e.ownerDocument.createElement("option");i.textContent=r,i.setAttribute("value",n),e.appendChild(i)})),e.addEventListener("change",(()=>{t.format(Rd.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)})),null==t.uiNode&&(t.attachUI(e),t.children.head&&(e.value=Rd.formats(t.children.head.domNode)))}))}initTimer(){let t=null;this.quill.on(lu.events.SCROLL_OPTIMIZE,(()=>{t&&clearTimeout(t),t=setTimeout((()=>{this.highlight(),t=null}),this.options.interval)}))}highlight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.quill.selection.composing)return;this.quill.update(lu.sources.USER);const n=this.quill.getSelection(),r=null==t?this.quill.scroll.descendants(Id):[t];r.forEach((t=>{t.highlight(this.highlightBlot,e)})),this.quill.update(lu.sources.SILENT),null!=n&&this.quill.setSelection(n,lu.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"plain";if(e=this.languages[e]?e:"plain","plain"===e)return nc(t).split("\n").reduce(((t,n,r)=>(0!==r&&t.insert("\n",{[ju.blotName]:e}),t.insert(n))),new vs);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(ju.className),n.innerHTML=Md(this.options.hljs,e,t),_h(this.quill.scroll,n,[(t,e)=>{const n=jd.value(t);return n?e.compose((new vs).retain(e.length(),{[Cd.blotName]:n})):e}],[(t,n)=>t.data.split("\n").reduce(((t,n,r)=>(0!==r&&t.insert("\n",{[ju.blotName]:e}),t.insert(n))),n)],new WeakMap)}}Bd.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"}]};class Dd extends lc{static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",Fd()),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===Dd.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()}}l(Dd,"blotName","table"),l(Dd,"tagName","TD");class Ud extends mu{checkMerge(){if(super.checkMerge()&&null!=this.next.children.head){const t=this.children.head.formats(),e=this.children.tail.formats(),n=this.next.children.head.formats(),r=this.next.children.tail.formats();return t.table===e.table&&t.table===n.table&&t.table===r.table}return!1}optimize(t){super.optimize(t),this.children.forEach((t=>{if(null==t.next)return;const e=t.formats(),n=t.next.formats();if(e.table!==n.table){const e=this.splitAfter(t);e&&e.optimize(),this.prev&&this.prev.optimize()}}))}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}l(Ud,"blotName","table-row"),l(Ud,"tagName","TR");class Pd extends mu{}l(Pd,"blotName","table-body"),l(Pd,"tagName","TBODY");class zd extends mu{balanceCells(){const t=this.descendants(Ud),e=t.reduce(((t,e)=>Math.max(e.children.length,t)),0);t.forEach((t=>{new Array(e-t.children.length).fill(0).forEach((()=>{let e;null!=t.children.head&&(e=Dd.formats(t.children.head.domNode));const n=this.scroll.create(Dd.blotName,e);t.appendChild(n),n.optimize()}))}))}cells(t){return this.rows().map((e=>e.children.at(t)))}deleteColumn(t){const[e]=this.descendant(Pd);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const n=e.children.at(t);null!=n&&n.remove()}))}insertColumn(t){const[e]=this.descendant(Pd);null!=e&&null!=e.children.head&&e.children.forEach((e=>{const n=e.children.at(t),r=Dd.formats(e.children.head.domNode),i=this.scroll.create(Dd.blotName,r);e.insertBefore(i,n)}))}insertRow(t){const[e]=this.descendant(Pd);if(null==e||null==e.children.head)return;const n=Fd(),r=this.scroll.create(Ud.blotName);e.children.head.children.forEach((()=>{const t=this.scroll.create(Dd.blotName,n);r.appendChild(t)}));const i=e.children.at(t);e.insertBefore(r,i)}rows(){const t=this.children.head;return null==t?[]:t.children.map((t=>t))}}function Fd(){const t=Math.random().toString(36).slice(2,6);return`row-${t}`}l(zd,"blotName","table-container"),l(zd,"tagName","TABLE"),zd.allowedChildren=[Pd],Pd.requiredContainer=zd,Pd.allowedChildren=[Ud],Ud.requiredContainer=Pd,Ud.allowedChildren=[Dd],Dd.requiredContainer=Ud;class Hd extends Pc{static register(){lu.register(Dd),lu.register(Ud),lu.register(Pd),lu.register(zd)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(zd).forEach((t=>{t.balanceCells()}))}deleteColumn(){const[t,,e]=this.getTable();null!=e&&(t.deleteColumn(e.cellOffset()),this.quill.update(lu.sources.USER))}deleteRow(){const[,t]=this.getTable();null!=t&&(t.remove(),this.quill.update(lu.sources.USER))}deleteTable(){const[t]=this.getTable();if(null==t)return;const e=t.offset();t.remove(),this.quill.update(lu.sources.USER),this.quill.setSelection(e,lu.sources.SILENT)}getTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.quill.getSelection();if(null==t)return[null,null,null,-1];const[e,n]=this.quill.getLine(t.index);if(null==e||e.statics.blotName!==Dd.blotName)return[null,null,null,-1];const r=e.parent,i=r.parent.parent;return[i,r,e,n]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[n,r,i]=this.getTable(e);if(null==i)return;const s=i.cellOffset();n.insertColumn(s+t),this.quill.update(lu.sources.USER);let o=r.rowOffset();0===t&&(o+=1),this.quill.setSelection(e.index+o,e.length,lu.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[n,r,i]=this.getTable(e);if(null==i)return;const s=r.rowOffset();n.insertRow(s+t),this.quill.update(lu.sources.USER),t>0?this.quill.setSelection(e,lu.sources.SILENT):this.quill.setSelection(e.index+r.children.length,e.length,lu.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const n=this.quill.getSelection();if(null==n)return;const r=new Array(t).fill(0).reduce((t=>{const n=new Array(e).fill("\n").join("");return t.insert(n,{table:Fd()})}),(new vs).retain(n.index));this.quill.updateContents(r,lu.sources.USER),this.quill.setSelection(n.index,lu.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(lu.events.SCROLL_OPTIMIZE,(t=>{t.some((t=>!!["TD","TR","TBODY","TABLE"].includes(t.target.tagName)&&(this.quill.once(lu.events.TEXT_CHANGE,((t,e,n)=>{n===lu.sources.USER&&this.balanceTables()})),!0)))}))}}var $d=Hd;const Vd=yc("quill:toolbar");class Kd extends Pc{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar"),Zd(e,this.options.container),t.container?.parentNode?.insertBefore(e,t.container),this.container=e}else"string"===typeof this.options.container?this.container=document.querySelector(this.options.container):this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];e&&this.addHandler(t,e)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(lu.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):Vd.error("Container required for toolbar",this.options)}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]&&null==this.quill.scroll.query(e))return void Vd.warn("ignoring attaching to nonexistent format",e,t);const n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let r;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];r=!e.hasAttribute("selected")&&(e.value||!1)}else r=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,r);else if(this.quill.scroll.query(e).prototype instanceof cs){if(r=prompt(`Enter ${e}`),!r)return;this.quill.updateContents((new vs).retain(i.index).delete(i.length).insert({[e]:r}),lu.sources.USER)}else this.quill.format(e,r,lu.sources.USER);this.update(i)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((n=>{const[r,i]=n;if("SELECT"===i.tagName){let n=null;if(null==t)n=null;else if(null==e[r])n=i.querySelector("option[selected]");else if(!Array.isArray(e[r])){let t=e[r];"string"===typeof t&&(t=t.replace(/"/g,'\\"')),n=i.querySelector(`option[value="${t}"]`)}null==n?(i.value="",i.selectedIndex=-1):n.selected=!0}else if(null==t)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const t=e[r],n=t===i.getAttribute("value")||null!=t&&t.toString()===i.getAttribute("value")||null==t&&!i.getAttribute("value");i.classList.toggle("ql-active",n),i.setAttribute("aria-pressed",n.toString())}else{const t=null!=e[r];i.classList.toggle("ql-active",t),i.setAttribute("aria-pressed",t.toString())}}))}}function Wd(t,e,n){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),null!=n?(r.value=n,r.setAttribute("aria-label",`${e}: ${n}`)):r.setAttribute("aria-label",e),t.appendChild(r)}function Zd(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((e=>{const n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((t=>{if("string"===typeof t)Wd(n,t);else{const e=Object.keys(t)[0],r=t[e];Array.isArray(r)?Gd(n,e,r):Wd(n,e,r)}})),t.appendChild(n)}))}function Gd(t,e,n){const r=document.createElement("select");r.classList.add(`ql-${e}`),n.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),r.appendChild(e)})),t.appendChild(r)}Kd.DEFAULTS={},Kd.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,Oi.INLINE)&&this.quill.format(t,!1,lu.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,lu.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",lu.sources.USER):t||"right"!==e||this.quill.format("align",!1,lu.sources.USER),this.quill.format("direction",t,lu.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0,10);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===n.direction&&(e*=-1),this.quill.format("indent",r+e,lu.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,lu.sources.USER)},list(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,lu.sources.USER):this.quill.format("list","unchecked",lu.sources.USER):this.quill.format("list",t,lu.sources.USER)}}};const Xd='<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>',Yd='<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>',Qd='<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>',Jd='<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>',tf='<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"/><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>',ef='<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>',nf='<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>',rf='<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>',of='<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>',lf='<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>',af='<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>',cf='<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>',uf='<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>',hf='<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>',df='<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-.86816H13.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>',ff='<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>',pf='<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>',gf='<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>',mf='<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>',bf='<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>',vf='<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>',yf='<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>',xf='<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>',Nf='<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>',wf='<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>',Ef='<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"/><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>',Af='<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>',qf='<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>',kf='<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>',_f='<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>',Lf='<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>',Of='<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>';var Sf={align:{"":Xd,center:Yd,right:Qd,justify:Jd},background:tf,blockquote:ef,bold:nf,clean:rf,code:sf,"code-block":sf,color:of,direction:{"":lf,rtl:af},formula:cf,header:{1:uf,2:hf,3:df,4:ff,5:pf,6:gf},italic:mf,image:bf,indent:{"+1":vf,"-1":yf},link:xf,list:{bullet:Nf,check:wf,ordered:Ef},script:{sub:Af,super:qf},strike:kf,table:_f,underline:Lf,video:Of};const Tf='<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>';let jf=0;function Cf(t,e){t.setAttribute(e,`${!("true"===t.getAttribute(e))}`)}class Rf{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",(t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}})),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Cf(this.label,"aria-expanded"),Cf(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const n=t.getAttribute("value");return n&&e.setAttribute("data-value",n),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",(()=>{this.selectItem(e,!0)})),e.addEventListener("keydown",(t=>{switch(t.key){case"Enter":this.selectItem(e,!0),t.preventDefault();break;case"Escape":this.escape(),t.preventDefault();break;default:}})),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=Tf,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${jf}`,jf+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach((e=>{const n=this.buildItem(e);t.appendChild(n),!0===e.selected&&this.selectItem(n)})),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&&void 0!==arguments[1]&&arguments[1];const n=this.container.querySelector(".ql-selected");t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(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){const e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);const e=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}var If=Rf;class Mf extends If{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((t=>{t.classList.add("ql-primary")}))}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const n=this.label.querySelector(".ql-color-label"),r=t&&t.getAttribute("data-value")||"";n&&("line"===n.tagName?n.style.stroke=r:n.style.fill=r)}}var Bf=Mf;class Df extends If{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach((t=>{t.innerHTML=e[t.getAttribute("data-value")||""]})),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const n=t||this.defaultItem;if(null!=n){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}var Uf=Df;const Pf=t=>{const{overflowY:e}=getComputedStyle(t,null);return"visible"!==e&&"clip"!==e};class zf{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Pf(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){const e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let s=0;if(i.right>r.right&&(s=r.right-i.right,this.root.style.left=`${e+s}px`),i.left<r.left&&(s=r.left-i.left,this.root.style.left=`${e+s}px`),i.bottom>r.bottom){const e=i.bottom-i.top,r=t.bottom-t.top+e;this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}var Ff=zf;const Hf=[!1,"center","right","justify"],$f=["#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"],Vf=[!1,"serif","monospace"],Kf=["1","2","3",!1],Wf=["small",!1,"large","huge"];class Zf extends Zc{constructor(t,e){super(t,e);const n=e=>{document.body.contains(t.root)?(null==this.tooltip||this.tooltip.root.contains(e.target)||document.activeElement===this.tooltip.textbox||this.quill.hasFocus()||this.tooltip.hide(),null!=this.pickers&&this.pickers.forEach((t=>{t.container.contains(e.target)||t.close()}))):document.body.removeEventListener("click",n)};t.emitter.listenDOM("click",document.body,n)}addModule(t){const e=super.addModule(t);return"toolbar"===t&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach((t=>{const n=t.getAttribute("class")||"";n.split(/\s+/).forEach((n=>{if(n.startsWith("ql-")&&(n=n.slice(3),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"===typeof e[n])t.innerHTML=e[n];else{const r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}}))}))}buildPickers(t,e){this.pickers=Array.from(t).map((t=>{if(t.classList.contains("ql-align")&&(null==t.querySelector("option")&&Yf(t,Hf),"object"===typeof e.align))return new Uf(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){const n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&Yf(t,$f,"background"===n?"#ffffff":"#000000"),new Bf(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?Yf(t,Vf):t.classList.contains("ql-header")?Yf(t,Kf):t.classList.contains("ql-size")&&Yf(t,Wf)),new If(t)}));const n=()=>{this.pickers.forEach((t=>{t.update()}))};this.quill.on(Ec.events.EDITOR_CHANGE,n)}}Zf.DEFAULTS=Li({},Zc.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let t=this.container.querySelector("input.ql-image[type=file]");null==t&&(t=document.createElement("input"),t.setAttribute("type","file"),t.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),t.classList.add("ql-image"),t.addEventListener("change",(()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,t.files),t.value=""})),this.container.appendChild(t)),t.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Gf extends Ff{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",(t=>{"Enter"===t.key?(this.save(),t.preventDefault()):"Escape"===t.key&&(this.cancel(),t.preventDefault())}))}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null==this.textbox)return;null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);null!=n&&this.position(n),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":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,Ec.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,Ec.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=Xf(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(null!=e){const n=e.index+e.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),t,Ec.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(n+1," ",Ec.sources.USER),this.quill.setSelection(n+2,Ec.sources.USER)}break}default:}this.textbox.value="",this.hide()}}function Xf(t){let e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:t}function Yf(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((e=>{const r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",String(e)),t.appendChild(r)}))}const Qf=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Jf extends Gf{constructor(t,e){super(t,e),this.quill.on(Ec.events.EDITOR_CHANGE,((t,e,n,r)=>{if(t===Ec.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&r===Ec.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const t=this.quill.getLines(e.index,e.length);if(1===t.length){const t=this.quill.getBounds(e);null!=t&&this.position(t)}else{const n=t[t.length-1],r=this.quill.getIndex(n),i=Math.min(n.length()-1,e.index+e.length-r),s=this.quill.getBounds(new qc(r,i));null!=s&&this.position(s)}}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(Ec.events.SCROLL_OPTIMIZE,(()=>{setTimeout((()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(null!=t){const e=this.quill.getBounds(t);null!=e&&this.position(e)}}),1)}))}cancel(){this.show()}position(t){const e=super.position(t),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",0!==e&&(n.style.marginLeft=-1*e-n.offsetWidth/2+"px"),e}}l(Jf,"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(""));class tp extends Zf{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=Qf),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Jf(this.quill,this.options.bounds),null!=t.container&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),Sf),this.buildPickers(t.container.querySelectorAll("select"),Sf))}}tp.DEFAULTS=Li({},Zf.DEFAULTS,{modules:{toolbar:{handlers:{link(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1,lu.sources.USER)}}}}});const ep=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class np extends Gf{constructor(...t){super(...t),l(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",(t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()})),this.root.querySelector("a.ql-remove").addEventListener("click",(t=>{if(null!=this.linkRange){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,Ec.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()})),this.quill.on(Ec.events.SELECTION_CHANGE,((t,e,n)=>{if(null!=t){if(0===t.length&&n===Ec.sources.USER){const[e,n]=this.quill.scroll.descendant(md,t.index);if(null!=e){this.linkRange=new qc(t.index-n,e.length());const r=md.formats(e.domNode);this.preview.textContent=r,this.preview.setAttribute("href",r),this.show();const i=this.quill.getBounds(this.linkRange);return void(null!=i&&this.position(i))}}else delete this.linkRange;this.hide()}}))}show(){super.show(),this.root.removeAttribute("data-mode")}}l(np,"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(""));class rp extends Zf{constructor(t,e){null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=ep),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){null!=t.container&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),Sf),this.buildPickers(t.container.querySelectorAll("select"),Sf),this.tooltip=new np(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},((e,n)=>{t.handlers.link.call(t,!n.format.link)})))}}rp.DEFAULTS=Li({},Zf.DEFAULTS,{modules:{toolbar:{handlers:{link(t){if(t){const t=this.quill.getSelection();if(null==t||0===t.length)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&0!==e.indexOf("mailto:")&&(e=`mailto:${e}`);const{tooltip:n}=this.quill.theme;n.edit("link",e)}else this.quill.format("link",!1,lu.sources.USER)}}}}});var ip=rp;nd.register({"attributors/attribute/direction":Iu,"attributors/class/align":Au,"attributors/class/background":Ou,"attributors/class/color":_u,"attributors/class/direction":Mu,"attributors/class/font":Uu,"attributors/class/size":Fu,"attributors/style/align":qu,"attributors/style/background":Su,"attributors/style/color":Lu,"attributors/style/direction":Bu,"attributors/style/font":zu,"attributors/style/size":Hu},!0),nd.register({"formats/align":Au,"formats/direction":Mu,"formats/indent":sd,"formats/background":Su,"formats/color":Lu,"formats/font":Uu,"formats/size":Fu,"formats/blockquote":ld,"formats/code-block":ju,"formats/header":cd,"formats/list":hd,"formats/bold":fd,"formats/code":Cu,"formats/italic":gd,"formats/link":md,"formats/script":yd,"formats/strike":Nd,"formats/underline":Ed,"formats/formula":qd,"formats/image":Ld,"formats/video":Td,"modules/syntax":Bd,"modules/table":$d,"modules/toolbar":Kd,"themes/bubble":tp,"themes/snow":ip,"ui/icons":Sf,"ui/picker":If,"ui/icon-picker":Uf,"ui/color-picker":Bf,"ui/tooltip":Ff},!0);var sp=nd},1314:function(t,e,n){t=n.nmd(t),n(4114),n(8111),n(7588),n(1701);var r=200,i="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",l="[object Array]",a="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Function]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",g="[object Object]",m="[object Promise]",b="[object RegExp]",v="[object Set]",y="[object String]",x="[object Symbol]",N="[object WeakMap]",w="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",q="[object Float64Array]",k="[object Int8Array]",_="[object Int16Array]",L="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",T="[object Uint16Array]",j="[object Uint32Array]",C=/[\\^$.*+?()[\]{}|]/g,R=/\w*$/,I=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,B={};B[o]=B[l]=B[w]=B[E]=B[a]=B[c]=B[A]=B[q]=B[k]=B[_]=B[L]=B[f]=B[p]=B[g]=B[b]=B[v]=B[y]=B[x]=B[O]=B[S]=B[T]=B[j]=!0,B[u]=B[h]=B[N]=!1;var D="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,U="object"==typeof self&&self&&self.Object===Object&&self,P=D||U||Function("return this")(),z=e&&!e.nodeType&&e,F=z&&t&&!t.nodeType&&t,H=F&&F.exports===z;function $(t,e){return t.set(e[0],e[1]),t}function V(t,e){return t.add(e),t}function K(t,e){var n=-1,r=t?t.length:0;while(++n<r)if(!1===e(t[n],n,t))break;return t}function W(t,e){var n=-1,r=e.length,i=t.length;while(++n<r)t[i+n]=e[n];return t}function Z(t,e,n,r){var i=-1,s=t?t.length:0;r&&s&&(n=t[++i]);while(++i<s)n=e(n,t[i],i,t);return n}function G(t,e){var n=-1,r=Array(t);while(++n<t)r[n]=e(n);return r}function X(t,e){return null==t?void 0:t[e]}function Y(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}function Q(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function J(t,e){return function(n){return t(e(n))}}function tt(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var et=Array.prototype,nt=Function.prototype,rt=Object.prototype,it=P["__core-js_shared__"],st=function(){var t=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),ot=nt.toString,lt=rt.hasOwnProperty,at=rt.toString,ct=RegExp("^"+ot.call(lt).replace(C,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=H?P.Buffer:void 0,ht=P.Symbol,dt=P.Uint8Array,ft=J(Object.getPrototypeOf,Object),pt=Object.create,gt=rt.propertyIsEnumerable,mt=et.splice,bt=Object.getOwnPropertySymbols,vt=ut?ut.isBuffer:void 0,yt=J(Object.keys,Object),xt=ke(P,"DataView"),Nt=ke(P,"Map"),wt=ke(P,"Promise"),Et=ke(P,"Set"),At=ke(P,"WeakMap"),qt=ke(Object,"create"),kt=Me(xt),_t=Me(Nt),Lt=Me(wt),Ot=Me(Et),St=Me(At),Tt=ht?ht.prototype:void 0,jt=Tt?Tt.valueOf:void 0;function Ct(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Rt(){this.__data__=qt?qt(null):{}}function It(t){return this.has(t)&&delete this.__data__[t]}function Mt(t){var e=this.__data__;if(qt){var n=e[t];return n===i?void 0:n}return lt.call(e,t)?e[t]:void 0}function Bt(t){var e=this.__data__;return qt?void 0!==e[t]:lt.call(e,t)}function Dt(t,e){var n=this.__data__;return n[t]=qt&&void 0===e?i:e,this}function Ut(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Pt(){this.__data__=[]}function zt(t){var e=this.__data__,n=se(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():mt.call(e,n,1),!0}function Ft(t){var e=this.__data__,n=se(e,t);return n<0?void 0:e[n][1]}function Ht(t){return se(this.__data__,t)>-1}function $t(t,e){var n=this.__data__,r=se(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function Vt(t){var e=-1,n=t?t.length:0;this.clear();while(++e<n){var r=t[e];this.set(r[0],r[1])}}function Kt(){this.__data__={hash:new Ct,map:new(Nt||Ut),string:new Ct}}function Wt(t){return qe(this,t)["delete"](t)}function Zt(t){return qe(this,t).get(t)}function Gt(t){return qe(this,t).has(t)}function Xt(t,e){return qe(this,t).set(t,e),this}function Yt(t){this.__data__=new Ut(t)}function Qt(){this.__data__=new Ut}function Jt(t){return this.__data__["delete"](t)}function te(t){return this.__data__.get(t)}function ee(t){return this.__data__.has(t)}function ne(t,e){var n=this.__data__;if(n instanceof Ut){var i=n.__data__;if(!Nt||i.length<r-1)return i.push([t,e]),this;n=this.__data__=new Vt(i)}return n.set(t,e),this}function re(t,e){var n=Pe(t)||Ue(t)?G(t.length,String):[],r=n.length,i=!!r;for(var s in t)!e&&!lt.call(t,s)||i&&("length"==s||je(s,r))||n.push(s);return n}function ie(t,e,n){var r=t[e];lt.call(t,e)&&De(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function se(t,e){var n=t.length;while(n--)if(De(t[n][0],e))return n;return-1}function oe(t,e){return t&&we(e,Ze(e),t)}function le(t,e,n,r,i,s,l){var a;if(r&&(a=s?r(t,i,s,l):r(t)),void 0!==a)return a;if(!Ke(t))return t;var c=Pe(t);if(c){if(a=Oe(t),!e)return Ne(t,a)}else{var u=Le(t),f=u==h||u==d;if(He(t))return fe(t,e);if(u==g||u==o||f&&!s){if(Y(t))return s?t:{};if(a=Se(f?{}:t),!e)return Ee(t,oe(a,t))}else{if(!B[u])return s?t:{};a=Te(t,u,le,e)}}l||(l=new Yt);var p=l.get(t);if(p)return p;if(l.set(t,a),!c)var m=n?Ae(t):Ze(t);return K(m||t,(function(i,s){m&&(s=i,i=t[s]),ie(a,s,le(i,e,n,r,s,t,l))})),a}function ae(t){return Ke(t)?pt(t):{}}function ce(t,e,n){var r=e(t);return Pe(t)?r:W(r,n(t))}function ue(t){return at.call(t)}function he(t){if(!Ke(t)||Re(t))return!1;var e=$e(t)||Y(t)?ct:I;return e.test(Me(t))}function de(t){if(!Ie(t))return yt(t);var e=[];for(var n in Object(t))lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fe(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function pe(t){var e=new t.constructor(t.byteLength);return new dt(e).set(new dt(t)),e}function ge(t,e){var n=e?pe(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}function me(t,e,n){var r=e?n(Q(t),!0):Q(t);return Z(r,$,new t.constructor)}function be(t){var e=new t.constructor(t.source,R.exec(t));return e.lastIndex=t.lastIndex,e}function ve(t,e,n){var r=e?n(tt(t),!0):tt(t);return Z(r,V,new t.constructor)}function ye(t){return jt?Object(jt.call(t)):{}}function xe(t,e){var n=e?pe(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ne(t,e){var n=-1,r=t.length;e||(e=Array(r));while(++n<r)e[n]=t[n];return e}function we(t,e,n,r){n||(n={});var i=-1,s=e.length;while(++i<s){var o=e[i],l=r?r(n[o],t[o],o,n,t):void 0;ie(n,o,void 0===l?t[o]:l)}return n}function Ee(t,e){return we(t,_e(t),e)}function Ae(t){return ce(t,Ze,_e)}function qe(t,e){var n=t.__data__;return Ce(e)?n["string"==typeof e?"string":"hash"]:n.map}function ke(t,e){var n=X(t,e);return he(n)?n:void 0}Ct.prototype.clear=Rt,Ct.prototype["delete"]=It,Ct.prototype.get=Mt,Ct.prototype.has=Bt,Ct.prototype.set=Dt,Ut.prototype.clear=Pt,Ut.prototype["delete"]=zt,Ut.prototype.get=Ft,Ut.prototype.has=Ht,Ut.prototype.set=$t,Vt.prototype.clear=Kt,Vt.prototype["delete"]=Wt,Vt.prototype.get=Zt,Vt.prototype.has=Gt,Vt.prototype.set=Xt,Yt.prototype.clear=Qt,Yt.prototype["delete"]=Jt,Yt.prototype.get=te,Yt.prototype.has=ee,Yt.prototype.set=ne;var _e=bt?J(bt,Object):Ge,Le=ue;function Oe(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&lt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Se(t){return"function"!=typeof t.constructor||Ie(t)?{}:ae(ft(t))}function Te(t,e,n,r){var i=t.constructor;switch(e){case w:return pe(t);case a:case c:return new i(+t);case E:return ge(t,r);case A:case q:case k:case _:case L:case O:case S:case T:case j:return xe(t,r);case f:return me(t,r,n);case p:case y:return new i(t);case b:return be(t);case v:return ve(t,r,n);case x:return ye(t)}}function je(t,e){return e=null==e?s:e,!!e&&("number"==typeof t||M.test(t))&&t>-1&&t%1==0&&t<e}function Ce(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Re(t){return!!st&&st in t}function Ie(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||rt;return t===n}function Me(t){if(null!=t){try{return ot.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Be(t){return le(t,!0,!0)}function De(t,e){return t===e||t!==t&&e!==e}function Ue(t){return Fe(t)&&lt.call(t,"callee")&&(!gt.call(t,"callee")||at.call(t)==o)}(xt&&Le(new xt(new ArrayBuffer(1)))!=E||Nt&&Le(new Nt)!=f||wt&&Le(wt.resolve())!=m||Et&&Le(new Et)!=v||At&&Le(new At)!=N)&&(Le=function(t){var e=at.call(t),n=e==g?t.constructor:void 0,r=n?Me(n):void 0;if(r)switch(r){case kt:return E;case _t:return f;case Lt:return m;case Ot:return v;case St:return N}return e});var Pe=Array.isArray;function ze(t){return null!=t&&Ve(t.length)&&!$e(t)}function Fe(t){return We(t)&&ze(t)}var He=vt||Xe;function $e(t){var e=Ke(t)?at.call(t):"";return e==h||e==d}function Ve(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=s}function Ke(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function We(t){return!!t&&"object"==typeof t}function Ze(t){return ze(t)?re(t):de(t)}function Ge(){return[]}function Xe(){return!1}t.exports=Be},2502:function(t,e,n){"use strict";n(4114),n(8111),n(2489),n(7588),n(1701),n(8237),Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const r=n(680),i=n(1314),s=n(1029),o=n(4008);e.AttributeMap=o.default;const l=n(4169);e.Op=l.default;const a=n(7019);e.OpIterator=a.default;const c=String.fromCharCode(0),u=(t,e)=>{if("object"!==typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!==typeof e||null===e)throw new Error("cannot retain a "+typeof e);const n=Object.keys(t)[0];if(!n||n!==Object.keys(e)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(e)[0]}`);return[n,t[n],e[n]]};class h{constructor(t){Array.isArray(t)?this.ops=t:null!=t&&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){const e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}insert(t,e){const n={};return"string"===typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if("number"===typeof t&&t<=0)return this;const n={retain:t};return null!=e&&"object"===typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)}push(t){let e=this.ops.length,n=this.ops[e-1];if(t=i(t),"object"===typeof n){if("number"===typeof t.delete&&"number"===typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"===typeof n.delete&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!==typeof n))return this.ops.unshift(t),this;if(s(t.attributes,n.attributes)){if("string"===typeof t.insert&&"string"===typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"===typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"===typeof t.retain&&"number"===typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"===typeof t.attributes&&(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(){const t=this.ops[this.ops.length-1];return t&&"number"===typeof t.retain&&!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){const e=[],n=[];return this.forEach((r=>{const i=t(r)?e:n;i.push(r)})),[e,n]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>e.insert?t+l.default.length(e):e.delete?t-e.delete:t),0)}length(){return this.reduce(((t,e)=>t+l.default.length(e)),0)}slice(t=0,e=1/0){const n=[],r=new a.default(this.ops);let i=0;while(i<e&&r.hasNext()){let s;i<t?s=r.next(t-i):(s=r.next(e-i),n.push(s)),i+=l.default.length(s)}return new h(n)}compose(t){const e=new a.default(this.ops),n=new a.default(t.ops),r=[],i=n.peek();if(null!=i&&"number"===typeof i.retain&&null==i.attributes){let t=i.retain;while("insert"===e.peekType()&&e.peekLength()<=t)t-=e.peekLength(),r.push(e.next());i.retain-t>0&&n.next(i.retain-t)}const l=new h(r);while(e.hasNext()||n.hasNext())if("insert"===n.peekType())l.push(n.next());else if("delete"===e.peekType())l.push(e.next());else{const t=Math.min(e.peekLength(),n.peekLength()),r=e.next(t),i=n.next(t);if(i.retain){const a={};if("number"===typeof r.retain)a.retain="number"===typeof i.retain?t:i.retain;else if("number"===typeof i.retain)null==r.retain?a.insert=r.insert:a.retain=r.retain;else{const t=null==r.retain?"insert":"retain",[e,n,s]=u(r[t],i.retain),o=h.getHandler(e);a[t]={[e]:o.compose(n,s,"retain"===t)}}const c=o.default.compose(r.attributes,i.attributes,"number"===typeof r.retain);if(c&&(a.attributes=c),l.push(a),!n.hasNext()&&s(l.ops[l.ops.length-1],a)){const t=new h(e.rest());return l.concat(t).chop()}}else"number"===typeof i.delete&&("number"===typeof r.retain||"object"===typeof r.retain&&null!==r.retain)&&l.push(i)}return l.chop()}concat(t){const e=new h(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 h;const n=[this,t].map((e=>e.map((n=>{if(null!=n.insert)return"string"===typeof n.insert?n.insert:c;const r=e===t?"on":"with";throw new Error("diff() called "+r+" non-document")})).join(""))),i=new h,l=r(n[0],n[1],e,!0),u=new a.default(this.ops),d=new a.default(t.ops);return l.forEach((t=>{let e=t[1].length;while(e>0){let n=0;switch(t[0]){case r.INSERT:n=Math.min(d.peekLength(),e),i.push(d.next(n));break;case r.DELETE:n=Math.min(e,u.peekLength()),u.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(u.peekLength(),d.peekLength(),e);const t=u.next(n),l=d.next(n);s(t.insert,l.insert)?i.retain(n,o.default.diff(t.attributes,l.attributes)):i.push(l).delete(n);break}e-=n}})),i.chop()}eachLine(t,e="\n"){const n=new a.default(this.ops);let r=new h,i=0;while(n.hasNext()){if("insert"!==n.peekType())return;const s=n.peek(),o=l.default.length(s)-n.peekLength(),a="string"===typeof s.insert?s.insert.indexOf(e,o)-o:-1;if(a<0)r.push(n.next());else if(a>0)r.push(n.next(a));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new h}}r.length()>0&&t(r,{},i)}invert(t){const e=new h;return this.reduce(((n,r)=>{if(r.insert)e.delete(l.default.length(r));else{if("number"===typeof r.retain&&null==r.attributes)return e.retain(r.retain),n+r.retain;if(r.delete||"number"===typeof r.retain){const i=r.delete||r.retain,s=t.slice(n,n+i);return s.forEach((t=>{r.delete?e.push(t):r.retain&&r.attributes&&e.retain(l.default.length(t),o.default.invert(r.attributes,t.attributes))})),n+i}if("object"===typeof r.retain&&null!==r.retain){const i=t.slice(n,n+1),s=new a.default(i.ops).next(),[l,c,d]=u(r.retain,s.insert),f=h.getHandler(l);return e.retain({[l]:f.invert(c,d)},o.default.invert(r.attributes,s.attributes)),n+1}}return n}),0),e.chop()}transform(t,e=!1){if(e=!!e,"number"===typeof t)return this.transformPosition(t,e);const n=t,r=new a.default(this.ops),i=new a.default(n.ops),s=new h;while(r.hasNext()||i.hasNext())if("insert"!==r.peekType()||!e&&"insert"===i.peekType())if("insert"===i.peekType())s.push(i.next());else{const t=Math.min(r.peekLength(),i.peekLength()),n=r.next(t),l=i.next(t);if(n.delete)continue;if(l.delete)s.push(l);else{const r=n.retain,i=l.retain;let a="object"===typeof i&&null!==i?i:t;if("object"===typeof r&&null!==r&&"object"===typeof i&&null!==i){const t=Object.keys(r)[0];if(t===Object.keys(i)[0]){const n=h.getHandler(t);n&&(a={[t]:n.transform(r[t],i[t],e)})}}s.retain(a,o.default.transform(n.attributes,l.attributes,e))}}else s.retain(l.default.length(r.next()));return s.chop()}transformPosition(t,e=!1){e=!!e;const n=new a.default(this.ops);let r=0;while(n.hasNext()&&r<=t){const i=n.peekLength(),s=n.peekType();n.next(),"delete"!==s?("insert"===s&&(r<t||!e)&&(t+=i),r+=i):t-=Math.min(i,t-r)}return t}}h.Op=l.default,h.OpIterator=a.default,h.AttributeMap=o.default,h.handlers={},e["default"]=h,t.exports=h,t.exports["default"]=h},4008:function(t,e,n){"use strict";n(8111),n(8237),Object.defineProperty(e,"__esModule",{value:!0});const r=n(1314),i=n(1029);var s;(function(t){function e(t={},e={},n=!1){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});let i=r(e);n||(i=Object.keys(i).reduce(((t,e)=>(null!=i[e]&&(t[e]=i[e]),t)),{}));for(const r in t)void 0!==t[r]&&void 0===e[r]&&(i[r]=t[r]);return Object.keys(i).length>0?i:void 0}function n(t={},e={}){"object"!==typeof t&&(t={}),"object"!==typeof e&&(e={});const n=Object.keys(t).concat(Object.keys(e)).reduce(((n,r)=>(i(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n)),{});return Object.keys(n).length>0?n:void 0}function s(t={},e={}){t=t||{};const n=Object.keys(e).reduce(((n,r)=>(e[r]!==t[r]&&void 0!==t[r]&&(n[r]=e[r]),n)),{});return Object.keys(t).reduce(((n,r)=>(t[r]!==e[r]&&void 0===e[r]&&(n[r]=null),n)),n)}function o(t,e,n=!1){if("object"!==typeof t)return e;if("object"!==typeof e)return;if(!n)return e;const r=Object.keys(e).reduce(((n,r)=>(void 0===t[r]&&(n[r]=e[r]),n)),{});return Object.keys(r).length>0?r:void 0}t.compose=e,t.diff=n,t.invert=s,t.transform=o})(s||(s={})),e["default"]=s},4169:function(t,e){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){function e(t){return"number"===typeof t.delete?t.delete:"number"===typeof t.retain?t.retain:"object"===typeof t.retain&&null!==t.retain?1:"string"===typeof t.insert?t.insert.length:1}t.length=e}(n||(n={})),e["default"]=n},6590:function(t,e,n){"use strict";n(4114);var r=Object.prototype.hasOwnProperty,i="~";function s(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function l(t,e,n,r,s){if("function"!==typeof n)throw new TypeError("The listener must be a function");var l=new o(n,r||t,s),a=i?i+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],l]:t._events[a].push(l):(t._events[a]=l,t._eventsCount++),t}function a(t,e){0===--t._eventsCount?t._events=new s:delete t._events[e]}function c(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},c.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,o=new Array(s);r<s;r++)o[r]=n[r].fn;return o},c.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},c.prototype.emit=function(t,e,n,r,s,o){var l=i?i+t:t;if(!this._events[l])return!1;var a,c,u=this._events[l],h=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,n),!0;case 4:return u.fn.call(u.context,e,n,r),!0;case 5:return u.fn.call(u.context,e,n,r,s),!0;case 6:return u.fn.call(u.context,e,n,r,s,o),!0}for(c=1,a=new Array(h-1);c<h;c++)a[c-1]=arguments[c];u.fn.apply(u.context,a)}else{var d,f=u.length;for(c=0;c<f;c++)switch(u[c].once&&this.removeListener(t,u[c].fn,void 0,!0),h){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,e);break;case 3:u[c].fn.call(u[c].context,e,n);break;case 4:u[c].fn.call(u[c].context,e,n,r);break;default:if(!a)for(d=1,a=new Array(h-1);d<h;d++)a[d-1]=arguments[d];u[c].fn.apply(u[c].context,a)}}return!0},c.prototype.on=function(t,e,n){return l(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return l(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,n,r){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return a(this,s),this;var o=this._events[s];if(o.fn)o.fn!==e||r&&!o.once||n&&o.context!==n||a(this,s);else{for(var l=0,c=[],u=o.length;l<u;l++)(o[l].fn!==e||r&&!o[l].once||n&&o[l].context!==n)&&c.push(o[l]);c.length?this._events[s]=1===c.length?c[0]:c:a(this,s)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&a(this,e)):(this._events=new s,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},7019:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(4169);class i{constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const e=this.ops[this.index];if(e){const n=this.offset,i=r.default.length(e);if(t>=i-n?(t=i-n,this.index+=1,this.offset=0):this.offset+=t,"number"===typeof e.delete)return{delete:t};{const r={};return e.attributes&&(r.attributes=e.attributes),"number"===typeof e.retain?r.retain=t:"object"===typeof e.retain&&null!==e.retain?r.retain=e.retain:"string"===typeof e.insert?r.insert=e.insert.substr(n,t):r.insert=e.insert,r}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"===typeof t.delete?"delete":"number"===typeof t.retain||"object"===typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}}return[]}}e["default"]=i}}]);
  2. //# sourceMappingURL=7882.9dd4b9a4.js.map