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