(self.webpackChunk=self.webpackChunk||[]).push([[1952],{8214:function(dt,vt,at){"use strict";var ft=at(1413),M=at(45987),O=at(67294),d=at(66758),S=at(32586),_=at(85893),k=["fieldProps","request","params","proFieldProps"],p=function(c,a){var e=c.fieldProps,t=c.request,l=c.params,o=c.proFieldProps,u=(0,M.Z)(c,k),r=(0,O.useContext)(d.Z);return(0,_.jsx)(S.Z,(0,ft.Z)({valueType:"cascader",fieldProps:(0,ft.Z)({getPopupContainer:r.getPopupContainer},e),ref:a,request:t,params:l,filedConfig:{customLightMode:!0},proFieldProps:o},u))};vt.Z=O.forwardRef(p)},40190:function(){"use strict"},18446:function(dt,vt,at){var ft=at(90939);function M(O,d){return ft(O,d)}dt.exports=M},76095:function(dt,vt,at){var ft=at(48764).lW;(function(O,d){dt.exports=d()})(typeof self!="undefined"?self:this,function(){return function(M){var O={};function d(S){if(O[S])return O[S].exports;var _=O[S]={i:S,l:!1,exports:{}};return M[S].call(_.exports,_,_.exports,d),_.l=!0,_.exports}return d.m=M,d.c=O,d.d=function(S,_,k){d.o(S,_)||Object.defineProperty(S,_,{configurable:!1,enumerable:!0,get:k})},d.n=function(S){var _=S&&S.__esModule?function(){return S.default}:function(){return S};return d.d(_,"a",_),_},d.o=function(S,_){return Object.prototype.hasOwnProperty.call(S,_)},d.p="",d(d.s=109)}([function(M,O,d){"use strict";Object.defineProperty(O,"__esModule",{value:!0});var S=d(17),_=d(18),k=d(19),p=d(45),m=d(46),c=d(47),a=d(48),e=d(49),t=d(12),l=d(32),o=d(33),u=d(31),r=d(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:S.default,Format:_.default,Leaf:k.default,Embed:a.default,Scroll:p.default,Block:c.default,Inline:m.default,Text:e.default,Attributor:{Attribute:t.default,Class:l.default,Style:o.default,Store:u.default}};O.default=i},function(M,O,d){"use strict";var S=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var f in i)i.hasOwnProperty(f)&&(r[f]=i[f])};return function(r,i){u(r,i);function f(){this.constructor=r}r.prototype=i===null?Object.create(i):(f.prototype=i.prototype,new f)}}();Object.defineProperty(O,"__esModule",{value:!0});var _=function(u){S(r,u);function r(i){var f=this;return i="[Parchment] "+i,f=u.call(this,i)||this,f.message=i,f.name=f.constructor.name,f}return r}(Error);O.ParchmentError=_;var k={},p={},m={},c={};O.DATA_KEY="__blot";var a;(function(u){u[u.TYPE=3]="TYPE",u[u.LEVEL=12]="LEVEL",u[u.ATTRIBUTE=13]="ATTRIBUTE",u[u.BLOT=14]="BLOT",u[u.INLINE=7]="INLINE",u[u.BLOCK=11]="BLOCK",u[u.BLOCK_BLOT=10]="BLOCK_BLOT",u[u.INLINE_BLOT=6]="INLINE_BLOT",u[u.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",u[u.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",u[u.ANY=15]="ANY"})(a=O.Scope||(O.Scope={}));function e(u,r){var i=l(u);if(i==null)throw new _("Unable to create "+u+" blot");var f=i,n=u instanceof Node||u.nodeType===Node.TEXT_NODE?u:f.create(r);return new f(n,r)}O.create=e;function t(u,r){return r===void 0&&(r=!1),u==null?null:u[O.DATA_KEY]!=null?u[O.DATA_KEY].blot:r?t(u.parentNode,r):null}O.find=t;function l(u,r){r===void 0&&(r=a.ANY);var i;if(typeof u=="string")i=c[u]||k[u];else if(u instanceof Text||u.nodeType===Node.TEXT_NODE)i=c.text;else if(typeof u=="number")u&a.LEVEL&a.BLOCK?i=c.block:u&a.LEVEL&a.INLINE&&(i=c.inline);else if(u instanceof HTMLElement){var f=(u.getAttribute("class")||"").split(/\s+/);for(var n in f)if(i=p[f[n]],i)break;i=i||m[u.tagName]}return i==null?null:r&a.LEVEL&i.scope&&r&a.TYPE&i.scope?i:null}O.query=l;function o(){for(var u=[],r=0;r1)return u.map(function(n){return o(n)});var i=u[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new _("Invalid definition");if(i.blotName==="abstract")throw new _("Cannot register abstract class");if(c[i.blotName||i.attrName]=i,typeof i.keyName=="string")k[i.keyName]=i;else if(i.className!=null&&(p[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){(m[n]==null||i.className==null)&&(m[n]=i)})}return i}O.register=o},function(M,O,d){var S=d(51),_=d(11),k=d(3),p=d(20),m="\0",c=function(a){Array.isArray(a)?this.ops=a:a!=null&&Array.isArray(a.ops)?this.ops=a.ops:this.ops=[]};c.prototype.insert=function(a,e){var t={};return a.length===0?this:(t.insert=a,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},c.prototype.delete=function(a){return a<=0?this:this.push({delete:a})},c.prototype.retain=function(a,e){if(a<=0)return this;var t={retain:a};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},c.prototype.push=function(a){var e=this.ops.length,t=this.ops[e-1];if(a=k(!0,{},a),typeof t=="object"){if(typeof a.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+a.delete},this;if(typeof t.delete=="number"&&a.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(a),this;if(_(a.attributes,t.attributes)){if(typeof a.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+a.insert},typeof a.attributes=="object"&&(this.ops[e-1].attributes=a.attributes),this;if(typeof a.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+a.retain},typeof a.attributes=="object"&&(this.ops[e-1].attributes=a.attributes),this}}return e===this.ops.length?this.ops.push(a):this.ops.splice(e,0,a),this},c.prototype.chop=function(){var a=this.ops[this.ops.length-1];return a&&a.retain&&!a.attributes&&this.ops.pop(),this},c.prototype.filter=function(a){return this.ops.filter(a)},c.prototype.forEach=function(a){this.ops.forEach(a)},c.prototype.map=function(a){return this.ops.map(a)},c.prototype.partition=function(a){var e=[],t=[];return this.forEach(function(l){var o=a(l)?e:t;o.push(l)}),[e,t]},c.prototype.reduce=function(a,e){return this.ops.reduce(a,e)},c.prototype.changeLength=function(){return this.reduce(function(a,e){return e.insert?a+p.length(e):e.delete?a-e.delete:a},0)},c.prototype.length=function(){return this.reduce(function(a,e){return a+p.length(e)},0)},c.prototype.slice=function(a,e){a=a||0,typeof e!="number"&&(e=1/0);for(var t=[],l=p.iterator(this.ops),o=0;o0&&t.next(o.retain-u)}for(var r=new c(l);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var i=Math.min(e.peekLength(),t.peekLength()),f=e.next(i),n=t.next(i);if(typeof n.retain=="number"){var s={};typeof f.retain=="number"?s.retain=i:s.insert=f.insert;var A=p.attributes.compose(f.attributes,n.attributes,typeof f.retain=="number");if(A&&(s.attributes=A),r.push(s),!t.hasNext()&&_(r.ops[r.ops.length-1],s)){var g=new c(e.rest());return r.concat(g).chop()}}else typeof n.delete=="number"&&typeof f.retain=="number"&&r.push(n)}return r.chop()},c.prototype.concat=function(a){var e=new c(this.ops.slice());return a.ops.length>0&&(e.push(a.ops[0]),e.ops=e.ops.concat(a.ops.slice(1))),e},c.prototype.diff=function(a,e){if(this.ops===a.ops)return new c;var t=[this,a].map(function(i){return i.map(function(f){if(f.insert!=null)return typeof f.insert=="string"?f.insert:m;var n=i===a?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),l=new c,o=S(t[0],t[1],e),u=p.iterator(this.ops),r=p.iterator(a.ops);return o.forEach(function(i){for(var f=i[1].length;f>0;){var n=0;switch(i[0]){case S.INSERT:n=Math.min(r.peekLength(),f),l.push(r.next(n));break;case S.DELETE:n=Math.min(f,u.peekLength()),u.next(n),l.delete(n);break;case S.EQUAL:n=Math.min(u.peekLength(),r.peekLength(),f);var s=u.next(n),A=r.next(n);_(s.insert,A.insert)?l.retain(n,p.attributes.diff(s.attributes,A.attributes)):l.push(A).delete(n);break}f-=n}}),l.chop()},c.prototype.eachLine=function(a,e){e=e||` `;for(var t=p.iterator(this.ops),l=new c,o=0;t.hasNext();){if(t.peekType()!=="insert")return;var u=t.peek(),r=p.length(u)-t.peekLength(),i=typeof u.insert=="string"?u.insert.indexOf(e,r)-r:-1;if(i<0)l.push(t.next());else if(i>0)l.push(t.next(i));else{if(a(l,t.next(1).attributes||{},o)===!1)return;o+=1,l=new c}}l.length()>0&&a(l,{},o)},c.prototype.transform=function(a,e){if(e=!!e,typeof a=="number")return this.transformPosition(a,e);for(var t=p.iterator(this.ops),l=p.iterator(a.ops),o=new c;t.hasNext()||l.hasNext();)if(t.peekType()==="insert"&&(e||l.peekType()!=="insert"))o.retain(p.length(t.next()));else if(l.peekType()==="insert")o.push(l.next());else{var u=Math.min(t.peekLength(),l.peekLength()),r=t.next(u),i=l.next(u);if(r.delete)continue;i.delete?o.push(i):o.retain(u,p.attributes.transform(r.attributes,i.attributes,e))}return o.chop()},c.prototype.transformPosition=function(a,e){e=!!e;for(var t=p.iterator(this.ops),l=0;t.hasNext()&&l<=a;){var o=t.peekLength(),u=t.peekType();if(t.next(),u==="delete"){a-=Math.min(o,a-l);continue}else u==="insert"&&(l0&&(T1&&arguments[1]!==void 0?arguments[1]:!1;if(q&&(T===0||T>=this.length()-g)){var B=this.clone();return T===0?(this.parent.insertBefore(B,this),this):(this.parent.insertBefore(B,this.next),B)}else{var C=_(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"split",this).call(this,T,q);return this.cache={},C}}}]),v}(e.default.Block);N.blotName="block",N.tagName="P",N.defaultChild="break",N.allowedChildren=[u.default,e.default.Embed,i.default];function y(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return h==null||(typeof h.formats=="function"&&(v=(0,p.default)(v,h.formats())),h.parent==null||h.parent.blotName=="scroll"||h.parent.statics.scope!==h.statics.scope)?v:y(h.parent,v)}O.bubbleFormats=y,O.BlockEmbed=b,O.default=N},function(M,O,d){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.overload=O.expandConfig=void 0;var S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},_=function(){function j(R,E){var P=[],L=!0,F=!1,D=void 0;try{for(var x=R[Symbol.iterator](),I;!(L=(I=x.next()).done)&&(P.push(I.value),!(E&&P.length===E));L=!0);}catch(U){F=!0,D=U}finally{try{!L&&x.return&&x.return()}finally{if(F)throw D}}return P}return function(R,E){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return j(R,E);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),k=function(){function j(R,E){for(var P=0;P2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof E!="string"){var D=E.attrName||E.blotName;typeof D=="string"?this.register("formats/"+D,E,P):Object.keys(E).forEach(function(x){L.register(x,E[x],P)})}else this.imports[E]!=null&&!F&&w.warn("Overwriting "+E+" with",P),this.imports[E]=P,(E.startsWith("blots/")||E.startsWith("formats/"))&&P.blotName!=="abstract"?r.default.register(P):E.startsWith("modules")&&typeof P.register=="function"&&P.register()}}]);function j(R){var E=this,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(v(this,j),this.options=q(R,P),this.container=this.options.container,this.container==null)return w.error("Invalid Quill container",R);this.options.debug&&j.debug(this.options.debug);var L=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 t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.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(t.default.events.EDITOR_CHANGE,function(D){D===t.default.events.TEXT_CHANGE&&E.root.classList.toggle("ql-blank",E.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(D,x){var I=E.selection.lastRange,U=I&&I.length===0?I.index:void 0;B.call(E,function(){return E.editor.update(null,x,U)},D)});var F=this.clipboard.convert(`
`+L+"


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