Files
appco_dist/.output/public/_nuxt/CSSH7tfB.js
T

43 lines
246 KiB
JavaScript
Raw Normal View History

2025-08-18 18:29:28 +03:30
import{cC as In,eb as zt}from"./B3Hm6diO.js";var Ce={exports:{}};/*!
2025-07-26 22:08:43 +03:30
* Quill Editor v1.3.7
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/var Cn=Ce.exports,kn;function Fn(){return kn||(kn=1,function(ft,dt){(function(O,m){ft.exports=m()})(typeof self<"u"?self:Cn,function(){return function(F){var O={};function m(L){if(O[L])return O[L].exports;var S=O[L]={i:L,l:!1,exports:{}};return F[L].call(S.exports,S,S.exports,m),S.l=!0,S.exports}return m.m=F,m.c=O,m.d=function(L,S,N){m.o(L,S)||Object.defineProperty(L,S,{configurable:!1,enumerable:!0,get:N})},m.n=function(L){var S=L&&L.__esModule?function(){return L.default}:function(){return L};return m.d(S,"a",S),S},m.o=function(L,S){return Object.prototype.hasOwnProperty.call(L,S)},m.p="",m(m.s=109)}([function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=m(17),S=m(18),N=m(19),y=m(45),d=m(46),f=m(47),i=m(48),t=m(49),n=m(12),h=m(32),u=m(33),c=m(31),a=m(1),o={Scope:a.Scope,create:a.create,find:a.find,query:a.query,register:a.register,Container:L.default,Format:S.default,Leaf:N.default,Embed:i.default,Scroll:y.default,Block:f.default,Inline:d.default,Text:t.default,Attributor:{Attribute:n.default,Class:h.default,Style:u.default,Store:c.default}};O.default=o},function(F,O,m){var L=this&&this.__extends||function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var r in o)o.hasOwnProperty(r)&&(a[r]=o[r])};return function(a,o){c(a,o);function r(){this.constructor=a}a.prototype=o===null?Object.create(o):(r.prototype=o.prototype,new r)}}();Object.defineProperty(O,"__esModule",{value:!0});var S=function(c){L(a,c);function a(o){var r=this;return o="[Parchment] "+o,r=c.call(this,o)||this,r.message=o,r.name=r.constructor.name,r}return a}(Error);O.ParchmentError=S;var N={},y={},d={},f={};O.DATA_KEY="__blot";var i;(function(c){c[c.TYPE=3]="TYPE",c[c.LEVEL=12]="LEVEL",c[c.ATTRIBUTE=13]="ATTRIBUTE",c[c.BLOT=14]="BLOT",c[c.INLINE=7]="INLINE",c[c.BLOCK=11]="BLOCK",c[c.BLOCK_BLOT=10]="BLOCK_BLOT",c[c.INLINE_BLOT=6]="INLINE_BLOT",c[c.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",c[c.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",c[c.ANY=15]="ANY"})(i=O.Scope||(O.Scope={}));function t(c,a){var o=h(c);if(o==null)throw new S("Unable to create "+c+" blot");var r=o,e=c instanceof Node||c.nodeType===Node.TEXT_NODE?c:r.create(a);return new r(e,a)}O.create=t;function n(c,a){return a===void 0&&(a=!1),c==null?null:c[O.DATA_KEY]!=null?c[O.DATA_KEY].blot:a?n(c.parentNode,a):null}O.find=n;function h(c,a){a===void 0&&(a=i.ANY);var o;if(typeof c=="string")o=f[c]||N[c];else if(c instanceof Text||c.nodeType===Node.TEXT_NODE)o=f.text;else if(typeof c=="number")c&i.LEVEL&i.BLOCK?o=f.block:c&i.LEVEL&i.INLINE&&(o=f.inline);else if(c instanceof HTMLElement){var r=(c.getAttribute("class")||"").split(/\s+/);for(var e in r)if(o=y[r[e]],o)break;o=o||d[c.tagName]}return o==null?null:a&i.LEVEL&o.scope&&a&i.TYPE&o.scope?o:null}O.query=h;function u(){for(var c=[],a=0;a<arguments.length;a++)c[a]=arguments[a];if(c.length>1)return c.map(function(e){return u(e)});var o=c[0];if(typeof o.blotName!="string"&&typeof o.attrName!="string")throw new S("Invalid definition");if(o.blotName==="abstract")throw new S("Cannot register abstract class");if(f[o.blotName||o.attrName]=o,typeof o.keyName=="string")N[o.keyName]=o;else if(o.className!=null&&(y[o.className]=o),o.tagName!=null){Array.isArray(o.tagName)?o.tagName=o.tagName.map(function(e){return e.toUpperCase()}):o.tagName=o.tagName.toUpperCase();var r=Array.isArray(o.tagName)?o.tagName:[o.tagName];r.forEach(function(e){(d[e]==null||o.className==null)&&(d[e]=o)})}return o}O.register=u},function(F,O,m){var L=m(51),S=m(11),N=m(3),y=m(20),d="\0",f=function(i){Array.isArray(i)?this.ops=i:i!=null&&Array.isArray(i.ops)?this.ops=i.ops:this.ops=[]};f.prototype.insert=function(i,t){var n={};return i.length===0?this:(n.insert=i,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(n.attributes=t),this.push(n))},f.prototype.delete=function(i){return i<=0?this:this.push({delete:i})},f.prototype.retain=function(i,t){if(i<=0)return this;var n={retain:i};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(n.attributes=t),this.push(n)},f.prototype.push=function(i){var t=t
`;for(var n=y.iterator(this.ops),h=new f,u=0;n.hasNext();){if(n.peekType()!=="insert")return;var c=n.peek(),a=y.length(c)-n.peekLength(),o=typeof c.insert=="string"?c.insert.indexOf(t,a)-a:-1;if(o<0)h.push(n.next());else if(o>0)h.push(n.next(o));else{if(i(h,n.next(1).attributes||{},u)===!1)return;u+=1,h=new f}}h.length()>0&&i(h,{},u)},f.prototype.transform=function(i,t){if(t=!!t,typeof i=="number")return this.transformPosition(i,t);for(var n=y.iterator(this.ops),h=y.iterator(i.ops),u=new f;n.hasNext()||h.hasNext();)if(n.peekType()==="insert"&&(t||h.peekType()!=="insert"))u.retain(y.length(n.next()));else if(h.peekType()==="insert")u.push(h.next());else{var c=Math.min(n.peekLength(),h.peekLength()),a=n.next(c),o=h.next(c);if(a.delete)continue;o.delete?u.push(o):u.retain(c,y.attributes.transform(a.attributes,o.attributes,t))}return u.chop()},f.prototype.transformPosition=function(i,t){t=!!t;for(var n=y.iterator(this.ops),h=0;n.hasNext()&&h<=i;){var u=n.peekLength(),c=n.peekType();if(n.next(),c==="delete"){i-=Math.min(u,i-h);continue}else c==="insert"&&(h<i||!t)&&(i+=u);h+=u}return i},F.exports=f},function(F,O){var m=Object.prototype.hasOwnProperty,L=Object.prototype.toString,S=Object.defineProperty,N=Object.getOwnPropertyDescriptor,y=function(n){return typeof Array.isArray=="function"?Array.isArray(n):L.call(n)==="[object Array]"},d=function(n){if(!n||L.call(n)!=="[object Object]")return!1;var h=m.call(n,"constructor"),u=n.constructor&&n.constructor.prototype&&m.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!h&&!u)return!1;var c;for(c in n);return typeof c>"u"||m.call(n,c)},f=function(n,h){S&&h.name==="__proto__"?S(n,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):n[h.name]=h.newValue},i=function(n,h){if(h==="__proto__")if(m.call(n,h)){if(N)return N(n,h).value}else return;return n[h]};F.exports=function t(){var n,h,u,c,a,o,r=arguments[0],e=1,l=arguments.length,E=!1;for(typeof r=="boolean"&&(E=r,r=arguments[1]||{},e=2),(r==null||typeof r!="object"&&typeof r!="function")&&(r={});e<l;++e)if(n=arguments[e],n!=null)for(h in n)u=i(r,h),c=i(n,h),r!==c&&(E&&c&&(d(c)||(a=y(c)))?(a?(a=!1,o=u&&y(u)?u:[]):o=u&&d(u)?u:{},f(r,{name:h,newValue:t(E,o,c)})):typeof c<"u"&&f(r,{name:h,newValue:c}));return r}},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.BlockEmbed=O.bubbleFormats=void 0;var L=function(){function v(_,w){for(var x=0;x<w.length;x++){var I=w[x];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}return function(_,w,x){return w&&v(_.prototype,w),x&&v(_,x),_}}(),S=function v(_,w,x){_===null&&(_=Function.prototype);var I=Object.getOwnPropertyDescriptor(_,w);if(I===void 0){var U=Object.getPrototypeOf(_);return U===null?void 0:v(U,w,x)}else{if("value"in I)return I.value;var z=I.get;return z===void 0?void 0:z.call(x)}},N=m(3),y=r(N),d=m(2),f=r(d),i=m(0),t=r(i),n=m(16),h=r(n),u=m(6),c=r(u),a=m(7),o=r(a);function r(v){return v&&v.__esModule?v:{default:v}}function e(v,_){if(!(v instanceof _))throw new TypeError("Cannot call a class as a function")}function l(v,_){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:v}function E(v,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);v.prototype=Object.create(_&&_.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(v,_):v.__proto__=_)}var b=1,g=function(v){E(_,v);function _(){return e(this,_),l(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return L(_,[{key:"attach",value:function(){S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"attach",this).call(this),this.attributes=new t.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new f.default().insert(this.value(),(0,y.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(x,I){var U=t.defaul
`)){var z=t.default.create(T.blotName);this.parent.insertBefore(z,x===0?this:this.next),z.insertAt(0,I.slice(0,-1))}else S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,x,I,U)}}]),_}(t.default.Embed);g.scope=t.default.Scope.BLOCK_BLOT;var T=function(v){E(_,v);function _(w){e(this,_);var x=l(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,w));return x.cache={},x}return L(_,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(t.default.Leaf).reduce(function(x,I){return I.length()===0?x:x.insert(I.value(),p(I))},new f.default).insert(`
`,p(this))),this.cache.delta}},{key:"deleteAt",value:function(x,I){S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"deleteAt",this).call(this,x,I),this.cache={}}},{key:"formatAt",value:function(x,I,U,z){I<=0||(t.default.query(U,t.default.Scope.BLOCK)?x+I===this.length()&&this.format(U,z):S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"formatAt",this).call(this,x,Math.min(I,this.length()-x-1),U,z),this.cache={})}},{key:"insertAt",value:function(x,I,U){if(U!=null)return S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,x,I,U);if(I.length!==0){var z=I.split(`
`),Z=z.shift();Z.length>0&&(x<this.length()-1||this.children.tail==null?S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,Math.min(x,this.length()-1),Z):this.children.tail.insertAt(this.children.tail.length(),Z),this.cache={});var C=this;z.reduce(function(q,A){return C=C.split(q,!0),C.insertAt(0,A),A.length},x+Z.length)}}},{key:"insertBefore",value:function(x,I){var U=this.children.head;S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,x,I),U instanceof h.default&&U.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"length",this).call(this)+b),this.cache.length}},{key:"moveChildren",value:function(x,I){S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"moveChildren",this).call(this,x,I),this.cache={}}},{key:"optimize",value:function(x){S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,x),this.cache={}}},{key:"path",value:function(x){return S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"path",this).call(this,x,!0)}},{key:"removeChild",value:function(x){S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"removeChild",this).call(this,x),this.cache={}}},{key:"split",value:function(x){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(I&&(x===0||x>=this.length()-b)){var U=this.clone();return x===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var z=S(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"split",this).call(this,x,I);return this.cache={},z}}}]),_}(t.default.Block);T.blotName="block",T.tagName="P",T.defaultChild="break",T.allowedChildren=[c.default,t.default.Embed,o.default];function p(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return v==null||(typeof v.formats=="function"&&(_=(0,y.default)(_,v.formats())),v.parent==null||v.parent.blotName=="scroll"||v.parent.statics.scope!==v.statics.scope)?_:p(v.parent,_)}O.bubbleFormats=p,O.BlockEmbed=g,O.default=T},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.overload=O.expandConfig=void 0;var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},S=function(){function C(q,A){var R=[],j=!0,H=!1,M=void 0;try{for(var P=q[Symbol.iterator](),B;!(j=(B=P.next()).done)&&(R.push(B.value),!(A&&R.length===A));j=!0);}catch(K){H=!0,M=K}finally{try{!j&&P.return&&P.return()}finally{if(H)throw M}}return R}return function(q,A){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return C(q,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function C(q,A){for(var R=0;R<A.length;R++){var j=A[R];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(q,j.key,j)}}return function(q,A,R){return A&&C(q.prototype,A),R&&C(q,R),q}}();m(50);var y=m(2),d=p(y),f=m(14),i=p(f),t=m(8),n=p(t),h=m(9),u=p(h),c=m(0),a=p(c),o=m(15),r=p(o),e=m(3),l=p(e),E=m(10),b=p(E),g=m(34),T=p(g);function p(C){return C&&C.__esModule?C:{default:C}}function v(C,q,A){return q in C?Object.defineProperty(C,q,{value:A,enumerable:!0,configurable:!0,writable:!0}):C[q]=A,C}function _(C,q){if(!(C instanceof q))throw new TypeError("Cannot call a class as a function")}var w=(0,b.default)("quill"),x=function(){N(C,null,[{key:"debug",value:function(A){A===!0&&(A="log"),b.default.level(A)}},{key:"find",value:function(A){return A.__quill||a.default.find(A)}},{key:"import",value:function(A){return this.imports[A]==null&&w.error("Cannot import "+A+". Are you sure it was registered?"),this.imports[A]}},{key:"register",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof A!="string"){var M=A.attrName||A.blotName;typeof M=="string"?this.register("formats/"+M,A,R):Object.keys(A).forE
`&&(R.editor.deleteText(R.getLength()-1,1),P.delete(1));var K=M.compose(P);return K},j)}},{key:"setSelection",value:function(A,R,j){if(A==null)this.selection.setRange(null,R||C.sources.API);else{var H=z(A,R,j),M=S(H,4);A=M[0],R=M[1],j=M[3],this.selection.setRange(new o.Range(A,R),j),j!==n.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.default.sources.API,j=new d.default().insert(A);return this.setContents(j,R)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.default.sources.USER,R=this.scroll.update(A);return this.selection.update(A),R}},{key:"updateContents",value:function(A){var R=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.default.sources.API;return U.call(this,function(){return A=new d.default(A),R.editor.applyDelta(A,j)},j,!0)}}]),C}();x.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},x.events=n.default.events,x.sources=n.default.sources,x.version="1.3.7",x.imports={delta:d.default,parchment:a.default,"core/module":u.default,"core/theme":T.default};function I(C,q){if(q=(0,l.default)(!0,{container:C,modules:{clipboard:!0,keyboard:!0,history:!0}},q),!q.theme||q.theme===x.DEFAULTS.theme)q.theme=T.default;else if(q.theme=x.import("themes/"+q.theme),q.theme==null)throw new Error("Invalid theme "+q.theme+". Did you register it?");var A=(0,l.default)(!0,{},q.theme.DEFAULTS);[A,q].forEach(function(H){H.modules=H.modules||{},Object.keys(H.modules).forEach(function(M){H.modules[M]===!0&&(H.modules[M]={})})});var R=Object.keys(A.modules).concat(Object.keys(q.modules)),j=R.reduce(function(H,M){var P=x.import("modules/"+M);return P==null?w.error("Cannot load "+M+" module. Are you sure you registered it?"):H[M]=P.DEFAULTS||{},H},{});return q.modules!=null&&q.modules.toolbar&&q.modules.toolbar.constructor!==Object&&(q.modules.toolbar={container:q.modules.toolbar}),q=(0,l.default)(!0,{},x.DEFAULTS,{modules:j},A,q),["bounds","container","scrollingContainer"].forEach(function(H){typeof q[H]=="string"&&(q[H]=document.querySelector(q[H]))}),q.modules=Object.keys(q.modules).reduce(function(H,M){return q.modules[M]&&(H[M]=q.modules[M]),H},{}),q}function U(C,q,A,R){if(this.options.strict&&!this.isEnabled()&&q===n.default.sources.USER)return new d.default;var j=A==null?null:this.getSelection(),H=this.editor.delta,M=C();if(j!=null&&(A===!0&&(A=j.index),R==null?j=Z(j,M,q):R!==0&&(j=Z(j,A,R,q)),this.setSelection(j,n.default.sources.SILENT)),M.length()>0){var P,B=[n.default.events.TEXT_CHANGE,M,H,q];if((P=this.emitter).emit.apply(P,[n.default.events.EDITOR_CHANGE].concat(B)),q!==n.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,B)}}return M}function z(C,q,A,R,j){var H={};return typeof C.index=="number"&&typeof C.length=="number"?typeof q!="number"?(j=R,R=A,A=q,q=C.length,C=C.index):(q=C.length,C=C.index):typeof q!="number"&&(j=R,R=A,A=q,q=0),(typeof A>"u"?"undefined":L(A))==="object"?(H=A,j=R):typeof A=="string"&&(R!=null?H[A]=R:j=A),j=j||n.default.sources.API,[C,q,H,j]}function Z(C,q,A,R){if(C==null)return null;var j=void 0,H=void 0;if(q instanceof d.default){var M=[C.index,C.index+C.length].map(function(G){return q.transformPosition(G,R!==n.default.sources.USER)}),P=S(M,2);j=P[0],H=P[1]}else{var B=[C.index,C.index+C.length].map(function(G){return G<q||G===q&&R===n.default.sources.USER?G:A>=0?G+A:Math.max(q,G+A)}),K=S(B,2);j=K[0],H=K[1]}return new o.Range(j,H-j)}O.expandConfig=I,O.overload=z,O.default=x},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function c(a,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}return function(a,o,r){return o&&c(a.prototype,o),r&&c(a,r),a}}(),S=function c(a,o,r){a===null&&(a=Function.prototype);var e=Object.getOwnPropertyDescriptor(a,o);if(e===void 0){var l=Object.getPrototypeOf(a);return l=
`)&&(_=_.slice(0,-1)),_.split(`
`).reduce(function(w,x){return w.insert(x).insert(`
`,v.formats())},new d.default)}},{key:"format",value:function(v,_){if(!(v===this.statics.blotName&&_)){var w=this.descendant(a.default,this.length()-1),x=L(w,1),I=x[0];I!=null&&I.deleteAt(I.length()-1,1),N(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"format",this).call(this,v,_)}}},{key:"formatAt",value:function(v,_,w,x){if(_!==0&&!(i.default.query(w,i.default.Scope.BLOCK)==null||w===this.statics.blotName&&x===this.statics.formats(this.domNode))){var I=this.newlineIndex(v);if(!(I<0||I>=v+_)){var U=this.newlineIndex(v,!0)+1,z=I-U+1,Z=this.isolate(U,z),C=Z.next;Z.format(w,x),C instanceof T&&C.formatAt(0,v-U+_-z,w,x)}}}},{key:"insertAt",value:function(v,_,w){if(w==null){var x=this.descendant(a.default,v),I=L(x,2),U=I[0],z=I[1];U.insertAt(z,_)}}},{key:"length",value:function(){var v=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
`)?v:v+1}},{key:"newlineIndex",value:function(v){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(_)return this.domNode.textContent.slice(0,v).lastIndexOf(`
`);var w=this.domNode.textContent.slice(v).indexOf(`
`);return w>-1?v+w:-1}},{key:"optimize",value:function(v){this.domNode.textContent.endsWith(`
`)||this.appendChild(i.default.create("text",`
`)),N(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,v);var _=this.next;_!=null&&_.prev===this&&_.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===_.statics.formats(_.domNode)&&(_.optimize(v),_.moveChildren(this),_.remove())}},{key:"replace",value:function(v){N(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replace",this).call(this,v),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(_){var w=i.default.find(_);w==null?_.parentNode.removeChild(_):w instanceof i.default.Embed?w.remove():w.unwrap()})}}],[{key:"create",value:function(v){var _=N(T.__proto__||Object.getPrototypeOf(T),"create",this).call(this,v);return _.setAttribute("spellcheck",!1),_}},{key:"formats",value:function(){return!0}}]),T}(n.default);b.blotName="code-block",b.tagName="PRE",b.TAB=" ",O.Code=E,O.default=b},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},S=function(){function C(q,A){var R=[],j=!0,H=!1,M=void 0;try{for(var P=q[Symbol.iterator](),B;!(j=(B=P.next()).done)&&(R.push(B.value),!(A&&R.length===A));j=!0);}catch(K){H=!0,M=K}finally{try{!j&&P.return&&P.return()}finally{if(H)throw M}}return R}return function(q,A){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return C(q,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function C(q,A){for(var R=0;R<A.length;R++){var j=A[R];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(q,j.key,j)}}return function(q,A,R){return A&&C(q.prototype,A),R&&C(q,R),q}}(),y=m(2),d=_(y),f=m(20),i=_(f),t=m(0),n=_(t),h=m(13),u=_(h),c=m(24),a=_(c),o=m(4),r=_(o),e=m(16),l=_(e),E=m(21),b=_(E),g=m(11),T=_(g),p=m(3),v=_(p);function _(C){return C&&C.__esModule?C:{default:C}}function w(C,q,A){return q in C?Object.defineProperty(C,q,{value:A,enumerable:!0,configurable:!0,writable:!0}):C[q]=A,C}function x(C,q){if(!(C instanceof q))throw new TypeError("Cannot call a class as a function")}var I=/^[ -~]*$/,U=function(){function C(q){x(this,C),this.scroll=q,this.delta=this.getDelta()}return N(C,[{key:"applyDelta",value:function(A){var R=this,j=!1;this.scroll.update();var H=this.scroll.length();return this.scroll.batchStart(),A=Z(A),A.reduce(function(M,P){var B=P.retain||P.delete||P.insert.length||1,K=P.attributes||{};if(P.insert!=null){if(typeof P.insert=="string"){var G=P.insert;G.endsWith(`
`)&&j&&(j=!1,G=G.slice(0,-1)),M>=H&&!G.endsWith(`
`)&&(j=!0),R.scroll.insertAt(M,G);var Y=R.scroll.line(M),tt=S(Y,2),nt=tt[0],it=tt[1],ut=(0,v.default)({},(0,o.bubbleFormats)(nt));if(nt instanceof r.default){var st=nt.descendant(n.default.Leaf,it),mt=S(st,1),gt=mt[0];ut=(0,v.default)(ut,(0,o.bubbleFormats)(gt))}K=i.default.attributes.diff(ut,K)||{}}else if(L(P.insert)==="object"){var $=Object.keys(P.insert)[0];if($==null)return M;R.scroll.insertAt(M,$,P.insert[$])}H+=B}return Object.keys(K).forEach(function(W){R.scroll.formatAt(M,B,W,K[W])}),M+B},0),A.reduce(function(M,P){return typeof P.delete=="number"?(R.scroll.deleteAt(M,P.delete),M):M+(P.retain||P.insert.length||1)},0),this.scroll.batchEnd(),this.update(A)}},{key:"deleteText",value:function(A,R){return this.scroll.deleteAt(A,R),this.update(new d.default().retain(A).delete(R))}},{key:"formatLine",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(H).forEach(function(M){if(!(j.scroll.whitelist!=null&&!j.scroll.whitelist[M])){var P=j.scroll.lines(A,Math.max(R,1)),B=R;P.forEach(function(K){var G=K.length();if(!(K instanceof u.default))K.format(M,H[M]);else{var Y=A-K.offset(j.scroll),tt=K.newlineIndex(Y+B)-Y+1;K.formatAt(Y,tt,M,H[M])}B-=G})}}),this.scroll.optimize(),this.update(new d.default().retain(A).retain(R,(0,b.default)(H)))}},{key:"formatText",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(H).forEach(function(M){j.scroll.formatAt(A,R,M,H[M])}),this.update(new d.default().retain(A).retain(R,(0,b.default)(H)))}},{key:"getContents",value:function(A,R){return this.delta.slice(A,A+R)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(A,R){return A.concat(R.delta())},new d.default)}},{key:"getFormat",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[],H=[];R===0?this.scroll.path(A).forEach(function(P){var B=S(P,1),K=B[0];K instanceof r.default?j.push(K):K instanceof n.default.Leaf&&H.push(K)}):(j=this.scroll.lines(A,R),H=this.scroll.descendants(n.default.Leaf,A,R));var M=[j,H].map(function(P){if(P.length===0)return{};for(var B=(0,o.bubbleFormats)(P.shift());Object.keys(B).length>0;){var K=P.shift();if(K==null)return B;B=z((0,o.bubbleFormats)(K),B)}return B});return v.default.apply(v.default,M)}},{key:"getText",value:function(A,R){return this.getContents(A,R).filter(function(j){return typeof j.insert=="string"}).map(function(j){return j.insert}).join("")}},{key:"insertEmbed",value:function(A,R,j){return this.scroll.insertAt(A,R,j),this.update(new d.default().retain(A).insert(w({},R,j)))}},{key:"insertText",value:function(A,R){var j=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return R=R.replace(/\r\n/g,`
`).replace(/\r/g,`
`),this.scroll.insertAt(A,R),Object.keys(H).forEach(function(M){j.scroll.formatAt(A,R.length,M,H[M])}),this.update(new d.default().retain(A).insert(R,(0,b.default)(H)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var A=this.scroll.children.head;return A.statics.blotName!==r.default.blotName||A.children.length>1?!1:A.children.head instanceof l.default}},{key:"removeFormat",value:function(A,R){var j=this.getText(A,R),H=this.scroll.line(A+R),M=S(H,2),P=M[0],B=M[1],K=0,G=new d.default;P!=null&&(P instanceof u.default?K=P.newlineIndex(B)-B+1:K=P.length()-B,G=P.delta().slice(B,B+K-1).insert(`
`));var Y=this.getContents(A,R+K),tt=Y.diff(new d.default().insert(j).concat(G)),nt=new d.default().retain(A).concat(tt);return this.applyDelta(nt)}},{key:"update",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,H=this.delta;if(R.length===1&&R[0].type==="characterData"&&R[0].target.data.match(I)&&n.default.find(R[0].target)){var M=n.default.find(R[0].target),P=(0,o.bubbleFormats)(M),B=M.offset(this.scroll),K=R[0].oldValue.replace(a.default.CONTENTS,""),G=new d.default().insert(K),Y=new d.default().insert(M.value()),tt=new d.default().retain(B).concat(G.diff(Y,j));A=tt.reduce(function(nt,it){return it.insert?nt.insert(it.insert,P):nt.push(it)},new d.default),this.delta=H.compose(A)}else this.delta=this.getDelta(),(!A||!(0,T.default)(H.compose(A),this.delta))&&(A=H.diff(this.delta,j));return A}}]),C}();function z(C,q){return Object.keys(q).reduce(function(A,R){return C[R]==null||(q[R]===C[R]?A[R]=q[R]:Array.isArray(q[R])?q[R].indexOf(C[R])<0&&(A[R]=q[R].concat([C[R]])):A[R]=[q[R],C[R]]),A},{})}function Z(C){return C.reduce(function(q,A){if(A.insert===1){var R=(0,b.default)(A.attributes);return delete R.image,q.insert({image:A.attributes.image},R)}if(A.attributes!=null&&(A.attributes.list===!0||A.attributes.bullet===!0)&&(A=(0,b.default)(A),A.attributes.list?A.attributes.list="ordered":(A.attributes.list="bullet",delete A.attributes.bullet)),typeof A.insert=="string"){var j=A.insert.replace(/\r\n/g,`
`).replace(/\r/g,`
`);return q.insert(j,A.attributes)}return q.push(A)},new d.default)}O.default=U},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.Range=void 0;var L=function(){function g(T,p){var v=[],_=!0,w=!1,x=void 0;try{for(var I=T[Symbol.iterator](),U;!(_=(U=I.next()).done)&&(v.push(U.value),!(p&&v.length===p));_=!0);}catch(z){w=!0,x=z}finally{try{!_&&I.return&&I.return()}finally{if(w)throw x}}return v}return function(T,p){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return g(T,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function g(T,p){for(var v=0;v<p.length;v++){var _=p[v];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(T,_.key,_)}}return function(T,p,v){return p&&g(T.prototype,p),v&&g(T,v),T}}(),N=m(0),y=a(N),d=m(21),f=a(d),i=m(11),t=a(i),n=m(8),h=a(n),u=m(10),c=a(u);function a(g){return g&&g.__esModule?g:{default:g}}function o(g){if(Array.isArray(g)){for(var T=0,p=Array(g.length);T<g.length;T++)p[T]=g[T];return p}else return Array.from(g)}function r(g,T){if(!(g instanceof T))throw new TypeError("Cannot call a class as a function")}var e=(0,c.default)("quill:selection"),l=function g(T){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;r(this,g),this.index=T,this.length=p},E=function(){function g(T,p){var v=this;r(this,g),this.emitter=p,this.scroll=T,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=y.default.create("cursor",this),this.lastRange=this.savedRange=new l(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){v.mouseDown||setTimeout(v.update.bind(v,h.default.sources.USER),1)}),this.emitter.on(h.default.events.EDITOR_CHANGE,function(_,w){_===h.default.events.TEXT_CHANGE&&w.length()>0&&v.update(h.default.sources.SILENT)}),this.emitter.on(h.default.events.SCROLL_BEFORE_UPDATE,function(){if(v.hasFocus()){var _=v.getNativeRange();_!=null&&_.start.node!==v.cursor.textNode&&v.emitter.once(h.default.events.SCROLL_UPDATE,function(){try{v.setNativeRange(_.start.node,_.start.offset,_.end.node,_.end.offset)}catch{}})}}),this.emitter.on(h.default.events.SCROLL_OPTIMIZE,function(_,w){if(w.range){var x=w.range,I=x.startNode,U=x.startOffset,z=x.endNode,Z=x.endOffset;v.setNativeRange(I,U,z,Z)}}),this.update(h.default.sources.SILENT)}return S(g,[{key:"handleComposition",value:function(){var p=this;this.root.addEventListener("compositionstart",function(){p.composing=!0}),this.root.addEventListener("compositionend",function(){if(p.composing=!1,p.cursor.parent){var v=p.cursor.restore();if(!v)return;setTimeout(function(){p.setNativeRange(v.startNode,v.startOffset,v.endNode,v.endOffset)},1)}})}},{key:"handleDragging",value:function(){var p=this;this.emitter.listenDOM("mousedown",document.body,function(){p.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){p.mouseDown=!1,p.update(h.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(p,v){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[p])){this.scroll.update();var _=this.getNativeRange();if(!(_==null||!_.native.collapsed||y.default.query(p,y.default.Scope.BLOCK))){if(_.start.node!==this.cursor.textNode){var w=y.default.find(_.start.node,!1);if(w==null)return;if(w instanceof y.default.Leaf){var x=w.split(_.start.offset);w.parent.insertBefore(this.cursor,x)}else w.insertBefore(this.cursor,_.start.node);this.cursor.attach()}this.cursor.format(p,v),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_=this.scroll.length();p=Math.min(p,_-1),v=Math.min(p+v,_-1)-p;var w=void 0,x=this.scroll.leaf(p),I=L(x,2),U=I[0],z=I[1];if(U==null)return null;var Z=U.position(z,!0),C=L(Z,2);w=C[0],z=C[1];var q=document.createRange();if(v>0){q.setStart(w,z);var A=this.scroll.leaf(p+
`)&&(x=x.slice(0,-1)),U.insertAt(0,x,I)}else{var z=d.default.create(x,I);this.appendChild(z)}else N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertAt",this).call(this,w,x,I);this.optimize()}}},{key:"insertBefore",value:function(w,x){if(w.statics.scope===d.default.Scope.INLINE_BLOT){var I=d.default.create(this.statics.defaultChild);I.appendChild(w),w=I}N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,w,x)}},{key:"leaf",value:function(w){return this.path(w).pop()||[null,-1]}},{key:"line",value:function(w){return w===this.length()?this.line(w-1):this.descendant(g,w)}},{key:"lines",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,I=function U(z,Z,C){var q=[],A=C;return z.children.forEachAt(Z,C,function(R,j,H){g(R)?q.push(R):R instanceof d.default.Container&&(q=q.concat(U(R,j,A))),A-=H}),q};return I(this,w,x)}},{key:"optimize",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,w,x),w.length>0&&this.emitter.emit(i.default.events.SCROLL_OPTIMIZE,w,x))}},{key:"path",value:function(w){return N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"path",this).call(this,w).slice(1)}},{key:"update",value:function(w){if(this.batch!==!0){var x=i.default.sources.USER;typeof w=="string"&&(x=w),Array.isArray(w)||(w=this.observer.takeRecords()),w.length>0&&this.emitter.emit(i.default.events.SCROLL_BEFORE_UPDATE,x,w),N(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"update",this).call(this,w.concat([])),w.length>0&&this.emitter.emit(i.default.events.SCROLL_UPDATE,x,w)}}}]),v}(d.default.Scroll);T.blotName="scroll",T.className="ql-editor",T.tagName="DIV",T.defaultChild="block",T.allowedChildren=[n.default,t.BlockEmbed,r.default],O.default=T},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.SHORTKEY=O.default=void 0;var L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},S=function(){function P(B,K){var G=[],Y=!0,tt=!1,nt=void 0;try{for(var it=B[Symbol.iterator](),ut;!(Y=(ut=it.next()).done)&&(G.push(ut.value),!(K&&G.length===K));Y=!0);}catch(st){tt=!0,nt=st}finally{try{!Y&&it.return&&it.return()}finally{if(tt)throw nt}}return G}return function(B,K){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return P(B,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),N=function(){function P(B,K){for(var G=0;G<K.length;G++){var Y=K[G];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(B,Y.key,Y)}}return function(B,K,G){return K&&P(B.prototype,K),G&&P(B,G),B}}(),y=m(21),d=p(y),f=m(11),i=p(f),t=m(3),n=p(t),h=m(2),u=p(h),c=m(20),a=p(c),o=m(0),r=p(o),e=m(5),l=p(e),E=m(10),b=p(E),g=m(9),T=p(g);function p(P){return P&&P.__esModule?P:{default:P}}function v(P,B,K){return B in P?Object.defineProperty(P,B,{value:K,enumerable:!0,configurable:!0,writable:!0}):P[B]=K,P}function _(P,B){if(!(P instanceof B))throw new TypeError("Cannot call a class as a function")}function w(P,B){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:P}function x(P,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);P.prototype=Object.create(B&&B.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(P,B):P.__proto__=B)}var I=(0,b.default)("quill:keyboard"),U=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function(P){x(B,P),N(B,null,[{key:"match",value:function(G,Y){return Y=M(Y),["altKey","ctrlKey","metaKey","shiftKey"
`,nt).retain(Y.length()-tt-1).retain(1,{list:"unchecked"});this.quill.updateContents(it,l.default.sources.USER),this.quill.setSelection(B.index+1,l.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(B,K){var G=this.quill.getLine(B.index),Y=S(G,2),tt=Y[0],nt=Y[1],it=new u.default().retain(B.index).insert(`
`,K.format).retain(tt.length()-nt-1).retain(1,{header:null});this.quill.updateContents(it,l.default.sources.USER),this.quill.setSelection(B.index+1,l.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(B,K){var G=K.prefix.length,Y=this.quill.getLine(B.index),tt=S(Y,2),nt=tt[0],it=tt[1];if(it>G)return!0;var ut=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":ut="unchecked";break;case"[x]":ut="checked";break;case"-":case"*":ut="bullet";break;default:ut="ordered"}this.quill.insertText(B.index," ",l.default.sources.USER),this.quill.history.cutoff();var st=new u.default().retain(B.index-it).delete(G+1).retain(nt.length()-2-it).retain(1,{list:ut});this.quill.updateContents(st,l.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index-G,l.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(B){var K=this.quill.getLine(B.index),G=S(K,2),Y=G[0],tt=G[1],nt=new u.default().retain(B.index+Y.length()-tt-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(nt,l.default.sources.USER)}},"embed left":Z(z.keys.LEFT,!1),"embed left shift":Z(z.keys.LEFT,!0),"embed right":Z(z.keys.RIGHT,!1),"embed right shift":Z(z.keys.RIGHT,!0)}};function Z(P,B){var K,G=P===z.keys.LEFT?"prefix":"suffix";return K={key:P,shiftKey:B,altKey:null},v(K,G,/^$/),v(K,"handler",function(tt){var nt=tt.index;P===z.keys.RIGHT&&(nt+=tt.length+1);var it=this.quill.getLeaf(nt),ut=S(it,1),st=ut[0];return st instanceof r.default.Embed?(P===z.keys.LEFT?B?this.quill.setSelection(tt.index-1,tt.length+1,l.default.sources.USER):this.quill.setSelection(tt.index-1,l.default.sources.USER):B?this.quill.setSelection(tt.index,tt.length+1,l.default.sources.USER):this.quill.setSelection(tt.index+tt.length+1,l.default.sources.USER),!1):!0}),K}function C(P,B){if(!(P.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(P.index),G=S(K,1),Y=G[0],tt={};if(B.offset===0){var nt=this.quill.getLine(P.index-1),it=S(nt,1),ut=it[0];if(ut!=null&&ut.length()>1){var st=Y.formats(),mt=this.quill.getFormat(P.index-1,1);tt=a.default.attributes.diff(st,mt)||{}}}var gt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(B.prefix)?2:1;this.quill.deleteText(P.index-gt,gt,l.default.sources.USER),Object.keys(tt).length>0&&this.quill.formatLine(P.index-gt,gt,tt,l.default.sources.USER),this.quill.focus()}}function q(P,B){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(B.suffix)?2:1;if(!(P.index>=this.quill.getLength()-K)){var G={},Y=0,tt=this.quill.getLine(P.index),nt=S(tt,1),it=nt[0];if(B.offset>=it.length()-1){var ut=this.quill.getLine(P.index+1),st=S(ut,1),mt=st[0];if(mt){var gt=it.formats(),$=this.quill.getFormat(P.index,1);G=a.default.attributes.diff(gt,$)||{},Y=mt.length()}}this.quill.deleteText(P.index,K,l.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(P.index+Y-1,K,G,l.default.sources.USER)}}function A(P){var B=this.quill.getLines(P),K={};if(B.length>1){var G=B[0].formats(),Y=B[B.length-1].formats();K=a.default.attributes.diff(Y,G)||{}}this.quill.deleteText(P,l.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(P.index,1,K,l.default.sources.USER),this.quill.setSelection(P.index,l.default.sources.SILENT),this.quill.focus()}function R(P,B){var K=this;P.length>0&&this.quill.scroll.deleteAt(P.index,P.length);var G=Object.keys(B.format).reduce(function(Y,tt){return r.default.query(tt,r.default.Scope.BLOCK)&&!Array.isArray(B.format[tt])&&(Y[tt]=B.format[tt]),Y},{});this.quill.insertText(P.index,`
`,G,l.default.sources.USER),this.quill.setSelection(P.index+1,l.default.sources.SILENT),this.quill.focus(),Object.keys(B.format).forEach(function(Y){G[Y]==null&&(Array.isArray(B.format[Y])||Y!=="link"&&K.quill.format(Y,B.format[Y],l.default.sources.USER))})}function j(P){return{key:z.keys.TAB,shiftKey:!P,format:{"code-block":!0},handler:function(K){var G=r.default.query("code-block"),Y=K.index,tt=K.length,nt=this.quill.scroll.descendant(G,Y),it=S(nt,2),ut=it[0],st=it[1];if(ut!=null){var mt=this.quill.getIndex(ut),gt=ut.newlineIndex(st,!0)+1,$=ut.newlineIndex(mt+st+tt),W=ut.domNode.textContent.slice(gt,$).split(`
`);st=0,W.forEach(function(Q,J){P?(ut.insertAt(gt+st,G.TAB),st+=G.TAB.length,J===0?Y+=G.TAB.length:tt+=G.TAB.length):Q.startsWith(G.TAB)&&(ut.deleteAt(gt+st,G.TAB.length),st-=G.TAB.length,J===0?Y-=G.TAB.length:tt-=G.TAB.length),st+=Q.length+1}),this.quill.update(l.default.sources.USER),this.quill.setSelection(Y,tt,l.default.sources.SILENT)}}}}function H(P){return{key:P[0].toUpperCase(),shortKey:!0,handler:function(K,G){this.quill.format(P,!G.format[P],l.default.sources.USER)}}}function M(P){if(typeof P=="string"||typeof P=="number")return M({key:P});if((typeof P>"u"?"undefined":L(P))==="object"&&(P=(0,d.default)(P,!1)),typeof P.key=="string")if(z.keys[P.key.toUpperCase()]!=null)P.key=z.keys[P.key.toUpperCase()];else if(P.key.length===1)P.key=P.key.toUpperCase().charCodeAt(0);else return null;return P.shortKey&&(P[U]=P.shortKey,delete P.shortKey),P}O.default=z,O.SHORTKEY=U},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function a(o,r){var e=[],l=!0,E=!1,b=void 0;try{for(var g=o[Symbol.iterator](),T;!(l=(T=g.next()).done)&&(e.push(T.value),!(r&&e.length===r));l=!0);}catch(p){E=!0,b=p}finally{try{!l&&g.return&&g.return()}finally{if(E)throw b}}return e}return function(o,r){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return a(o,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function a(o,r,e){o===null&&(o=Function.prototype);var l=Object.getOwnPropertyDescriptor(o,r);if(l===void 0){var E=Object.getPrototypeOf(o);return E===null?void 0:a(E,r,e)}else{if("value"in l)return l.value;var b=l.get;return b===void 0?void 0:b.call(e)}},N=function(){function a(o,r){for(var e=0;e<r.length;e++){var l=r[e];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(o,l.key,l)}}return function(o,r,e){return r&&a(o.prototype,r),e&&a(o,e),o}}(),y=m(0),d=t(y),f=m(7),i=t(f);function t(a){return a&&a.__esModule?a:{default:a}}function n(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")}function h(a,o){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o&&(typeof o=="object"||typeof o=="function")?o:a}function u(a,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof o);a.prototype=Object.create(o&&o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(a,o):a.__proto__=o)}var c=function(a){u(o,a),N(o,null,[{key:"value",value:function(){}}]);function o(r,e){n(this,o);var l=h(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,r));return l.selection=e,l.textNode=document.createTextNode(o.CONTENTS),l.domNode.appendChild(l.textNode),l._length=0,l}return N(o,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(e,l){if(this._length!==0)return S(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"format",this).call(this,e,l);for(var E=this,b=0;E!=null&&E.statics.scope!==d.default.Scope.BLOCK_BLOT;)b+=E.offset(E.parent),E=E.parent;E!=null&&(this._length=o.CONTENTS.length,E.optimize(),E.formatAt(b,o.CONTENTS.length,e,l),this._length=0)}},{key:"index",value:function(e,l){return e===this.textNode?0:S(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"index",this).call(this,e,l)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){S(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var e=this.textNode,l=this.selection.getNativeRange(),E=void 0,b=void 0,g=void 0;if(l!=null&&l.start.node===e&&l.end.node===e){var T=[e,l.start.offset,l.end.offset];E=T[0],b=T[1],g=T[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.last
`):e.attributes!=null?Object.keys(e.attributes).some(function(l){return N.default.query(l,N.default.Scope.BLOCK)!=null}):!1}function o(r){var e=r.reduce(function(E,b){return E+=b.delete||0,E},0),l=r.length()-e;return a(r)&&(l-=1),l}O.default=c,O.getLastChangeIndex=o},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.default=O.BaseTooltip=void 0;var L=function(){function R(j,H){for(var M=0;M<H.length;M++){var P=H[M];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(j,P.key,P)}}return function(j,H,M){return H&&R(j.prototype,H),M&&R(j,M),j}}(),S=function R(j,H,M){j===null&&(j=Function.prototype);var P=Object.getOwnPropertyDescriptor(j,H);if(P===void 0){var B=Object.getPrototypeOf(j);return B===null?void 0:R(B,H,M)}else{if("value"in P)return P.value;var K=P.get;return K===void 0?void 0:K.call(M)}},N=m(3),y=T(N),d=m(2),f=T(d),i=m(8),t=T(i),n=m(23),h=T(n),u=m(34),c=T(u),a=m(59),o=T(a),r=m(60),e=T(r),l=m(28),E=T(l),b=m(61),g=T(b);function T(R){return R&&R.__esModule?R:{default:R}}function p(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")}function v(R,j){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:R}function _(R,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);R.prototype=Object.create(j&&j.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(R,j):R.__proto__=j)}var w=[!1,"center","right","justify"],x=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],I=[!1,"serif","monospace"],U=["1","2","3",!1],z=["small",!1,"large","huge"],Z=function(R){_(j,R);function j(H,M){p(this,j);var P=v(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,H,M)),B=function K(G){if(!document.body.contains(H.root))return document.body.removeEventListener("click",K);P.tooltip!=null&&!P.tooltip.root.contains(G.target)&&document.activeElement!==P.tooltip.textbox&&!P.quill.hasFocus()&&P.tooltip.hide(),P.pickers!=null&&P.pickers.forEach(function(Y){Y.container.contains(G.target)||Y.close()})};return H.emitter.listenDOM("click",document.body,B),P}return L(j,[{key:"addModule",value:function(M){var P=S(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"addModule",this).call(this,M);return M==="toolbar"&&this.extendToolbar(P),P}},{key:"buildButtons",value:function(M,P){M.forEach(function(B){var K=B.getAttribute("class")||"";K.split(/\s+/).forEach(function(G){if(G.startsWith("ql-")&&(G=G.slice(3),P[G]!=null))if(G==="direction")B.innerHTML=P[G][""]+P[G].rtl;else if(typeof P[G]=="string")B.innerHTML=P[G];else{var Y=B.value||"";Y!=null&&P[G][Y]&&(B.innerHTML=P[G][Y])}})})}},{key:"buildPickers",value:function(M,P){var B=this;this.pickers=M.map(function(G){if(G.classList.contains("ql-align"))return G.querySelector("option")==null&&A(G,w),new e.default(G,P.align);if(G.classList.contains("ql-background")||G.classList.contains("ql-color")){var Y=G.classList.contains("ql-background")?"background":"color";return G.querySelector("option")==null&&A(G,x,Y==="background"?"#ffffff":"#000000"),new o.default(G,P[Y])}else return G.querySelector("option")==null&&(G.classList.contains("ql-font")?A(G,I):G.classList.contains("ql-header")?A(G,U):G.classList.contains("ql-size")&&A(G,z)),new E.default(G)});var K=function(){B.pickers.forEach(function(Y){Y.update()})};this.quill.on(t.default.events.EDITOR_CHANGE,K)}}]),j}(c.default);Z.DEFAULTS=(0,y.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var j=this,H=this.container.querySelector("input.ql-i
`)&&pt.ops[pt.ops.length-1].attributes==null&&(pt=pt.compose(new i.default().retain(pt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,pt),this.container.innerHTML="",pt}},{key:"dangerouslyPasteHTML",value:function(J,X){var at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;if(typeof J=="string")this.quill.setContents(this.convert(J),X),this.quill.setSelection(0,u.default.sources.SILENT);else{var rt=this.convert(X);this.quill.updateContents(new i.default().retain(J).concat(rt),at),this.quill.setSelection(J+rt.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(J){var X=this;if(!(J.defaultPrevented||!this.quill.isEnabled())){var at=this.quill.getSelection(),rt=new i.default().retain(at.index),ot=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){rt=rt.concat(X.convert()).delete(at.length),X.quill.updateContents(rt,u.default.sources.USER),X.quill.setSelection(rt.length()-at.length,u.default.sources.SILENT),X.quill.scrollingContainer.scrollTop=ot,X.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var J=this,X=[],at=[];return this.matchers.forEach(function(rt){var ot=S(rt,2),wt=ot[0],Ot=ot[1];switch(wt){case Node.TEXT_NODE:at.push(Ot);break;case Node.ELEMENT_NODE:X.push(Ot);break;default:[].forEach.call(J.container.querySelectorAll(wt),function(pt){pt[Z]=pt[Z]||[],pt[Z].push(Ot)});break}}),[X,at]}}]),W}(r.default);R.DEFAULTS={matchers:[],matchVisual:!0};function j($,W,Q){return(typeof W>"u"?"undefined":L(W))==="object"?Object.keys(W).reduce(function(J,X){return j(J,X,W[X])},$):$.reduce(function(J,X){return X.attributes&&X.attributes[W]?J.push(X):J.insert(X.insert,(0,d.default)({},w({},W,Q),X.attributes))},new i.default)}function H($){if($.nodeType!==Node.ELEMENT_NODE)return{};var W="__ql-computed-style";return $[W]||($[W]=window.getComputedStyle($))}function M($,W){for(var Q="",J=$.ops.length-1;J>=0&&Q.length<W.length;--J){var X=$.ops[J];if(typeof X.insert!="string")break;Q=X.insert+Q}return Q.slice(-1*W.length)===W}function P($){if($.childNodes.length===0)return!1;var W=H($);return["block","list-item"].indexOf(W.display)>-1}function B($,W,Q){return $.nodeType===$.TEXT_NODE?Q.reduce(function(J,X){return X($,J)},new i.default):$.nodeType===$.ELEMENT_NODE?[].reduce.call($.childNodes||[],function(J,X){var at=B(X,W,Q);return X.nodeType===$.ELEMENT_NODE&&(at=W.reduce(function(rt,ot){return ot(X,rt)},at),at=(X[Z]||[]).reduce(function(rt,ot){return ot(X,rt)},at)),J.concat(at)},new i.default):new i.default}function K($,W,Q){return j(Q,$,!0)}function G($,W){var Q=n.default.Attributor.Attribute.keys($),J=n.default.Attributor.Class.keys($),X=n.default.Attributor.Style.keys($),at={};return Q.concat(J).concat(X).forEach(function(rt){var ot=n.default.query(rt,n.default.Scope.ATTRIBUTE);ot!=null&&(at[ot.attrName]=ot.value($),at[ot.attrName])||(ot=q[rt],ot!=null&&(ot.attrName===rt||ot.keyName===rt)&&(at[ot.attrName]=ot.value($)||void 0),ot=A[rt],ot!=null&&(ot.attrName===rt||ot.keyName===rt)&&(ot=A[rt],at[ot.attrName]=ot.value($)||void 0))}),Object.keys(at).length>0&&(W=j(W,at)),W}function Y($,W){var Q=n.default.query($);if(Q==null)return W;if(Q.prototype instanceof n.default.Embed){var J={},X=Q.value($);X!=null&&(J[Q.blotName]=X,W=new i.default().insert(J,Q.formats($)))}else typeof Q.formats=="function"&&(W=j(W,Q.blotName,Q.formats($)));return W}function tt($,W){return M(W,`
`)||W.insert(`
`),W}function nt(){return new i.default}function it($,W){var Q=n.default.query($);if(Q==null||Q.blotName!=="list-item"||!M(W,`
`))return W;for(var J=-1,X=$.parentNode;!X.classList.contains("ql-clipboard");)(n.default.query(X)||{}).blotName==="list"&&(J+=1),X=X.parentNode;return J<=0?W:W.compose(new i.default().retain(W.length()-1).retain(1,{indent:J}))}function ut($,W){return M(W,`
`)||(P($)||W.length()>0&&$.nextSibling&&P($.nextSibling))&&W.insert(`
`),W}function st($,W){if(P($)&&$.nextElementSibling!=null&&!M(W,`
`)){var Q=$.offsetHeight+parseFloat(H($).marginTop)+parseFloat(H($).marginBottom);$.nextElementSibling.offsetTop>$.offsetTop+Q*1.5&&W.insert(`
`)}return W}function mt($,W){var Q={},J=$.style||{};return J.fontStyle&&H($).fontStyle==="italic"&&(Q.italic=!0),J.fontWeight&&(H($).fontWeight.startsWith("bold")||parseInt(H($).fontWeight)>=700)&&(Q.bold=!0),Object.keys(Q).length>0&&(W=j(W,Q)),parseFloat(J.textIndent||0)>0&&(W=new i.default().insert(" ").concat(W)),W}function gt($,W){var Q=$.data;if($.parentNode.tagName==="O:P")return W.insert(Q.trim());if(Q.trim().length===0&&$.parentNode.classList.contains("ql-clipboard"))return W;if(!H($.parentNode).whiteSpace.startsWith("pre")){var J=function(at,rt){return rt=rt.replace(/[^\u00a0]/g,""),rt.length<1&&at?" ":rt};Q=Q.replace(/\r\n/g," ").replace(/\n/g," "),Q=Q.replace(/\s\s+/g,J.bind(J,!0)),($.previousSibling==null&&P($.parentNode)||$.previousSibling!=null&&P($.previousSibling))&&(Q=Q.replace(/^\s+/,J.bind(J,!1))),($.nextSibling==null&&P($.parentNode)||$.nextSibling!=null&&P($.nextSibling))&&(Q=Q.replace(/\s+$/,J.bind(J,!1)))}return W.insert(Q)}O.default=R,O.matchAttributor=G,O.matchBlot=Y,O.matchNewline=ut,O.matchSpacing=st,O.matchText=gt},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0});var L=function(){function h(u,c){for(var a=0;a<c.length;a++){var o=c[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,c,a){return c&&h(u.prototype,c),a&&h(u,a),u}}(),S=function h(u,c,a){u===null&&(u=Function.prototype);var o=Object.getOwnPropertyDescriptor(u,c);if(o===void 0){var r=Object.getPrototypeOf(u);return r===null?void 0:h(r,c,a)}else{if("value"in o)return o.value;var e=o.get;return e===void 0?void 0:e.call(a)}},N=m(6),y=d(N);function d(h){return h&&h.__esModule?h:{default:h}}function f(h,u){if(!(h instanceof u))throw new TypeError("Cannot call a class as a function")}function i(h,u){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:h}function t(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);h.prototype=Object.create(u&&u.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(h,u):h.__proto__=u)}var n=function(h){t(u,h);function u(){return f(this,u),i(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return L(u,[{key:"optimize",value:function(a){S(u.prototype.__proto__||Object.getPrototypeOf(u.prototype),"optimize",this).call(this,a),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return S(u.__proto__||Object.getPrototypeOf(u),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),u}(y.default);n.blotName="bold",n.tagName=["STRONG","B"],O.default=n},function(F,O,m){Object.defineProperty(O,"__esModule",{value:!0}),O.addControls=O.default=void 0;var L=function(){function v(_,w){var x=[],I=!0,U=!1,z=void 0;try{for(var Z=_[Symbol.iterator](),C;!(I=(C=Z.next()).done)&&(x.push(C.value),!(w&&x.length===w));I=!0);}catch(q){U=!0,z=q}finally{try{!I&&Z.return&&Z.return()}finally{if(U)throw z}}return x}return function(_,w){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return v(_,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(){function v(_,w){for(var x=0;x<w.length;x++){var I=w[x];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(_,I.key,I)}}return function(_,w,x){return w&&v(_.prototype,w),x&&v(_,x),_}}(),N=m(2),y=a(N),d=m(0),f=a(d),i=m(5),t=a(i),n=m(10),h=a(n),u=m(9),c=a(u);function a(v){return v&&v.__esModule?v:{default:v}}function o(v,_,w){return _ in v?Object.defineProperty(v,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):v[_]=w,v}function r(v,_){if(!(v instanceof _))throw new TypeError("Cannot call a class as a function")}function e(v,_){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof
`);for(var i=L.default.iterator(this.ops),t=new y,n=0;i.hasNext();){if(i.peekType()!=="insert")return;var h=i.peek(),u=L.default.length(h)-i.peekLength(),c=typeof h.insert=="string"?h.insert.indexOf(f,u)-u:-1;if(c<0)t.push(i.next());else if(c>0)t.push(i.next(c));else{if(d(t,i.next(1).attributes||{},n)===!1)return;n+=1,t=new y}}t.length()>0&&d(t,{},n)},y.prototype.invert=function(d){var f=new y;return this.reduce(function(i,t){if(t.insert)f.delete(L.default.length(t));else{if(t.retain&&t.attributes==null)return f.retain(t.retain),i+t.retain;if(t.delete||t.retain&&t.attributes){var n=t.delete||t.retain,h=d.slice(i,i+n);return h.forEach(function(u){t.delete?f.push(u):t.retain&&t.attributes&&f.retain(L.default.length(u),m.default.invert(t.attributes,u.attributes))}),i+n}}return i},0),f.chop()},y.prototype.transform=function(d,f){if(f===void 0&&(f=!1),f=!!f,typeof d=="number")return this.transformPosition(d,f);for(var i=d,t=L.default.iterator(this.ops),n=L.default.iterator(i.ops),h=new y;t.hasNext()||n.hasNext();)if(t.peekType()==="insert"&&(f||n.peekType()!=="insert"))h.retain(L.default.length(t.next()));else if(n.peekType()==="insert")h.push(n.next());else{var u=Math.min(t.peekLength(),n.peekLength()),c=t.next(u),a=n.next(u);if(c.delete)continue;a.delete?h.push(a):h.retain(u,m.default.transform(c.attributes,a.attributes,f))}return h.chop()},y.prototype.transformPosition=function(d,f){f===void 0&&(f=!1),f=!!f;for(var i=L.default.iterator(this.ops),t=0;i.hasNext()&&t<=d;){var n=i.peekLength(),h=i.peekType();if(i.next(),h==="delete"){d-=Math.min(n,d-t);continue}else h==="insert"&&(t<d||!f)&&(d+=n);t+=n}return d},y.Op=L.default,y.AttributeMap=m.default,y}();return Oe=N,Oe}var $n=Gn();const Wn=In($n);export{Wn as D,Zn as Q};