mkA~(@^_^@)~PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT p0 import{z as Ve,B as xt,H as We,o as Ze,k as Se,q as Ye,b as Pe,t as Qe,v as Xe,p as Je,T as ht,D as tn,U as en,j as at,S as nn}from"./index-DoU2MHKd.js";import{M as rn}from"./index-BrNVkngO.js";import{u as on,B as an}from"./BlurComponent-By-zEEWf.js";import{u as ln}from"./useMutation-BvY1LEQe.js";import{F as St}from"./index-BjvZ8PnY.js";import{u as un,b as sn,c as fn,C as cn,F as hn}from"./index-m30_MRwT.js";import{T as Jt}from"./index-Dx3xM2U7.js";import{a as dn}from"./index-CVW_SfJD.js";import{G as mt}from"./Grid-Dszo2Bkt.js";import"./Box-COt46hbf.js";import"./observer-B278D4P8.js";import"./Typography-CcGLjhMP.js";import"./Paper-KHBRuWUR.js";import"./ownerWindow-PUvYI-j5.js";import"./isHostComponent-BHK9_qiJ.js";import"./useTheme-DOOi9IXa.js";const vn=Ve({arTitle:xt().required(),enTitle:xt().required(),arDescribtion:xt().required(),enDescribtion:xt().required()}),pn={arTitle:"",enTitle:"",arDescribtion:"",enDescribtion:""},yn=()=>{const{id:x}=We(),j=Ze(),{t:b}=Se(),s=Ye(),d=Pe.useRef(),{handleError:T,fireToast:A}=on(),{loading:_,requestHandlers:v}=Qe(),y=async()=>{var u;const{res:t,error:e}=await v({endpoint:`admin/pages/${x}`});return e?T(e):((u=d.current)==null||u.setValues({arTitle:t.data.title[0].title,enTitle:t.data.title[1].title,arDescribtion:t.data.description[0].describtion,enDescribtion:t.data.description[1].describtion}),t.data)},{data:h}=Xe({queryKey:["static_pages",x],queryFn:y,options:{enabled:!!x}}),o=ln({mutationFn:async t=>{const e={"ar[title]":t.arTitle,"en[title]":t.enTitle,"ar[describtion]":t.arDescribtion,"en[describtion]":t.enDescribtion},{res:u,error:a}=await v({type:"POST",endpoint:`admin/pages/${x}?_method=PUT`,body:e});if(a)return T(a);A({type:"success",title:u.message}),j(Je.staticPages)},onSuccess:()=>{s.invalidateQueries(["admin/pages"])}});return{data:h,loading:_,mutation:o,defaultValues:pn,t:b,id:x,formRef:d}},gn=()=>{const{t:x}=Se(),{control:j}=un();return{control:j,t:x}};function mn(){this.__data__=[],this.size=0}var bn=mn;function _n(x,j){return x===j||x!==x&&j!==j}var Le=_n,On=Le;function En(x,j){for(var b=x.length;b--;)if(On(x[b][0],j))return b;return-1}var It=En,An=It,Tn=Array.prototype,wn=Tn.splice;function kn(x){var j=this.__data__,b=An(j,x);if(b<0)return!1;var s=j.length-1;return b==s?j.pop():wn.call(j,b,1),--this.size,!0}var Nn=kn,xn=It;function Sn(x){var j=this.__data__,b=xn(j,x);return b<0?void 0:j[b][1]}var Pn=Sn,Ln=It;function qn(x){return Ln(this.__data__,x)>-1}var jn=qn,Rn=It;function In(x,j){var b=this.__data__,s=Rn(b,x);return s<0?(++this.size,b.push([x,j])):b[s][1]=j,this}var Dn=In,Mn=bn,Cn=Nn,Bn=Pn,$n=jn,Fn=Dn;function _t(x){var j=-1,b=x==null?0:x.length;for(this.clear();++j_))return!1;var y=T.get(x),h=T.get(j);if(y&&h)return y==j&&h==x;var o=-1,t=!0,e=b&xo?new To:void 0;for(T.set(x,j),T.set(j,x);++o<_;){var u=x[o],a=j[o];if(s)var l=A?s(a,u,o,j,x,T):s(u,a,o,x,j,T);if(l!==void 0){if(l)continue;t=!1;break}if(e){if(!wo(j,function(r,i){if(!ko(e,i)&&(u===r||d(u,r,b,s,T)))return e.push(i)})){t=!1;break}}else if(!(u===a||d(u,a,b,s,T))){t=!1;break}}return T.delete(x),T.delete(j),t}var Ce=So,Po=yt,Lo=Po.Uint8Array,qo=Lo;function jo(x){var j=-1,b=Array(x.size);return x.forEach(function(s,d){b[++j]=[d,s]}),b}var Ro=jo;function Io(x){var j=-1,b=Array(x.size);return x.forEach(function(s){b[++j]=s}),b}var Do=Io,ae=Yt,le=qo,Mo=Le,Co=Ce,Bo=Ro,$o=Do,Fo=1,Uo=2,Ho="[object Boolean]",Ko="[object Date]",zo="[object Error]",Go="[object Map]",Vo="[object Number]",Wo="[object RegExp]",Zo="[object Set]",Yo="[object String]",Qo="[object Symbol]",Xo="[object ArrayBuffer]",Jo="[object DataView]",ue=ae?ae.prototype:void 0,Ht=ue?ue.valueOf:void 0;function ta(x,j,b,s,d,T,A){switch(b){case Jo:if(x.byteLength!=j.byteLength||x.byteOffset!=j.byteOffset)return!1;x=x.buffer,j=j.buffer;case Xo:return!(x.byteLength!=j.byteLength||!T(new le(x),new le(j)));case Ho:case Ko:case Vo:return Mo(+x,+j);case zo:return x.name==j.name&&x.message==j.message;case Wo:case Yo:return x==j+"";case Go:var _=Bo;case Zo:var v=s&Fo;if(_||(_=$o),x.size!=j.size&&!v)return!1;var y=A.get(x);if(y)return y==j;s|=Uo,A.set(x,j);var h=Co(_(x),_(j),s,d,T,A);return A.delete(x),h;case Qo:if(Ht)return Ht.call(x)==Ht.call(j)}return!1}var ea=ta;function na(x,j){for(var b=-1,s=j.length,d=x.length;++b-1&&x%1==0&&x-1&&x%1==0&&x<=Ca}var Fe=Ba,$a=Mt,Fa=Fe,Ua=$t,Ha="[object Arguments]",Ka="[object Array]",za="[object Boolean]",Ga="[object Date]",Va="[object Error]",Wa="[object Function]",Za="[object Map]",Ya="[object Number]",Qa="[object Object]",Xa="[object RegExp]",Ja="[object Set]",tl="[object String]",el="[object WeakMap]",nl="[object ArrayBuffer]",rl="[object DataView]",il="[object Float32Array]",ol="[object Float64Array]",al="[object Int8Array]",ll="[object Int16Array]",ul="[object Int32Array]",sl="[object Uint8Array]",fl="[object Uint8ClampedArray]",cl="[object Uint16Array]",hl="[object Uint32Array]",lt={};lt[il]=lt[ol]=lt[al]=lt[ll]=lt[ul]=lt[sl]=lt[fl]=lt[cl]=lt[hl]=!0;lt[Ha]=lt[Ka]=lt[nl]=lt[za]=lt[rl]=lt[Ga]=lt[Va]=lt[Wa]=lt[Za]=lt[Ya]=lt[Qa]=lt[Xa]=lt[Ja]=lt[tl]=lt[el]=!1;function dl(x){return Ua(x)&&Fa(x.length)&&!!lt[$a(x)]}var vl=dl;function pl(x){return function(j){return x(j)}}var yl=pl,jt={exports:{}};jt.exports;(function(x,j){var b=qe,s=j&&!j.nodeType&&j,d=s&&!0&&x&&!x.nodeType&&x,T=d&&d.exports===s,A=T&&b.process,_=function(){try{var v=d&&d.require&&d.require("util").types;return v||A&&A.binding&&A.binding("util")}catch{}}();x.exports=_})(jt,jt.exports);var gl=jt.exports,ml=vl,bl=yl,ce=gl,he=ce&&ce.isTypedArray,_l=he?bl(he):ml,Ue=_l,Ol=_a,El=La,Al=Xt,Tl=$e,wl=Ma,kl=Ue,Nl=Object.prototype,xl=Nl.hasOwnProperty;function Sl(x,j){var b=Al(x),s=!b&&El(x),d=!b&&!s&&Tl(x),T=!b&&!s&&!d&&kl(x),A=b||s||d||T,_=A?Ol(x.length,String):[],v=_.length;for(var y in x)(j||xl.call(x,y))&&!(A&&(y=="length"||d&&(y=="offset"||y=="parent")||T&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||wl(y,v)))&&_.push(y);return _}var Pl=Sl,Ll=Object.prototype;function ql(x){var j=x&&x.constructor,b=typeof j=="function"&&j.prototype||Ll;return x===b}var jl=ql;function Rl(x,j){return function(b){return x(j(b))}}var Il=Rl,Dl=Il,Ml=Dl(Object.keys,Object),Cl=Ml,Bl=jl,$l=Cl,Fl=Object.prototype,Ul=Fl.hasOwnProperty;function Hl(x){if(!Bl(x))return $l(x);var j=[];for(var b in Object(x))Ul.call(x,b)&&b!="constructor"&&j.push(b);return j}var Kl=Hl,zl=Ie,Gl=Fe;function Vl(x){return x!=null&&Gl(x.length)&&!zl(x)}var Wl=Vl,Zl=Pl,Yl=Kl,Ql=Wl;function Xl(x){return Ql(x)?Zl(x):Yl(x)}var Jl=Xl,tu=ua,eu=ma,nu=Jl;function ru(x){return tu(x,nu,eu)}var iu=ru,de=iu,ou=1,au=Object.prototype,lu=au.hasOwnProperty;function uu(x,j,b,s,d,T){var A=b&ou,_=de(x),v=_.length,y=de(j),h=y.length;if(v!=h&&!A)return!1;for(var o=v;o--;){var t=_[o];if(!(A?t in j:lu.call(j,t)))return!1}var e=T.get(x),u=T.get(j);if(e&&u)return e==j&&u==x;var a=!0;T.set(x,j),T.set(j,x);for(var l=A;++o1)return l.map(function(n){return a(n)});var i=l[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new A("Invalid definition");if(i.blotName==="abstract")throw new A("Cannot register abstract class");if(h[i.blotName||i.attrName]=i,typeof i.keyName=="string")_[i.keyName]=i;else if(i.className!=null&&(v[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var f=Array.isArray(i.tagName)?i.tagName:[i.tagName];f.forEach(function(n){(y[n]==null||i.className==null)&&(y[n]=i)})}return i}s.register=a},function(b,s,d){var T=d(51),A=d(11),_=d(3),v=d(20),y="\0",h=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};h.prototype.insert=function(o,t){var e={};return o.length===0?this:(e.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(e.attributes=t),this.push(e))},h.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},h.prototype.retain=function(o,t){if(o<=0)return this;var e={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(e.attributes=t),this.push(e)},h.prototype.push=function(o){var t=this.ops.length,e=this.ops[t-1];if(o=_(!0,{},o),typeof e=="object"){if(typeof o.delete=="number"&&typeof e.delete=="number")return this.ops[t-1]={delete:e.delete+o.delete},this;if(typeof e.delete=="number"&&o.insert!=null&&(t-=1,e=this.ops[t-1],typeof e!="object"))return this.ops.unshift(o),this;if(A(o.attributes,e.attributes)){if(typeof o.insert=="string"&&typeof e.insert=="string")return this.ops[t-1]={insert:e.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof e.retain=="number")return this.ops[t-1]={retain:e.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this},h.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},h.prototype.filter=function(o){return this.ops.filter(o)},h.prototype.forEach=function(o){this.ops.forEach(o)},h.prototype.map=function(o){return this.ops.map(o)},h.prototype.partition=function(o){var t=[],e=[];return this.forEach(function(u){var a=o(u)?t:e;a.push(u)}),[t,e]},h.prototype.reduce=function(o,t){return this.ops.reduce(o,t)},h.prototype.changeLength=function(){return this.reduce(function(o,t){return t.insert?o+v.length(t):t.delete?o-t.delete:o},0)},h.prototype.length=function(){return this.reduce(function(o,t){return o+v.length(t)},0)},h.prototype.slice=function(o,t){o=o||0,typeof t!="number"&&(t=1/0);for(var e=[],u=v.iterator(this.ops),a=0;a0&&e.next(a.retain-l)}for(var r=new h(u);t.hasNext()||e.hasNext();)if(e.peekType()==="insert")r.push(e.next());else if(t.peekType()==="delete")r.push(t.next());else{var i=Math.min(t.peekLength(),e.peekLength()),f=t.next(i),n=e.next(i);if(typeof n.retain=="number"){var c={};typeof f.retain=="number"?c.retain=i:c.insert=f.insert;var N=v.attributes.compose(f.attributes,n.attributes,typeof f.retain=="number");if(N&&(c.attributes=N),r.push(c),!e.hasNext()&&A(r.ops[r.ops.length-1],c)){var O=new h(t.rest());return r.concat(O).chop()}}else typeof n.delete=="number"&&typeof f.retain=="number"&&r.push(n)}return r.chop()},h.prototype.concat=function(o){var t=new h(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t},h.prototype.diff=function(o,t){if(this.ops===o.ops)return new h;var e=[this,o].map(function(i){return i.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:y;var n=i===o?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),u=new h,a=T(e[0],e[1],t),l=v.iterator(this.ops),r=v.iterator(o.ops);return a.forEach(function(i){for(var f=i[1].length;f>0;){var n=0;switch(i[0]){case T.INSERT:n=Math.min(r.peekLength(),f),u.push(r.next(n));break;case T.DELETE:n=Math.min(f,l.peekLength()),l.next(n),u.delete(n);break;case T.EQUAL:n=Math.min(l.peekLength(),r.peekLength(),f);var c=l.next(n),N=r.next(n);A(c.insert,N.insert)?u.retain(n,v.attributes.diff(c.attributes,N.attributes)):u.push(N).delete(n);break}f-=n}}),u.chop()},h.prototype.eachLine=function(o,t){t=t||` `;for(var e=v.iterator(this.ops),u=new h,a=0;e.hasNext();){if(e.peekType()!=="insert")return;var l=e.peek(),r=v.length(l)-e.peekLength(),i=typeof l.insert=="string"?l.insert.indexOf(t,r)-r:-1;if(i<0)u.push(e.next());else if(i>0)u.push(e.next(i));else{if(o(u,e.next(1).attributes||{},a)===!1)return;a+=1,u=new h}}u.length()>0&&o(u,{},a)},h.prototype.transform=function(o,t){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);for(var e=v.iterator(this.ops),u=v.iterator(o.ops),a=new h;e.hasNext()||u.hasNext();)if(e.peekType()==="insert"&&(t||u.peekType()!=="insert"))a.retain(v.length(e.next()));else if(u.peekType()==="insert")a.push(u.next());else{var l=Math.min(e.peekLength(),u.peekLength()),r=e.next(l),i=u.next(l);if(r.delete)continue;i.delete?a.push(i):a.retain(l,v.attributes.transform(r.attributes,i.attributes,t))}return a.chop()},h.prototype.transformPosition=function(o,t){t=!!t;for(var e=v.iterator(this.ops),u=0;e.hasNext()&&u<=o;){var a=e.peekLength(),l=e.peekType();if(e.next(),l==="delete"){o-=Math.min(a,o-u);continue}else l==="insert"&&(u"u"||d.call(e,l)},h=function(e,u){A&&u.name==="__proto__"?A(e,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):e[u.name]=u.newValue},o=function(e,u){if(u==="__proto__")if(d.call(e,u)){if(_)return _(e,u).value}else return;return e[u]};b.exports=function t(){var e,u,a,l,r,i,f=arguments[0],n=1,c=arguments.length,N=!1;for(typeof f=="boolean"&&(N=f,f=arguments[1]||{},n=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});n0&&(P1&&arguments[1]!==void 0?arguments[1]:!1;if(I&&(P===0||P>=this.length()-O)){var $=this.clone();return P===0?(this.parent.insertBefore($,this),this):(this.parent.insertBefore($,this.next),$)}else{var F=A(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"split",this).call(this,P,I);return this.cache={},F}}}]),g}(t.default.Block);S.blotName="block",S.tagName="P",S.defaultChild="break",S.allowedChildren=[l.default,t.default.Embed,i.default];function m(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return p==null||(typeof p.formats=="function"&&(g=(0,v.default)(g,p.formats())),p.parent==null||p.parent.blotName=="scroll"||p.parent.statics.scope!==p.statics.scope)?g:m(p.parent,g)}s.bubbleFormats=m,s.BlockEmbed=E,s.default=S},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.overload=s.expandConfig=void 0;var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},A=function(){function C(D,w){var q=[],R=!0,U=!1,B=void 0;try{for(var L=D[Symbol.iterator](),M;!(R=(M=L.next()).done)&&(q.push(M.value),!(w&&q.length===w));R=!0);}catch(H){U=!0,B=H}finally{try{!R&&L.return&&L.return()}finally{if(U)throw B}}return q}return function(D,w){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return C(D,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function C(D,w){for(var q=0;q2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof w!="string"){var B=w.attrName||w.blotName;typeof B=="string"?this.register("formats/"+B,w,q):Object.keys(w).forEach(function(L){R.register(L,w[L],q)})}else this.imports[w]!=null&&!U&&k.warn("Overwriting "+w+" with",q),this.imports[w]=q,(w.startsWith("blots/")||w.startsWith("formats/"))&&q.blotName!=="abstract"?r.default.register(q):w.startsWith("modules")&&typeof q.register=="function"&&q.register()}}]);function C(D){var w=this,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g(this,C),this.options=I(D,q),this.container=this.options.container,this.container==null)return k.error("Invalid Quill container",D);this.options.debug&&C.debug(this.options.debug);var R=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new e.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new f.default(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.theme.init(),this.emitter.on(e.default.events.EDITOR_CHANGE,function(B){B===e.default.events.TEXT_CHANGE&&w.root.classList.toggle("ql-blank",w.editor.isBlank())}),this.emitter.on(e.default.events.SCROLL_UPDATE,function(B,L){var M=w.selection.lastRange,H=M&&M.length===0?M.index:void 0;$.call(w,function(){return w.editor.update(null,L,H)},B)});var U=this.clipboard.convert(`
`+R+"


");this.setContents(U),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _(C,[{key:"addContainer",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof w=="string"){var R=w;w=document.createElement("div"),w.classList.add(R)}return this.container.insertBefore(w,q),w}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(w,q,R){var U=this,B=F(w,q,R),L=A(B,4);return w=L[0],q=L[1],R=L[3],$.call(this,function(){return U.editor.deleteText(w,q)},R,w,-1*q)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(w),this.container.classList.toggle("ql-disabled",!w)}},{key:"focus",value:function(){var w=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=w,this.scrollIntoView()}},{key:"format",value:function(w,q){var R=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.default.sources.API;return $.call(this,function(){var B=R.getSelection(!0),L=new y.default;if(B==null)return L;if(r.default.query(w,r.default.Scope.BLOCK))L=R.editor.formatLine(B.index,B.length,p({},w,q));else{if(B.length===0)return R.selection.format(w,q),L;L=R.editor.formatText(B.index,B.length,p({},w,q))}return R.setSelection(B,e.default.sources.SILENT),L},U)}},{key:"formatLine",value:function(w,q,R,U,B){var L=this,M=void 0,H=F(w,q,R,U,B),K=A(H,4);return w=K[0],q=K[1],M=K[2],B=K[3],$.call(this,function(){return L.editor.formatLine(w,q,M)},B,w,0)}},{key:"formatText",value:function(w,q,R,U,B){var L=this,M=void 0,H=F(w,q,R,U,B),K=A(H,4);return w=K[0],q=K[1],M=K[2],B=K[3],$.call(this,function(){return L.editor.formatText(w,q,M)},B,w,0)}},{key:"getBounds",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=void 0;typeof w=="number"?R=this.selection.getBounds(w,q):R=this.selection.getBounds(w.index,w.length);var U=this.container.getBoundingClientRect();return{bottom:R.bottom-U.top,height:R.height,left:R.left-U.left,right:R.right-U.left,top:R.top-U.top,width:R.width}}},{key:"getContents",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-w,R=F(w,q),U=A(R,2);return w=U[0],q=U[1],this.editor.getContents(w,q)}},{key:"getFormat",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof w=="number"?this.editor.getFormat(w,q):this.editor.getFormat(w.index,w.length)}},{key:"getIndex",value:function(w){return w.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(w){return this.scroll.leaf(w)}},{key:"getLine",value:function(w){return this.scroll.line(w)}},{key:"getLines",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof w!="number"?this.scroll.lines(w.index,w.length):this.scroll.lines(w,q)}},{key:"getModule",value:function(w){return this.theme.modules[w]}},{key:"getSelection",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return w&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-w,R=F(w,q),U=A(R,2);return w=U[0],q=U[1],this.editor.getText(w,q)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(w,q,R){var U=this,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C.sources.API;return $.call(this,function(){return U.editor.insertEmbed(w,q,R)},B,w)}},{key:"insertText",value:function(w,q,R,U,B){var L=this,M=void 0,H=F(w,0,R,U,B),K=A(H,4);return w=K[0],M=K[2],B=K[3],$.call(this,function(){return L.editor.insertText(w,q,M)},B,w,q.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(w,q,R){this.clipboard.dangerouslyPasteHTML(w,q,R)}},{key:"removeFormat",value:function(w,q,R){var U=this,B=F(w,q,R),L=A(B,4);return w=L[0],q=L[1],R=L[3],$.call(this,function(){return U.editor.removeFormat(w,q)},R,w)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(w){var q=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return $.call(this,function(){w=new y.default(w);var U=q.getLength(),B=q.editor.deleteText(0,U),L=q.editor.applyDelta(w),M=L.ops[L.ops.length-1];M!=null&&typeof M.insert=="string"&&M.insert[M.insert.length-1]===` `&&(q.editor.deleteText(q.getLength()-1,1),L.delete(1));var H=B.compose(L);return H},R)}},{key:"setSelection",value:function(w,q,R){if(w==null)this.selection.setRange(null,q||C.sources.API);else{var U=F(w,q,R),B=A(U,4);w=B[0],q=B[1],R=B[3],this.selection.setRange(new i.Range(w,q),R),R!==e.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API,R=new y.default().insert(w);return this.setContents(R,q)}},{key:"update",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.default.sources.USER,q=this.scroll.update(w);return this.selection.update(w),q}},{key:"updateContents",value:function(w){var q=this,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.default.sources.API;return $.call(this,function(){return w=new y.default(w),q.editor.applyDelta(w,R)},R,!0)}}]),C}();P.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},P.events=e.default.events,P.sources=e.default.sources,P.version="1.3.7",P.imports={delta:y.default,parchment:r.default,"core/module":a.default,"core/theme":S.default};function I(C,D){if(D=(0,c.default)(!0,{container:C,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===P.DEFAULTS.theme)D.theme=S.default;else if(D.theme=P.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var w=(0,c.default)(!0,{},D.theme.DEFAULTS);[w,D].forEach(function(U){U.modules=U.modules||{},Object.keys(U.modules).forEach(function(B){U.modules[B]===!0&&(U.modules[B]={})})});var q=Object.keys(w.modules).concat(Object.keys(D.modules)),R=q.reduce(function(U,B){var L=P.import("modules/"+B);return L==null?k.error("Cannot load "+B+" module. Are you sure you registered it?"):U[B]=L.DEFAULTS||{},U},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,c.default)(!0,{},P.DEFAULTS,{modules:R},w,D),["bounds","container","scrollingContainer"].forEach(function(U){typeof D[U]=="string"&&(D[U]=document.querySelector(D[U]))}),D.modules=Object.keys(D.modules).reduce(function(U,B){return D.modules[B]&&(U[B]=D.modules[B]),U},{}),D}function $(C,D,w,q){if(this.options.strict&&!this.isEnabled()&&D===e.default.sources.USER)return new y.default;var R=w==null?null:this.getSelection(),U=this.editor.delta,B=C();if(R!=null&&(w===!0&&(w=R.index),q==null?R=W(R,B,D):q!==0&&(R=W(R,w,q,D)),this.setSelection(R,e.default.sources.SILENT)),B.length()>0){var L,M=[e.default.events.TEXT_CHANGE,B,U,D];if((L=this.emitter).emit.apply(L,[e.default.events.EDITOR_CHANGE].concat(M)),D!==e.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,M)}}return B}function F(C,D,w,q,R){var U={};return typeof C.index=="number"&&typeof C.length=="number"?typeof D!="number"?(R=q,q=w,w=D,D=C.length,C=C.index):(D=C.length,C=C.index):typeof D!="number"&&(R=q,q=w,w=D,D=0),(typeof w>"u"?"undefined":T(w))==="object"?(U=w,R=q):typeof w=="string"&&(q!=null?U[w]=q:R=w),R=R||e.default.sources.API,[C,D,U,R]}function W(C,D,w,q){if(C==null)return null;var R=void 0,U=void 0;if(D instanceof y.default){var B=[C.index,C.index+C.length].map(function(K){return D.transformPosition(K,q!==e.default.sources.USER)}),L=A(B,2);R=L[0],U=L[1]}else{var M=[C.index,C.index+C.length].map(function(K){return K=0?K+w:Math.max(D,K+w)}),H=A(M,2);R=H[0],U=H[1]}return new i.Range(R,U-R)}s.expandConfig=I,s.overload=F,s.default=P},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function l(r,i){for(var f=0;f0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(f,n){var c=r.order.indexOf(f),N=r.order.indexOf(n);return c>=0||N>=0?c-N:f===n?0:f1?N-1:0),E=1;E1&&arguments[1]!==void 0?arguments[1]:{};T(this,_),this.quill=v,this.options=y};A.DEFAULTS={},s.default=A},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=["error","warn","log","info"],A="warn";function _(y){if(T.indexOf(y)<=T.indexOf(A)){for(var h,o=arguments.length,t=Array(o>1?o-1:0),e=1;e0&&typeof t[0]!="number")}function o(t,e,u){var a,l;if(y(t)||y(e)||t.prototype!==e.prototype)return!1;if(_(t))return _(e)?(t=T.call(t),e=T.call(e),v(t,e,u)):!1;if(h(t)){if(!h(e)||t.length!==e.length)return!1;for(a=0;a=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(l=r[a],!v(t[l],e[l],u))return!1;return typeof t==typeof e}},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(1),A=function(){function _(v,y,h){h===void 0&&(h={}),this.attrName=v,this.keyName=y;var o=T.Scope.TYPE&T.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&T.Scope.LEVEL|o:this.scope=T.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return _.keys=function(v){return[].map.call(v.attributes,function(y){return y.name})},_.prototype.add=function(v,y){return this.canAdd(v,y)?(v.setAttribute(this.keyName,y),!0):!1},_.prototype.canAdd=function(v,y){var h=T.query(v,T.Scope.BLOT&(this.scope|T.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof y=="string"?this.whitelist.indexOf(y.replace(/["']/g,""))>-1:this.whitelist.indexOf(y)>-1},_.prototype.remove=function(v){v.removeAttribute(this.keyName)},_.prototype.value=function(v){var y=v.getAttribute(this.keyName);return this.canAdd(v,y)&&y?y:""},_}();s.default=A},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.Code=void 0;var T=function(){function E(S,m){var p=[],g=!0,k=!1,P=void 0;try{for(var I=S[Symbol.iterator](),$;!(g=($=I.next()).done)&&(p.push($.value),!(m&&p.length===m));g=!0);}catch(F){k=!0,P=F}finally{try{!g&&I.return&&I.return()}finally{if(k)throw P}}return p}return function(S,m){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return E(S,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(){function E(S,m){for(var p=0;p=p+g)){var $=this.newlineIndex(p,!0)+1,F=I-$+1,W=this.isolate($,F),C=W.next;W.format(k,P),C instanceof S&&C.formatAt(0,p-$+g-F,k,P)}}}},{key:"insertAt",value:function(p,g,k){if(k==null){var P=this.descendant(r.default,p),I=T(P,2),$=I[0],F=I[1];$.insertAt(F,g)}}},{key:"length",value:function(){var p=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?p:p+1}},{key:"newlineIndex",value:function(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(g)return this.domNode.textContent.slice(0,p).lastIndexOf(` `);var k=this.domNode.textContent.slice(p).indexOf(` `);return k>-1?p+k:-1}},{key:"optimize",value:function(p){this.domNode.textContent.endsWith(` `)||this.appendChild(o.default.create("text",` `)),_(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,p);var g=this.next;g!=null&&g.prev===this&&g.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===g.statics.formats(g.domNode)&&(g.optimize(p),g.moveChildren(this),g.remove())}},{key:"replace",value:function(p){_(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,p),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(g){var k=o.default.find(g);k==null?g.parentNode.removeChild(g):k instanceof o.default.Embed?k.remove():k.unwrap()})}}],[{key:"create",value:function(p){var g=_(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,p);return g.setAttribute("spellcheck",!1),g}},{key:"formats",value:function(){return!0}}]),S}(e.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",s.Code=N,s.default=O},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},A=function(){function C(D,w){var q=[],R=!0,U=!1,B=void 0;try{for(var L=D[Symbol.iterator](),M;!(R=(M=L.next()).done)&&(q.push(M.value),!(w&&q.length===w));R=!0);}catch(H){U=!0,B=H}finally{try{!R&&L.return&&L.return()}finally{if(U)throw B}}return q}return function(D,w){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return C(D,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function C(D,w){for(var q=0;q=U&&!K.endsWith(` `)&&(R=!0),q.scroll.insertAt(B,K);var V=q.scroll.line(B),X=A(V,2),J=X[0],tt=X[1],it=(0,p.default)({},(0,i.bubbleFormats)(J));if(J instanceof f.default){var ot=J.descendant(e.default.Leaf,tt),ct=A(ot,1),ft=ct[0];it=(0,p.default)(it,(0,i.bubbleFormats)(ft))}H=o.default.attributes.diff(it,H)||{}}else if(T(L.insert)==="object"){var z=Object.keys(L.insert)[0];if(z==null)return B;q.scroll.insertAt(B,z,L.insert[z])}U+=M}return Object.keys(H).forEach(function(G){q.scroll.formatAt(B,M,G,H[G])}),B+M},0),w.reduce(function(B,L){return typeof L.delete=="number"?(q.scroll.deleteAt(B,L.delete),B):B+(L.retain||L.insert.length||1)},0),this.scroll.batchEnd(),this.update(w)}},{key:"deleteText",value:function(w,q){return this.scroll.deleteAt(w,q),this.update(new y.default().retain(w).delete(q))}},{key:"formatLine",value:function(w,q){var R=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(U).forEach(function(B){if(!(R.scroll.whitelist!=null&&!R.scroll.whitelist[B])){var L=R.scroll.lines(w,Math.max(q,1)),M=q;L.forEach(function(H){var K=H.length();if(!(H instanceof a.default))H.format(B,U[B]);else{var V=w-H.offset(R.scroll),X=H.newlineIndex(V+M)-V+1;H.formatAt(V,X,B,U[B])}M-=K})}}),this.scroll.optimize(),this.update(new y.default().retain(w).retain(q,(0,O.default)(U)))}},{key:"formatText",value:function(w,q){var R=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(U).forEach(function(B){R.scroll.formatAt(w,q,B,U[B])}),this.update(new y.default().retain(w).retain(q,(0,O.default)(U)))}},{key:"getContents",value:function(w,q){return this.delta.slice(w,w+q)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(w,q){return w.concat(q.delta())},new y.default)}},{key:"getFormat",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=[],U=[];q===0?this.scroll.path(w).forEach(function(L){var M=A(L,1),H=M[0];H instanceof f.default?R.push(H):H instanceof e.default.Leaf&&U.push(H)}):(R=this.scroll.lines(w,q),U=this.scroll.descendants(e.default.Leaf,w,q));var B=[R,U].map(function(L){if(L.length===0)return{};for(var M=(0,i.bubbleFormats)(L.shift());Object.keys(M).length>0;){var H=L.shift();if(H==null)return M;M=F((0,i.bubbleFormats)(H),M)}return M});return p.default.apply(p.default,B)}},{key:"getText",value:function(w,q){return this.getContents(w,q).filter(function(R){return typeof R.insert=="string"}).map(function(R){return R.insert}).join("")}},{key:"insertEmbed",value:function(w,q,R){return this.scroll.insertAt(w,q,R),this.update(new y.default().retain(w).insert(k({},q,R)))}},{key:"insertText",value:function(w,q){var R=this,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return q=q.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(w,q),Object.keys(U).forEach(function(B){R.scroll.formatAt(w,q.length,B,U[B])}),this.update(new y.default().retain(w).insert(q,(0,O.default)(U)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var w=this.scroll.children.head;return w.statics.blotName!==f.default.blotName||w.children.length>1?!1:w.children.head instanceof c.default}},{key:"removeFormat",value:function(w,q){var R=this.getText(w,q),U=this.scroll.line(w+q),B=A(U,2),L=B[0],M=B[1],H=0,K=new y.default;L!=null&&(L instanceof a.default?H=L.newlineIndex(M)-M+1:H=L.length()-M,K=L.delta().slice(M,M+H-1).insert(` `));var V=this.getContents(w,q+H),X=V.diff(new y.default().insert(R).concat(K)),J=new y.default().retain(w).concat(X);return this.applyDelta(J)}},{key:"update",value:function(w){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,U=this.delta;if(q.length===1&&q[0].type==="characterData"&&q[0].target.data.match(I)&&e.default.find(q[0].target)){var B=e.default.find(q[0].target),L=(0,i.bubbleFormats)(B),M=B.offset(this.scroll),H=q[0].oldValue.replace(r.default.CONTENTS,""),K=new y.default().insert(H),V=new y.default().insert(B.value()),X=new y.default().retain(M).concat(K.diff(V,R));w=X.reduce(function(J,tt){return tt.insert?J.insert(tt.insert,L):J.push(tt)},new y.default),this.delta=U.compose(w)}else this.delta=this.getDelta(),(!w||!(0,S.default)(U.compose(w),this.delta))&&(w=U.diff(this.delta,R));return w}}]),C}();function F(C,D){return Object.keys(D).reduce(function(w,q){return C[q]==null||(D[q]===C[q]?w[q]=D[q]:Array.isArray(D[q])?D[q].indexOf(C[q])<0&&(w[q]=D[q].concat([C[q]])):w[q]=[D[q],C[q]]),w},{})}function W(C){return C.reduce(function(D,w){if(w.insert===1){var q=(0,O.default)(w.attributes);return delete q.image,D.insert({image:w.attributes.image},q)}if(w.attributes!=null&&(w.attributes.list===!0||w.attributes.bullet===!0)&&(w=(0,O.default)(w),w.attributes.list?w.attributes.list="ordered":(w.attributes.list="bullet",delete w.attributes.bullet)),typeof w.insert=="string"){var R=w.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return D.insert(R,w.attributes)}return D.push(w)},new y.default)}s.default=$},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.Range=void 0;var T=function(){function E(S,m){var p=[],g=!0,k=!1,P=void 0;try{for(var I=S[Symbol.iterator](),$;!(g=($=I.next()).done)&&(p.push($.value),!(m&&p.length===m));g=!0);}catch(F){k=!0,P=F}finally{try{!g&&I.return&&I.return()}finally{if(k)throw P}}return p}return function(S,m){if(Array.isArray(S))return S;if(Symbol.iterator in Object(S))return E(S,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function(){function E(S,m){for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:0;f(this,E),this.index=S,this.length=m},N=function(){function E(S,m){var p=this;f(this,E),this.emitter=m,this.scroll=S,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=v.default.create("cursor",this),this.lastRange=this.savedRange=new c(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){p.mouseDown||setTimeout(p.update.bind(p,u.default.sources.USER),1)}),this.emitter.on(u.default.events.EDITOR_CHANGE,function(g,k){g===u.default.events.TEXT_CHANGE&&k.length()>0&&p.update(u.default.sources.SILENT)}),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,function(){if(p.hasFocus()){var g=p.getNativeRange();g!=null&&g.start.node!==p.cursor.textNode&&p.emitter.once(u.default.events.SCROLL_UPDATE,function(){try{p.setNativeRange(g.start.node,g.start.offset,g.end.node,g.end.offset)}catch{}})}}),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,function(g,k){if(k.range){var P=k.range,I=P.startNode,$=P.startOffset,F=P.endNode,W=P.endOffset;p.setNativeRange(I,$,F,W)}}),this.update(u.default.sources.SILENT)}return A(E,[{key:"handleComposition",value:function(){var m=this;this.root.addEventListener("compositionstart",function(){m.composing=!0}),this.root.addEventListener("compositionend",function(){if(m.composing=!1,m.cursor.parent){var p=m.cursor.restore();if(!p)return;setTimeout(function(){m.setNativeRange(p.startNode,p.startOffset,p.endNode,p.endOffset)},1)}})}},{key:"handleDragging",value:function(){var m=this;this.emitter.listenDOM("mousedown",document.body,function(){m.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){m.mouseDown=!1,m.update(u.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(m,p){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[m])){this.scroll.update();var g=this.getNativeRange();if(!(g==null||!g.native.collapsed||v.default.query(m,v.default.Scope.BLOCK))){if(g.start.node!==this.cursor.textNode){var k=v.default.find(g.start.node,!1);if(k==null)return;if(k instanceof v.default.Leaf){var P=k.split(g.start.offset);k.parent.insertBefore(this.cursor,P)}else k.insertBefore(this.cursor,g.start.node);this.cursor.attach()}this.cursor.format(m,p),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(m){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,g=this.scroll.length();m=Math.min(m,g-1),p=Math.min(m+p,g-1)-m;var k=void 0,P=this.scroll.leaf(m),I=T(P,2),$=I[0],F=I[1];if($==null)return null;var W=$.position(F,!0),C=T(W,2);k=C[0],F=C[1];var D=document.createRange();if(p>0){D.setStart(k,F);var w=this.scroll.leaf(m+p),q=T(w,2);if($=q[0],F=q[1],$==null)return null;var R=$.position(F,!0),U=T(R,2);return k=U[0],F=U[1],D.setEnd(k,F),D.getBoundingClientRect()}else{var B="left",L=void 0;return k instanceof Text?(F0&&(B="right")),{bottom:L.top+L.height,height:L.height,left:L[B],right:L[B],top:L.top,width:0}}}},{key:"getNativeRange",value:function(){var m=document.getSelection();if(m==null||m.rangeCount<=0)return null;var p=m.getRangeAt(0);if(p==null)return null;var g=this.normalizeNative(p);return n.info("getNativeRange",g),g}},{key:"getRange",value:function(){var m=this.getNativeRange();if(m==null)return[null,null];var p=this.normalizedToRange(m);return[p,m]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(m){var p=this,g=[[m.start.node,m.start.offset]];m.native.collapsed||g.push([m.end.node,m.end.offset]);var k=g.map(function($){var F=T($,2),W=F[0],C=F[1],D=v.default.find(W,!0),w=D.offset(p.scroll);return C===0?w:D instanceof v.default.Container?w+D.length():w+D.index(W,C)}),P=Math.min(Math.max.apply(Math,i(k)),this.scroll.length()-1),I=Math.min.apply(Math,[P].concat(i(k)));return new c(I,P-I)}},{key:"normalizeNative",value:function(m){if(!O(this.root,m.startContainer)||!m.collapsed&&!O(this.root,m.endContainer))return null;var p={start:{node:m.startContainer,offset:m.startOffset},end:{node:m.endContainer,offset:m.endOffset},native:m};return[p.start,p.end].forEach(function(g){for(var k=g.node,P=g.offset;!(k instanceof Text)&&k.childNodes.length>0;)if(k.childNodes.length>P)k=k.childNodes[P],P=0;else if(k.childNodes.length===P)k=k.lastChild,P=k instanceof Text?k.data.length:k.childNodes.length+1;else break;g.node=k,g.offset=P}),p}},{key:"rangeToNative",value:function(m){var p=this,g=m.collapsed?[m.index]:[m.index,m.index+m.length],k=[],P=this.scroll.length();return g.forEach(function(I,$){I=Math.min(P-1,I);var F=void 0,W=p.scroll.leaf(I),C=T(W,2),D=C[0],w=C[1],q=D.position(w,$!==0),R=T(q,2);F=R[0],w=R[1],k.push(F,w)}),k.length<2&&(k=k.concat(k)),k}},{key:"scrollIntoView",value:function(m){var p=this.lastRange;if(p!=null){var g=this.getBounds(p.index,p.length);if(g!=null){var k=this.scroll.length()-1,P=this.scroll.line(Math.min(p.index,k)),I=T(P,1),$=I[0],F=$;if(p.length>0){var W=this.scroll.line(Math.min(p.index+p.length,k)),C=T(W,1);F=C[0]}if(!($==null||F==null)){var D=m.getBoundingClientRect();g.topD.bottom&&(m.scrollTop+=g.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(m,p){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m,k=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",m,p,g,k),!(m!=null&&(this.root.parentNode==null||m.parentNode==null||g.parentNode==null))){var I=document.getSelection();if(I!=null)if(m!=null){this.hasFocus()||this.root.focus();var $=(this.getNativeRange()||{}).native;if($==null||P||m!==$.startContainer||p!==$.startOffset||g!==$.endContainer||k!==$.endOffset){m.tagName=="BR"&&(p=[].indexOf.call(m.parentNode.childNodes,m),m=m.parentNode),g.tagName=="BR"&&(k=[].indexOf.call(g.parentNode.childNodes,g),g=g.parentNode);var F=document.createRange();F.setStart(m,p),F.setEnd(g,k),I.removeAllRanges(),I.addRange(F)}}else I.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(m){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;if(typeof p=="string"&&(g=p,p=!1),n.info("setRange",m),m!=null){var k=this.rangeToNative(m);this.setNativeRange.apply(this,i(k).concat([p]))}else this.setNativeRange(null);this.update(g)}},{key:"update",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u.default.sources.USER,p=this.lastRange,g=this.getRange(),k=T(g,2),P=k[0],I=k[1];if(this.lastRange=P,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,t.default)(p,this.lastRange)){var $;!this.composing&&I!=null&&I.native.collapsed&&I.start.node!==this.cursor.textNode&&this.cursor.restore();var F=[u.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(p),m];if(($=this.emitter).emit.apply($,[u.default.events.EDITOR_CHANGE].concat(F)),m!==u.default.sources.SILENT){var W;(W=this.emitter).emit.apply(W,F)}}}}]),E}();function O(E,S){try{S.parentNode}catch{return!1}return S instanceof Text&&(S=S.parentNode),E.contains(S)}s.Range=c,s.default=N},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function u(a,l){for(var r=0;r0&&(e+=1),[this.parent.domNode,e]},h.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},h.scope=_.Scope.INLINE_BLOT,h}(A.default);s.default=v},function(b,s,d){var T=d(11),A=d(3),_={attributes:{compose:function(y,h,o){typeof y!="object"&&(y={}),typeof h!="object"&&(h={});var t=A(!0,{},h);o||(t=Object.keys(t).reduce(function(u,a){return t[a]!=null&&(u[a]=t[a]),u},{}));for(var e in y)y[e]!==void 0&&h[e]===void 0&&(t[e]=y[e]);return Object.keys(t).length>0?t:void 0},diff:function(y,h){typeof y!="object"&&(y={}),typeof h!="object"&&(h={});var o=Object.keys(y).concat(Object.keys(h)).reduce(function(t,e){return T(y[e],h[e])||(t[e]=h[e]===void 0?null:h[e]),t},{});return Object.keys(o).length>0?o:void 0},transform:function(y,h,o){if(typeof y!="object")return h;if(typeof h=="object"){if(!o)return h;var t=Object.keys(h).reduce(function(e,u){return y[u]===void 0&&(e[u]=h[u]),e},{});return Object.keys(t).length>0?t:void 0}}},iterator:function(y){return new v(y)},length:function(y){return typeof y.delete=="number"?y.delete:typeof y.retain=="number"?y.retain:typeof y.insert=="string"?y.insert.length:1}};function v(y){this.ops=y,this.index=0,this.offset=0}v.prototype.hasNext=function(){return this.peekLength()<1/0},v.prototype.next=function(y){y||(y=1/0);var h=this.ops[this.index];if(h){var o=this.offset,t=_.length(h);if(y>=t-o?(y=t-o,this.index+=1,this.offset=0):this.offset+=y,typeof h.delete=="number")return{delete:y};var e={};return h.attributes&&(e.attributes=h.attributes),typeof h.retain=="number"?e.retain=y:typeof h.insert=="string"?e.insert=h.insert.substr(o,y):e.insert=h.insert,e}else return{retain:1/0}},v.prototype.peek=function(){return this.ops[this.index]},v.prototype.peekLength=function(){return this.ops[this.index]?_.length(this.ops[this.index])-this.offset:1/0},v.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},v.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var y=this.offset,h=this.index,o=this.next(),t=this.ops.slice(this.index);return this.offset=y,this.index=h,[o].concat(t)}else return[]},b.exports=_},function(b,s){var d=function(){function T(a,l){return l!=null&&a instanceof l}var A;try{A=Map}catch{A=function(){}}var _;try{_=Set}catch{_=function(){}}var v;try{v=Promise}catch{v=function(){}}function y(a,l,r,i,f){typeof l=="object"&&(r=l.depth,i=l.prototype,f=l.includeNonEnumerable,l=l.circular);var n=[],c=[],N=typeof Buffer<"u";typeof l>"u"&&(l=!0),typeof r>"u"&&(r=1/0);function O(E,S){if(E===null)return null;if(S===0)return E;var m,p;if(typeof E!="object")return E;if(T(E,A))m=new A;else if(T(E,_))m=new _;else if(T(E,v))m=new v(function(D,w){E.then(function(q){D(O(q,S-1))},function(q){w(O(q,S-1))})});else if(y.__isArray(E))m=[];else if(y.__isRegExp(E))m=new RegExp(E.source,u(E)),E.lastIndex&&(m.lastIndex=E.lastIndex);else if(y.__isDate(E))m=new Date(E.getTime());else{if(N&&Buffer.isBuffer(E))return Buffer.allocUnsafe?m=Buffer.allocUnsafe(E.length):m=new Buffer(E.length),E.copy(m),m;T(E,Error)?m=Object.create(E):typeof i>"u"?(p=Object.getPrototypeOf(E),m=Object.create(p)):(m=Object.create(i),p=i)}if(l){var g=n.indexOf(E);if(g!=-1)return c[g];n.push(E),c.push(m)}T(E,A)&&E.forEach(function(D,w){var q=O(w,S-1),R=O(D,S-1);m.set(q,R)}),T(E,_)&&E.forEach(function(D){var w=O(D,S-1);m.add(w)});for(var k in E){var P;p&&(P=Object.getOwnPropertyDescriptor(p,k)),!(P&&P.set==null)&&(m[k]=O(E[k],S-1))}if(Object.getOwnPropertySymbols)for(var I=Object.getOwnPropertySymbols(E),k=0;k0){if(F instanceof t.BlockEmbed||w instanceof t.BlockEmbed){this.optimize();return}if(F instanceof r.default){var q=F.newlineIndex(F.length(),!0);if(q>-1&&(F=F.split(q+1),F===w)){this.optimize();return}}else if(w instanceof r.default){var R=w.newlineIndex(0);R>-1&&w.split(R+1)}var U=w.children.head instanceof a.default?null:w.children.head;F.moveChildren(w,U),F.remove()}this.optimize()}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",k)}},{key:"formatAt",value:function(k,P,I,$){this.whitelist!=null&&!this.whitelist[I]||(_(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"formatAt",this).call(this,k,P,I,$),this.optimize())}},{key:"insertAt",value:function(k,P,I){if(!(I!=null&&this.whitelist!=null&&!this.whitelist[P])){if(k>=this.length())if(I==null||y.default.query(P,y.default.Scope.BLOCK)==null){var $=y.default.create(this.statics.defaultChild);this.appendChild($),I==null&&P.endsWith(` `)&&(P=P.slice(0,-1)),$.insertAt(0,P,I)}else{var F=y.default.create(P,I);this.appendChild(F)}else _(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertAt",this).call(this,k,P,I);this.optimize()}}},{key:"insertBefore",value:function(k,P){if(k.statics.scope===y.default.Scope.INLINE_BLOT){var I=y.default.create(this.statics.defaultChild);I.appendChild(k),k=I}_(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertBefore",this).call(this,k,P)}},{key:"leaf",value:function(k){return this.path(k).pop()||[null,-1]}},{key:"line",value:function(k){return k===this.length()?this.line(k-1):this.descendant(E,k)}},{key:"lines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,I=function $(F,W,C){var D=[],w=C;return F.children.forEachAt(W,C,function(q,R,U){E(q)?D.push(q):q instanceof y.default.Container&&(D=D.concat($(q,R,w))),w-=U}),D};return I(this,k,P)}},{key:"optimize",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(_(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,k,P),k.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,k,P))}},{key:"path",value:function(k){return _(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"path",this).call(this,k).slice(1)}},{key:"update",value:function(k){if(this.batch!==!0){var P=o.default.sources.USER;typeof k=="string"&&(P=k),Array.isArray(k)||(k=this.observer.takeRecords()),k.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,P,k),_(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"update",this).call(this,k.concat([])),k.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,P,k)}}}]),p}(y.default.Scroll);S.blotName="scroll",S.className="ql-editor",S.tagName="DIV",S.defaultChild="block",S.allowedChildren=[e.default,t.BlockEmbed,f.default],s.default=S},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.SHORTKEY=s.default=void 0;var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},A=function(){function L(M,H){var K=[],V=!0,X=!1,J=void 0;try{for(var tt=M[Symbol.iterator](),it;!(V=(it=tt.next()).done)&&(K.push(it.value),!(H&&K.length===H));V=!0);}catch(ot){X=!0,J=ot}finally{try{!V&&tt.return&&tt.return()}finally{if(X)throw J}}return K}return function(M,H){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return L(M,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function L(M,H){for(var K=0;K1&&arguments[1]!==void 0?arguments[1]:{},X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=B(K);if(J==null||J.key==null)return I.warn("Attempted to add invalid keyboard binding",J);typeof V=="function"&&(V={handler:V}),typeof X=="function"&&(X={handler:X}),J=(0,e.default)(J,V,X),this.bindings[J.key]=this.bindings[J.key]||[],this.bindings[J.key].push(J)}},{key:"listen",value:function(){var K=this;this.quill.root.addEventListener("keydown",function(V){if(!V.defaultPrevented){var X=V.which||V.keyCode,J=(K.bindings[X]||[]).filter(function(st){return M.match(V,st)});if(J.length!==0){var tt=K.quill.getSelection();if(!(tt==null||!K.quill.hasFocus())){var it=K.quill.getLine(tt.index),ot=A(it,2),ct=ot[0],ft=ot[1],z=K.quill.getLeaf(tt.index),G=A(z,2),Y=G[0],Q=G[1],Z=tt.length===0?[Y,Q]:K.quill.getLeaf(tt.index+tt.length),et=A(Z,2),nt=et[0],rt=et[1],dt=Y instanceof f.default.Text?Y.value().slice(0,Q):"",pt=nt instanceof f.default.Text?nt.value().slice(rt):"",ut={collapsed:tt.length===0,empty:tt.length===0&&ct.length()<=1,format:K.quill.getFormat(tt),offset:ft,prefix:dt,suffix:pt},Ge=J.some(function(st){if(st.collapsed!=null&&st.collapsed!==ut.collapsed||st.empty!=null&&st.empty!==ut.empty||st.offset!=null&&st.offset!==ut.offset)return!1;if(Array.isArray(st.format)){if(st.format.every(function(gt){return ut.format[gt]==null}))return!1}else if(T(st.format)==="object"&&!Object.keys(st.format).every(function(gt){return st.format[gt]===!0?ut.format[gt]!=null:st.format[gt]===!1?ut.format[gt]==null:(0,o.default)(st.format[gt],ut.format[gt])}))return!1;return st.prefix!=null&&!st.prefix.test(ut.prefix)||st.suffix!=null&&!st.suffix.test(ut.suffix)?!1:st.handler.call(K,tt,ut)!==!0});Ge&&V.preventDefault()}}}})}}]),M}(S.default);F.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},F.DEFAULTS={bindings:{bold:U("bold"),italic:U("italic"),underline:U("underline"),indent:{key:F.keys.TAB,format:["blockquote","indent","list"],handler:function(M,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","+1",c.default.sources.USER)}},outdent:{key:F.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(M,H){if(H.collapsed&&H.offset!==0)return!0;this.quill.format("indent","-1",c.default.sources.USER)}},"outdent backspace":{key:F.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(M,H){H.format.indent!=null?this.quill.format("indent","-1",c.default.sources.USER):H.format.list!=null&&this.quill.format("list",!1,c.default.sources.USER)}},"indent code-block":R(!0),"outdent code-block":R(!1),"remove tab":{key:F.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(M){this.quill.deleteText(M.index-1,1,c.default.sources.USER)}},tab:{key:F.keys.TAB,handler:function(M){this.quill.history.cutoff();var H=new a.default().retain(M.index).delete(M.length).insert(" ");this.quill.updateContents(H,c.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(M.index+1,c.default.sources.SILENT)}},"list empty enter":{key:F.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(M,H){this.quill.format("list",!1,c.default.sources.USER),H.format.indent&&this.quill.format("indent",!1,c.default.sources.USER)}},"checklist enter":{key:F.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(M){var H=this.quill.getLine(M.index),K=A(H,2),V=K[0],X=K[1],J=(0,e.default)({},V.formats(),{list:"checked"}),tt=new a.default().retain(M.index).insert(` `,J).retain(V.length()-X-1).retain(1,{list:"unchecked"});this.quill.updateContents(tt,c.default.sources.USER),this.quill.setSelection(M.index+1,c.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:F.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(M,H){var K=this.quill.getLine(M.index),V=A(K,2),X=V[0],J=V[1],tt=new a.default().retain(M.index).insert(` `,H.format).retain(X.length()-J-1).retain(1,{header:null});this.quill.updateContents(tt,c.default.sources.USER),this.quill.setSelection(M.index+1,c.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(M,H){var K=H.prefix.length,V=this.quill.getLine(M.index),X=A(V,2),J=X[0],tt=X[1];if(tt>K)return!0;var it=void 0;switch(H.prefix.trim()){case"[]":case"[ ]":it="unchecked";break;case"[x]":it="checked";break;case"-":case"*":it="bullet";break;default:it="ordered"}this.quill.insertText(M.index," ",c.default.sources.USER),this.quill.history.cutoff();var ot=new a.default().retain(M.index-tt).delete(K+1).retain(J.length()-2-tt).retain(1,{list:it});this.quill.updateContents(ot,c.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(M.index-K,c.default.sources.SILENT)}},"code exit":{key:F.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(M){var H=this.quill.getLine(M.index),K=A(H,2),V=K[0],X=K[1],J=new a.default().retain(M.index+V.length()-X-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(J,c.default.sources.USER)}},"embed left":W(F.keys.LEFT,!1),"embed left shift":W(F.keys.LEFT,!0),"embed right":W(F.keys.RIGHT,!1),"embed right shift":W(F.keys.RIGHT,!0)}};function W(L,M){var H,K=L===F.keys.LEFT?"prefix":"suffix";return H={key:L,shiftKey:M,altKey:null},p(H,K,/^$/),p(H,"handler",function(X){var J=X.index;L===F.keys.RIGHT&&(J+=X.length+1);var tt=this.quill.getLeaf(J),it=A(tt,1),ot=it[0];return ot instanceof f.default.Embed?(L===F.keys.LEFT?M?this.quill.setSelection(X.index-1,X.length+1,c.default.sources.USER):this.quill.setSelection(X.index-1,c.default.sources.USER):M?this.quill.setSelection(X.index,X.length+1,c.default.sources.USER):this.quill.setSelection(X.index+X.length+1,c.default.sources.USER),!1):!0}),H}function C(L,M){if(!(L.index===0||this.quill.getLength()<=1)){var H=this.quill.getLine(L.index),K=A(H,1),V=K[0],X={};if(M.offset===0){var J=this.quill.getLine(L.index-1),tt=A(J,1),it=tt[0];if(it!=null&&it.length()>1){var ot=V.formats(),ct=this.quill.getFormat(L.index-1,1);X=r.default.attributes.diff(ot,ct)||{}}}var ft=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(M.prefix)?2:1;this.quill.deleteText(L.index-ft,ft,c.default.sources.USER),Object.keys(X).length>0&&this.quill.formatLine(L.index-ft,ft,X,c.default.sources.USER),this.quill.focus()}}function D(L,M){var H=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(M.suffix)?2:1;if(!(L.index>=this.quill.getLength()-H)){var K={},V=0,X=this.quill.getLine(L.index),J=A(X,1),tt=J[0];if(M.offset>=tt.length()-1){var it=this.quill.getLine(L.index+1),ot=A(it,1),ct=ot[0];if(ct){var ft=tt.formats(),z=this.quill.getFormat(L.index,1);K=r.default.attributes.diff(ft,z)||{},V=ct.length()}}this.quill.deleteText(L.index,H,c.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(L.index+V-1,H,K,c.default.sources.USER)}}function w(L){var M=this.quill.getLines(L),H={};if(M.length>1){var K=M[0].formats(),V=M[M.length-1].formats();H=r.default.attributes.diff(V,K)||{}}this.quill.deleteText(L,c.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(L.index,1,H,c.default.sources.USER),this.quill.setSelection(L.index,c.default.sources.SILENT),this.quill.focus()}function q(L,M){var H=this;L.length>0&&this.quill.scroll.deleteAt(L.index,L.length);var K=Object.keys(M.format).reduce(function(V,X){return f.default.query(X,f.default.Scope.BLOCK)&&!Array.isArray(M.format[X])&&(V[X]=M.format[X]),V},{});this.quill.insertText(L.index,` `,K,c.default.sources.USER),this.quill.setSelection(L.index+1,c.default.sources.SILENT),this.quill.focus(),Object.keys(M.format).forEach(function(V){K[V]==null&&(Array.isArray(M.format[V])||V!=="link"&&H.quill.format(V,M.format[V],c.default.sources.USER))})}function R(L){return{key:F.keys.TAB,shiftKey:!L,format:{"code-block":!0},handler:function(H){var K=f.default.query("code-block"),V=H.index,X=H.length,J=this.quill.scroll.descendant(K,V),tt=A(J,2),it=tt[0],ot=tt[1];if(it!=null){var ct=this.quill.getIndex(it),ft=it.newlineIndex(ot,!0)+1,z=it.newlineIndex(ct+ot+X),G=it.domNode.textContent.slice(ft,z).split(` `);ot=0,G.forEach(function(Y,Q){L?(it.insertAt(ft+ot,K.TAB),ot+=K.TAB.length,Q===0?V+=K.TAB.length:X+=K.TAB.length):Y.startsWith(K.TAB)&&(it.deleteAt(ft+ot,K.TAB.length),ot-=K.TAB.length,Q===0?V-=K.TAB.length:X-=K.TAB.length),ot+=Y.length+1}),this.quill.update(c.default.sources.USER),this.quill.setSelection(V,X,c.default.sources.SILENT)}}}}function U(L){return{key:L[0].toUpperCase(),shortKey:!0,handler:function(H,K){this.quill.format(L,!K.format[L],c.default.sources.USER)}}}function B(L){if(typeof L=="string"||typeof L=="number")return B({key:L});if((typeof L>"u"?"undefined":T(L))==="object"&&(L=(0,y.default)(L,!1)),typeof L.key=="string")if(F.keys[L.key.toUpperCase()]!=null)L.key=F.keys[L.key.toUpperCase()];else if(L.key.length===1)L.key=L.key.toUpperCase().charCodeAt(0);else return null;return L.shortKey&&(L[$]=L.shortKey,delete L.shortKey),L}s.default=F,s.SHORTKEY=$},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function r(i,f){var n=[],c=!0,N=!1,O=void 0;try{for(var E=i[Symbol.iterator](),S;!(c=(S=E.next()).done)&&(n.push(S.value),!(f&&n.length===f));c=!0);}catch(m){N=!0,O=m}finally{try{!c&&E.return&&E.return()}finally{if(N)throw O}}return n}return function(i,f){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function r(i,f,n){i===null&&(i=Function.prototype);var c=Object.getOwnPropertyDescriptor(i,f);if(c===void 0){var N=Object.getPrototypeOf(i);return N===null?void 0:r(N,f,n)}else{if("value"in c)return c.value;var O=c.get;return O===void 0?void 0:O.call(n)}},_=function(){function r(i,f){for(var n=0;n-1}s.default=e,s.sanitize=u},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},A=function(){function l(r,i){for(var f=0;f1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),f))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":T(Event))==="object"){var c=document.createEvent("Event");c.initEvent("change",!0,!0),this.select.dispatchEvent(c)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var f=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(f)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),l}();s.default=a},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(0),A=I(T),_=d(5),v=I(_),y=d(4),h=I(y),o=d(16),t=I(o),e=d(25),u=I(e),a=d(24),l=I(a),r=d(35),i=I(r),f=d(6),n=I(f),c=d(22),N=I(c),O=d(7),E=I(O),S=d(55),m=I(S),p=d(42),g=I(p),k=d(23),P=I(k);function I($){return $&&$.__esModule?$:{default:$}}v.default.register({"blots/block":h.default,"blots/block/embed":y.BlockEmbed,"blots/break":t.default,"blots/container":u.default,"blots/cursor":l.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":N.default,"blots/text":E.default,"modules/clipboard":m.default,"modules/history":g.default,"modules/keyboard":P.default}),A.default.register(h.default,t.default,l.default,n.default,N.default,E.default),s.default=v.default},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(1),A=function(){function _(v){this.domNode=v,this.domNode[T.DATA_KEY]={blot:this}}return Object.defineProperty(_.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),_.create=function(v){if(this.tagName==null)throw new T.ParchmentError("Blot definition missing tagName");var y;return Array.isArray(this.tagName)?(typeof v=="string"&&(v=v.toUpperCase(),parseInt(v).toString()===v&&(v=parseInt(v))),typeof v=="number"?y=document.createElement(this.tagName[v-1]):this.tagName.indexOf(v)>-1?y=document.createElement(v):y=document.createElement(this.tagName[0])):y=document.createElement(this.tagName),this.className&&y.classList.add(this.className),y},_.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},_.prototype.clone=function(){var v=this.domNode.cloneNode(!1);return T.create(v)},_.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[T.DATA_KEY]},_.prototype.deleteAt=function(v,y){var h=this.isolate(v,y);h.remove()},_.prototype.formatAt=function(v,y,h,o){var t=this.isolate(v,y);if(T.query(h,T.Scope.BLOT)!=null&&o)t.wrap(h,o);else if(T.query(h,T.Scope.ATTRIBUTE)!=null){var e=T.create(this.statics.scope);t.wrap(e),e.format(h,o)}},_.prototype.insertAt=function(v,y,h){var o=h==null?T.create("text",y):T.create(y,h),t=this.split(v);this.parent.insertBefore(o,t)},_.prototype.insertInto=function(v,y){y===void 0&&(y=null),this.parent!=null&&this.parent.children.remove(this);var h=null;v.children.insertBefore(this,y),y!=null&&(h=y.domNode),(this.domNode.parentNode!=v.domNode||this.domNode.nextSibling!=h)&&v.domNode.insertBefore(this.domNode,h),this.parent=v,this.attach()},_.prototype.isolate=function(v,y){var h=this.split(v);return h.split(y),h},_.prototype.length=function(){return 1},_.prototype.offset=function(v){return v===void 0&&(v=this.parent),this.parent==null||this==v?0:this.parent.children.offset(this)+this.parent.offset(v)},_.prototype.optimize=function(v){this.domNode[T.DATA_KEY]!=null&&delete this.domNode[T.DATA_KEY].mutations},_.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},_.prototype.replace=function(v){v.parent!=null&&(v.parent.insertBefore(this,v.next),v.remove())},_.prototype.replaceWith=function(v,y){var h=typeof v=="string"?T.create(v,y):v;return h.replace(this),h},_.prototype.split=function(v,y){return v===0?this:this.next},_.prototype.update=function(v,y){},_.prototype.wrap=function(v,y){var h=typeof v=="string"?T.create(v,y):v;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},_.blotName="abstract",_}();s.default=A},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(12),A=d(32),_=d(33),v=d(1),y=function(){function h(o){this.attributes={},this.domNode=o,this.build()}return h.prototype.attribute=function(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},h.prototype.build=function(){var o=this;this.attributes={};var t=T.default.keys(this.domNode),e=A.default.keys(this.domNode),u=_.default.keys(this.domNode);t.concat(e).concat(u).forEach(function(a){var l=v.query(a,v.Scope.ATTRIBUTE);l instanceof T.default&&(o.attributes[l.attrName]=l)})},h.prototype.copy=function(o){var t=this;Object.keys(this.attributes).forEach(function(e){var u=t.attributes[e].value(t.domNode);o.format(e,u)})},h.prototype.move=function(o){var t=this;this.copy(o),Object.keys(this.attributes).forEach(function(e){t.attributes[e].remove(t.domNode)}),this.attributes={}},h.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(t,e){return t[e]=o.attributes[e].value(o.domNode),t},{})},h}();s.default=y},function(b,s,d){var T=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var t in o)o.hasOwnProperty(t)&&(h[t]=o[t])};return function(h,o){y(h,o);function t(){this.constructor=h}h.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(12);function _(y,h){var o=y.getAttribute("class")||"";return o.split(/\s+/).filter(function(t){return t.indexOf(h+"-")===0})}var v=function(y){T(h,y);function h(){return y!==null&&y.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},h.prototype.add=function(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(this.keyName+"-"+t),!0):!1},h.prototype.remove=function(o){var t=_(o,this.keyName);t.forEach(function(e){o.classList.remove(e)}),o.classList.length===0&&o.removeAttribute("class")},h.prototype.value=function(o){var t=_(o,this.keyName)[0]||"",e=t.slice(this.keyName.length+1);return this.canAdd(o,e)?e:""},h}(A.default);s.default=v},function(b,s,d){var T=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var t in o)o.hasOwnProperty(t)&&(h[t]=o[t])};return function(h,o){y(h,o);function t(){this.constructor=h}h.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(12);function _(y){var h=y.split("-"),o=h.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return h[0]+o}var v=function(y){T(h,y);function h(){return y!==null&&y.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(t){var e=t.split(":");return e[0].trim()})},h.prototype.add=function(o,t){return this.canAdd(o,t)?(o.style[_(this.keyName)]=t,!0):!1},h.prototype.remove=function(o){o.style[_(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},h.prototype.value=function(o){var t=o.style[_(this.keyName)];return this.canAdd(o,t)?t:""},h}(A.default);s.default=v},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function v(y,h){for(var o=0;oS&&this.stack.undo.length>0){var m=this.stack.undo.pop();E=E.compose(m.undo),N=m.redo.compose(N)}else this.lastRecorded=S;this.stack.undo.push({redo:N,undo:E}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(N){this.stack.undo.forEach(function(O){O.undo=N.transform(O.undo,!0),O.redo=N.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=N.transform(O.undo,!0),O.redo=N.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(o.default);l.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(f){var n=f.ops[f.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(` `):n.attributes!=null?Object.keys(n.attributes).some(function(c){return _.default.query(c,_.default.Scope.BLOCK)!=null}):!1}function i(f){var n=f.reduce(function(N,O){return N+=O.delete||0,N},0),c=f.length()-n;return r(f)&&(c-=1),c}s.default=l,s.getLastChangeIndex=i},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.BaseTooltip=void 0;var T=function(){function q(R,U){for(var B=0;B0&&arguments[0]!==void 0?arguments[0]:"link",L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),L!=null?this.textbox.value=L:B!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+B)||""),this.root.setAttribute("data-mode",B)}},{key:"restoreFocus",value:function(){var B=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=B}},{key:"save",value:function(){var B=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var L=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",B,t.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",B,t.default.sources.USER)),this.quill.root.scrollTop=L;break}case"video":B=D(B);case"formula":{if(!B)break;var M=this.quill.getSelection(!0);if(M!=null){var H=M.index+M.length;this.quill.insertEmbed(H,this.root.getAttribute("data-mode"),B,t.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(H+1," ",t.default.sources.USER),this.quill.setSelection(H+2,t.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),R}(E.default);function D(q){var R=q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||q.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return R?(R[1]||"https")+"://www.youtube.com/embed/"+R[2]+"?showinfo=0":(R=q.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(R[1]||"https")+"://player.vimeo.com/video/"+R[2]+"/":q}function w(q,R){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;R.forEach(function(B){var L=document.createElement("option");B===U?L.setAttribute("selected","selected"):L.setAttribute("value",B),q.appendChild(L)})}s.BaseTooltip=C,s.default=W},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function A(){this.head=this.tail=null,this.length=0}return A.prototype.append=function(){for(var _=[],v=0;v1&&this.append.apply(this,_.slice(1))},A.prototype.contains=function(_){for(var v,y=this.iterator();v=y();)if(v===_)return!0;return!1},A.prototype.insertBefore=function(_,v){_&&(_.next=v,v!=null?(_.prev=v.prev,v.prev!=null&&(v.prev.next=_),v.prev=_,v===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1)},A.prototype.offset=function(_){for(var v=0,y=this.head;y!=null;){if(y===_)return v;v+=y.length(),y=y.next}return-1},A.prototype.remove=function(_){this.contains(_)&&(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1)},A.prototype.iterator=function(_){return _===void 0&&(_=this.head),function(){var v=_;return _!=null&&(_=_.next),v}},A.prototype.find=function(_,v){v===void 0&&(v=!1);for(var y,h=this.iterator();y=h();){var o=y.length();if(_u?y(e,_-u,Math.min(v,u+l-_)):y(e,0,Math.min(l,_+v-u)),u+=l}},A.prototype.map=function(_){return this.reduce(function(v,y){return v.push(_(y)),v},[])},A.prototype.reduce=function(_,v){for(var y,h=this.iterator();y=h();)v=_(v,y);return v},A}();s.default=T},function(b,s,d){var T=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var u in e)e.hasOwnProperty(u)&&(t[u]=e[u])};return function(t,e){o(t,e);function u(){this.constructor=t}t.prototype=e===null?Object.create(e):(u.prototype=e.prototype,new u)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(17),_=d(1),v={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},y=100,h=function(o){T(t,o);function t(e){var u=o.call(this,e)||this;return u.scroll=u,u.observer=new MutationObserver(function(a){u.update(a)}),u.observer.observe(u.domNode,v),u.attach(),u}return t.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},t.prototype.deleteAt=function(e,u){this.update(),e===0&&u===this.length()?this.children.forEach(function(a){a.remove()}):o.prototype.deleteAt.call(this,e,u)},t.prototype.formatAt=function(e,u,a,l){this.update(),o.prototype.formatAt.call(this,e,u,a,l)},t.prototype.insertAt=function(e,u,a){this.update(),o.prototype.insertAt.call(this,e,u,a)},t.prototype.optimize=function(e,u){var a=this;e===void 0&&(e=[]),u===void 0&&(u={}),o.prototype.optimize.call(this,u);for(var l=[].slice.call(this.observer.takeRecords());l.length>0;)e.push(l.pop());for(var r=function(c,N){N===void 0&&(N=!0),!(c==null||c===a)&&c.domNode.parentNode!=null&&(c.domNode[_.DATA_KEY].mutations==null&&(c.domNode[_.DATA_KEY].mutations=[]),N&&r(c.parent))},i=function(c){c.domNode[_.DATA_KEY]==null||c.domNode[_.DATA_KEY].mutations==null||(c instanceof A.default&&c.children.forEach(i),c.optimize(u))},f=e,n=0;f.length>0;n+=1){if(n>=y)throw new Error("[Parchment] Maximum optimize iterations reached");for(f.forEach(function(c){var N=_.find(c.target,!0);N!=null&&(N.domNode===c.target&&(c.type==="childList"?(r(_.find(c.previousSibling,!1)),[].forEach.call(c.addedNodes,function(O){var E=_.find(O,!1);r(E,!1),E instanceof A.default&&E.children.forEach(function(S){r(S,!1)})})):c.type==="attributes"&&r(N.prev)),r(N))}),this.children.forEach(i),f=[].slice.call(this.observer.takeRecords()),l=f.slice();l.length>0;)e.push(l.pop())}},t.prototype.update=function(e,u){var a=this;u===void 0&&(u={}),e=e||this.observer.takeRecords(),e.map(function(l){var r=_.find(l.target,!0);return r==null?null:r.domNode[_.DATA_KEY].mutations==null?(r.domNode[_.DATA_KEY].mutations=[l],r):(r.domNode[_.DATA_KEY].mutations.push(l),null)}).forEach(function(l){l==null||l===a||l.domNode[_.DATA_KEY]==null||l.update(l.domNode[_.DATA_KEY].mutations||[],u)}),this.domNode[_.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[_.DATA_KEY].mutations,u),this.optimize(e,u)},t.blotName="scroll",t.defaultChild="block",t.scope=_.Scope.BLOCK_BLOT,t.tagName="DIV",t}(A.default);s.default=h},function(b,s,d){var T=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e])};return function(o,t){h(o,t);function e(){this.constructor=o}o.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(18),_=d(1);function v(h,o){if(Object.keys(h).length!==Object.keys(o).length)return!1;for(var t in h)if(h[t]!==o[t])return!1;return!0}var y=function(h){T(o,h);function o(){return h!==null&&h.apply(this,arguments)||this}return o.formats=function(t){if(t.tagName!==o.tagName)return h.formats.call(this,t)},o.prototype.format=function(t,e){var u=this;t===this.statics.blotName&&!e?(this.children.forEach(function(a){a instanceof A.default||(a=a.wrap(o.blotName,!0)),u.attributes.copy(a)}),this.unwrap()):h.prototype.format.call(this,t,e)},o.prototype.formatAt=function(t,e,u,a){if(this.formats()[u]!=null||_.query(u,_.Scope.ATTRIBUTE)){var l=this.isolate(t,e);l.format(u,a)}else h.prototype.formatAt.call(this,t,e,u,a)},o.prototype.optimize=function(t){h.prototype.optimize.call(this,t);var e=this.formats();if(Object.keys(e).length===0)return this.unwrap();var u=this.next;u instanceof o&&u.prev===this&&v(e,u.formats())&&(u.moveChildren(this),u.remove())},o.blotName="inline",o.scope=_.Scope.INLINE_BLOT,o.tagName="SPAN",o}(A.default);s.default=y},function(b,s,d){var T=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var t in o)o.hasOwnProperty(t)&&(h[t]=o[t])};return function(h,o){y(h,o);function t(){this.constructor=h}h.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(18),_=d(1),v=function(y){T(h,y);function h(){return y!==null&&y.apply(this,arguments)||this}return h.formats=function(o){var t=_.query(h.blotName).tagName;if(o.tagName!==t)return y.formats.call(this,o)},h.prototype.format=function(o,t){_.query(o,_.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!t?this.replaceWith(h.blotName):y.prototype.format.call(this,o,t))},h.prototype.formatAt=function(o,t,e,u){_.query(e,_.Scope.BLOCK)!=null?this.format(e,u):y.prototype.formatAt.call(this,o,t,e,u)},h.prototype.insertAt=function(o,t,e){if(e==null||_.query(t,_.Scope.INLINE)!=null)y.prototype.insertAt.call(this,o,t,e);else{var u=this.split(o),a=_.create(t,e);u.parent.insertBefore(a,u)}},h.prototype.update=function(o,t){navigator.userAgent.match(/Trident/)?this.build():y.prototype.update.call(this,o,t)},h.blotName="block",h.scope=_.Scope.BLOCK_BLOT,h.tagName="P",h}(A.default);s.default=v},function(b,s,d){var T=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,h){y.__proto__=h}||function(y,h){for(var o in h)h.hasOwnProperty(o)&&(y[o]=h[o])};return function(y,h){v(y,h);function o(){this.constructor=y}y.prototype=h===null?Object.create(h):(o.prototype=h.prototype,new o)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(19),_=function(v){T(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.formats=function(h){},y.prototype.format=function(h,o){v.prototype.formatAt.call(this,0,this.length(),h,o)},y.prototype.formatAt=function(h,o,t,e){h===0&&o===this.length()?this.format(t,e):v.prototype.formatAt.call(this,h,o,t,e)},y.prototype.formats=function(){return this.statics.formats(this.domNode)},y}(A.default);s.default=_},function(b,s,d){var T=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var t in o)o.hasOwnProperty(t)&&(h[t]=o[t])};return function(h,o){y(h,o);function t(){this.constructor=h}h.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)}}();Object.defineProperty(s,"__esModule",{value:!0});var A=d(19),_=d(1),v=function(y){T(h,y);function h(o){var t=y.call(this,o)||this;return t.text=t.statics.value(t.domNode),t}return h.create=function(o){return document.createTextNode(o)},h.value=function(o){var t=o.data;return t.normalize&&(t=t.normalize()),t},h.prototype.deleteAt=function(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)},h.prototype.index=function(o,t){return this.domNode===o?t:-1},h.prototype.insertAt=function(o,t,e){e==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):y.prototype.insertAt.call(this,o,t,e)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(o){y.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(o,t){return[this.domNode,o]},h.prototype.split=function(o,t){if(t===void 0&&(t=!1),!t){if(o===0)return this;if(o===this.length())return this.next}var e=_.create(this.domNode.splitText(o));return this.parent.insertBefore(e,this.next),this.text=this.statics.value(this.domNode),e},h.prototype.update=function(o,t){var e=this;o.some(function(u){return u.type==="characterData"&&u.target===e.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=_.Scope.INLINE_BLOT,h}(A.default);s.default=v},function(b,s,d){var T=document.createElement("div");if(T.classList.toggle("test-class",!1),T.classList.contains("test-class")){var A=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(_,v){return arguments.length>1&&!this.contains(_)==!v?v:A.call(this,_)}}String.prototype.startsWith||(String.prototype.startsWith=function(_,v){return v=v||0,this.substr(v,_.length)===_}),String.prototype.endsWith||(String.prototype.endsWith=function(_,v){var y=this.toString();(typeof v!="number"||!isFinite(v)||Math.floor(v)!==v||v>y.length)&&(v=y.length),v-=_.length;var h=y.indexOf(_,v);return h!==-1&&h===v}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(v){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof v!="function")throw new TypeError("predicate must be a function");for(var y=Object(this),h=y.length>>>0,o=arguments[1],t,e=0;ec.length?n:c,E=n.length>c.length?c:n,S=O.indexOf(E);if(S!=-1)return N=[[T,O.substring(0,S)],[A,E],[T,O.substring(S+E.length)]],n.length>c.length&&(N[0][0]=N[2][0]=d),N;if(E.length==1)return[[d,n],[T,c]];var m=e(n,c);if(m){var p=m[0],g=m[1],k=m[2],P=m[3],I=m[4],$=_(p,k),F=_(g,P);return $.concat([[A,I]],F)}return y(n,c)}function y(n,c){for(var N=n.length,O=c.length,E=Math.ceil((N+O)/2),S=E,m=2*E,p=new Array(m),g=new Array(m),k=0;kN)F+=2;else if(U>O)$+=2;else if(I){var B=S+P-w;if(B>=0&&B=L)return h(n,c,R,U)}}}for(var M=-D+W;M<=D-C;M+=2){var B=S+M,L;M==-D||M!=D&&g[B-1]N)C+=2;else if(H>O)W+=2;else if(!I){var q=S+P-M;if(q>=0&&q=L)return h(n,c,R,U)}}}}return[[d,n],[T,c]]}function h(n,c,N,O){var E=n.substring(0,N),S=c.substring(0,O),m=n.substring(N),p=c.substring(O),g=_(E,S),k=_(m,p);return g.concat(k)}function o(n,c){if(!n||!c||n.charAt(0)!=c.charAt(0))return 0;for(var N=0,O=Math.min(n.length,c.length),E=O,S=0;Nc.length?n:c,O=n.length>c.length?c:n;if(N.length<4||O.length*2=F.length?[R,U,B,L,q]:null}var S=E(N,O,Math.ceil(N.length/4)),m=E(N,O,Math.ceil(N.length/2)),p;if(!S&&!m)return null;m?S?p=S[4].length>m[4].length?S:m:p=m:p=S;var g,k,P,I;n.length>c.length?(g=p[0],k=p[1],P=p[2],I=p[3]):(P=p[0],I=p[1],g=p[2],k=p[3]);var $=p[4];return[g,k,P,I,$]}function u(n){n.push([A,""]);for(var c=0,N=0,O=0,E="",S="",m;c1?(N!==0&&O!==0&&(m=o(S,E),m!==0&&(c-N-O>0&&n[c-N-O-1][0]==A?n[c-N-O-1][1]+=S.substring(0,m):(n.splice(0,0,[A,S.substring(0,m)]),c++),S=S.substring(m),E=E.substring(m)),m=t(S,E),m!==0&&(n[c][1]=S.substring(S.length-m)+n[c][1],S=S.substring(0,S.length-m),E=E.substring(0,E.length-m))),N===0?n.splice(c-O,N+O,[T,S]):O===0?n.splice(c-N,N+O,[d,E]):n.splice(c-N-O,N+O,[d,E],[T,S]),c=c-N-O+(N?1:0)+(O?1:0)+1):c!==0&&n[c-1][0]==A?(n[c-1][1]+=n[c][1],n.splice(c,1)):c++,O=0,N=0,E="",S="";break}n[n.length-1][1]===""&&n.pop();var p=!1;for(c=1;c0&&O.splice(E+2,0,[m[0],p]),f(O,E,3)}else return n}function i(n){for(var c=!1,N=function(m){return m.charCodeAt(0)>=56320&&m.charCodeAt(0)<=57343},O=function(m){return m.charCodeAt(m.length-1)>=55296&&m.charCodeAt(m.length-1)<=56319},E=2;E0&&S.push(n[E]);return S}function f(n,c,N){for(var O=c+N-1;O>=0&&O>=c-1;O--)if(O+1\r?\n +\<"),this.convert();var Z=this.quill.getFormat(this.quill.selection.savedRange.index);if(Z[O.default.blotName]){var et=this.container.innerText;return this.container.innerHTML="",new o.default().insert(et,k({},O.default.blotName,Z[O.default.blotName]))}var nt=this.prepareMatching(),rt=A(nt,2),dt=rt[0],pt=rt[1],ut=M(this.container,dt,pt);return B(ut,` `)&&ut.ops[ut.ops.length-1].attributes==null&&(ut=ut.compose(new o.default().retain(ut.length()-1).delete(1))),F.log("convert",this.container.innerHTML,ut),this.container.innerHTML="",ut}},{key:"dangerouslyPasteHTML",value:function(Q,Z){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;if(typeof Q=="string")this.quill.setContents(this.convert(Q),Z),this.quill.setSelection(0,a.default.sources.SILENT);else{var nt=this.convert(Z);this.quill.updateContents(new o.default().retain(Q).concat(nt),et),this.quill.setSelection(Q+nt.length(),a.default.sources.SILENT)}}},{key:"onPaste",value:function(Q){var Z=this;if(!(Q.defaultPrevented||!this.quill.isEnabled())){var et=this.quill.getSelection(),nt=new o.default().retain(et.index),rt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(a.default.sources.SILENT),setTimeout(function(){nt=nt.concat(Z.convert()).delete(et.length),Z.quill.updateContents(nt,a.default.sources.USER),Z.quill.setSelection(nt.length()-et.length,a.default.sources.SILENT),Z.quill.scrollingContainer.scrollTop=rt,Z.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Q=this,Z=[],et=[];return this.matchers.forEach(function(nt){var rt=A(nt,2),dt=rt[0],pt=rt[1];switch(dt){case Node.TEXT_NODE:et.push(pt);break;case Node.ELEMENT_NODE:Z.push(pt);break;default:[].forEach.call(Q.container.querySelectorAll(dt),function(ut){ut[W]=ut[W]||[],ut[W].push(pt)});break}}),[Z,et]}}]),G}(f.default);q.DEFAULTS={matchers:[],matchVisual:!0};function R(z,G,Y){return(typeof G>"u"?"undefined":T(G))==="object"?Object.keys(G).reduce(function(Q,Z){return R(Q,Z,G[Z])},z):z.reduce(function(Q,Z){return Z.attributes&&Z.attributes[G]?Q.push(Z):Q.insert(Z.insert,(0,y.default)({},k({},G,Y),Z.attributes))},new o.default)}function U(z){if(z.nodeType!==Node.ELEMENT_NODE)return{};var G="__ql-computed-style";return z[G]||(z[G]=window.getComputedStyle(z))}function B(z,G){for(var Y="",Q=z.ops.length-1;Q>=0&&Y.length-1}function M(z,G,Y){return z.nodeType===z.TEXT_NODE?Y.reduce(function(Q,Z){return Z(z,Q)},new o.default):z.nodeType===z.ELEMENT_NODE?[].reduce.call(z.childNodes||[],function(Q,Z){var et=M(Z,G,Y);return Z.nodeType===z.ELEMENT_NODE&&(et=G.reduce(function(nt,rt){return rt(Z,nt)},et),et=(Z[W]||[]).reduce(function(nt,rt){return rt(Z,nt)},et)),Q.concat(et)},new o.default):new o.default}function H(z,G,Y){return R(Y,z,!0)}function K(z,G){var Y=e.default.Attributor.Attribute.keys(z),Q=e.default.Attributor.Class.keys(z),Z=e.default.Attributor.Style.keys(z),et={};return Y.concat(Q).concat(Z).forEach(function(nt){var rt=e.default.query(nt,e.default.Scope.ATTRIBUTE);rt!=null&&(et[rt.attrName]=rt.value(z),et[rt.attrName])||(rt=D[nt],rt!=null&&(rt.attrName===nt||rt.keyName===nt)&&(et[rt.attrName]=rt.value(z)||void 0),rt=w[nt],rt!=null&&(rt.attrName===nt||rt.keyName===nt)&&(rt=w[nt],et[rt.attrName]=rt.value(z)||void 0))}),Object.keys(et).length>0&&(G=R(G,et)),G}function V(z,G){var Y=e.default.query(z);if(Y==null)return G;if(Y.prototype instanceof e.default.Embed){var Q={},Z=Y.value(z);Z!=null&&(Q[Y.blotName]=Z,G=new o.default().insert(Q,Y.formats(z)))}else typeof Y.formats=="function"&&(G=R(G,Y.blotName,Y.formats(z)));return G}function X(z,G){return B(G,` `)||G.insert(` `),G}function J(){return new o.default}function tt(z,G){var Y=e.default.query(z);if(Y==null||Y.blotName!=="list-item"||!B(G,` `))return G;for(var Q=-1,Z=z.parentNode;!Z.classList.contains("ql-clipboard");)(e.default.query(Z)||{}).blotName==="list"&&(Q+=1),Z=Z.parentNode;return Q<=0?G:G.compose(new o.default().retain(G.length()-1).retain(1,{indent:Q}))}function it(z,G){return B(G,` `)||(L(z)||G.length()>0&&z.nextSibling&&L(z.nextSibling))&&G.insert(` `),G}function ot(z,G){if(L(z)&&z.nextElementSibling!=null&&!B(G,` `)){var Y=z.offsetHeight+parseFloat(U(z).marginTop)+parseFloat(U(z).marginBottom);z.nextElementSibling.offsetTop>z.offsetTop+Y*1.5&&G.insert(` `)}return G}function ct(z,G){var Y={},Q=z.style||{};return Q.fontStyle&&U(z).fontStyle==="italic"&&(Y.italic=!0),Q.fontWeight&&(U(z).fontWeight.startsWith("bold")||parseInt(U(z).fontWeight)>=700)&&(Y.bold=!0),Object.keys(Y).length>0&&(G=R(G,Y)),parseFloat(Q.textIndent||0)>0&&(G=new o.default().insert(" ").concat(G)),G}function ft(z,G){var Y=z.data;if(z.parentNode.tagName==="O:P")return G.insert(Y.trim());if(Y.trim().length===0&&z.parentNode.classList.contains("ql-clipboard"))return G;if(!U(z.parentNode).whiteSpace.startsWith("pre")){var Q=function(et,nt){return nt=nt.replace(/[^\u00a0]/g,""),nt.length<1&&et?" ":nt};Y=Y.replace(/\r\n/g," ").replace(/\n/g," "),Y=Y.replace(/\s\s+/g,Q.bind(Q,!0)),(z.previousSibling==null&&L(z.parentNode)||z.previousSibling!=null&&L(z.previousSibling))&&(Y=Y.replace(/^\s+/,Q.bind(Q,!1))),(z.nextSibling==null&&L(z.parentNode)||z.nextSibling!=null&&L(z.nextSibling))&&(Y=Y.replace(/\s+$/,Q.bind(Q,!1)))}return G.insert(Y)}s.default=q,s.matchAttributor=K,s.matchBlot=V,s.matchNewline=it,s.matchSpacing=ot,s.matchText=ft},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function u(a,l){for(var r=0;r '},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function u(a,l){for(var r=0;re.right&&(a=e.right-u.right,this.root.style.left=o+a+"px"),u.lefte.bottom){var l=u.bottom-u.top,r=h.bottom-h.top+l;this.root.style.top=t-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),v}();s.default=_},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function m(p,g){var k=[],P=!0,I=!1,$=void 0;try{for(var F=p[Symbol.iterator](),W;!(P=(W=F.next()).done)&&(k.push(W.value),!(g&&k.length===g));P=!0);}catch(C){I=!0,$=C}finally{try{!P&&F.return&&F.return()}finally{if(I)throw $}}return k}return function(p,g){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return m(p,g);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),A=function m(p,g,k){p===null&&(p=Function.prototype);var P=Object.getOwnPropertyDescriptor(p,g);if(P===void 0){var I=Object.getPrototypeOf(p);return I===null?void 0:m(I,g,k)}else{if("value"in P)return P.value;var $=P.get;return $===void 0?void 0:$.call(k)}},_=function(){function m(p,g){for(var k=0;k','','',''].join(""),s.default=E},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(29),A=Z(T),_=d(36),v=d(38),y=d(64),h=d(65),o=Z(h),t=d(66),e=Z(t),u=d(67),a=Z(u),l=d(37),r=d(26),i=d(39),f=d(40),n=d(56),c=Z(n),N=d(68),O=Z(N),E=d(27),S=Z(E),m=d(69),p=Z(m),g=d(70),k=Z(g),P=d(71),I=Z(P),$=d(72),F=Z($),W=d(73),C=Z(W),D=d(13),w=Z(D),q=d(74),R=Z(q),U=d(75),B=Z(U),L=d(57),M=Z(L),H=d(41),K=Z(H),V=d(28),X=Z(V),J=d(59),tt=Z(J),it=d(60),ot=Z(it),ct=d(61),ft=Z(ct),z=d(108),G=Z(z),Y=d(62),Q=Z(Y);function Z(et){return et&&et.__esModule?et:{default:et}}A.default.register({"attributors/attribute/direction":v.DirectionAttribute,"attributors/class/align":_.AlignClass,"attributors/class/background":l.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":v.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":f.SizeClass,"attributors/style/align":_.AlignStyle,"attributors/style/background":l.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":v.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":f.SizeStyle},!0),A.default.register({"formats/align":_.AlignClass,"formats/direction":v.DirectionClass,"formats/indent":y.IndentClass,"formats/background":l.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":f.SizeClass,"formats/blockquote":o.default,"formats/code-block":w.default,"formats/header":e.default,"formats/list":a.default,"formats/bold":c.default,"formats/code":D.Code,"formats/italic":O.default,"formats/link":S.default,"formats/script":p.default,"formats/strike":k.default,"formats/underline":I.default,"formats/image":F.default,"formats/video":C.default,"formats/list/item":u.ListItem,"modules/formula":R.default,"modules/syntax":B.default,"modules/toolbar":M.default,"themes/bubble":G.default,"themes/snow":Q.default,"ui/icons":K.default,"ui/picker":X.default,"ui/icon-picker":ot.default,"ui/color-picker":tt.default,"ui/tooltip":ft.default},!0),s.default=A.default},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.IndentClass=void 0;var T=function(){function a(l,r){for(var i=0;i0&&this.children.tail.format(O,E)}},{key:"formats",value:function(){return u({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,E){if(O instanceof i)A(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"insertBefore",this).call(this,O,E);else{var S=E==null?this.length():E.offset(this),m=this.split(S);m.parent.insertBefore(O,m)}}},{key:"optimize",value:function(O){A(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"optimize",this).call(this,O);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&E.domNode.tagName===this.domNode.tagName&&E.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(E.moveChildren(this),E.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var E=v.default.create(this.statics.defaultChild);O.moveChildren(E),this.appendChild(E)}A(c.prototype.__proto__||Object.getPrototypeOf(c.prototype),"replace",this).call(this,O)}}]),c}(t.default);f.blotName="list",f.scope=v.default.Scope.BLOCK_BLOT,f.tagName=["OL","UL"],f.defaultChild="list-item",f.allowedChildren=[i],s.ListItem=i,s.default=f},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=d(56),A=_(T);function _(t){return t&&t.__esModule?t:{default:t}}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function h(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var o=function(t){h(e,t);function e(){return v(this,e),y(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return e}(A.default);o.blotName="italic",o.tagName=["EM","I"],s.default=o},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function u(a,l){for(var r=0;r-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):A(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=A(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,f);return typeof f=="string"&&n.setAttribute("src",this.sanitize(f)),n}},{key:"formats",value:function(f){return u.reduce(function(n,c){return f.hasAttribute(c)&&(n[c]=f.getAttribute(c)),n},{})}},{key:"match",value:function(f){return/\.(jpe?g|gif|png)$/.test(f)||/^data:image\/.+;base64/.test(f)}},{key:"sanitize",value:function(f){return(0,y.sanitize)(f,["http","https","data"])?f:"//:0"}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(v.default.Embed);a.blotName="image",a.tagName="IMG",s.default=a},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0});var T=function(){function l(r,i){for(var f=0;f-1?n?this.domNode.setAttribute(f,n):this.domNode.removeAttribute(f):A(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,f,n)}}],[{key:"create",value:function(f){var n=A(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,f);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(f)),n}},{key:"formats",value:function(f){return u.reduce(function(n,c){return f.hasAttribute(c)&&(n[c]=f.getAttribute(c)),n},{})}},{key:"sanitize",value:function(f){return y.default.sanitize(f)}},{key:"value",value:function(f){return f.getAttribute("src")}}]),r}(_.BlockEmbed);a.blotName="video",a.className="ql-video",a.tagName="IFRAME",s.default=a},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.FormulaBlot=void 0;var T=function(){function f(n,c){for(var N=0;N0||this.cachedText==null)&&(this.domNode.innerHTML=S(m),this.domNode.normalize(),this.attach()),this.cachedText=m)}}]),O}(u.default);f.className="ql-syntax";var n=new v.default.Attributor.Class("token","hljs",{scope:v.default.Scope.INLINE}),c=function(N){i(O,N),T(O,null,[{key:"register",value:function(){h.default.register(n,!0),h.default.register(f,!0)}}]);function O(E,S){l(this,O);var m=r(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,E,S));if(typeof m.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var p=null;return m.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(p),p=setTimeout(function(){m.highlight(),p=null},m.options.interval)}),m.highlight(),m}return T(O,[{key:"highlight",value:function(){var S=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var m=this.quill.getSelection();this.quill.scroll.descendants(f).forEach(function(p){p.highlight(S.options.highlight)}),this.quill.update(h.default.sources.SILENT),m!=null&&this.quill.setSelection(m,h.default.sources.SILENT)}}}]),O}(t.default);c.DEFAULTS={highlight:function(){return window.hljs==null?null:function(N){var O=window.hljs.highlightAuto(N);return O.value}}(),interval:1e3},s.CodeBlock=f,s.CodeToken=n,s.default=c},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s){b.exports=' '},function(b,s,d){Object.defineProperty(s,"__esModule",{value:!0}),s.default=s.BubbleTooltip=void 0;var T=function O(E,S,m){E===null&&(E=Function.prototype);var p=Object.getOwnPropertyDescriptor(E,S);if(p===void 0){var g=Object.getPrototypeOf(E);return g===null?void 0:O(g,S,m)}else{if("value"in p)return p.value;var k=p.get;return k===void 0?void 0:k.call(m)}},A=function(){function O(E,S){for(var m=0;m0&&I===h.default.sources.USER){p.show(),p.root.style.left="0px",p.root.style.width="",p.root.style.width=p.root.offsetWidth+"px";var $=p.quill.getLines(k.index,k.length);if($.length===1)p.position(p.quill.getBounds(k));else{var F=$[$.length-1],W=p.quill.getIndex(F),C=Math.min(F.length()-1,k.index+k.length-W),D=p.quill.getBounds(new e.Range(W,C));p.position(D)}}else document.activeElement!==p.textbox&&p.quill.hasFocus()&&p.hide()}),p}return A(E,[{key:"listen",value:function(){var m=this;T(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){m.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!m.root.classList.contains("ql-hidden")){var p=m.quill.getSelection();p!=null&&m.position(m.quill.getBounds(p))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(m){var p=T(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"position",this).call(this,m),g=this.root.querySelector(".ql-tooltip-arrow");if(g.style.marginLeft="",p===0)return p;g.style.marginLeft=-1*p-g.offsetWidth/2+"px"}}]),E}(o.BaseTooltip);N.TEMPLATE=['','
','','',"
"].join(""),s.BubbleTooltip=N,s.default=c},function(b,s,d){b.exports=d(63)}]).default})})(ze);var Gu=ze.exports,Vu=ht&&ht.__extends||function(){var x=function(j,b){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,d){s.__proto__=d}||function(s,d){for(var T in d)d.hasOwnProperty(T)&&(s[T]=d[T])},x(j,b)};return function(j,b){x(j,b);function s(){this.constructor=j}j.prototype=b===null?Object.create(b):(s.prototype=b.prototype,new s)}}(),Rt=ht&&ht.__assign||function(){return Rt=Object.assign||function(x){for(var j,b=1,s=arguments.length;b1)throw new Error("The Quill editing area can only be composed of a single React element.");if(vt.default.Children.count(b.children)){var d=vt.default.Children.only(b.children);if(((s=d)===null||s===void 0?void 0:s.type)==="textarea")throw new Error("Quill does not support editing on a