@vaadin/rich-text-editor 25.3.3 → 25.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,5 +5,5 @@
5
5
  * Copyright (c) 2014, Jason Chen
6
6
  * Copyright (c) 2013, salesforce.com
7
7
  */
8
- !function(t,e){t.Quill=e()}(window,(function(){return function(){"use strict";var t={698:function(t,e,n){n.d(e,{Ay:function(){return a},Ji:function(){return h},zo:function(){return c}});var s=n(3),i=n(398),r=n(36),o=n(850),l=n(508);class a extends s.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(s.LeafBlot).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),h(n,{},e))),new i.Ay).insert("\n",h(t))}(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,i){e<=0||(this.scroll.query(n,s.Scope.BLOCK)?t+e===this.length()&&this.format(n,i):super.formatAt(t,Math.min(e,this.length()-t-1),n,i),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const s=e.split("\n"),i=s.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let r=this;s.reduce(((t,e)=>(r=r.split(t,!0),r.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof r.A&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}a.blotName="block",a.tagName="P",a.defaultChild=r.A,a.allowedChildren=[r.A,o.A,s.EmbedBlot,l.A];class c extends s.EmbedBlot{attach(){super.attach(),this.attributes=new s.AttributorStore(this.domNode)}delta(){return(new i.Ay).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,s.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,s){this.format(n,s)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const s=e.split("\n"),i=s.pop(),r=s.map((t=>{const e=this.scroll.create(a.blotName);return e.insertAt(0,t),e})),o=this.split(t);r.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:h(t.parent,e,n))}c.scope=s.Scope.BLOCK_BLOT},36:function(t,e,n){var s=n(3);class i extends s.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}i.blotName="break",i.tagName="BR",e.A=i},580:function(t,e,n){var s=n(3);class i extends s.ContainerBlot{}e.A=i},541:function(t,e,n){var s=n(3),i=n(508);class r extends s.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(r.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,i=0;for(;null!=n&&n.statics.scope!==s.Scope.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=r.CONTENTS.length,n.optimize(),n.formatAt(i,r.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof i.A?this.prev:null,n=e?e.length():0,s=this.next instanceof i.A?this.next:null,o=s?s.text:"",{textNode:l}=this,a=l.data.split(r.CONTENTS).join("");let c;if(l.data=r.CONTENTS,e)c=e,(a||s)&&(e.insertAt(e.length(),a+o),s&&s.remove());else if(s)c=s,s.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.remove(),t){const i=(t,i)=>e&&t===e.domNode?i:t===l?n+i-1:s&&t===s.domNode?n+a.length+i:null,r=i(t.start.node,t.start.offset),o=i(t.end.node,t.end.offset);if(null!==r&&null!==o)return{startNode:c.domNode,startOffset:r,endNode:c.domNode,endOffset:o}}return null}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(e.range=t)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if("A"===e.domNode.tagName){this.savedLength=r.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}e.A=r},746:function(t,e,n){var s=n(3),i=n(508);const r="\ufeff";class o extends s.EmbedBlot{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(r),this.rightGuard=document.createTextNode(r),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e,n=null;const s=t.data.split(r).join("");if(t===this.leftGuard)if(this.prev instanceof i.A){const t=this.prev.length();this.prev.insertAt(t,s),n={startNode:this.prev.domNode,startOffset:t+s.length}}else e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this),n={startNode:e,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof i.A?(this.next.insertAt(0,s),n={startNode:this.next.domNode,startOffset:s.length}):(e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this.next),n={startNode:e,startOffset:s.length}));return t.data=r,n}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const n=this.restore(t.target);n&&(e.range=n)}}))}}e.A=o},850:function(t,e,n){var s=n(3),i=n(36),r=n(508);class o extends s.InlineBlot{static allowedChildren=[o,i.A,s.EmbedBlot,r.A];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const n=o.order.indexOf(t),s=o.order.indexOf(e);return n>=0||s>=0?n-s:t===e?0:t<e?-1:1}formatAt(t,e,n,i){if(o.compare(this.statics.blotName,n)<0&&this.scroll.query(n,s.Scope.BLOT)){const s=this.isolate(t,e);i&&s.wrap(n,i)}else super.formatAt(t,e,n,i)}optimize(t){if(super.optimize(t),this.parent instanceof o&&o.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}e.A=o},508:function(t,e,n){n.d(e,{A:function(){return i},X:function(){return o}});var s=n(3);class i extends s.TextBlot{}const r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function o(t){return t.replace(/[&<>"']/g,(t=>r[t]))}},729:function(t,e,n){n.d(e,{default:function(){return B}});var s=n(543),i=n(698),r=n(36),o=n(580),l=n(541),a=n(746),c=n(850),h=n(3),u=n(398),d=n(200);function f(t){return t instanceof i.Ay||t instanceof i.zo}function p(t){return"function"==typeof t.updateContent}class m extends h.ScrollBlot{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=i.Ay;static allowedChildren=[i.Ay,i.zo,o.A];constructor(t,e,n){let{emitter:s}=n;super(t,e),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(d.A.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[n,s]=this.line(t),[o]=this.line(t+e);if(super.deleteAt(t,e),null!=o&&n!==o&&s>0){if(n instanceof i.zo||o instanceof i.zo)return void this.optimize();const t=o.children.head instanceof r.A?null:o.children.head;n.moveChildren(o,t),n.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.optimize()}insertAt(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,h.Scope.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==n&&e.endsWith("\n")?t.insertAt(0,e.slice(0,-1),n):t.insertAt(0,e,n)}else{const t=this.scroll.create(e,n);this.appendChild(t)}else super.insertAt(t,e,n);this.optimize()}insertBefore(t,e){if(t.statics.scope===h.Scope.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(t),super.insertBefore(n,e)}else super.insertBefore(t,e)}insertContents(t,e){const n=this.deltaToRenderBlocks(e.concat((new u.Ay).insert("\n"))),s=n.pop();if(null==s)return;this.batchStart();const r=n.shift();if(r){const e="block"===r.type&&(0===r.delta.length()||!this.descendant(i.zo,t)[0]&&t<this.length()),n="block"===r.type?r.delta:(new u.Ay).insert({[r.key]:r.value});g(this,t,n);const s="block"===r.type?1:0,o=t+n.length()+s;e&&this.insertAt(o-1,"\n");const l=(0,i.Ji)(this.line(t)[0]),a=u.xb.diff(l,r.attributes)||{};Object.keys(a).forEach((t=>{this.formatAt(o-1,1,t,a[t])})),t=o}let[o,l]=this.children.find(t);n.length&&(o&&(o=o.split(l),l=0),n.forEach((t=>{if("block"===t.type)g(this.createBlock(t.attributes,o||void 0),0,t.delta);else{const e=this.create(t.key,t.value);this.insertBefore(e,o||void 0),Object.keys(t.attributes).forEach((n=>{e.format(n,t.attributes[n])}))}}))),"block"===s.type&&s.delta.length()&&g(this,o?o.offset(o.scroll)+l:this.length(),s.delta),this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[n,s]=e;return n instanceof h.LeafBlot?[n,s]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(f,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(t,e,s)=>{let i=[],r=s;return t.children.forEachAt(e,s,((t,e,s)=>{f(t)?i.push(t):t instanceof h.ContainerBlot&&(i=i.concat(n(t,e,r))),r-=s})),i};return n(this,t,e)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(d.A.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let e=d.A.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),(t=t.filter((t=>{let{target:e}=t;const n=this.find(e,!0);return n&&!p(n)}))).length>0&&this.emitter.emit(d.A.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(d.A.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[s]=this.descendant((t=>t instanceof i.zo),t);s&&s.statics.blotName===e&&p(s)&&s.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new u.Ay;return t.forEach((t=>{const s=t?.insert;if(s)if("string"==typeof s){const i=s.split("\n");i.slice(0,-1).forEach((s=>{n.insert(s,t.attributes),e.push({type:"block",delta:n,attributes:t.attributes??{}}),n=new u.Ay}));const r=i[i.length-1];r&&n.insert(r,t.attributes)}else{const i=Object.keys(s)[0];if(!i)return;this.query(i,h.Scope.INLINE)?n.push(t):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new u.Ay,e.push({type:"blockEmbed",key:i,value:s[i],attributes:t.attributes??{}}))}})),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const s={};Object.entries(t).forEach((t=>{let[e,i]=t;null!=this.query(e,h.Scope.BLOCK&h.Scope.BLOT)?n=e:s[e]=i}));const i=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(i,e||void 0);const r=i.length();return Object.entries(s).forEach((t=>{let[e,n]=t;i.formatAt(0,r,e,n)})),i}}function g(t,e,n){n.reduce(((e,n)=>{const s=u.Op.length(n);let r=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const s=n.insert;t.insertAt(e,s);const[o]=t.descendant(h.LeafBlot,e),l=(0,i.Ji)(o);r=u.xb.diff(l,r)||{}}else if("object"==typeof n.insert){const s=Object.keys(n.insert)[0];if(null==s)return e;if(t.insertAt(e,s,n.insert[s]),null!=t.scroll.query(s,h.Scope.INLINE)){const[n]=t.descendant(h.LeafBlot,e),s=(0,i.Ji)(n);r=u.xb.diff(s,r)||{}}}return Object.keys(r).forEach((n=>{t.formatAt(e,s,n,r[n])})),e+s}),e)}var b=m,y=n(508),A=n(584),N=n(266);class v extends N.A{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(s.Ay.events.EDITOR_CHANGE,((t,e,n,i)=>{t===s.Ay.events.SELECTION_CHANGE?e&&i!==s.Ay.sources.SILENT&&(this.currentRange=e):t===s.Ay.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&i!==s.Ay.sources.USER?this.transform(e):this.record(e,n)),this.currentRange=x(this.currentRange,e))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,e){if(0===this.stack[t].length)return;const n=this.stack[t].pop();if(!n)return;const i=this.quill.getContents(),r=n.delta.invert(i);this.stack[e].push({delta:r,range:x(n.range,r)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,s.Ay.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let n=t.invert(e),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(n=n.compose(t.delta),s=t.range)}else this.lastRecorded=i;0!==n.length()&&(this.stack.undo.push({delta:n,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){E(this.stack.undo,t),E(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,s.Ay.sources.USER);else{const e=function(t,e){const n=e.reduce(((t,e)=>t+(e.delete||0)),0);let s=e.length()-n;return function(t,e){const n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((e=>null!=t.query(e,h.Scope.BLOCK))))}(t,e)&&(s-=1),s}(this.quill.scroll,t.delta);this.quill.setSelection(e,s.Ay.sources.USER)}}}function E(t,e){let n=e;for(let e=t.length-1;e>=0;e-=1){const s=t[e];t[e]={delta:n.transform(s.delta,!0),range:s.range&&x(s.range,n)},n=s.delta.transform(n),0===t[e].delta.length()&&t.splice(e,1)}}function x(t,e){if(!t)return t;const n=e.transformPosition(t.index);return{index:n,length:e.transformPosition(t.index+t.length)-n}}var L=n(123);class S extends N.A{constructor(t,e){super(t,e),t.root.addEventListener("drop",(e=>{e.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(e.clientX,e.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);n=document.createRange(),n.setStart(t.offsetNode,t.offset),n.setEnd(t.offsetNode,t.offset)}const s=n&&t.selection.normalizeNative(n);if(s){const n=t.selection.normalizedToRange(s);e.dataTransfer?.files&&this.upload(n,e.dataTransfer.files)}}))}upload(t,e){const n=[];Array.from(e).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&n.push(t)})),n.length>0&&this.options.handler.call(this,t,n)}}S.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const n=e.map((t=>new Promise((e=>{const n=new FileReader;n.onload=()=>{e(n.result)},n.readAsDataURL(t)}))));Promise.all(n).then((e=>{const n=e.reduce(((t,e)=>t.insert({image:e})),(new u.Ay).retain(t.index).delete(t.length));this.quill.updateContents(n,d.A.sources.USER),this.quill.setSelection(t.index+e.length,d.A.sources.SILENT)}))}};var T=S;const k=["insertText","insertReplacementText"];class O extends N.A{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(s.Ay.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){(0,L.Xo)({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(e){const n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new u.Ay).retain(t.index).insert(e,n),s.Ay.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,s.Ay.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!k.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const n=function(t){return"string"==typeof t.data?t.data:t.dataTransfer?.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}(t);if(null==n)return;const s=this.quill.selection.normalizeNative(e),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}var w=O;const C=/Mac/i.test(navigator.platform);class q extends N.A{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:n,event:i}=e;if(!(n instanceof h.ParentBlot&&n.uiNode))return!0;const r="rtl"===getComputedStyle(n.domNode).direction;return!!(r&&"ArrowRight"!==i.key||!r&&"ArrowLeft"!==i.key)||(this.quill.setSelection(t.index-1,t.length+(i.shiftKey?1:0),s.Ay.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&(t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!C||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,this.isListening||(this.isListening=!0,document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0}))}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(!0!==e.collapsed||0!==e.startOffset)return;const n=this.quill.scroll.find(e.startContainer);if(!(n instanceof h.ParentBlot&&n.uiNode))return;const s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(s)}}var R=q;s.Ay.register({"blots/block":i.Ay,"blots/block/embed":i.zo,"blots/break":r.A,"blots/container":o.A,"blots/cursor":l.A,"blots/embed":a.A,"blots/inline":c.A,"blots/scroll":b,"blots/text":y.A,"modules/clipboard":A.Ay,"modules/history":v,"modules/keyboard":L.Ay,"modules/uploader":T,"modules/input":w,"modules/uiNode":R});var B=s.Ay},200:function(t,e,n){n.d(e,{A:function(){return l}});class s{listener;context;once;constructor(t,e,n=!1){this.listener=t,this.context=e,this.once=n}}class i{static prefixed=!1;_events=Object.create(null);_eventsCount=0;#t(t,e,n,i){if("function"!=typeof e)throw new TypeError("The listener must be a function");const r=new s(e,n||this,i),o=this._events[t];return Array.isArray(o)?o.push(r):o?this._events[t]=[o,r]:(this._events[t]=r,this._eventsCount++),this}clearEvent(t){0==--this._eventsCount?this._events=Object.create(null):delete this._events[t]}eventNames(){return 0===this._eventsCount?[]:Reflect.ownKeys(this._events)}listeners(t){const e=this._events[t];return e?Array.isArray(e)?e.map((t=>t.listener)):[e.listener]:[]}listenerCount(t){const e=this._events[t];return e?Array.isArray(e)?e.length:1:0}emit(t,...e){const n=this._events[t];return!!n&&(Array.isArray(n)?n.slice(0).forEach((n=>{n.once&&this.removeListener(t,n.listener,void 0,!0),n.listener.call(n.context,...e)})):(n.once&&this.removeListener(t,n.listener,void 0,!0),n.listener.call(n.context,...e)),!0)}on(t,e,n){return this.#t(t,e,n,!1)}once(t,e,n){return this.#t(t,e,n,!0)}removeListener(t,e,n,s){const i=this._events[t];if(!i)return this;if(!e)return this.clearEvent(t),this;if(Array.isArray(i)){const r=[];i.forEach((t=>{(t.listener!==e||s&&!t.once||n&&t.context!==n)&&r.push(t)})),r.length?this._events[t]=1===r.length?r[0]:r:this.clearEvent(t)}else i.listener!==e||s&&!i.once||n&&i.context!==n||this.clearEvent(t);return this}removeAllListeners(t){return t?this._events[t]&&this.clearEvent(t):(this._events=Object.create(null),this._eventsCount=0),this}off(t,e,n,s){return this.removeListener(t,e,n,s)}addListener(t,e,n){return this.on(t,e,n)}}const r=(0,n(78).A)("quill:events"),o=[];["selectionchange","mousedown","mouseup","click"].forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];o.forEach((t=>{t.handleDOM(...e)}))}))}));var l=class extends i{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",r.error)}connect(){o.push(this)}disconnect(){o.splice(o.indexOf(this),1)}emit(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.log.call(r,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];const i=t.composedPath()[0];(this.domListeners[t.type]||[]).forEach((e=>{let{node:s,handler:r}=e;(i===s||((t,e)=>{if(e.getRootNode()===document)return t.contains(e);for(;!t.contains(e);){const t=e.getRootNode();if(!t)return!1;const n=t.host;if(!n)return!1;e=n}return!0})(s,i))&&r(t,...n)}))}listenDOM(t,e,n){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:n})}}},78:function(t,e){const n=["error","warn","log","info"];let s="warn";function i(t){if(s&&n.indexOf(t)<=n.indexOf(s)){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];console[t](...i)}}function r(t){return n.reduce(((e,n)=>(e[n]=i.bind(console,n,t),e)),{})}r.level=t=>{s=t},i.level=r.level,e.A=r},266:function(t,e){e.A=class{static DEFAULTS={};constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}}},543:function(t,e,n){n.d(e,{Ay:function(){return B}});var s=n(3),i=n(398),r=n(698),o=n(36),l=n(541),a=n(508),c=n(298),h=n(857),u=n(697);const d=/^[ -~]*$/;function f(t,e,n){if(0===t.length){const[t]=g(n.pop());return e<=0?`</li></${t}>`:`</li></${t}>${f([],e-1,n)}`}const[{child:s,offset:i,length:r,indent:o,type:l},...a]=t,[c,h]=g(l);if(o>e)return n.push(l),o===e+1?`<${c}><li${h}>${p(s,i,r)}${f(a,o,n)}`:`<${c}><li>${f(t,e+1,n)}`;const u=n[n.length-1];if(o===e&&l===u)return`</li><li${h}>${p(s,i,r)}${f(a,o,n)}`;const[d]=g(n.pop());return`</li></${d}>${f(t,e-1,n)}`}function p(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"==typeof t.html)return t.html(e,n);if(t instanceof a.A)return(0,a.X)(t.value().slice(e,e+n)).replaceAll(/ +/g,(t=>"&nbsp;".repeat(t.length-1)+" "));if(t instanceof s.ParentBlot){if("list-container"===t.statics.blotName){const s=[];return t.children.forEachAt(e,n,((t,e,n)=>{const i="formats"in t&&"function"==typeof t.formats?t.formats():{};s.push({child:t,offset:e,length:n,indent:i.indent||0,type:i.list})})),f(s,-1,[])}const s=[];if(t.children.forEachAt(e,n,((t,e,n)=>{s.push(p(t,e,n))})),i||"list"===t.statics.blotName)return s.join("");const{outerHTML:r,innerHTML:o}=t.domNode,[l,a]=r.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${s.join("")}<${a}`:`${l}>${s.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function m(t,e){return Object.keys(e).reduce(((n,s)=>{if(null==t[s])return n;const i=e[s];return i===t[s]?n[s]=i:Array.isArray(i)?i.indexOf(t[s])<0?n[s]=i.concat([t[s]]):n[s]=i:n[s]=[i,t[s]],n}),{})}function g(t){const e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function b(t){return t.reduce(((t,e)=>{if("string"==typeof e.insert){const n=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(n,e.attributes)}return t.push(e)}),new i.Ay)}function y(t,e){let{index:n,length:s}=t;return new c.Q(n+e,s)}var A=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const n=b(t),o=new i.Ay;return function(t){const e=[];return t.forEach((t=>{"string"==typeof t.insert?t.insert.split("\n").forEach(((n,s)=>{s&&e.push({insert:"\n",attributes:t.attributes}),n&&e.push({insert:n,attributes:t.attributes})})):e.push(t)})),e}(n.ops.slice()).reduce(((t,n)=>{const l=i.Op.length(n);let c=n.attributes||{},h=!1,u=!1;if(null!=n.insert){if(o.retain(l),"string"==typeof n.insert){const o=n.insert;u=!o.endsWith("\n")&&(e<=t||!!this.scroll.descendant(r.zo,t)[0]),this.scroll.insertAt(t,o);const[l,a]=this.scroll.line(t);let h=Object.assign({},(0,r.Ji)(l));if(l instanceof r.Ay){const[t]=l.descendant(s.LeafBlot,a);t&&(h=Object.assign(h,(0,r.Ji)(t)))}c=i.xb.diff(h,c)||{}}else if("object"==typeof n.insert){const o=Object.keys(n.insert)[0];if(null==o)return t;const l=null!=this.scroll.query(o,s.Scope.INLINE);if(l)(e<=t||this.scroll.descendant(r.zo,t)[0])&&(u=!0);else if(t>0){const[e,n]=this.scroll.descendant(s.LeafBlot,t-1);e instanceof a.A?"\n"!==e.value()[n]&&(h=!0):e instanceof s.EmbedBlot&&e.statics.scope===s.Scope.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(t,o,n.insert[o]),l){const[e]=this.scroll.descendant(s.LeafBlot,t);if(e){const t=Object.assign({},(0,r.Ji)(e));c=i.xb.diff(t,c)||{}}}}e+=l}else if(o.push(n),null!==n.retain&&"object"==typeof n.retain){const e=Object.keys(n.retain)[0];if(null==e)return t;this.scroll.updateEmbedAt(t,e,n.retain[e])}Object.keys(c).forEach((e=>{this.scroll.formatAt(t,l,e,c[e])}));const d=h?1:0,f=u?1:0;return e+=d+f,o.retain(d),o.delete(f),t+l+d+f}),0),o.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+i.Op.length(e)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new i.Ay).retain(t).delete(e))}formatLine(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((s=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(s,n[s])}))})),this.scroll.optimize();const s=(new i.Ay).retain(t).retain(e,(0,h.A)(n));return this.update(s)}formatText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e,s,n[s])}));const s=(new i.Ay).retain(t).retain(e,(0,h.A)(n));return this.update(s)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new i.Ay)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof r.Ay?n.push(e):e instanceof s.LeafBlot&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(s.LeafBlot,t,e));const[o,l]=[n,i].map((t=>{const e=t.shift();if(null==e)return{};let n=(0,r.Ji)(e);for(;Object.keys(n).length>0;){const e=t.shift();if(null==e)return n;n=m((0,r.Ji)(e),n)}return n}));return{...o,...l}}getHTML(t,e){const[n,s]=this.scroll.line(t);if(n){const i=n.length();return n.length()>=s+e&&(0!==s||e!==i)?p(n,s,e,!0):p(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter((t=>"string"==typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,e){const n=b(e),s=(new i.Ay).retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(s)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new i.Ay).retain(t).insert({[e]:n}))}insertText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e.length,s,n[s])})),this.update((new i.Ay).retain(t).insert(e,(0,h.A)(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==r.Ay.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof o.A}removeFormat(t,e){const n=this.getText(t,e),[s,r]=this.scroll.line(t+e);let o=0,l=new i.Ay;null!=s&&(o=s.length()-r,l=s.delta().slice(r,r+o-1).insert("\n"));const a=this.getContents(t,e+o).diff((new i.Ay).insert(n).concat(l)),c=(new i.Ay).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const s=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(d)&&this.scroll.find(e[0].target)){const o=this.scroll.find(e[0].target),a=(0,r.Ji)(o),c=o.offset(this.scroll),h=e[0].oldValue.replace(l.A.CONTENTS,""),u=(new i.Ay).insert(h),d=(new i.Ay).insert(o.value()),f=n&&{oldRange:y(n.oldRange,-c),newRange:y(n.newRange,-c)};t=(new i.Ay).retain(c).concat(u.diff(d,f)).reduce(((t,e)=>e.insert?t.insert(e.insert,a):t.push(e)),new i.Ay),this.delta=s.compose(t)}else this.delta=this.getDelta(),t&&(0,u.A)(s.compose(t),this.delta)||(t=s.diff(this.delta,n));return t}},N=n(200),v=new WeakMap,E=n(78),x=n(266),L=n(746),S=class{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(t=>{this.isComposing||this.handleCompositionStart(t)})),this.scroll.domNode.addEventListener("compositionend",(t=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(t)}))}))}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;!e||e instanceof L.A||(this.emitter.emit(N.A.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(N.A.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(N.A.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(N.A.events.COMPOSITION_END,t),this.isComposing=!1}},T=n(609);const k=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,s="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*n,bottom:e.top+t.clientHeight*s,left:e.left}},O=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},w=(t,e,n,s,i,r)=>t<n&&e>s?0:t<n?-(n-t+i):e>s?e-t>s-n?t+i-n:e-s+r:0;const C=["block","break","cursor","inline","scroll","text"];const q=(0,E.A)("quill"),R=new s.Registry;s.ParentBlot.uiClass="ql-ui";class B{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:R,theme:"default"};static events=N.A.events;static sources=N.A.sources;static version="2.0.3";static imports={delta:i.Ay,parchment:s,"core/module":x.A,"core/theme":T.A};static debug(t){!0===t&&(t="log"),E.A.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v.get(t)||R.find(t,e)}static import(t){return null==this.imports[t]&&q.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],e=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in t?t.attrName:t.blotName;"string"==typeof n?this.register(`formats/${n}`,t,e):Object.keys(t).forEach((n=>{this.register(n,t[n],e)}))}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||n||q.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!=typeof e&&"abstract"!==e.blotName&&R.register(e),"function"==typeof e.register&&e.register(R)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,e){const n=I(t);if(!n)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===B.DEFAULTS.theme?T.A:B.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:r,...o}=B.DEFAULTS,{modules:l,...a}=i.DEFAULTS;let c=D(e.modules);null!=c&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const h={...D(r),...D(l),...c},u={...o,...M(a),...M(e)};let d=e.registry;return d?e.formats&&q.warn('Ignoring "formats" option because "registry" is specified'):d=e.formats?((t,e,n)=>{const i=new s.Registry;return C.forEach((t=>{const n=e.query(t);n&&i.register(n)})),t.forEach((t=>{let s=e.query(t);s||n.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let r=0;for(;s;)if(i.register(s),s="blotName"in s?s.requiredContainer??null:null,r+=1,r>100){n.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),i})(e.formats,u.registry,q):u.registry,{...u,registry:d,container:n,theme:i,modules:Object.entries(h).reduce(((t,e)=>{let[n,s]=e;if(!s)return t;const i=B.import(`modules/${n}`);return null==i?(q.error(`Cannot load ${n} module. Are you sure you registered it?`),t):{...t,[n]:{...i.DEFAULTS||{},...s}}}),{}),bounds:I(u.bounds)}}(t,e),this.container=this.options.container,null==this.container)return void q.error("Invalid Quill container",t);this.options.debug&&B.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",v.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new N.A;const r=s.ScrollBlot.blotName,o=this.options.registry.query(r);if(!o||!("blotName"in o))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new o(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new A(this.scroll),this.selection=new c.A(this.scroll,this.emitter),this.composition=new S(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(N.A.events.EDITOR_CHANGE,(t=>{t===N.A.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(N.A.events.SCROLL_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),i=n&&s?{oldRange:n,newRange:s}:void 0;U.call(this,(()=>this.editor.update(null,e,i)),t)})),this.emitter.on(N.A.events.SCROLL_EMBED_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),r=n&&s?{oldRange:n,newRange:s}:void 0;U.call(this,(()=>{const n=(new i.Ay).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(n,[],r)}),B.sources.USER)})),n){const t=this.clipboard.convert({html:`${n}<p><br></p>`,text:"\n"});this.setContents(t)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){const e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=_(t,e,n),U.call(this,(()=>this.editor.deleteText(t,e)),n,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N.A.sources.API;return U.call(this,(()=>{if(!this.hasFocus()){this.root.focus({preventScroll:!0});const t=this.selection.rangeToNative(this.selection.savedRange);this.selection.setNativeRange(...t)}const[n]=this.selection.getRange();let r=new i.Ay;if(null==n)return r;if(this.scroll.query(t,s.Scope.BLOCK))r=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),r;r=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,N.A.sources.SILENT),r}),n)}formatLine(t,e,n,s,i){let r;return[t,e,r,i]=_(t,e,n,s,i),U.call(this,(()=>this.editor.formatLine(t,e,r)),i,t,0)}formatText(t,e,n,s,i){let r;return[t,e,r,i]=_(t,e,n,s,i),U.call(this,(()=>this.editor.formatText(t,e,r)),i,t,0)}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,e]=_(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=_(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=_(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:B.sources.API;return U.call(this,(()=>this.editor.insertEmbed(t,e,n)),s,t)}insertText(t,e,n,s,i){let r;return[t,,r,i]=_(t,0,n,s,i),U.call(this,(()=>this.editor.insertText(t,e,r)),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,n){return[t,e,,n]=_(t,e,n),U.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollRectIntoView(t){((t,e)=>{const n=t.ownerDocument;let s=e,i=t;for(;i;){const t=i===n.body,e=t?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:k(i),o=getComputedStyle(i),l=w(s.left,s.right,e.left,e.right,O(o.scrollPaddingLeft),O(o.scrollPaddingRight)),a=w(s.top,s.bottom,e.top,e.bottom,O(o.scrollPaddingTop),O(o.scrollPaddingBottom));if(l||a)if(t)n.defaultView?.scrollBy(l,a);else{const{scrollLeft:t,scrollTop:e}=i;a&&(i.scrollTop+=a),l&&(i.scrollLeft+=l);const n=i.scrollLeft-t,r=i.scrollTop-e;s={left:s.left-n,top:s.top-r,right:s.right-n,bottom:s.bottom-r}}i=t||"fixed"===o.position?null:(r=i).parentElement||r.getRootNode().host||null}var r})(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;return U.call(this,(()=>{t=new i.Ay(t);const e=this.getLength(),n=this.editor.deleteText(0,e),s=this.editor.insertContents(0,t),r=this.editor.deleteText(this.getLength()-1,1);return n.compose(s).compose(r)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||B.sources.API):([t,e,,n]=_(t,e,n),this.selection.setRange(new c.Q(Math.max(0,t),e),n),n!==N.A.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;const n=(new i.Ay).insert(t);return this.setContents(n,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N.A.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;return U.call(this,(()=>(t=new i.Ay(t),this.editor.applyDelta(t))),e,!0)}}function I(t){return"string"==typeof t?document.querySelector(t):t}function D(t){return Object.entries(t??{}).reduce(((t,e)=>{let[n,s]=e;return{...t,[n]:!0===s?{}:s}}),{})}function M(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function U(t,e,n,s){if(!this.isEnabled()&&e===N.A.sources.USER&&!this.allowReadOnlyEdits)return new i.Ay;let r=null==n?null:this.getSelection();const o=this.editor.delta,l=t();if(null!=r&&(!0===n&&(n=r.index),null==s?r=j(r,l,e):0!==s&&(r=j(r,n,s,e)),this.setSelection(r,N.A.sources.SILENT)),l.length()>0){const t=[N.A.events.TEXT_CHANGE,l,o,e];this.emitter.emit(N.A.events.EDITOR_CHANGE,...t),e!==N.A.sources.SILENT&&this.emitter.emit(...t)}return l}function _(t,e,n,s,i){let r={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=s,s=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=s,s=n,n=e,e=0),"object"==typeof n?(r=n,i=s):"string"==typeof n&&(null!=s?r[n]=s:i=n),[t,e,r,i=i||N.A.sources.API]}function j(t,e,n,s){const i="number"==typeof n?n:0;if(null==t)return null;let r,o;return e&&"function"==typeof e.transformPosition?[r,o]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,s!==N.A.sources.USER))):[r,o]=[t.index,t.index+t.length].map((t=>t<e||t===e&&s===N.A.sources.USER?t:i>=0?t+i:Math.max(e,t+i))),new c.Q(r,o-r)}},298:function(t,e,n){n.d(e,{Q:function(){return h}});var s=n(3),i=n(200),r=n(78),o=n(857),l=n(697);const a=(0,r.A)("quill:selection"),c=t=>{try{return"getSelection"in t&&"function"==typeof t.getSelection?t.getSelection():window.getSelection()}catch{return null}};class h{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}function u(t,e){try{e.parentNode}catch(t){return!1}return t.contains(e)}e.A=class{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.rootDocument=this.root.getRootNode(),this.cursor=this.scroll.create("cursor",this),this.savedRange=new h(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",this.rootDocument,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,i.A.sources.USER),1)})),this.emitter.on(i.A.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(i.A.events.SCROLL_UPDATE,((e,n)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const s=n.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(s?i.A.sources.SILENT:e)}catch(t){}}))})),this.emitter.on(i.A.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:s,endOffset:r}=e.range;this.setNativeRange(t,n,s,r),this.update(i.A.sources.SILENT)}})),this.update(i.A.sources.SILENT)}handleComposition(){this.emitter.on(i.A.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(i.A.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(i.A.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,s.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){const t=this.scroll.find(n.start.node,!1);if(null==t)return;if(t instanceof s.LeafBlot){const e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let s;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let[i,r]=this.scroll.leaf(t);if(null==i)return null;if(e>0&&r===i.length()){const[e]=this.scroll.leaf(t+1);if(e){const[n]=this.scroll.line(t),[s]=this.scroll.line(t+1);n===s&&(i=e,r=0)}}[s,r]=i.position(r,!0);const o=document.createRange();if(e>0)return o.setStart(s,r),[i,r]=this.scroll.leaf(t+e),null==i?null:([s,r]=i.position(r,!0),o.setEnd(s,r),o.getBoundingClientRect());let l,a="left";if(s instanceof Text){if(!s.data.length)return null;r<s.data.length?(o.setStart(s,r),o.setEnd(s,r+1)):(o.setStart(s,r-1),o.setEnd(s,r),a="right"),l=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;l=i.domNode.getBoundingClientRect(),r>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const t=(t=>{const e=c(t);return e?.anchorNode?!e||!("getComposedRanges"in e)||"function"!=typeof e.getComposedRanges||t instanceof ShadowRoot&&"getSelection"in t?e.getRangeAt(0):e.getComposedRanges(t)[0]:null})(this.rootDocument);if(null==t)return null;const e=this.normalizeNative(t);return a.info("getNativeRange",e),e}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){const t=this.rootDocument;return t.activeElement===this.root||null!=t.activeElement&&u(this.root,t.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const n=e.map((t=>{const[e,n]=t,i=this.scroll.find(e,!0),r=i.offset(this.scroll);return 0===n?r:i instanceof s.LeafBlot?r+i.index(e,n):r+i.length()})),i=Math.min(Math.max(...n),this.scroll.length()-1),r=Math.min(i,...n);return new h(r,i-r)}normalizeNative(t){if(!u(this.root,t.startContainer)||!t.collapsed&&!u(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((t=>{let{node:e,offset:n}=t;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}rangeToNative(t){const e=this.scroll.length(),n=(t,n)=>{t=Math.min(e-1,t);const[s,i]=this.scroll.leaf(t);return s?s.position(i,n):[null,-1]};return[...n(t.index,!1),...n(t.index+t.length,!0)]}setNativeRange(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(a.info("setNativeRange",t,e,n,s),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==n.parentNode))return;const r=c(this.rootDocument);if(null!=r)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};(null==o||i||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||s!==o.endOffset)&&(t instanceof Element&&"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),n instanceof Element&&"BR"===n.tagName&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode),t&&n&&"number"==typeof e&&"number"==typeof s&&r.setBaseAndExtent(t,e,n,s))}else r.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.A.sources.API;if("string"==typeof e&&(n=e,e=!1),a.info("setRange",t),null!=t){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(n)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.A.sources.USER;const e=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.A)(e,this.lastRange)){if(!this.composing&&null!=s&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const n=[i.A.events.SELECTION_CHANGE,(0,o.A)(this.lastRange),(0,o.A)(e),t];this.emitter.emit(i.A.events.EDITOR_CHANGE,...n),t!==i.A.sources.SILENT&&this.emitter.emit(...n)}}}},609:function(t,e){class n{static DEFAULTS={modules:{}};static themes={default:n};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}e.A=n},857:function(t,e){e.A=function(t){return JSON.parse(JSON.stringify(t))}},697:function(t,e){function n(t){return t!==Object(t)}e.A=function t(e,s){if(e===s)return!0;if(n(e)||n(s))return e===s;if(Object.keys(e).length!==Object.keys(s).length)return!1;for(const n in e){if(!(n in s))return!1;if(!t(e[n],s[n]))return!1}return!0}},276:function(t,e,n){n.d(e,{Hu:function(){return l},gS:function(){return r},qh:function(){return o}});var s=n(3);const i={scope:s.Scope.BLOCK,whitelist:["right","center","justify"]},r=new s.Attributor("align","align",i),o=new s.ClassAttributor("align","ql-align",i),l=new s.StyleAttributor("align","text-align",i)},922:function(t,e,n){n.d(e,{l:function(){return r},s:function(){return o}});var s=n(3),i=n(638);const r=new s.ClassAttributor("background","ql-bg",{scope:s.Scope.INLINE}),o=new i.a2("background","background-color",{scope:s.Scope.INLINE})},404:function(t,e,n){n.d(e,{Ay:function(){return u},Cy:function(){return d}});var s=n(698),i=n(36),r=n(541),o=n(850),l=n(508),a=n(580),c=n(543);class h extends a.A{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${(0,l.X)(this.code(t,e))}\n</pre>`}}class u extends s.Ay{static TAB=" ";static register(){c.Ay.register(h)}}class d extends o.A{}d.blotName="code",d.tagName="CODE",u.blotName="code-block",u.className="ql-code-block",u.tagName="DIV",h.blotName="code-block-container",h.className="ql-code-block-container",h.tagName="DIV",h.allowedChildren=[u],u.allowedChildren=[l.A,i.A,r.A],u.requiredContainer=h},638:function(t,e,n){n.d(e,{JM:function(){return o},a2:function(){return i},g3:function(){return r}});var s=n(3);class i extends s.StyleAttributor{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`):e}}const r=new s.ClassAttributor("color","ql-color",{scope:s.Scope.INLINE}),o=new i("color","color",{scope:s.Scope.INLINE})},912:function(t,e,n){n.d(e,{Mc:function(){return r},VL:function(){return l},sY:function(){return o}});var s=n(3);const i={scope:s.Scope.BLOCK,whitelist:["rtl"]},r=new s.Attributor("direction","dir",i),o=new s.ClassAttributor("direction","ql-direction",i),l=new s.StyleAttributor("direction","direction",i)},772:function(t,e,n){n.d(e,{q:function(){return r},z:function(){return l}});var s=n(3);const i={scope:s.Scope.INLINE,whitelist:["serif","monospace"]},r=new s.ClassAttributor("font","ql-font",i);class o extends s.StyleAttributor{value(t){return super.value(t).replace(/["']/g,"")}}const l=new o("font","font-family",i)},664:function(t,e,n){n.d(e,{U:function(){return i},r:function(){return r}});var s=n(3);const i=new s.ClassAttributor("size","ql-size",{scope:s.Scope.INLINE,whitelist:["small","large","huge"]}),r=new s.StyleAttributor("size","font-size",{scope:s.Scope.INLINE,whitelist:["10px","18px","32px"]})},584:function(t,e,n){n.d(e,{Ay:function(){return O}});var s=n(3),i=n(398),r=n(698),o=n(78),l=n(266),a=n(543),c=n(276),h=n(922),u=n(404),d=n(638),f=n(912),p=n(772),m=n(664),g=n(123);const b=/font-weight:\s*normal/,y=["P","OL","UL"],A=t=>t&&y.includes(t.tagName),N=/\bmso-list:[^;]*ignore/i,v=/\bmso-list:[^;]*\bl(\d+)/i,E=/\bmso-list:[^;]*\blevel(\d+)/i,x=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&(t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],s=[];e.forEach((t=>{(t.getAttribute("style")||"").match(N)?n.push(t):s.push(t)})),n.forEach((t=>t.parentNode?.removeChild(t)));const i=t.documentElement.innerHTML,r=s.map((t=>((t,e)=>{const n=t.getAttribute("style"),s=n?.match(v);if(!s)return null;const i=Number(s[1]),r=n?.match(E),o=r?Number(r[1]):1,l=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l);return{id:i,indent:o,type:a&&"bullet"===a[1]?"bullet":"ordered",element:t}})(t,i))).filter((t=>t));for(;r.length;){const t=[];let e=r.shift();for(;e;)t.push(e),e=r.length&&r[0]?.element===e.element.nextElementSibling&&r[0].id===e.id?r.shift():null;const n=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type),t.indent>1&&e.setAttribute("class","ql-indent-"+(t.indent-1)),e.innerHTML=t.element.innerHTML,n.appendChild(e)}));const s=t[0]?.element,{parentNode:i}=s??{};s&&i?.replaceChild(n,s),t.slice(1).forEach((t=>{let{element:e}=t;i?.removeChild(e)}))}})(t)},function(t){t.querySelector('[id^="docs-internal-guid-"]')&&((t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(b))).forEach((e=>{const n=t.createDocumentFragment();n.append(...e.childNodes),e.parentNode?.replaceChild(n,e)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>A(t.previousElementSibling)&&A(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}];const L=(0,o.A)("quill:clipboard"),S=[[Node.TEXT_NODE,function(t,e,n){let s=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(s.trim());if(!B(t)){if(0===s.trim().length&&s.includes("\n")&&!function(t,e){return t.previousElementSibling&&t.nextElementSibling&&!q(t.previousElementSibling,e)&&!q(t.nextElementSibling,e)}(t,n))return e;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(null==t.previousSibling&&null!=t.parentElement&&q(t.parentElement,n)||t.previousSibling instanceof Element&&q(t.previousSibling,n))&&(s=s.replace(/^ /,"")),(null==t.nextSibling&&null!=t.parentElement&&q(t.parentElement,n)||t.nextSibling instanceof Element&&q(t.nextSibling,n))&&(s=s.replace(/ $/,"")),s=s.replaceAll(" "," ")}return e.insert(s)}],[Node.TEXT_NODE,M],["br",function(t,e){return C(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,function(t,e,n){const r=n.query(t);if(null==r)return e;if(r.prototype instanceof s.EmbedBlot){const e={},s=r.value(t);if(null!=s)return e[r.blotName]=s,(new i.Ay).insert(e,r.formats(t,n))}else if(r.prototype instanceof s.BlockBlot&&!C(e,"\n")&&e.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return w(e,r.blotName,r.formats(t,n),n);return e}],[Node.ELEMENT_NODE,function(t,e,n){const i=s.Attributor.keys(t),r=s.ClassAttributor.keys(t),o=s.StyleAttributor.keys(t),l={};return i.concat(r).concat(o).forEach((e=>{let i=n.query(e,s.Scope.ATTRIBUTE);null!=i&&(l[i.attrName]=i.value(t),l[i.attrName])||(i=T[e],null==i||i.attrName!==e&&i.keyName!==e||(l[i.attrName]=i.value(t)||void 0),i=k[e],null==i||i.attrName!==e&&i.keyName!==e||(i=k[e],l[i.attrName]=i.value(t)||void 0))})),Object.entries(l).reduce(((t,e)=>{let[s,i]=e;return w(t,s,i,n)}),e)}],[Node.ELEMENT_NODE,function(t,e,n){const s={},r=t.style||{};return"italic"===r.fontStyle&&(s.italic=!0),"underline"===r.textDecoration&&(s.underline=!0),"line-through"===r.textDecoration&&(s.strike=!0),(r.fontWeight?.startsWith("bold")||parseInt(r.fontWeight,10)>=700)&&(s.bold=!0),e=Object.entries(s).reduce(((t,e)=>{let[s,i]=e;return w(t,s,i,n)}),e),parseFloat(r.textIndent||0)>0?(new i.Ay).insert("\t").concat(e):e}],["li",function(t,e,n){const s=n.query(t);if(null==s||"list"!==s.blotName||!C(e,"\n"))return e;let r=-1,o=t.parentNode;for(;null!=o;)["OL","UL"].includes(o.tagName)&&(r+=1),o=o.parentNode;return r<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:r,...e.attributes||{}}):t),new i.Ay)}],["ol, ul",function(t,e,n){const s=t;let i="OL"===s.tagName?"ordered":"bullet";const r=s.getAttribute("data-checked");return r&&(i="true"===r?"checked":"unchecked"),w(e,"list",i,n)}],["pre",function(t,e,n){const s=n.query("code-block");return w(e,"code-block",!s||!("formats"in s)||"function"!=typeof s.formats||s.formats(t,n),n)}],["tr",function(t,e,n){const s="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;return null!=s?w(e,"table",Array.from(s.querySelectorAll("tr")).indexOf(t)+1,n):e}],["b",D("bold")],["i",D("italic")],["strike",D("strike")],["style",function(){return new i.Ay}]],T=[c.gS,f.Mc].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),k=[c.Hu,h.s,d.JM,f.VL,p.z,m.r].reduce(((t,e)=>(t[e.keyName]=e,t)),{});class O extends l.A{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],S.concat(this.options.matchers??[]).forEach((t=>{let[e,n]=t;this.addMatcher(e,n)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:n}=t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s[u.Ay.blotName])return(new i.Ay).insert(n||"",{[u.Ay.blotName]:s[u.Ay.blotName]});if(!e)return(new i.Ay).insert(n||"",s);const r=this.convertHTML(e);return C(r,"\n")&&(null==r.ops[r.ops.length-1].attributes||s.table)?r.compose((new i.Ay).retain(r.length()-1).delete(1)):r}normalizeHTML(t){(t=>{t.documentElement&&x.forEach((e=>{e(t)}))})(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,s=new WeakMap,[i,r]=this.prepareMatching(n,s);return I(this.quill.scroll,n,i,r,s)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.Ay.sources.API;if("string"==typeof t){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,a.Ay.sources.SILENT)}else{const s=this.convert({html:e,text:""});this.quill.updateContents((new i.Ay).retain(t).concat(s),n),this.quill.setSelection(t+s.length(),a.Ay.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:s,text:i}=this.onCopy(n,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",s),e&&(0,g.Xo)({range:n,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(null==e)return;const n=t.clipboardData?.getData("text/html");let s=t.clipboardData?.getData("text/plain");if(!n&&!s){const e=t.clipboardData?.getData("text/uri-list");e&&(s=this.normalizeURIList(e))}const i=Array.from(t.clipboardData?.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(e,i);else{if(n&&i.length>0){const t=(new DOMParser).parseFromString(n,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:n,text:s})}}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:n,html:s}=e;const r=this.quill.getFormat(t.index),o=this.convert({text:n,html:s},r);L.log("onPaste",o,{text:n,html:s});const l=(new i.Ay).retain(t.index).delete(t.length).concat(o);this.quill.updateContents(l,a.Ay.sources.USER),this.quill.setSelection(l.length()-t.length,a.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],s=[];return this.matchers.forEach((i=>{const[r,o]=i;switch(r){case Node.TEXT_NODE:s.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(t.querySelectorAll(r)).forEach((t=>{if(e.has(t)){const n=e.get(t);n?.push(o)}else e.set(t,[o])}))}})),[n,s]}}function w(t,e,n,s){return s.query(e)?t.reduce(((t,s)=>{if(!s.insert)return t;if(s.attributes&&s.attributes[e])return t.push(s);const i=n?{[e]:n}:{};return t.insert(s.insert,{...i,...s.attributes})}),new i.Ay):t}function C(t,e){let n="";for(let s=t.ops.length-1;s>=0&&n.length<e.length;--s){const e=t.ops[s];if("string"!=typeof e.insert)break;n=e.insert+n}return n.slice(-1*e.length)===e}function q(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return!(n&&n.prototype instanceof s.EmbedBlot)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}const R=new WeakMap;function B(t){return null!=t&&(R.has(t)||("PRE"===t.tagName?R.set(t,!0):R.set(t,B(t.parentNode))),R.get(t))}function I(t,e,n,s,r){return e.nodeType===e.TEXT_NODE?s.reduce(((n,s)=>s(e,n,t)),new i.Ay):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((i,o)=>{let l=I(t,o,n,s,r);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce(((e,n)=>n(o,e,t)),l),l=(r.get(o)||[]).reduce(((e,n)=>n(o,e,t)),l)),i.concat(l)}),new i.Ay):new i.Ay}function D(t){return(e,n,s)=>w(n,t,!0,s)}function M(t,e,n){if(!C(e,"\n")){if(q(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let s=t.nextSibling;for(;null!=s;){if(q(s,n))return e.insert("\n");const t=n.query(s);if(t&&t.prototype instanceof r.zo)return e.insert("\n");s=s.firstChild}}}return e}},123:function(t,e,n){n.d(e,{Ay:function(){return u},Xo:function(){return b}});var s=n(398),i=n(3),r=n(543),o=n(78),l=n(266),a=n(697);const c=(0,o.A)("quill:keyboard"),h=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class u extends l.A{static match(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!e[n]!==t[n]&&null!==e[n]))&&(e.key===t.key||e.key===t.which)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t={...t}}return t.shortKey&&(t[h]=t.shortKey,delete t.shortKey),t}(t);null!=s?("function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach((t=>{const i={...s,key:t,...e,...n};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}))):c.warn("Attempted to add invalid keyboard binding",s)}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;if(229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key))return;const e=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((e=>u.match(t,e)));if(0===e.length)return;const n=r.Ay.find(t.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const s=this.quill.getSelection();if(null==s||!this.quill.hasFocus())return;const[o,l]=this.quill.getLine(s.index),[c,h]=this.quill.getLeaf(s.index),[d,f]=0===s.length?[c,h]:this.quill.getLeaf(s.index+s.length),p=c instanceof i.TextBlot?c.value().slice(0,h):"",m=d instanceof i.TextBlot?d.value().slice(f):"",g={collapsed:0===s.length,empty:0===s.length&&o.length()<=1,format:this.quill.getFormat(s),line:o,offset:l,prefix:p,suffix:m,event:t};e.some((t=>{if(null!=t.collapsed&&t.collapsed!==g.collapsed)return!1;if(null!=t.empty&&t.empty!==g.empty)return!1;if(null!=t.offset&&t.offset!==g.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==g.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=g.format[e]:!1===t.format[e]?null==g.format[e]:(0,a.A)(t.format[e],g.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(g.prefix)||null!=t.suffix&&!t.suffix.test(g.suffix)||!0===t.handler.call(this,s,g,t))}))&&t.preventDefault()}))}handleBackspace(t,e){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let i={};const[o]=this.quill.getLine(t.index);let l=(new s.Ay).retain(t.index-n).delete(n);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e&&!("block"===e.statics.blotName&&e.length()<=1)){const e=o.formats(),n=this.quill.getFormat(t.index-1,1);if(i=s.xb.diff(e,n)||{},Object.keys(i).length>0){const e=(new s.Ay).retain(t.index+o.length()-2).retain(1,i);l=l.compose(e)}}}this.quill.updateContents(l,r.Ay.sources.USER),this.quill.focus()}handleDelete(t,e){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let i={};const[o]=this.quill.getLine(t.index);let l=(new s.Ay).retain(t.index).delete(n);if(e.offset>=o.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const n=o.formats(),r=this.quill.getFormat(t.index,1);i=s.xb.diff(n,r)||{},Object.keys(i).length>0&&(l=l.retain(e.length()-1).retain(1,i))}}this.quill.updateContents(l,r.Ay.sources.USER),this.quill.focus()}handleDeleteRange(t){b({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const n=Object.keys(e.format).reduce(((t,n)=>(this.quill.scroll.query(n,i.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{}),o=(new s.Ay).retain(t.index).delete(t.length).insert("\n",n);this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.focus()}}const d={bindings:{bold:m("bold"),italic:m("italic"),underline:m("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",r.Ay.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",r.Ay.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){null!=e.format.indent?this.quill.format("indent","-1",r.Ay.sources.USER):null!=e.format.list&&this.quill.format("list",!1,r.Ay.sources.USER)}},"indent code-block":f(!0),"outdent code-block":f(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,r.Ay.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=(new s.Ay).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,r.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,r.Ay.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,r.Ay.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),i={...e.formats(),list:"checked"},o=(new s.Ay).retain(t.index).insert("\n",i).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,i]=this.quill.getLine(t.index),o=(new s.Ay).retain(t.index).insert("\n",e.format).retain(n.length()-i-1).retain(1,{header:null});this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[n,i,o,l]=e.getTable(t),a=function(t,e,n,s){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===s?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}(0,i,o,l);if(null==a)return;let c=n.offset();if(a<0){const e=(new s.Ay).retain(c).insert("\n");this.quill.updateContents(e,r.Ay.sources.USER),this.quill.setSelection(t.index+1,t.length,r.Ay.sources.SILENT)}else if(a>0){c+=n.length();const t=(new s.Ay).retain(c).insert("\n");this.quill.updateContents(t,r.Ay.sources.USER),this.quill.setSelection(c,r.Ay.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:s}=e,i=s.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,r.Ay.sources.USER):this.quill.setSelection(i+s.length(),r.Ay.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=e.prefix,[i,o]=this.quill.getLine(t.index);if(o>n)return!0;let l;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",r.Ay.sources.USER),this.quill.history.cutoff();const a=(new s.Ay).retain(t.index-o).delete(n+1).retain(i.length()-2-o).retain(1,{list:l});return this.quill.updateContents(a,r.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,r.Ay.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,n]=this.quill.getLine(t.index);let i=2,o=e;for(;null!=o&&o.length()<=1&&o.formats()["code-block"];)if(o=o.prev,i-=1,i<=0){const i=(new s.Ay).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,r.Ay.sources.USER),this.quill.setSelection(t.index-1,r.Ay.sources.SILENT),!1}return!0}},"embed left":p("ArrowLeft",!1),"embed left shift":p("ArrowLeft",!0),"embed right":p("ArrowRight",!1),"embed right shift":p("ArrowRight",!0),"table down":g(!1),"table up":g(!0)}};function f(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:s}=n;const i=this.quill.scroll.query("code-block"),{TAB:o}=i;if(0===e.length&&!s.shiftKey)return this.quill.insertText(e.index,o,r.Ay.sources.USER),void this.quill.setSelection(e.index+o.length,r.Ay.sources.SILENT);const l=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:c}=e;l.forEach(((e,n)=>{t?(e.insertAt(0,o),0===n?a+=o.length:c+=o.length):e.domNode.textContent.startsWith(o)&&(e.deleteAt(0,o.length),0===n?a-=o.length:c-=o.length)})),this.quill.update(r.Ay.sources.USER),this.quill.setSelection(a,c,r.Ay.sources.SILENT)}}}function p(t,e){return{key:t,shiftKey:e,altKey:null,["ArrowLeft"===t?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;"ArrowRight"===t&&(s+=n.length+1);const[o]=this.quill.getLeaf(s);return!(o instanceof i.EmbedBlot&&("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,r.Ay.sources.USER):this.quill.setSelection(n.index-1,r.Ay.sources.USER):e?this.quill.setSelection(n.index,n.length+1,r.Ay.sources.USER):this.quill.setSelection(n.index+n.length+1,r.Ay.sources.USER),1))}}}function m(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],r.Ay.sources.USER)}}}function g(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const s=t?"prev":"next",i=n.line,o=i.parent[s];if(null!=o){if("table-row"===o.statics.blotName){let t=o.children.head,e=i;for(;null!=e.prev;)e=e.prev,t=t.next;const s=t.offset(this.quill.scroll)+Math.min(n.offset,t.length()-1);this.quill.setSelection(s,0,r.Ay.sources.USER)}}else{const e=i.table()[s];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,r.Ay.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,r.Ay.sources.USER))}return!1}}}function b(t){let{quill:e,range:n}=t;const i=e.getLines(n);let o={};if(i.length>1){const t=i[0].formats(),e=i[i.length-1].formats();o=s.xb.diff(e,t)||{}}e.deleteText(n,r.Ay.sources.USER),Object.keys(o).length>0&&e.formatLine(n.index,1,o,r.Ay.sources.USER),e.setSelection(n.index,r.Ay.sources.SILENT)}u.DEFAULTS=d},398:function(t,e,n){n.d(e,{Ay:function(){return L},Op:function(){return A},xb:function(){return y}});var s,i,r=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,u=((t,e,n)=>(n=null!=t?r(c(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of a(e))h.call(t,n)||undefined===n||o(t,n,{get:()=>e[n],enumerable:!(s=l(e,n))||s.enumerable});return t})(t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)))((s={"node_modules/.pnpm/fast-diff@1.3.0/node_modules/fast-diff/diff.js"(t,e){var n=-1;function s(t,e,p,m,g){if(t===e)return t?[[0,t]]:[];if(null!=p){var b=function(t,e,n){var s="number"==typeof n?{index:n,length:0}:n.oldRange,i="number"==typeof n?null:n.newRange,r=t.length,o=e.length;if(0===s.length&&(null===i||0===i.length)){var l=s.index,a=t.slice(0,l),c=t.slice(l),h=i?i.index:null,u=l+o-r;if((null===h||h===u)&&!(u<0||u>o)){var d=e.slice(0,u);if((m=e.slice(u))===c){var f=Math.min(l,u);if((b=a.slice(0,f))===(N=d.slice(0,f)))return y(b,a.slice(f),d.slice(f),c)}}if(null===h||h===l){var p=l,m=(d=e.slice(0,p),e.slice(p));if(d===a){var g=Math.min(r-p,o-p);if((A=c.slice(c.length-g))===(v=m.slice(m.length-g)))return y(a,c.slice(0,c.length-g),m.slice(0,m.length-g),A)}}}if(s.length>0&&i&&0===i.length){var b=t.slice(0,s.index),A=t.slice(s.index+s.length);if(!(o<(f=b.length)+(g=A.length))){var N=e.slice(0,f),v=e.slice(o-g);if(b===N&&A===v)return y(b,t.slice(f,r-g),e.slice(f,o-g),A)}}return null}(t,e,p);if(b)return b}var A=r(t,e),N=t.substring(0,A);A=l(t=t.substring(A),e=e.substring(A));var v=t.substring(t.length-A),E=function(t,e){var o;if(!t)return[[1,e]];if(!e)return[[n,t]];var a=t.length>e.length?t:e,c=t.length>e.length?e:t,h=a.indexOf(c);if(-1!==h)return o=[[1,a.substring(0,h)],[0,c],[1,a.substring(h+c.length)]],t.length>e.length&&(o[0][0]=o[2][0]=n),o;if(1===c.length)return[[n,t],[1,e]];var u=function(t,e){var n=t.length>e.length?t:e,s=t.length>e.length?e:t;if(n.length<4||2*s.length<n.length)return null;function i(t,e,n){for(var s,i,o,a,c=t.substring(n,n+Math.floor(t.length/4)),h=-1,u="";-1!==(h=e.indexOf(c,h+1));){var d=r(t.substring(n),e.substring(h)),f=l(t.substring(0,n),e.substring(0,h));u.length<f+d&&(u=e.substring(h-f,h)+e.substring(h,h+d),s=t.substring(0,n-f),i=t.substring(n+d),o=e.substring(0,h-f),a=e.substring(h+d))}return 2*u.length>=t.length?[s,i,o,a,u]:null}var o,a,c,h,u,d=i(n,s,Math.ceil(n.length/4)),f=i(n,s,Math.ceil(n.length/2));return d||f?(o=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=o[0],c=o[1],h=o[2],u=o[3]):(h=o[0],u=o[1],a=o[2],c=o[3]),[a,c,h,u,o[4]]):null}(t,e);if(u){var d=u[0],f=u[1],p=u[2],m=u[3],g=u[4],b=s(d,p),y=s(f,m);return b.concat([[0,g]],y)}return function(t,e){for(var s=t.length,r=e.length,o=Math.ceil((s+r)/2),l=o,a=2*o,c=new Array(a),h=new Array(a),u=0;u<a;u++)c[u]=-1,h[u]=-1;c[l+1]=0,h[l+1]=0;for(var d=s-r,f=d%2!=0,p=0,m=0,g=0,b=0,y=0;y<o;y++){for(var A=-y+p;A<=y-m;A+=2){for(var N=l+A,v=(T=A===-y||A!==y&&c[N-1]<c[N+1]?c[N+1]:c[N-1]+1)-A;T<s&&v<r&&t.charAt(T)===e.charAt(v);)T++,v++;if(c[N]=T,T>s)m+=2;else if(v>r)p+=2;else if(f&&(L=l+d-A)>=0&&L<a&&-1!==h[L]&&T>=(x=s-h[L]))return i(t,e,T,v)}for(var E=-y+g;E<=y-b;E+=2){for(var x,L=l+E,S=(x=E===-y||E!==y&&h[L-1]<h[L+1]?h[L+1]:h[L-1]+1)-E;x<s&&S<r&&t.charAt(s-x-1)===e.charAt(r-S-1);)x++,S++;if(h[L]=x,x>s)b+=2;else if(S>r)g+=2;else if(!f){var T;if((N=l+d-E)>=0&&N<a&&-1!==c[N]&&(v=l+(T=c[N])-N,T>=(x=s-x)))return i(t,e,T,v)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-A),e=e.substring(0,e.length-A));return N&&E.unshift([0,N]),v&&E.push([0,v]),f(E,g),m&&function(t){for(var e=!1,s=[],i=0,r=null,p=0,m=0,g=0,b=0,y=0;p<t.length;)0==t[p][0]?(s[i++]=p,m=b,g=y,b=0,y=0,r=t[p][1]):(1==t[p][0]?b+=t[p][1].length:y+=t[p][1].length,r&&r.length<=Math.max(m,g)&&r.length<=Math.max(b,y)&&(t.splice(s[i-1],0,[n,r]),t[s[i-1]+1][0]=1,i--,p=--i>0?s[i-1]:-1,m=0,g=0,b=0,y=0,r=null,e=!0)),p++;for(e&&f(t),function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),s=e.charAt(0),i=n.match(a),r=s.match(a),o=i&&n.match(c),l=r&&s.match(c),f=o&&n.match(h),p=l&&s.match(h),m=f&&t.match(u),g=p&&e.match(d);return m||g?5:f||p?4:i&&!o&&l?3:o||l?2:i||r?1:0}for(var n=1;n<t.length-1;){if(0==t[n-1][0]&&0==t[n+1][0]){var s=t[n-1][1],i=t[n][1],r=t[n+1][1],o=l(s,i);if(o){var f=i.substring(i.length-o);s=s.substring(0,s.length-o),i=f+i.substring(0,i.length-o),r=f+r}for(var p=s,m=i,g=r,b=e(s,i)+e(i,r);i.charAt(0)===r.charAt(0);){s+=i.charAt(0),i=i.substring(1)+r.charAt(0),r=r.substring(1);var y=e(s,i)+e(i,r);y>=b&&(b=y,p=s,m=i,g=r)}t[n-1][1]!=p&&(p?t[n-1][1]=p:(t.splice(n-1,1),n--),t[n][1]=m,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}}(t),p=1;p<t.length;){if(t[p-1][0]==n&&1==t[p][0]){var A=t[p-1][1],N=t[p][1],v=o(A,N),E=o(N,A);v>=E?(v>=A.length/2||v>=N.length/2)&&(t.splice(p,0,[0,N.substring(0,v)]),t[p-1][1]=A.substring(0,A.length-v),t[p+1][1]=N.substring(v),p++):(E>=A.length/2||E>=N.length/2)&&(t.splice(p,0,[0,A.substring(0,E)]),t[p-1][0]=1,t[p-1][1]=N.substring(0,N.length-E),t[p+1][0]=n,t[p+1][1]=A.substring(E),p++),p++}p++}}(E),E}function i(t,e,n,i){var r=t.substring(0,n),o=e.substring(0,i),l=t.substring(n),a=e.substring(i),c=s(r,o),h=s(l,a);return c.concat(h)}function r(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,s=Math.min(t.length,e.length),i=s,r=0;n<i;)t.substring(r,i)==e.substring(r,i)?r=n=i:s=i,i=Math.floor((s-n)/2+n);return p(t.charCodeAt(i-1))&&i--,i}function o(t,e){var n=t.length,s=e.length;if(0==n||0==s)return 0;n>s?t=t.substring(n-s):n<s&&(e=e.substring(0,n));var i=Math.min(n,s);if(t==e)return i;for(var r=0,o=1;;){var l=t.substring(i-o),a=e.indexOf(l);if(-1==a)return r;o+=a,0!=a&&t.substring(i-o)!=e.substring(0,o)||(r=o,o++)}}function l(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,s=Math.min(t.length,e.length),i=s,r=0;n<i;)t.substring(t.length-i,t.length-r)==e.substring(e.length-i,e.length-r)?r=n=i:s=i,i=Math.floor((s-n)/2+n);return m(t.charCodeAt(t.length-i))&&i--,i}var a=/[^a-zA-Z0-9]/,c=/\s/,h=/[\r\n]/,u=/\n\r?\n$/,d=/^\r?\n\r?\n/;function f(t,e){t.push([0,""]);for(var s,i=0,o=0,a=0,c="",h="";i<t.length;)if(i<t.length-1&&!t[i][1])t.splice(i,1);else switch(t[i][0]){case 1:a++,h+=t[i][1],i++;break;case n:o++,c+=t[i][1],i++;break;case 0:var u=i-a-o-1;if(e){if(u>=0&&b(t[u][1])){var d=t[u][1].slice(-1);if(t[u][1]=t[u][1].slice(0,-1),c=d+c,h=d+h,!t[u][1]){t.splice(u,1),i--;var p=u-1;t[p]&&1===t[p][0]&&(a++,h=t[p][1]+h,p--),t[p]&&t[p][0]===n&&(o++,c=t[p][1]+c,p--),u=p}}g(t[i][1])&&(d=t[i][1].charAt(0),t[i][1]=t[i][1].slice(1),c+=d,h+=d)}if(i<t.length-1&&!t[i][1]){t.splice(i,1);break}if(c.length>0||h.length>0){c.length>0&&h.length>0&&(0!==(s=r(h,c))&&(u>=0?t[u][1]+=h.substring(0,s):(t.splice(0,0,[0,h.substring(0,s)]),i++),h=h.substring(s),c=c.substring(s)),0!==(s=l(h,c))&&(t[i][1]=h.substring(h.length-s)+t[i][1],h=h.substring(0,h.length-s),c=c.substring(0,c.length-s)));var m=a+o;0===c.length&&0===h.length?(t.splice(i-m,m),i-=m):0===c.length?(t.splice(i-m,m,[1,h]),i=i-m+1):0===h.length?(t.splice(i-m,m,[n,c]),i=i-m+1):(t.splice(i-m,m,[n,c],[1,h]),i=i-m+2)}0!==i&&0===t[i-1][0]?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,a=0,o=0,c="",h=""}""===t[t.length-1][1]&&t.pop();var y=!1;for(i=1;i<t.length-1;)0===t[i-1][0]&&0===t[i+1][0]&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)===t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),t[i+1][1]=t[i-1][1]+t[i+1][1],t.splice(i-1,1),y=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),y=!0)),i++;y&&f(t,e)}function p(t){return t>=55296&&t<=56319}function m(t){return t>=56320&&t<=57343}function g(t){return m(t.charCodeAt(0))}function b(t){return p(t.charCodeAt(t.length-1))}function y(t,e,s,i){return b(t)||g(i)?null:function(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}([[0,t],[n,e],[1,s],[0,i]])}function A(t,e,n,i){return s(t,e,n,i,!0)}A.INSERT=1,A.DELETE=n,A.EQUAL=0,e.exports=A}},function(){return i||(0,s[a(s)[0]])((i={exports:{}}).exports,i),i.exports})()),d=function(t){return JSON.parse(JSON.stringify(t))};function f(t){return t!==Object(t)}var p,m,g=function t(e,n){if(e===n)return!0;if(f(e)||f(n))return e===n;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(let s in e){if(!(s in n))return!1;if(!t(e[s],n[s]))return!1}return!0};(m=p||(p={})).compose=function(t={},e={},n=!1){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});let s=d(e);n||(s=Object.keys(s).reduce(((t,e)=>(null!=s[e]&&(t[e]=s[e]),t)),{}));for(const n in t)void 0!==t[n]&&void 0===e[n]&&(s[n]=t[n]);return Object.keys(s).length>0?s:void 0},m.diff=function(t={},e={}){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});const n=Object.keys(t).concat(Object.keys(e)).reduce(((n,s)=>(g(t[s],e[s])||(n[s]=void 0===e[s]?null:e[s]),n)),{});return Object.keys(n).length>0?n:void 0},m.invert=function(t={},e={}){t=t||{};const n=Object.keys(e).reduce(((n,s)=>(e[s]!==t[s]&&void 0!==t[s]&&(n[s]=e[s]),n)),{});return Object.keys(t).reduce(((n,s)=>(t[s]!==e[s]&&void 0===e[s]&&(n[s]=null),n)),n)},m.transform=function(t,e,n=!1){if("object"!=typeof t)return e;if("object"!=typeof e)return;if(!n)return e;const s=Object.keys(e).reduce(((n,s)=>(void 0===t[s]&&(n[s]=e[s]),n)),{});return Object.keys(s).length>0?s:void 0};var b,y=p;(b||(b={})).length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"object"==typeof t.retain&&null!==t.retain?1:"string"==typeof t.insert?t.insert.length:1};var A=b,N=class{ops;index;offset;constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const e=this.ops[this.index];if(e){const n=this.offset,s=A.length(e);if(t>=s-n?(t=s-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};{const s={};return e.attributes&&(s.attributes=e.attributes),"number"==typeof e.retain?s.retain=t:"object"==typeof e.retain&&null!==e.retain?s.retain=e.retain:"string"==typeof e.insert?s.insert=e.insert.substr(n,t):s.insert=e.insert,s}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?A.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"==typeof t.delete?"delete":"number"==typeof t.retain||"object"==typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,e=this.index,n=this.next(),s=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(s)}}return[]}},v=String.fromCharCode(0),E=(t,e)=>{if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);const n=Object.keys(t)[0];if(!n||n!==Object.keys(e)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(e)[0]}`);return[n,t[n],e[n]]},x=class t{static Op=A;static OpIterator=N;static AttributeMap=y;static handlers={};static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){const e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}ops;inverted;constructor(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?(this.ops=t.ops,this.inverted=t.inverted):this.ops=[]}insert(t,e){const n={};return"string"==typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if("number"==typeof t&&t<=0)return this;const n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)}push(t){let e=this.ops.length,n=this.ops[e-1];if(t=d(t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!=typeof n))return this.ops.unshift(t),this;if(g(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){const t=this.ops[this.ops.length-1];return t&&"number"==typeof t.retain&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){const e=[],n=[];return this.forEach((s=>{(t(s)?e:n).push(s)})),[e,n]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>e.insert?t+A.length(e):e.delete?t-e.delete:t),0)}length(){return this.reduce(((t,e)=>t+A.length(e)),0)}slice(e=0,n=1/0){const s=[],i=new N(this.ops);let r=0;for(;r<n&&i.hasNext();){let t;r<e?t=i.next(e-r):(t=i.next(n-r),s.push(t)),r+=A.length(t)}return new t(s)}compose(e){const n=new N(this.ops),s=new N(e.ops),i=[],r=s.peek();if(null!=r&&"number"==typeof r.retain&&null==r.attributes){let t=r.retain;for(;"insert"===n.peekType()&&n.peekLength()<=t;)t-=n.peekLength(),i.push(n.next());r.retain-t>0&&s.next(r.retain-t)}const o=new t(i);for(;n.hasNext()||s.hasNext();)if("insert"===s.peekType())o.push(s.next());else if("delete"===n.peekType())o.push(n.next());else{const e=Math.min(n.peekLength(),s.peekLength()),i=n.next(e),r=s.next(e);if(r.retain){const l={};if("number"==typeof i.retain)l.retain="number"==typeof r.retain?e:r.retain;else if("number"==typeof r.retain)null==i.retain?l.insert=i.insert:l.retain=i.retain;else{const e=null==i.retain?"insert":"retain",[n,s,o]=E(i[e],r.retain),a=t.getHandler(n);l[e]={[n]:a.compose(s,o,"retain"===e)}}const a=y.compose(i.attributes,r.attributes,"number"==typeof i.retain);if(a&&(l.attributes=a),o.push(l),!s.hasNext()&&g(o.ops[o.ops.length-1],l)){const e=new t(n.rest());return o.concat(e).chop()}}else"number"==typeof r.delete&&("number"==typeof i.retain||"object"==typeof i.retain&&null!==i.retain)&&o.push(r)}return o.chop()}concat(e){const n=new t(this.ops.slice());return e.ops.length>0&&(n.push(e.ops[0]),n.ops=n.ops.concat(e.ops.slice(1))),n}diff(e,n){if(this.ops===e.ops)return new t;const s=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:v;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),i=new t,r=(0,u.default)(s[0],s[1],n,!0),o=new N(this.ops),l=new N(e.ops);return r.forEach((t=>{let e=t[1].length;for(;e>0;){let n=0;switch(t[0]){case u.default.INSERT:n=Math.min(l.peekLength(),e),i.push(l.next(n));break;case u.default.DELETE:n=Math.min(e,o.peekLength()),o.next(n),i.delete(n);break;case u.default.EQUAL:n=Math.min(o.peekLength(),l.peekLength(),e);const t=o.next(n),s=l.next(n);g(t.insert,s.insert)?i.retain(n,y.diff(t.attributes,s.attributes)):i.push(s).delete(n)}e-=n}})),i.chop()}eachLine(e,n="\n"){const s=new N(this.ops);let i=new t,r=0;for(;s.hasNext();){if("insert"!==s.peekType())return;const o=s.peek(),l=A.length(o)-s.peekLength(),a="string"==typeof o.insert?o.insert.indexOf(n,l)-l:-1;if(a<0)i.push(s.next());else if(a>0)i.push(s.next(a));else{if(!1===e(i,s.next(1).attributes||{},r))return;r+=1,i=new t}}i.length()>0&&e(i,{},r)}invert(e){const n=new t;return this.reduce(((s,i)=>{if(i.insert)n.delete(A.length(i));else{if("number"==typeof i.retain&&null==i.attributes)return n.retain(i.retain),s+i.retain;if(i.delete||"number"==typeof i.retain){const t=i.delete||i.retain;return e.slice(s,s+t).forEach((t=>{i.delete?n.push(t):i.retain&&i.attributes&&n.retain(A.length(t),y.invert(i.attributes,t.attributes))})),s+t}if("object"==typeof i.retain&&null!==i.retain){const r=e.slice(s,s+1),o=new N(r.ops).next(),[l,a,c]=E(i.retain,o.insert),h=t.getHandler(l);return n.retain({[l]:h.invert(a,c)},y.invert(i.attributes,o.attributes)),s+1}}return s}),0),n.chop()}transform(e,n=!1){if(n=!!n,"number"==typeof e)return this.transformPosition(e,n);const s=e,i=new N(this.ops),r=new N(s.ops),o=new t;for(;i.hasNext()||r.hasNext();)if("insert"!==i.peekType()||!n&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{const e=Math.min(i.peekLength(),r.peekLength()),s=i.next(e),l=r.next(e);if(s.delete)continue;if(l.delete)o.push(l);else{const i=s.retain,r=l.retain;let a="object"==typeof r&&null!==r?r:e;if("object"==typeof i&&null!==i&&"object"==typeof r&&null!==r){const e=Object.keys(i)[0];if(e===Object.keys(r)[0]){const s=t.getHandler(e);s&&(a={[e]:s.transform(i[e],r[e],n)})}}o.retain(a,y.transform(s.attributes,l.attributes,n))}}else o.retain(A.length(i.next()));return o.chop()}transformPosition(t,e=!1){e=!!e;const n=new N(this.ops);let s=0;for(;n.hasNext()&&s<=t;){const i=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(s<t||!e)&&(t+=i),s+=i):t-=Math.min(i,t-s)}return t}},L=x;"object"==typeof module&&(module.exports=x,module.exports.default=x)},3:function(t,e,n){n.r(e),n.d(e,{Attributor:function(){return i},AttributorStore:function(){return d},BlockBlot:function(){return L},ClassAttributor:function(){return c},ContainerBlot:function(){return T},EmbedBlot:function(){return k},InlineBlot:function(){return E},LeafBlot:function(){return g},ParentBlot:function(){return N},Registry:function(){return l},Scope:function(){return s},ScrollBlot:function(){return C},StyleAttributor:function(){return u},TextBlot:function(){return R}});var s=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(s||{});class i{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const i=s.TYPE&s.ATTRIBUTE;this.scope=null!=n.scope?n.scope&s.LEVEL|i:s.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}canAdd(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class r extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const o=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,e)}return null}create(e,n,s){const i=this.query(n);if(null==i)throw new r(`Unable to create ${n} blot`);const o=i,l=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(s),a=new o(e,l,s);return t.blots.set(a.domNode,a),a}find(e,n=!1){return t.find(e,n)}query(t,e=s.ANY){let n;return"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&s.LEVEL&s.BLOCK?n=this.types.block:t&s.LEVEL&s.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(n=this.classes[t],!!n))),n=n||this.tags[t.tagName]),null==n?null:"scope"in n&&e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}register(...t){return t.map((t=>{const e="blotName"in t,n="attrName"in t;if(!e&&!n)throw new r("Invalid definition");if(e&&"abstract"===t.blotName)throw new r("Cannot register abstract class");const s=e?t.blotName:n?t.attrName:void 0;return this.types[s]=t,n?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(null==this.tags[e]||null==t.className)&&(this.tags[e]=t)})))),t}))}};o.blots=new WeakMap;let l=o;function a(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}const c=class extends i{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0)}remove(t){a(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(a(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}};function h(t){const e=t.split("-"),n=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+n}const u=class extends i{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[h(this.keyName)]=e,!0)}remove(t){t.style[h(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[h(this.keyName)];return this.canAdd(t,e)?e:""}},d=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=l.find(this.domNode);if(null==t)return;const e=i.keys(this.domNode),n=c.keys(this.domNode),r=u.keys(this.domNode);e.concat(n).concat(r).forEach((e=>{const n=t.scroll.query(e,s.ATTRIBUTE);n instanceof i&&(this.attributes[n.attrName]=n)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const n=this.attributes[e].value(this.domNode);t.format(e,n)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}},f=class{constructor(t,e){this.scroll=t,this.domNode=e,l.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new r("Blot definition missing tagName");let e,n;return Array.isArray(this.tagName)?("string"==typeof t?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof t&&(n=t),e="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),l.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,i){const r=this.isolate(t,e);if(null!=this.scroll.query(n,s.BLOT)&&i)r.wrap(n,i);else if(null!=this.scroll.query(n,s.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);r.wrap(t),t.format(n,i)}}insertAt(t,e,n){const s=null==n?this.scroll.create("text",e):this.scroll.create(e,n),i=this.split(t);this.parent.insertBefore(s,i||void 0)}isolate(t,e){const n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n}length(){return 1}offset(t=this.parent){return null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,e){return 0===t?this:this.next}update(t,e){}wrap(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new r(`Cannot wrap ${t}`);return n.appendChild(this),n}};f.blotName="abstract";let p=f;const m=class extends p{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};m.scope=s.INLINE_BLOT;const g=m;class b{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let n=e();for(;n&&t>0;)t-=1,n=e();return n}contains(t){const e=this.iterator();let n=e();for(;n;){if(n===t)return!0;n=e()}return!1}indexOf(t){const e=this.iterator();let n=e(),s=0;for(;n;){if(n===t)return s;s+=1,n=e()}return-1}insertBefore(t,e){null!=t&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,n=this.head;for(;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return null!=t&&(t=t.next),e}}find(t,e=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(t<i||e&&t===i&&(null==s.next||0!==s.next.length()))return[s,t];t-=i,s=n()}return[null,0]}forEach(t){const e=this.iterator();let n=e();for(;n;)t(n),n=e()}forEachAt(t,e,n){if(e<=0)return;const[s,i]=this.find(t);let r=t-i;const o=this.iterator(s);let l=o();for(;l&&r<t+e;){const s=l.length();t>r?n(l,t-r,Math.min(e,r+s-t)):n(l,0,Math.min(s,t+e-r)),r+=s,l=o()}}map(t){return this.reduce(((e,n)=>(e.push(t(n)),e)),[])}reduce(t,e){const n=this.iterator();let s=n();for(;s;)e=t(e,s),s=n();return e}}function y(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const n=e.create(s.INLINE);return Array.from(t.childNodes).forEach((t=>{n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const A=class t extends p{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(e){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new b,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=y(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof r)return;throw t}}))}deleteAt(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,n)=>{t.deleteAt(e,n)}))}descendant(e,n=0){const[s,i]=this.children.find(n);return null==e.blotName&&e(s)||null!=e.blotName&&s instanceof e?[s,i]:s instanceof t?s.descendant(e,i):[null,-1]}descendants(e,n=0,s=Number.MAX_VALUE){let i=[],r=s;return this.children.forEachAt(n,s,((n,s,o)=>{(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,s,r))),r-=o})),i}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((n=>{e||this.statics.allowedChildren.some((t=>n instanceof t))||(n.statics.scope===s.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof t?n.unwrap():n.remove())}))}formatAt(t,e,n,s){this.children.forEachAt(t,e,((t,e,i)=>{t.formatAt(e,i,n,s)}))}insertAt(t,e,n){const[s,i]=this.children.find(t);if(s)s.insertAt(i,e,n);else{const t=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(t)}}insertBefore(t,e){null!=t.parent&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((n=>{t.insertBefore(n,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,n=!1){const[s,i]=this.children.find(e,n),r=[[this,e]];return s instanceof t?r.concat(s.path(i,n)):(null!=s&&r.push([s,i]),r)}removeChild(t){this.children.remove(t)}replaceWith(e,n){const s="string"==typeof e?this.scroll.create(e,n):e;return s instanceof t&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),((t,s,i)=>{const r=t.split(s,e);null!=r&&n.appendChild(r)})),n}splitAfter(t){const e=this.clone();for(;null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const n=[],s=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(n.push(...t.addedNodes),s.push(...t.removedNodes))})),s.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);null!=e&&(null==e.domNode.parentNode||e.domNode.parentNode===this.domNode)&&e.detach()})),n.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;null!=t.nextSibling&&(e=this.scroll.find(t.nextSibling));const n=y(t,this.scroll);(n.next!==e||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,e||void 0))})),this.enforceAllowedChildren()}};A.uiClass="";const N=A,v=class t extends N{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){if(e!==this.statics.blotName||n){const t=this.scroll.query(e,s.INLINE);if(null==t)return;t instanceof i?this.attributes.attribute(t,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}else this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap()}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){null!=this.formats()[n]||this.scroll.query(n,s.ATTRIBUTE)?this.isolate(t,e).format(n,i):super.formatAt(t,e,n,i)}optimize(e){super.optimize(e);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const s=this.next;s instanceof t&&s.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}(n,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(e,n){const s=super.wrap(e,n);return s instanceof t&&this.attributes.move(s),s}};v.allowedChildren=[v,g],v.blotName="inline",v.scope=s.INLINE_BLOT,v.tagName="SPAN";const E=v,x=class t extends N{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){const r=this.scroll.query(e,s.BLOCK);null!=r&&(r instanceof i?this.attributes.attribute(r,n):e!==this.statics.blotName||n?n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){null!=this.scroll.query(n,s.BLOCK)?this.format(n,i):super.formatAt(t,e,n,i)}insertAt(t,e,n){if(null==n||null!=this.scroll.query(e,s.INLINE))super.insertAt(t,e,n);else{const s=this.split(t);if(null==s)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,n);s.parent.insertBefore(t,s)}}}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};x.blotName="block",x.scope=s.BLOCK_BLOT,x.tagName="P",x.allowedChildren=[E,x,g];const L=x,S=class extends N{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.enforceAllowedChildren()}insertAt(t,e,n){super.insertAt(t,e,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};S.blotName="container",S.scope=s.BLOCK_BLOT;const T=S,k=class extends g{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,s){0===t&&e===this.length()?this.format(n,s):super.formatAt(t,e,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}},O={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},w=class extends N{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,O),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,e=s.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,n,s){this.update(),super.formatAt(t,e,n,s)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)t.push(s.pop());const i=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(n.has(t.domNode)||n.set(t.domNode,[]),e&&i(t.parent))},r=t=>{n.has(t.domNode)&&(t instanceof N&&t.children.forEach(r),n.delete(t.domNode),t.optimize(e))};let o=t;for(let e=0;o.length>0;e+=1){if(e>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((t=>{const e=this.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(i(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);i(e,!1),e instanceof N&&e.children.forEach((t=>{i(t,!1)}))}))):"attributes"===t.type&&i(e.prev)),i(e))})),this.children.forEach(r),o=Array.from(this.observer.takeRecords()),s=o.slice();s.length>0;)t.push(s.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const n=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return null==e?null:n.has(e.domNode)?(n.get(e.domNode).push(t),null):(n.set(e.domNode,[t]),e)})).forEach((t=>{null!=t&&t!==this&&n.has(t.domNode)&&t.update(n.get(t.domNode)||[],e)})),e.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),e),this.optimize(t,e)}};w.blotName="scroll",w.defaultChild=L,w.allowedChildren=[L,T],w.scope=s.BLOCK_BLOT,w.tagName="DIV";const C=w,q=class t extends g{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,n){null==n?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,e){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};q.blotName="text",q.scope=s.INLINE_BLOT;const R=q}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,n),r.exports}n.d=function(t,e){for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return function(){n.d(s,{default:function(){return K}});var t=n(729),e=n(276),i=n(912),r=n(3);class o extends r.ClassAttributor{add(t,e){let n=0;if("+1"===e||"-1"===e){const s=this.value(t)||0;n="+1"===e?s+1:s-1}else"number"==typeof e&&(n=e);return 0===n?(this.remove(t),!0):super.add(t,n.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}var l=new o("indent","ql-indent",{scope:r.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),a=n(698);class c extends a.Ay{static blotName="blockquote";static tagName="blockquote"}var h=c;class u extends a.Ay{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}var d=u,f=n(580),p=n(543);class m extends f.A{}m.blotName="list-container",m.tagName="OL";class g extends a.Ay{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){p.Ay.register(m)}constructor(t,e){super(t,e);const n=e.ownerDocument.createElement("span"),s=n=>{if(!t.isEnabled())return;const s=this.statics.formats(e,t);"checked"===s?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===s&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}g.blotName="list",g.tagName="LI",m.allowedChildren=[g],g.requiredContainer=m;var b=n(922),y=n(638),A=n(772),N=n(664),v=n(850);class E extends v.A{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}var x=E;class L extends v.A{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return S(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("href",this.constructor.sanitize(e)):super.format(t,e)}}function S(t,e){const n=document.createElement("a");n.href=t;const s=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(s)>-1}class T extends v.A{static blotName="script";static tagName=["SUB","SUP"];static create(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):super.create(t)}static formats(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}var k=T;class O extends v.A{static blotName="underline";static tagName="U"}var w=O;const C=["alt","height","width"];class q extends r.EmbedBlot{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return"string"==typeof t&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return C.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return S(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){C.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}var R=q;const B=["height","width"];class I extends a.zo{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return B.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static sanitize(t){return L.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){B.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}var D=I,M=n(404),U=n(398),_=n(78),j=n(266);const P=(0,_.A)("quill:toolbar");class z extends j.A{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar"),function(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((e=>{const n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((t=>{if("string"==typeof t)F(n,t);else{const e=Object.keys(t)[0],s=t[e];Array.isArray(s)?function(t,e,n){const s=document.createElement("select");s.classList.add(`ql-${e}`),n.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),s.appendChild(e)})),t.appendChild(s)}(n,e,s):F(n,e,s)}})),t.appendChild(n)}))}(e,this.options.container),t.container?.parentNode?.insertBefore(e,t.container),this.container=e}else if("string"==typeof this.options.container){const e=t.container.getRootNode();this.container=e.querySelector(this.options.container)}else this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];e&&this.addHandler(t,e)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(p.Ay.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):P.error("Container required for toolbar",this.options)}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]&&null==this.quill.scroll.query(e))return void P.warn("ignoring attaching to nonexistent format",e,t);const n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let s;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];s=!e.hasAttribute("selected")&&(e.value||!1)}else s=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,s);else if(this.quill.scroll.query(e).prototype instanceof r.EmbedBlot){if(s=prompt(`Enter ${e}`),!s)return;this.quill.updateContents((new U.Ay).retain(i.index).delete(i.length).insert({[e]:s}),p.Ay.sources.USER)}else this.quill.format(e,s,p.Ay.sources.USER);this.update(i)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((n=>{const[s,i]=n;if("SELECT"===i.tagName){let n=null;if(null==t)n=null;else if(null==e[s])n=i.querySelector("option[selected]");else if(!Array.isArray(e[s])){let t=e[s];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),n=i.querySelector(`option[value="${t}"]`)}null==n?(i.value="",i.selectedIndex=-1):n.selected=!0}else if(null==t)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const t=e[s],n=t===i.getAttribute("value")||null!=t&&t.toString()===i.getAttribute("value")||null==t&&!i.getAttribute("value");i.classList.toggle("ql-active",n),i.setAttribute("aria-pressed",n.toString())}else{const t=null!=e[s];i.classList.toggle("ql-active",t),i.setAttribute("aria-pressed",t.toString())}}))}}function F(t,e,n){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${e}`),s.setAttribute("aria-pressed","false"),null!=n?(s.value=n,s.setAttribute("aria-label",`${e}: ${n}`)):s.setAttribute("aria-label",e),t.appendChild(s)}z.DEFAULTS={},z.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,r.Scope.INLINE)&&this.quill.format(t,!1,p.Ay.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,p.Ay.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",p.Ay.sources.USER):t||"right"!==e||this.quill.format("align",!1,p.Ay.sources.USER),this.quill.format("direction",t,p.Ay.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),s=parseInt(n.indent||0,10);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===n.direction&&(e*=-1),this.quill.format("indent",s+e,p.Ay.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,p.Ay.sources.USER)},list(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,p.Ay.sources.USER):this.quill.format("list","unchecked",p.Ay.sources.USER):this.quill.format("list",t,p.Ay.sources.USER)}}},t.default.register({"attributors/attribute/direction":i.Mc,"attributors/class/align":e.qh,"attributors/class/background":b.l,"attributors/class/color":y.g3,"attributors/class/direction":i.sY,"attributors/class/font":A.q,"attributors/class/size":N.U,"attributors/style/align":e.Hu,"attributors/style/background":b.s,"attributors/style/color":y.JM,"attributors/style/direction":i.VL,"attributors/style/font":A.z,"attributors/style/size":N.r},!0),t.default.register({"formats/align":e.qh,"formats/direction":i.sY,"formats/indent":l,"formats/background":b.s,"formats/color":y.JM,"formats/font":A.q,"formats/size":N.U,"formats/blockquote":h,"formats/code-block":M.Ay,"formats/header":d,"formats/list":g,"formats/bold":x,"formats/code":M.Cy,"formats/italic":class extends x{static blotName="italic";static tagName=["EM","I"]},"formats/link":L,"formats/script":k,"formats/strike":class extends x{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":w,"formats/image":R,"formats/video":D,"modules/toolbar":z},!0);var K=t.default}(),s.default}()}));
8
+ !function(t,e){t.Quill=e()}(window,(function(){return function(){"use strict";var t={698:function(t,e,n){n.d(e,{Ay:function(){return a},Ji:function(){return h},zo:function(){return c}});var s=n(3),i=n(636),r=n(36),o=n(850),l=n(508);class a extends s.BlockBlot{cache={};delta(){return null==this.cache.delta&&(this.cache.delta=function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(s.LeafBlot).reduce(((t,n)=>0===n.length()?t:t.insert(n.value(),h(n,{},e))),new i.Ay).insert("\n",h(t))}(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,n,i){e<=0||(this.scroll.query(n,s.Scope.BLOCK)?t+e===this.length()&&this.format(n,i):super.formatAt(t,Math.min(e,this.length()-t-1),n,i),this.cache={})}insertAt(t,e,n){if(null!=n)return super.insertAt(t,e,n),void(this.cache={});if(0===e.length)return;const s=e.split("\n"),i=s.shift();i.length>0&&(t<this.length()-1||null==this.children.tail?super.insertAt(Math.min(t,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let r=this;s.reduce(((t,e)=>(r=r.split(t,!0),r.insertAt(0,e),e.length)),t+i.length)}insertBefore(t,e){const{head:n}=this.children;super.insertBefore(t,e),n instanceof r.A&&n.remove(),this.cache={}}length(){return null==this.cache.length&&(this.cache.length=super.length()+1),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){const e=this.clone();return 0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)}const n=super.split(t,e);return this.cache={},n}}a.blotName="block",a.tagName="P",a.defaultChild=r.A,a.allowedChildren=[r.A,o.A,s.EmbedBlot,l.A];class c extends s.EmbedBlot{attach(){super.attach(),this.attributes=new s.AttributorStore(this.domNode)}delta(){return(new i.Ay).insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const n=this.scroll.query(t,s.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}formatAt(t,e,n,s){this.format(n,s)}insertAt(t,e,n){if(null!=n)return void super.insertAt(t,e,n);const s=e.split("\n"),i=s.pop(),r=s.map((t=>{const e=this.scroll.create(a.blotName);return e.insertAt(0,t),e})),o=this.split(t);r.forEach((t=>{this.parent.insertBefore(t,o)})),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}}function h(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("formats"in t&&"function"==typeof t.formats&&(e={...e,...t.formats()},n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:h(t.parent,e,n))}c.scope=s.Scope.BLOCK_BLOT},36:function(t,e,n){var s=n(3);class i extends s.EmbedBlot{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}i.blotName="break",i.tagName="BR",e.A=i},580:function(t,e,n){var s=n(3);class i extends s.ContainerBlot{}e.A=i},541:function(t,e,n){var s=n(3),i=n(508);class r extends s.EmbedBlot{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\ufeff";static value(){}constructor(t,e,n){super(t,e),this.selection=n,this.textNode=document.createTextNode(r.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){null!=this.parent&&this.parent.removeChild(this)}format(t,e){if(0!==this.savedLength)return void super.format(t,e);let n=this,i=0;for(;null!=n&&n.statics.scope!==s.Scope.BLOCK_BLOT;)i+=n.offset(n.parent),n=n.parent;null!=n&&(this.savedLength=r.CONTENTS.length,n.optimize(),n.formatAt(i,r.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||null==this.parent)return null;const t=this.selection.getNativeRange();for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof i.A?this.prev:null,n=e?e.length():0,s=this.next instanceof i.A?this.next:null,o=s?s.text:"",{textNode:l}=this,a=l.data.split(r.CONTENTS).join("");let c;if(l.data=r.CONTENTS,e)c=e,(a||s)&&(e.insertAt(e.length(),a+o),s&&s.remove());else if(s)c=s,s.insertAt(0,a);else{const t=document.createTextNode(a);c=this.scroll.create(t),this.parent.insertBefore(c,this)}if(this.remove(),t){const i=(t,i)=>e&&t===e.domNode?i:t===l?n+i-1:s&&t===s.domNode?n+a.length+i:null,r=i(t.start.node,t.start.offset),o=i(t.end.node,t.end.offset);if(null!==r&&null!==o)return{startNode:c.domNode,startOffset:r,endNode:c.domNode,endOffset:o}}return null}update(t,e){if(t.some((t=>"characterData"===t.type&&t.target===this.textNode))){const t=this.restore();t&&(e.range=t)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if("A"===e.domNode.tagName){this.savedLength=r.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}e.A=r},746:function(t,e,n){var s=n(3),i=n(508);const r="\ufeff";class o extends s.EmbedBlot{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach((t=>{this.contentNode.appendChild(t)})),this.leftGuard=document.createTextNode(r),this.rightGuard=document.createTextNode(r),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e,n=null;const s=t.data.split(r).join("");if(t===this.leftGuard)if(this.prev instanceof i.A){const t=this.prev.length();this.prev.insertAt(t,s),n={startNode:this.prev.domNode,startOffset:t+s.length}}else e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this),n={startNode:e,startOffset:s.length};else t===this.rightGuard&&(this.next instanceof i.A?(this.next.insertAt(0,s),n={startNode:this.next.domNode,startOffset:s.length}):(e=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(e),this.next),n={startNode:e,startOffset:s.length}));return t.data=r,n}update(t,e){t.forEach((t=>{if("characterData"===t.type&&(t.target===this.leftGuard||t.target===this.rightGuard)){const n=this.restore(t.target);n&&(e.range=n)}}))}}e.A=o},850:function(t,e,n){var s=n(3),i=n(36),r=n(508);class o extends s.InlineBlot{static allowedChildren=[o,i.A,s.EmbedBlot,r.A];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const n=o.order.indexOf(t),s=o.order.indexOf(e);return n>=0||s>=0?n-s:t===e?0:t<e?-1:1}formatAt(t,e,n,i){if(o.compare(this.statics.blotName,n)<0&&this.scroll.query(n,s.Scope.BLOT)){const s=this.isolate(t,e);i&&s.wrap(n,i)}else super.formatAt(t,e,n,i)}optimize(t){if(super.optimize(t),this.parent instanceof o&&o.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}}e.A=o},508:function(t,e,n){n.d(e,{A:function(){return i},X:function(){return o}});var s=n(3);class i extends s.TextBlot{}const r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function o(t){return t.replace(/[&<>"']/g,(t=>r[t]))}},729:function(t,e,n){n.d(e,{default:function(){return B}});var s=n(543),i=n(698),r=n(36),o=n(580),l=n(541),a=n(746),c=n(850),h=n(3),u=n(636),d=n(200);function f(t){return t instanceof i.Ay||t instanceof i.zo}function p(t){return"function"==typeof t.updateContent}class m extends h.ScrollBlot{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=i.Ay;static allowedChildren=[i.Ay,i.zo,o.A];constructor(t,e,n){let{emitter:s}=n;super(t,e),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",(t=>this.handleDragStart(t)))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(d.A.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(d.A.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[n,s]=this.line(t),[o]=this.line(t+e);if(super.deleteAt(t,e),null!=o&&n!==o&&s>0){if(n instanceof i.zo||o instanceof i.zo)return void this.optimize();const t=o.children.head instanceof r.A?null:o.children.head;n.moveChildren(o,t),n.remove()}this.optimize()}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.optimize()}insertAt(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,h.Scope.BLOCK)){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t),null==n&&e.endsWith("\n")?t.insertAt(0,e.slice(0,-1),n):t.insertAt(0,e,n)}else{const t=this.scroll.create(e,n);this.appendChild(t)}else super.insertAt(t,e,n);this.optimize()}insertBefore(t,e){if(t.statics.scope===h.Scope.INLINE_BLOT){const n=this.scroll.create(this.statics.defaultChild.blotName);n.appendChild(t),super.insertBefore(n,e)}else super.insertBefore(t,e)}insertContents(t,e){const n=this.deltaToRenderBlocks(e.concat((new u.Ay).insert("\n"))),s=n.pop();if(null==s)return;this.batchStart();const r=n.shift();if(r){const e="block"===r.type&&(0===r.delta.length()||!this.descendant(i.zo,t)[0]&&t<this.length()),n="block"===r.type?r.delta:(new u.Ay).insert({[r.key]:r.value});g(this,t,n);const s="block"===r.type?1:0,o=t+n.length()+s;e&&this.insertAt(o-1,"\n");const l=(0,i.Ji)(this.line(t)[0]),a=u.xb.diff(l,r.attributes)||{};Object.keys(a).forEach((t=>{this.formatAt(o-1,1,t,a[t])})),t=o}let[o,l]=this.children.find(t);n.length&&(o&&(o=o.split(l),l=0),n.forEach((t=>{if("block"===t.type)g(this.createBlock(t.attributes,o||void 0),0,t.delta);else{const e=this.create(t.key,t.value);this.insertBefore(e,o||void 0),Object.keys(t.attributes).forEach((n=>{e.format(n,t.attributes[n])}))}}))),"block"===s.type&&s.delta.length()&&g(this,o?o.offset(o.scroll)+l:this.length(),s.delta),this.batchEnd(),this.optimize()}isEnabled(){return"true"===this.domNode.getAttribute("contenteditable")}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[n,s]=e;return n instanceof h.LeafBlot?[n,s]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(f,t)}lines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;const n=(t,e,s)=>{let i=[],r=s;return t.children.forEachAt(e,s,((t,e,s)=>{f(t)?i.push(t):t instanceof h.ContainerBlot&&(i=i.concat(n(t,e,r))),r-=s})),i};return n(this,t,e)}optimize(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(d.A.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch)return void(Array.isArray(t)&&(this.batch=this.batch.concat(t)));let e=d.A.sources.USER;"string"==typeof t&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),(t=t.filter((t=>{let{target:e}=t;const n=this.find(e,!0);return n&&!p(n)}))).length>0&&this.emitter.emit(d.A.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(d.A.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,n){const[s]=this.descendant((t=>t instanceof i.zo),t);s&&s.statics.blotName===e&&p(s)&&s.updateContent(n)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let n=new u.Ay;return t.forEach((t=>{const s=t?.insert;if(s)if("string"==typeof s){const i=s.split("\n");i.slice(0,-1).forEach((s=>{n.insert(s,t.attributes),e.push({type:"block",delta:n,attributes:t.attributes??{}}),n=new u.Ay}));const r=i[i.length-1];r&&n.insert(r,t.attributes)}else{const i=Object.keys(s)[0];if(!i)return;this.query(i,h.Scope.INLINE)?n.push(t):(n.length()&&e.push({type:"block",delta:n,attributes:{}}),n=new u.Ay,e.push({type:"blockEmbed",key:i,value:s[i],attributes:t.attributes??{}}))}})),n.length()&&e.push({type:"block",delta:n,attributes:{}}),e}createBlock(t,e){let n;const s={};Object.entries(t).forEach((t=>{let[e,i]=t;null!=this.query(e,h.Scope.BLOCK&h.Scope.BLOT)?n=e:s[e]=i}));const i=this.create(n||this.statics.defaultChild.blotName,n?t[n]:void 0);this.insertBefore(i,e||void 0);const r=i.length();return Object.entries(s).forEach((t=>{let[e,n]=t;i.formatAt(0,r,e,n)})),i}}function g(t,e,n){n.reduce(((e,n)=>{const s=u.Op.length(n);let r=n.attributes||{};if(null!=n.insert)if("string"==typeof n.insert){const s=n.insert;t.insertAt(e,s);const[o]=t.descendant(h.LeafBlot,e),l=(0,i.Ji)(o);r=u.xb.diff(l,r)||{}}else if("object"==typeof n.insert){const s=Object.keys(n.insert)[0];if(null==s)return e;if(t.insertAt(e,s,n.insert[s]),null!=t.scroll.query(s,h.Scope.INLINE)){const[n]=t.descendant(h.LeafBlot,e),s=(0,i.Ji)(n);r=u.xb.diff(s,r)||{}}}return Object.keys(r).forEach((n=>{t.formatAt(e,s,n,r[n])})),e+s}),e)}var b=m,y=n(508),A=n(584),N=n(266);class v extends N.A{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(s.Ay.events.EDITOR_CHANGE,((t,e,n,i)=>{t===s.Ay.events.SELECTION_CHANGE?e&&i!==s.Ay.sources.SILENT&&(this.currentRange=e):t===s.Ay.events.TEXT_CHANGE&&(this.ignoreChange||(this.options.userOnly&&i!==s.Ay.sources.USER?this.transform(e):this.record(e,n)),this.currentRange=x(this.currentRange,e))})),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",(t=>{"historyUndo"===t.inputType?(this.undo(),t.preventDefault()):"historyRedo"===t.inputType&&(this.redo(),t.preventDefault())}))}change(t,e){if(0===this.stack[t].length)return;const n=this.stack[t].pop();if(!n)return;const i=this.quill.getContents(),r=n.delta.invert(i);this.stack[e].push({delta:r,range:x(n.range,r)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,s.Ay.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(0===t.ops.length)return;this.stack.redo=[];let n=t.invert(e),s=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const t=this.stack.undo.pop();t&&(n=n.compose(t.delta),s=t.range)}else this.lastRecorded=i;0!==n.length()&&(this.stack.undo.push({delta:n,range:s}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){E(this.stack.undo,t),E(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,s.Ay.sources.USER);else{const e=function(t,e){const n=e.reduce(((t,e)=>t+(e.delete||0)),0);let s=e.length()-n;return function(t,e){const n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((e=>null!=t.query(e,h.Scope.BLOCK))))}(t,e)&&(s-=1),s}(this.quill.scroll,t.delta);this.quill.setSelection(e,s.Ay.sources.USER)}}}function E(t,e){let n=e;for(let e=t.length-1;e>=0;e-=1){const s=t[e];t[e]={delta:n.transform(s.delta,!0),range:s.range&&x(s.range,n)},n=s.delta.transform(n),0===t[e].delta.length()&&t.splice(e,1)}}function x(t,e){if(!t)return t;const n=e.transformPosition(t.index);return{index:n,length:e.transformPosition(t.index+t.length)-n}}var L=n(123);class S extends N.A{constructor(t,e){super(t,e),t.root.addEventListener("drop",(e=>{e.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(e.clientX,e.clientY);else if(document.caretPositionFromPoint){const t=document.caretPositionFromPoint(e.clientX,e.clientY);n=document.createRange(),n.setStart(t.offsetNode,t.offset),n.setEnd(t.offsetNode,t.offset)}const s=n&&t.selection.normalizeNative(n);if(s){const n=t.selection.normalizedToRange(s);e.dataTransfer?.files&&this.upload(n,e.dataTransfer.files)}}))}upload(t,e){const n=[];Array.from(e).forEach((t=>{t&&this.options.mimetypes?.includes(t.type)&&n.push(t)})),n.length>0&&this.options.handler.call(this,t,n)}}S.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(t,e){if(!this.quill.scroll.query("image"))return;const n=e.map((t=>new Promise((e=>{const n=new FileReader;n.onload=()=>{e(n.result)},n.readAsDataURL(t)}))));Promise.all(n).then((e=>{const n=e.reduce(((t,e)=>t.insert({image:e})),(new u.Ay).retain(t.index).delete(t.length));this.quill.updateContents(n,d.A.sources.USER),this.quill.setSelection(t.index+e.length,d.A.sources.SILENT)}))}};var T=S;const k=["insertText","insertReplacementText"];class O extends N.A{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",(t=>{this.handleBeforeInput(t)})),/Android/i.test(navigator.userAgent)||t.on(s.Ay.events.COMPOSITION_BEFORE_START,(()=>{this.handleCompositionStart()}))}deleteRange(t){(0,L.Xo)({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===t.length)return!1;if(e){const n=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents((new u.Ay).retain(t.index).insert(e,n),s.Ay.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,s.Ay.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!k.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||!0===e.collapsed)return;const n=function(t){return"string"==typeof t.data?t.data:t.dataTransfer?.types.includes("text/plain")?t.dataTransfer.getData("text/plain"):null}(t);if(null==n)return;const s=this.quill.selection.normalizeNative(e),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,n)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}var w=O;const C=/Mac/i.test(navigator.platform);class q extends N.A{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:n,event:i}=e;if(!(n instanceof h.ParentBlot&&n.uiNode))return!0;const r="rtl"===getComputedStyle(n.domNode).direction;return!!(r&&"ArrowRight"!==i.key||!r&&"ArrowLeft"!==i.key)||(this.quill.setSelection(t.index-1,t.length+(i.shiftKey?1:0),s.Ay.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",(t=>{!t.defaultPrevented&&(t=>"ArrowLeft"===t.key||"ArrowRight"===t.key||"ArrowUp"===t.key||"ArrowDown"===t.key||"Home"===t.key||!(!C||"a"!==t.key||!0!==t.ctrlKey))(t)&&this.ensureListeningToSelectionChange()}))}ensureListeningToSelectionChange(){this.selectionChangeDeadline=Date.now()+100,this.isListening||(this.isListening=!0,document.addEventListener("selectionchange",(()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()}),{once:!0}))}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(!0!==e.collapsed||0!==e.startOffset)return;const n=this.quill.scroll.find(e.startContainer);if(!(n instanceof h.ParentBlot&&n.uiNode))return;const s=document.createRange();s.setStartAfter(n.uiNode),s.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(s)}}var R=q;s.Ay.register({"blots/block":i.Ay,"blots/block/embed":i.zo,"blots/break":r.A,"blots/container":o.A,"blots/cursor":l.A,"blots/embed":a.A,"blots/inline":c.A,"blots/scroll":b,"blots/text":y.A,"modules/clipboard":A.Ay,"modules/history":v,"modules/keyboard":L.Ay,"modules/uploader":T,"modules/input":w,"modules/uiNode":R});var B=s.Ay},200:function(t,e,n){n.d(e,{A:function(){return l}});class s{listener;context;once;constructor(t,e,n=!1){this.listener=t,this.context=e,this.once=n}}class i{static prefixed=!1;_events=Object.create(null);_eventsCount=0;#t(t,e,n,i){if("function"!=typeof e)throw new TypeError("The listener must be a function");const r=new s(e,n||this,i),o=this._events[t];return Array.isArray(o)?o.push(r):o?this._events[t]=[o,r]:(this._events[t]=r,this._eventsCount++),this}clearEvent(t){0==--this._eventsCount?this._events=Object.create(null):delete this._events[t]}eventNames(){return 0===this._eventsCount?[]:Reflect.ownKeys(this._events)}listeners(t){const e=this._events[t];return e?Array.isArray(e)?e.map((t=>t.listener)):[e.listener]:[]}listenerCount(t){const e=this._events[t];return e?Array.isArray(e)?e.length:1:0}emit(t,...e){const n=this._events[t];return!!n&&(Array.isArray(n)?n.slice(0).forEach((n=>{n.once&&this.removeListener(t,n.listener,void 0,!0),n.listener.call(n.context,...e)})):(n.once&&this.removeListener(t,n.listener,void 0,!0),n.listener.call(n.context,...e)),!0)}on(t,e,n){return this.#t(t,e,n,!1)}once(t,e,n){return this.#t(t,e,n,!0)}removeListener(t,e,n,s){const i=this._events[t];if(!i)return this;if(!e)return this.clearEvent(t),this;if(Array.isArray(i)){const r=[];i.forEach((t=>{(t.listener!==e||s&&!t.once||n&&t.context!==n)&&r.push(t)})),r.length?this._events[t]=1===r.length?r[0]:r:this.clearEvent(t)}else i.listener!==e||s&&!i.once||n&&i.context!==n||this.clearEvent(t);return this}removeAllListeners(t){return t?this._events[t]&&this.clearEvent(t):(this._events=Object.create(null),this._eventsCount=0),this}off(t,e,n,s){return this.removeListener(t,e,n,s)}addListener(t,e,n){return this.on(t,e,n)}}const r=(0,n(78).A)("quill:events"),o=[];["selectionchange","mousedown","mouseup","click"].forEach((t=>{document.addEventListener(t,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];o.forEach((t=>{t.handleDOM(...e)}))}))}));var l=class extends i{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",r.error)}connect(){o.push(this)}disconnect(){o.splice(o.indexOf(this),1)}emit(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.log.call(r,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];const i=t.composedPath()[0];(this.domListeners[t.type]||[]).forEach((e=>{let{node:s,handler:r}=e;(i===s||((t,e)=>{if(e.getRootNode()===document)return t.contains(e);for(;!t.contains(e);){const t=e.getRootNode();if(!t)return!1;const n=t.host;if(!n)return!1;e=n}return!0})(s,i))&&r(t,...n)}))}listenDOM(t,e,n){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:n})}}},78:function(t,e){const n=["error","warn","log","info"];let s="warn";function i(t){if(s&&n.indexOf(t)<=n.indexOf(s)){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];console[t](...i)}}function r(t){return n.reduce(((e,n)=>(e[n]=i.bind(console,n,t),e)),{})}r.level=t=>{s=t},i.level=r.level,e.A=r},266:function(t,e){e.A=class{static DEFAULTS={};constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.quill=t,this.options=e}}},543:function(t,e,n){n.d(e,{Ay:function(){return B}});var s=n(3),i=n(636),r=n(698),o=n(36),l=n(541),a=n(508),c=n(298),h=n(857),u=n(697);const d=/^[ -~]*$/;function f(t,e,n){if(0===t.length){const[t]=g(n.pop());return e<=0?`</li></${t}>`:`</li></${t}>${f([],e-1,n)}`}const[{child:s,offset:i,length:r,indent:o,type:l},...a]=t,[c,h]=g(l);if(o>e)return n.push(l),o===e+1?`<${c}><li${h}>${p(s,i,r)}${f(a,o,n)}`:`<${c}><li>${f(t,e+1,n)}`;const u=n[n.length-1];if(o===e&&l===u)return`</li><li${h}>${p(s,i,r)}${f(a,o,n)}`;const[d]=g(n.pop());return`</li></${d}>${f(t,e-1,n)}`}function p(t,e,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("html"in t&&"function"==typeof t.html)return t.html(e,n);if(t instanceof a.A)return(0,a.X)(t.value().slice(e,e+n)).replaceAll(/ +/g,(t=>"&nbsp;".repeat(t.length-1)+" "));if(t instanceof s.ParentBlot){if("list-container"===t.statics.blotName){const s=[];return t.children.forEachAt(e,n,((t,e,n)=>{const i="formats"in t&&"function"==typeof t.formats?t.formats():{};s.push({child:t,offset:e,length:n,indent:i.indent||0,type:i.list})})),f(s,-1,[])}const s=[];if(t.children.forEachAt(e,n,((t,e,n)=>{s.push(p(t,e,n))})),i||"list"===t.statics.blotName)return s.join("");const{outerHTML:r,innerHTML:o}=t.domNode,[l,a]=r.split(`>${o}<`);return"<table"===l?`<table style="border: 1px solid #000;">${s.join("")}<${a}`:`${l}>${s.join("")}<${a}`}return t.domNode instanceof Element?t.domNode.outerHTML:""}function m(t,e){return Object.keys(e).reduce(((n,s)=>{if(null==t[s])return n;const i=e[s];return i===t[s]?n[s]=i:Array.isArray(i)?i.indexOf(t[s])<0?n[s]=i.concat([t[s]]):n[s]=i:n[s]=[i,t[s]],n}),{})}function g(t){const e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function b(t){return t.reduce(((t,e)=>{if("string"==typeof e.insert){const n=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(n,e.attributes)}return t.push(e)}),new i.Ay)}function y(t,e){let{index:n,length:s}=t;return new c.Q(n+e,s)}var A=class{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const n=b(t),o=new i.Ay;return function(t){const e=[];return t.forEach((t=>{"string"==typeof t.insert?t.insert.split("\n").forEach(((n,s)=>{s&&e.push({insert:"\n",attributes:t.attributes}),n&&e.push({insert:n,attributes:t.attributes})})):e.push(t)})),e}(n.ops.slice()).reduce(((t,n)=>{const l=i.Op.length(n);let c=n.attributes||{},h=!1,u=!1;if(null!=n.insert){if(o.retain(l),"string"==typeof n.insert){const o=n.insert;u=!o.endsWith("\n")&&(e<=t||!!this.scroll.descendant(r.zo,t)[0]),this.scroll.insertAt(t,o);const[l,a]=this.scroll.line(t);let h=Object.assign({},(0,r.Ji)(l));if(l instanceof r.Ay){const[t]=l.descendant(s.LeafBlot,a);t&&(h=Object.assign(h,(0,r.Ji)(t)))}c=i.xb.diff(h,c)||{}}else if("object"==typeof n.insert){const o=Object.keys(n.insert)[0];if(null==o)return t;const l=null!=this.scroll.query(o,s.Scope.INLINE);if(l)(e<=t||this.scroll.descendant(r.zo,t)[0])&&(u=!0);else if(t>0){const[e,n]=this.scroll.descendant(s.LeafBlot,t-1);e instanceof a.A?"\n"!==e.value()[n]&&(h=!0):e instanceof s.EmbedBlot&&e.statics.scope===s.Scope.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(t,o,n.insert[o]),l){const[e]=this.scroll.descendant(s.LeafBlot,t);if(e){const t=Object.assign({},(0,r.Ji)(e));c=i.xb.diff(t,c)||{}}}}e+=l}else if(o.push(n),null!==n.retain&&"object"==typeof n.retain){const e=Object.keys(n.retain)[0];if(null==e)return t;this.scroll.updateEmbedAt(t,e,n.retain[e])}Object.keys(c).forEach((e=>{this.scroll.formatAt(t,l,e,c[e])}));const d=h?1:0,f=u?1:0;return e+=d+f,o.retain(d),o.delete(f),t+l+d+f}),0),o.reduce(((t,e)=>"number"==typeof e.delete?(this.scroll.deleteAt(t,e.delete),t):t+i.Op.length(e)),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(n)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update((new i.Ay).retain(t).delete(e))}formatLine(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(n).forEach((s=>{this.scroll.lines(t,Math.max(e,1)).forEach((t=>{t.format(s,n[s])}))})),this.scroll.optimize();const s=(new i.Ay).retain(t).retain(e,(0,h.A)(n));return this.update(s)}formatText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e,s,n[s])}));const s=(new i.Ay).retain(t).retain(e,(0,h.A)(n));return this.update(s)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce(((t,e)=>t.concat(e.delta())),new i.Ay)}getFormat(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],i=[];0===e?this.scroll.path(t).forEach((t=>{const[e]=t;e instanceof r.Ay?n.push(e):e instanceof s.LeafBlot&&i.push(e)})):(n=this.scroll.lines(t,e),i=this.scroll.descendants(s.LeafBlot,t,e));const[o,l]=[n,i].map((t=>{const e=t.shift();if(null==e)return{};let n=(0,r.Ji)(e);for(;Object.keys(n).length>0;){const e=t.shift();if(null==e)return n;n=m((0,r.Ji)(e),n)}return n}));return{...o,...l}}getHTML(t,e){const[n,s]=this.scroll.line(t);if(n){const i=n.length();return n.length()>=s+e&&(0!==s||e!==i)?p(n,s,e,!0):p(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter((t=>"string"==typeof t.insert)).map((t=>t.insert)).join("")}insertContents(t,e){const n=b(e),s=(new i.Ay).retain(t).concat(n);return this.scroll.insertContents(t,n),this.update(s)}insertEmbed(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new i.Ay).retain(t).insert({[e]:n}))}insertText(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(n).forEach((s=>{this.scroll.formatAt(t,e.length,s,n[s])})),this.update((new i.Ay).retain(t).insert(e,(0,h.A)(n)))}isBlank(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==r.Ay.blotName)return!1;const e=t;return!(e.children.length>1)&&e.children.head instanceof o.A}removeFormat(t,e){const n=this.getText(t,e),[s,r]=this.scroll.line(t+e);let o=0,l=new i.Ay;null!=s&&(o=s.length()-r,l=s.delta().slice(r,r+o-1).insert("\n"));const a=this.getContents(t,e+o).diff((new i.Ay).insert(n).concat(l)),c=(new i.Ay).retain(t).concat(a);return this.applyDelta(c)}update(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const s=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(d)&&this.scroll.find(e[0].target)){const o=this.scroll.find(e[0].target),a=(0,r.Ji)(o),c=o.offset(this.scroll),h=e[0].oldValue.replace(l.A.CONTENTS,""),u=(new i.Ay).insert(h),d=(new i.Ay).insert(o.value()),f=n&&{oldRange:y(n.oldRange,-c),newRange:y(n.newRange,-c)};t=(new i.Ay).retain(c).concat(u.diff(d,f)).reduce(((t,e)=>e.insert?t.insert(e.insert,a):t.push(e)),new i.Ay),this.delta=s.compose(t)}else this.delta=this.getDelta(),t&&(0,u.A)(s.compose(t),this.delta)||(t=s.diff(this.delta,n));return t}},N=n(200),v=new WeakMap,E=n(78),x=n(266),L=n(746),S=class{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",(t=>{this.isComposing||this.handleCompositionStart(t)})),this.scroll.domNode.addEventListener("compositionend",(t=>{this.isComposing&&queueMicrotask((()=>{this.handleCompositionEnd(t)}))}))}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;!e||e instanceof L.A||(this.emitter.emit(N.A.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(N.A.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(N.A.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(N.A.events.COMPOSITION_END,t),this.isComposing=!1}},T=n(609);const k=t=>{const e=t.getBoundingClientRect(),n="offsetWidth"in t&&Math.abs(e.width)/t.offsetWidth||1,s="offsetHeight"in t&&Math.abs(e.height)/t.offsetHeight||1;return{top:e.top,right:e.left+t.clientWidth*n,bottom:e.top+t.clientHeight*s,left:e.left}},O=t=>{const e=parseInt(t,10);return Number.isNaN(e)?0:e},w=(t,e,n,s,i,r)=>t<n&&e>s?0:t<n?-(n-t+i):e>s?e-t>s-n?t+i-n:e-s+r:0;const C=["block","break","cursor","inline","scroll","text"];const q=(0,E.A)("quill"),R=new s.Registry;s.ParentBlot.uiClass="ql-ui";class B{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:R,theme:"default"};static events=N.A.events;static sources=N.A.sources;static version="2.0.3";static imports={delta:i.Ay,parchment:s,"core/module":x.A,"core/theme":T.A};static debug(t){!0===t&&(t="log"),E.A.level(t)}static find(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return v.get(t)||R.find(t,e)}static import(t){return null==this.imports[t]&&q.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if("string"!=typeof(arguments.length<=0?void 0:arguments[0])){const t=arguments.length<=0?void 0:arguments[0],e=!!(arguments.length<=1?void 0:arguments[1]),n="attrName"in t?t.attrName:t.blotName;"string"==typeof n?this.register(`formats/${n}`,t,e):Object.keys(t).forEach((n=>{this.register(n,t[n],e)}))}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],n=!!(arguments.length<=2?void 0:arguments[2]);null==this.imports[t]||n||q.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&"boolean"!=typeof e&&"abstract"!==e.blotName&&R.register(e),"function"==typeof e.register&&e.register(R)}}constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.options=function(t,e){const n=I(t);if(!n)throw new Error("Invalid Quill container");const i=!e.theme||e.theme===B.DEFAULTS.theme?T.A:B.import(`themes/${e.theme}`);if(!i)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:r,...o}=B.DEFAULTS,{modules:l,...a}=i.DEFAULTS;let c=D(e.modules);null!=c&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const h={...D(r),...D(l),...c},u={...o,...M(a),...M(e)};let d=e.registry;return d?e.formats&&q.warn('Ignoring "formats" option because "registry" is specified'):d=e.formats?((t,e,n)=>{const i=new s.Registry;return C.forEach((t=>{const n=e.query(t);n&&i.register(n)})),t.forEach((t=>{let s=e.query(t);s||n.error(`Cannot register "${t}" specified in "formats" config. Are you sure it was registered?`);let r=0;for(;s;)if(i.register(s),s="blotName"in s?s.requiredContainer??null:null,r+=1,r>100){n.error(`Cycle detected in registering blot requiredContainer: "${t}"`);break}})),i})(e.formats,u.registry,q):u.registry,{...u,registry:d,container:n,theme:i,modules:Object.entries(h).reduce(((t,e)=>{let[n,s]=e;if(!s)return t;const i=B.import(`modules/${n}`);return null==i?(q.error(`Cannot load ${n} module. Are you sure you registered it?`),t):{...t,[n]:{...i.DEFAULTS||{},...s}}}),{}),bounds:I(u.bounds)}}(t,e),this.container=this.options.container,null==this.container)return void q.error("Invalid Quill container",t);this.options.debug&&B.debug(this.options.debug);const n=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",v.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new N.A;const r=s.ScrollBlot.blotName,o=this.options.registry.query(r);if(!o||!("blotName"in o))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new o(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new A(this.scroll),this.selection=new c.A(this.scroll,this.emitter),this.composition=new S(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(N.A.events.EDITOR_CHANGE,(t=>{t===N.A.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())})),this.emitter.on(N.A.events.SCROLL_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),i=n&&s?{oldRange:n,newRange:s}:void 0;U.call(this,(()=>this.editor.update(null,e,i)),t)})),this.emitter.on(N.A.events.SCROLL_EMBED_UPDATE,((t,e)=>{const n=this.selection.lastRange,[s]=this.selection.getRange(),r=n&&s?{oldRange:n,newRange:s}:void 0;U.call(this,(()=>{const n=(new i.Ay).retain(t.offset(this)).retain({[t.statics.blotName]:e});return this.editor.update(n,[],r)}),B.sources.USER)})),n){const t=this.clipboard.convert({html:`${n}<p><br></p>`,text:"\n"});this.setContents(t)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){const e=t;(t=document.createElement("div")).classList.add(e)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,n){return[t,e,,n]=_(t,e,n),U.call(this,(()=>this.editor.deleteText(t,e)),n,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:N.A.sources.API;return U.call(this,(()=>{if(!this.hasFocus()){this.root.focus({preventScroll:!0});const t=this.selection.rangeToNative(this.selection.savedRange);this.selection.setNativeRange(...t)}const[n]=this.selection.getRange();let r=new i.Ay;if(null==n)return r;if(this.scroll.query(t,s.Scope.BLOCK))r=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(0===n.length)return this.selection.format(t,e),r;r=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,N.A.sources.SILENT),r}),n)}formatLine(t,e,n,s,i){let r;return[t,e,r,i]=_(t,e,n,s,i),U.call(this,(()=>this.editor.formatLine(t,e,r)),i,t,0)}formatText(t,e,n,s,i){let r;return[t,e,r,i]=_(t,e,n,s,i),U.call(this,(()=>this.editor.formatText(t,e,r)),i,t,0)}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=null;if(n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length),!n)return null;const s=this.container.getBoundingClientRect();return{bottom:n.bottom-s.top,height:n.height,left:n.left-s.left,right:n.right-s.left,top:n.top-s.top,width:n.width}}getContents(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t;return[t,e]=_(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=_(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return"number"==typeof t&&(e=e??this.getLength()-t),[t,e]=_(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:B.sources.API;return U.call(this,(()=>this.editor.insertEmbed(t,e,n)),s,t)}insertText(t,e,n,s,i){let r;return[t,,r,i]=_(t,0,n,s,i),U.call(this,(()=>this.editor.insertText(t,e,r)),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,n){return[t,e,,n]=_(t,e,n),U.call(this,(()=>this.editor.removeFormat(t,e)),n,t)}scrollRectIntoView(t){((t,e)=>{const n=t.ownerDocument;let s=e,i=t;for(;i;){const t=i===n.body,e=t?{top:0,right:window.visualViewport?.width??n.documentElement.clientWidth,bottom:window.visualViewport?.height??n.documentElement.clientHeight,left:0}:k(i),o=getComputedStyle(i),l=w(s.left,s.right,e.left,e.right,O(o.scrollPaddingLeft),O(o.scrollPaddingRight)),a=w(s.top,s.bottom,e.top,e.bottom,O(o.scrollPaddingTop),O(o.scrollPaddingBottom));if(l||a)if(t)n.defaultView?.scrollBy(l,a);else{const{scrollLeft:t,scrollTop:e}=i;a&&(i.scrollTop+=a),l&&(i.scrollLeft+=l);const n=i.scrollLeft-t,r=i.scrollTop-e;s={left:s.left-n,top:s.top-r,right:s.right-n,bottom:s.bottom-r}}i=t||"fixed"===o.position?null:(r=i).parentElement||r.getRootNode().host||null}var r})(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;return U.call(this,(()=>{t=new i.Ay(t);const e=this.getLength(),n=this.editor.deleteText(0,e),s=this.editor.insertContents(0,t),r=this.editor.deleteText(this.getLength()-1,1);return n.compose(s).compose(r)}),e)}setSelection(t,e,n){null==t?this.selection.setRange(null,e||B.sources.API):([t,e,,n]=_(t,e,n),this.selection.setRange(new c.Q(Math.max(0,t),e),n),n!==N.A.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;const n=(new i.Ay).insert(t);return this.setContents(n,e)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N.A.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N.A.sources.API;return U.call(this,(()=>(t=new i.Ay(t),this.editor.applyDelta(t))),e,!0)}}function I(t){return"string"==typeof t?document.querySelector(t):t}function D(t){return Object.entries(t??{}).reduce(((t,e)=>{let[n,s]=e;return{...t,[n]:!0===s?{}:s}}),{})}function M(t){return Object.fromEntries(Object.entries(t).filter((t=>void 0!==t[1])))}function U(t,e,n,s){if(!this.isEnabled()&&e===N.A.sources.USER&&!this.allowReadOnlyEdits)return new i.Ay;let r=null==n?null:this.getSelection();const o=this.editor.delta,l=t();if(null!=r&&(!0===n&&(n=r.index),null==s?r=j(r,l,e):0!==s&&(r=j(r,n,s,e)),this.setSelection(r,N.A.sources.SILENT)),l.length()>0){const t=[N.A.events.TEXT_CHANGE,l,o,e];this.emitter.emit(N.A.events.EDITOR_CHANGE,...t),e!==N.A.sources.SILENT&&this.emitter.emit(...t)}return l}function _(t,e,n,s,i){let r={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=s,s=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=s,s=n,n=e,e=0),"object"==typeof n?(r=n,i=s):"string"==typeof n&&(null!=s?r[n]=s:i=n),[t,e,r,i=i||N.A.sources.API]}function j(t,e,n,s){const i="number"==typeof n?n:0;if(null==t)return null;let r,o;return e&&"function"==typeof e.transformPosition?[r,o]=[t.index,t.index+t.length].map((t=>e.transformPosition(t,s!==N.A.sources.USER))):[r,o]=[t.index,t.index+t.length].map((t=>t<e||t===e&&s===N.A.sources.USER?t:i>=0?t+i:Math.max(e,t+i))),new c.Q(r,o-r)}},298:function(t,e,n){n.d(e,{Q:function(){return h}});var s=n(3),i=n(200),r=n(78),o=n(857),l=n(697);const a=(0,r.A)("quill:selection"),c=t=>{try{return"getSelection"in t&&"function"==typeof t.getSelection?t.getSelection():window.getSelection()}catch{return null}};class h{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.index=t,this.length=e}}function u(t,e){try{e.parentNode}catch(t){return!1}return t.contains(e)}e.A=class{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.rootDocument=this.root.getRootNode(),this.cursor=this.scroll.create("cursor",this),this.savedRange=new h(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",this.rootDocument,(()=>{this.mouseDown||this.composing||setTimeout(this.update.bind(this,i.A.sources.USER),1)})),this.emitter.on(i.A.events.SCROLL_BEFORE_UPDATE,(()=>{if(!this.hasFocus())return;const t=this.getNativeRange();null!=t&&t.start.node!==this.cursor.textNode&&this.emitter.once(i.A.events.SCROLL_UPDATE,((e,n)=>{try{this.root.contains(t.start.node)&&this.root.contains(t.end.node)&&this.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset);const s=n.some((t=>"characterData"===t.type||"childList"===t.type||"attributes"===t.type&&t.target===this.root));this.update(s?i.A.sources.SILENT:e)}catch(t){}}))})),this.emitter.on(i.A.events.SCROLL_OPTIMIZE,((t,e)=>{if(e.range){const{startNode:t,startOffset:n,endNode:s,endOffset:r}=e.range;this.setNativeRange(t,n,s,r),this.update(i.A.sources.SILENT)}})),this.update(i.A.sources.SILENT)}handleComposition(){this.emitter.on(i.A.events.COMPOSITION_BEFORE_START,(()=>{this.composing=!0})),this.emitter.on(i.A.events.COMPOSITION_END,(()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout((()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}),1)}}))}handleDragging(){this.emitter.listenDOM("mousedown",document.body,(()=>{this.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(()=>{this.mouseDown=!1,this.update(i.A.sources.USER)}))}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,s.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){const t=this.scroll.find(n.start.node,!1);if(null==t)return;if(t instanceof s.LeafBlot){const e=t.split(n.start.offset);t.parent.insertBefore(this.cursor,e)}else t.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.scroll.length();let s;t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;let[i,r]=this.scroll.leaf(t);if(null==i)return null;if(e>0&&r===i.length()){const[e]=this.scroll.leaf(t+1);if(e){const[n]=this.scroll.line(t),[s]=this.scroll.line(t+1);n===s&&(i=e,r=0)}}[s,r]=i.position(r,!0);const o=document.createRange();if(e>0)return o.setStart(s,r),[i,r]=this.scroll.leaf(t+e),null==i?null:([s,r]=i.position(r,!0),o.setEnd(s,r),o.getBoundingClientRect());let l,a="left";if(s instanceof Text){if(!s.data.length)return null;r<s.data.length?(o.setStart(s,r),o.setEnd(s,r+1)):(o.setStart(s,r-1),o.setEnd(s,r),a="right"),l=o.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;l=i.domNode.getBoundingClientRect(),r>0&&(a="right")}return{bottom:l.top+l.height,height:l.height,left:l[a],right:l[a],top:l.top,width:0}}getNativeRange(){const t=(t=>{const e=c(t);return e?.anchorNode?!e||!("getComposedRanges"in e)||"function"!=typeof e.getComposedRanges||t instanceof ShadowRoot&&"getSelection"in t?e.getRangeAt(0):e.getComposedRanges(t)[0]:null})(this.rootDocument);if(null==t)return null;const e=this.normalizeNative(t);return a.info("getNativeRange",e),e}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){const t=this.rootDocument;return t.activeElement===this.root||null!=t.activeElement&&u(this.root,t.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const n=e.map((t=>{const[e,n]=t,i=this.scroll.find(e,!0),r=i.offset(this.scroll);return 0===n?r:i instanceof s.LeafBlot?r+i.index(e,n):r+i.length()})),i=Math.min(Math.max(...n),this.scroll.length()-1),r=Math.min(i,...n);return new h(r,i-r)}normalizeNative(t){if(!u(this.root,t.startContainer)||!t.collapsed&&!u(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((t=>{let{node:e,offset:n}=t;for(;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;e=e.lastChild,n=e instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}rangeToNative(t){const e=this.scroll.length(),n=(t,n)=>{t=Math.min(e-1,t);const[s,i]=this.scroll.leaf(t);return s?s.position(i,n):[null,-1]};return[...n(t.index,!1),...n(t.index+t.length,!0)]}setNativeRange(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(a.info("setNativeRange",t,e,n,s),null!=t&&(null==this.root.parentNode||null==t.parentNode||null==n.parentNode))return;const r=c(this.rootDocument);if(null!=r)if(null!=t){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:o}=this.getNativeRange()||{};(null==o||i||t!==o.startContainer||e!==o.startOffset||n!==o.endContainer||s!==o.endOffset)&&(t instanceof Element&&"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),n instanceof Element&&"BR"===n.tagName&&(s=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode),t&&n&&"number"==typeof e&&"number"==typeof s&&r.setBaseAndExtent(t,e,n,s))}else r.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.A.sources.API;if("string"==typeof e&&(n=e,e=!1),a.info("setRange",t),null!=t){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(n)}update(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.A.sources.USER;const e=this.lastRange,[n,s]=this.getRange();if(this.lastRange=n,this.lastNative=s,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,l.A)(e,this.lastRange)){if(!this.composing&&null!=s&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const t=this.cursor.restore();t&&this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)}const n=[i.A.events.SELECTION_CHANGE,(0,o.A)(this.lastRange),(0,o.A)(e),t];this.emitter.emit(i.A.events.EDITOR_CHANGE,...n),t!==i.A.sources.SILENT&&this.emitter.emit(...n)}}}},609:function(t,e){class n{static DEFAULTS={modules:{}};static themes={default:n};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach((t=>{null==this.modules[t]&&this.addModule(t)}))}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}e.A=n},857:function(t,e){e.A=function(t){return JSON.parse(JSON.stringify(t))}},697:function(t,e){function n(t){return t!==Object(t)}e.A=function t(e,s){if(e===s)return!0;if(n(e)||n(s))return e===s;if(Object.keys(e).length!==Object.keys(s).length)return!1;for(const n in e){if(!(n in s))return!1;if(!t(e[n],s[n]))return!1}return!0}},276:function(t,e,n){n.d(e,{Hu:function(){return l},gS:function(){return r},qh:function(){return o}});var s=n(3);const i={scope:s.Scope.BLOCK,whitelist:["right","center","justify"]},r=new s.Attributor("align","align",i),o=new s.ClassAttributor("align","ql-align",i),l=new s.StyleAttributor("align","text-align",i)},922:function(t,e,n){n.d(e,{l:function(){return r},s:function(){return o}});var s=n(3),i=n(638);const r=new s.ClassAttributor("background","ql-bg",{scope:s.Scope.INLINE}),o=new i.a2("background","background-color",{scope:s.Scope.INLINE})},404:function(t,e,n){n.d(e,{Ay:function(){return u},Cy:function(){return d}});var s=n(698),i=n(36),r=n(541),o=n(850),l=n(508),a=n(580),c=n(543);class h extends a.A{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map((t=>t.length()<=1?"":t.domNode.innerText)).join("\n").slice(t,t+e)}html(t,e){return`<pre>\n${(0,l.X)(this.code(t,e))}\n</pre>`}}class u extends s.Ay{static TAB=" ";static register(){c.Ay.register(h)}}class d extends o.A{}d.blotName="code",d.tagName="CODE",u.blotName="code-block",u.className="ql-code-block",u.tagName="DIV",h.blotName="code-block-container",h.className="ql-code-block-container",h.tagName="DIV",h.allowedChildren=[u],u.allowedChildren=[l.A,i.A,r.A],u.requiredContainer=h},638:function(t,e,n){n.d(e,{JM:function(){return o},a2:function(){return i},g3:function(){return r}});var s=n(3);class i extends s.StyleAttributor{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map((t=>`00${parseInt(t,10).toString(16)}`.slice(-2))).join("")}`):e}}const r=new s.ClassAttributor("color","ql-color",{scope:s.Scope.INLINE}),o=new i("color","color",{scope:s.Scope.INLINE})},912:function(t,e,n){n.d(e,{Mc:function(){return r},VL:function(){return l},sY:function(){return o}});var s=n(3);const i={scope:s.Scope.BLOCK,whitelist:["rtl"]},r=new s.Attributor("direction","dir",i),o=new s.ClassAttributor("direction","ql-direction",i),l=new s.StyleAttributor("direction","direction",i)},772:function(t,e,n){n.d(e,{q:function(){return r},z:function(){return l}});var s=n(3);const i={scope:s.Scope.INLINE,whitelist:["serif","monospace"]},r=new s.ClassAttributor("font","ql-font",i);class o extends s.StyleAttributor{value(t){return super.value(t).replace(/["']/g,"")}}const l=new o("font","font-family",i)},664:function(t,e,n){n.d(e,{U:function(){return i},r:function(){return r}});var s=n(3);const i=new s.ClassAttributor("size","ql-size",{scope:s.Scope.INLINE,whitelist:["small","large","huge"]}),r=new s.StyleAttributor("size","font-size",{scope:s.Scope.INLINE,whitelist:["10px","18px","32px"]})},584:function(t,e,n){n.d(e,{Ay:function(){return O}});var s=n(3),i=n(636),r=n(698),o=n(78),l=n(266),a=n(543),c=n(276),h=n(922),u=n(404),d=n(638),f=n(912),p=n(772),m=n(664),g=n(123);const b=/font-weight:\s*normal/,y=["P","OL","UL"],A=t=>t&&y.includes(t.tagName),N=/\bmso-list:[^;]*ignore/i,v=/\bmso-list:[^;]*\bl(\d+)/i,E=/\bmso-list:[^;]*\blevel(\d+)/i,x=[function(t){"urn:schemas-microsoft-com:office:word"===t.documentElement.getAttribute("xmlns:w")&&(t=>{const e=Array.from(t.querySelectorAll("[style*=mso-list]")),n=[],s=[];e.forEach((t=>{(t.getAttribute("style")||"").match(N)?n.push(t):s.push(t)})),n.forEach((t=>t.parentNode?.removeChild(t)));const i=t.documentElement.innerHTML,r=s.map((t=>((t,e)=>{const n=t.getAttribute("style"),s=n?.match(v);if(!s)return null;const i=Number(s[1]),r=n?.match(E),o=r?Number(r[1]):1,l=new RegExp(`@list l${i}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),a=e.match(l);return{id:i,indent:o,type:a&&"bullet"===a[1]?"bullet":"ordered",element:t}})(t,i))).filter((t=>t));for(;r.length;){const t=[];let e=r.shift();for(;e;)t.push(e),e=r.length&&r[0]?.element===e.element.nextElementSibling&&r[0].id===e.id?r.shift():null;const n=document.createElement("ul");t.forEach((t=>{const e=document.createElement("li");e.setAttribute("data-list",t.type),t.indent>1&&e.setAttribute("class","ql-indent-"+(t.indent-1)),e.innerHTML=t.element.innerHTML,n.appendChild(e)}));const s=t[0]?.element,{parentNode:i}=s??{};s&&i?.replaceChild(n,s),t.slice(1).forEach((t=>{let{element:e}=t;i?.removeChild(e)}))}})(t)},function(t){t.querySelector('[id^="docs-internal-guid-"]')&&((t=>{Array.from(t.querySelectorAll('b[style*="font-weight"]')).filter((t=>t.getAttribute("style")?.match(b))).forEach((e=>{const n=t.createDocumentFragment();n.append(...e.childNodes),e.parentNode?.replaceChild(n,e)}))})(t),(t=>{Array.from(t.querySelectorAll("br")).filter((t=>A(t.previousElementSibling)&&A(t.nextElementSibling))).forEach((t=>{t.parentNode?.removeChild(t)}))})(t))}];const L=(0,o.A)("quill:clipboard"),S=[[Node.TEXT_NODE,function(t,e,n){let s=t.data;if("O:P"===t.parentElement?.tagName)return e.insert(s.trim());if(!B(t)){if(0===s.trim().length&&s.includes("\n")&&!function(t,e){return t.previousElementSibling&&t.nextElementSibling&&!q(t.previousElementSibling,e)&&!q(t.nextElementSibling,e)}(t,n))return e;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(null==t.previousSibling&&null!=t.parentElement&&q(t.parentElement,n)||t.previousSibling instanceof Element&&q(t.previousSibling,n))&&(s=s.replace(/^ /,"")),(null==t.nextSibling&&null!=t.parentElement&&q(t.parentElement,n)||t.nextSibling instanceof Element&&q(t.nextSibling,n))&&(s=s.replace(/ $/,"")),s=s.replaceAll(" "," ")}return e.insert(s)}],[Node.TEXT_NODE,M],["br",function(t,e){return C(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,function(t,e,n){const r=n.query(t);if(null==r)return e;if(r.prototype instanceof s.EmbedBlot){const e={},s=r.value(t);if(null!=s)return e[r.blotName]=s,(new i.Ay).insert(e,r.formats(t,n))}else if(r.prototype instanceof s.BlockBlot&&!C(e,"\n")&&e.insert("\n"),"blotName"in r&&"formats"in r&&"function"==typeof r.formats)return w(e,r.blotName,r.formats(t,n),n);return e}],[Node.ELEMENT_NODE,function(t,e,n){const i=s.Attributor.keys(t),r=s.ClassAttributor.keys(t),o=s.StyleAttributor.keys(t),l={};return i.concat(r).concat(o).forEach((e=>{let i=n.query(e,s.Scope.ATTRIBUTE);null!=i&&(l[i.attrName]=i.value(t),l[i.attrName])||(i=T[e],null==i||i.attrName!==e&&i.keyName!==e||(l[i.attrName]=i.value(t)||void 0),i=k[e],null==i||i.attrName!==e&&i.keyName!==e||(i=k[e],l[i.attrName]=i.value(t)||void 0))})),Object.entries(l).reduce(((t,e)=>{let[s,i]=e;return w(t,s,i,n)}),e)}],[Node.ELEMENT_NODE,function(t,e,n){const s={},r=t.style||{};return"italic"===r.fontStyle&&(s.italic=!0),"underline"===r.textDecoration&&(s.underline=!0),"line-through"===r.textDecoration&&(s.strike=!0),(r.fontWeight?.startsWith("bold")||parseInt(r.fontWeight,10)>=700)&&(s.bold=!0),e=Object.entries(s).reduce(((t,e)=>{let[s,i]=e;return w(t,s,i,n)}),e),parseFloat(r.textIndent||0)>0?(new i.Ay).insert("\t").concat(e):e}],["li",function(t,e,n){const s=n.query(t);if(null==s||"list"!==s.blotName||!C(e,"\n"))return e;let r=-1,o=t.parentNode;for(;null!=o;)["OL","UL"].includes(o.tagName)&&(r+=1),o=o.parentNode;return r<=0?e:e.reduce(((t,e)=>e.insert?e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,{indent:r,...e.attributes||{}}):t),new i.Ay)}],["ol, ul",function(t,e,n){const s=t;let i="OL"===s.tagName?"ordered":"bullet";const r=s.getAttribute("data-checked");return r&&(i="true"===r?"checked":"unchecked"),w(e,"list",i,n)}],["pre",function(t,e,n){const s=n.query("code-block");return w(e,"code-block",!s||!("formats"in s)||"function"!=typeof s.formats||s.formats(t,n),n)}],["tr",function(t,e,n){const s="TABLE"===t.parentElement?.tagName?t.parentElement:t.parentElement?.parentElement;return null!=s?w(e,"table",Array.from(s.querySelectorAll("tr")).indexOf(t)+1,n):e}],["b",D("bold")],["i",D("italic")],["strike",D("strike")],["style",function(){return new i.Ay}]],T=[c.gS,f.Mc].reduce(((t,e)=>(t[e.keyName]=e,t)),{}),k=[c.Hu,h.s,d.JM,f.VL,p.z,m.r].reduce(((t,e)=>(t[e.keyName]=e,t)),{});class O extends l.A{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",(t=>this.onCaptureCopy(t,!1))),this.quill.root.addEventListener("cut",(t=>this.onCaptureCopy(t,!0))),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],S.concat(this.options.matchers??[]).forEach((t=>{let[e,n]=t;this.addMatcher(e,n)}))}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:n}=t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s[u.Ay.blotName])return(new i.Ay).insert(n||"",{[u.Ay.blotName]:s[u.Ay.blotName]});if(!e)return(new i.Ay).insert(n||"",s);const r=this.convertHTML(e);return C(r,"\n")&&(null==r.ops[r.ops.length-1].attributes||s.table)?r.compose((new i.Ay).retain(r.length()-1).delete(1)):r}normalizeHTML(t){(t=>{t.documentElement&&x.forEach((e=>{e(t)}))})(t)}convertHTML(t){const e=(new DOMParser).parseFromString(t,"text/html");this.normalizeHTML(e);const n=e.body,s=new WeakMap,[i,r]=this.prepareMatching(n,s);return I(this.quill.scroll,n,i,r,s)}dangerouslyPasteHTML(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.Ay.sources.API;if("string"==typeof t){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,a.Ay.sources.SILENT)}else{const s=this.convert({html:e,text:""});this.quill.updateContents((new i.Ay).retain(t).concat(s),n),this.quill.setSelection(t+s.length(),a.Ay.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.defaultPrevented)return;t.preventDefault();const[n]=this.quill.selection.getRange();if(null==n)return;const{html:s,text:i}=this.onCopy(n,e);t.clipboardData?.setData("text/plain",i),t.clipboardData?.setData("text/html",s),e&&(0,g.Xo)({range:n,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter((t=>"#"!==t[0])).join("\n")}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(null==e)return;const n=t.clipboardData?.getData("text/html");let s=t.clipboardData?.getData("text/plain");if(!n&&!s){const e=t.clipboardData?.getData("text/uri-list");e&&(s=this.normalizeURIList(e))}const i=Array.from(t.clipboardData?.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(e,i);else{if(n&&i.length>0){const t=(new DOMParser).parseFromString(n,"text/html");if(1===t.body.childElementCount&&"IMG"===t.body.firstElementChild?.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:n,text:s})}}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:n,html:s}=e;const r=this.quill.getFormat(t.index),o=this.convert({text:n,html:s},r);L.log("onPaste",o,{text:n,html:s});const l=(new i.Ay).retain(t.index).delete(t.length).concat(o);this.quill.updateContents(l,a.Ay.sources.USER),this.quill.setSelection(l.length()-t.length,a.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const n=[],s=[];return this.matchers.forEach((i=>{const[r,o]=i;switch(r){case Node.TEXT_NODE:s.push(o);break;case Node.ELEMENT_NODE:n.push(o);break;default:Array.from(t.querySelectorAll(r)).forEach((t=>{if(e.has(t)){const n=e.get(t);n?.push(o)}else e.set(t,[o])}))}})),[n,s]}}function w(t,e,n,s){return s.query(e)?t.reduce(((t,s)=>{if(!s.insert)return t;if(s.attributes&&s.attributes[e])return t.push(s);const i=n?{[e]:n}:{};return t.insert(s.insert,{...i,...s.attributes})}),new i.Ay):t}function C(t,e){let n="";for(let s=t.ops.length-1;s>=0&&n.length<e.length;--s){const e=t.ops[s];if("string"!=typeof e.insert)break;n=e.insert+n}return n.slice(-1*e.length)===e}function q(t,e){if(!(t instanceof Element))return!1;const n=e.query(t);return!(n&&n.prototype instanceof s.EmbedBlot)&&["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(t.tagName.toLowerCase())}const R=new WeakMap;function B(t){return null!=t&&(R.has(t)||("PRE"===t.tagName?R.set(t,!0):R.set(t,B(t.parentNode))),R.get(t))}function I(t,e,n,s,r){return e.nodeType===e.TEXT_NODE?s.reduce(((n,s)=>s(e,n,t)),new i.Ay):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce(((i,o)=>{let l=I(t,o,n,s,r);return o.nodeType===e.ELEMENT_NODE&&(l=n.reduce(((e,n)=>n(o,e,t)),l),l=(r.get(o)||[]).reduce(((e,n)=>n(o,e,t)),l)),i.concat(l)}),new i.Ay):new i.Ay}function D(t){return(e,n,s)=>w(n,t,!0,s)}function M(t,e,n){if(!C(e,"\n")){if(q(t,n)&&(t.childNodes.length>0||t instanceof HTMLParagraphElement))return e.insert("\n");if(e.length()>0&&t.nextSibling){let s=t.nextSibling;for(;null!=s;){if(q(s,n))return e.insert("\n");const t=n.query(s);if(t&&t.prototype instanceof r.zo)return e.insert("\n");s=s.firstChild}}}return e}},123:function(t,e,n){n.d(e,{Ay:function(){return u},Xo:function(){return b}});var s=n(636),i=n(3),r=n(543),o=n(78),l=n(266),a=n(697);const c=(0,o.A)("quill:keyboard"),h=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class u extends l.A{static match(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((n=>!!e[n]!==t[n]&&null!==e[n]))&&(e.key===t.key||e.key===t.which)}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach((t=>{this.options.bindings[t]&&this.addBinding(this.options.bindings[t])})),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},(()=>{})),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=function(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!=typeof t)return null;t={...t}}return t.shortKey&&(t[h]=t.shortKey,delete t.shortKey),t}(t);null!=s?("function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),(Array.isArray(s.key)?s.key:[s.key]).forEach((t=>{const i={...s,key:t,...e,...n};this.bindings[i.key]=this.bindings[i.key]||[],this.bindings[i.key].push(i)}))):c.warn("Attempted to add invalid keyboard binding",s)}listen(){this.quill.root.addEventListener("keydown",(t=>{if(t.defaultPrevented||t.isComposing)return;if(229===t.keyCode&&("Enter"===t.key||"Backspace"===t.key))return;const e=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter((e=>u.match(t,e)));if(0===e.length)return;const n=r.Ay.find(t.target,!0);if(n&&n.scroll!==this.quill.scroll)return;const s=this.quill.getSelection();if(null==s||!this.quill.hasFocus())return;const[o,l]=this.quill.getLine(s.index),[c,h]=this.quill.getLeaf(s.index),[d,f]=0===s.length?[c,h]:this.quill.getLeaf(s.index+s.length),p=c instanceof i.TextBlot?c.value().slice(0,h):"",m=d instanceof i.TextBlot?d.value().slice(f):"",g={collapsed:0===s.length,empty:0===s.length&&o.length()<=1,format:this.quill.getFormat(s),line:o,offset:l,prefix:p,suffix:m,event:t};e.some((t=>{if(null!=t.collapsed&&t.collapsed!==g.collapsed)return!1;if(null!=t.empty&&t.empty!==g.empty)return!1;if(null!=t.offset&&t.offset!==g.offset)return!1;if(Array.isArray(t.format)){if(t.format.every((t=>null==g.format[t])))return!1}else if("object"==typeof t.format&&!Object.keys(t.format).every((e=>!0===t.format[e]?null!=g.format[e]:!1===t.format[e]?null==g.format[e]:(0,a.A)(t.format[e],g.format[e]))))return!1;return!(null!=t.prefix&&!t.prefix.test(g.prefix)||null!=t.suffix&&!t.suffix.test(g.suffix)||!0===t.handler.call(this,s,g,t))}))&&t.preventDefault()}))}handleBackspace(t,e){const n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(0===t.index||this.quill.getLength()<=1)return;let i={};const[o]=this.quill.getLine(t.index);let l=(new s.Ay).retain(t.index-n).delete(n);if(0===e.offset){const[e]=this.quill.getLine(t.index-1);if(e&&!("block"===e.statics.blotName&&e.length()<=1)){const e=o.formats(),n=this.quill.getFormat(t.index-1,1);if(i=s.xb.diff(e,n)||{},Object.keys(i).length>0){const e=(new s.Ay).retain(t.index+o.length()-2).retain(1,i);l=l.compose(e)}}}this.quill.updateContents(l,r.Ay.sources.USER),this.quill.focus()}handleDelete(t,e){const n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-n)return;let i={};const[o]=this.quill.getLine(t.index);let l=(new s.Ay).retain(t.index).delete(n);if(e.offset>=o.length()-1){const[e]=this.quill.getLine(t.index+1);if(e){const n=o.formats(),r=this.quill.getFormat(t.index,1);i=s.xb.diff(n,r)||{},Object.keys(i).length>0&&(l=l.retain(e.length()-1).retain(1,i))}}this.quill.updateContents(l,r.Ay.sources.USER),this.quill.focus()}handleDeleteRange(t){b({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const n=Object.keys(e.format).reduce(((t,n)=>(this.quill.scroll.query(n,i.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t)),{}),o=(new s.Ay).retain(t.index).delete(t.length).insert("\n",n);this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.focus()}}const d={bindings:{bold:m("bold"),italic:m("italic"),underline:m("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",r.Ay.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",r.Ay.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(t,e){null!=e.format.indent?this.quill.format("indent","-1",r.Ay.sources.USER):null!=e.format.list&&this.quill.format("list",!1,r.Ay.sources.USER)}},"indent code-block":f(!0),"outdent code-block":f(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(t){this.quill.deleteText(t.index-1,1,r.Ay.sources.USER)}},tab:{key:"Tab",handler(t,e){if(e.format.table)return!0;this.quill.history.cutoff();const n=(new s.Ay).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,r.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,r.Ay.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(t,e){const n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,r.Ay.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(t){const[e,n]=this.quill.getLine(t.index),i={...e.formats(),list:"checked"},o=(new s.Ay).retain(t.index).insert("\n",i).retain(e.length()-n-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(t,e){const[n,i]=this.quill.getLine(t.index),o=(new s.Ay).retain(t.index).insert("\n",e.format).retain(n.length()-i-1).retain(1,{header:null});this.quill.updateContents(o,r.Ay.sources.USER),this.quill.setSelection(t.index+1,r.Ay.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(t){const e=this.quill.getModule("table");if(e){const[n,i,o,l]=e.getTable(t),a=function(t,e,n,s){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===s?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}(0,i,o,l);if(null==a)return;let c=n.offset();if(a<0){const e=(new s.Ay).retain(c).insert("\n");this.quill.updateContents(e,r.Ay.sources.USER),this.quill.setSelection(t.index+1,t.length,r.Ay.sources.SILENT)}else if(a>0){c+=n.length();const t=(new s.Ay).retain(c).insert("\n");this.quill.updateContents(t,r.Ay.sources.USER),this.quill.setSelection(c,r.Ay.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(t,e){const{event:n,line:s}=e,i=s.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,r.Ay.sources.USER):this.quill.setSelection(i+s.length(),r.Ay.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(t,e){if(null==this.quill.scroll.query("list"))return!0;const{length:n}=e.prefix,[i,o]=this.quill.getLine(t.index);if(o>n)return!0;let l;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",r.Ay.sources.USER),this.quill.history.cutoff();const a=(new s.Ay).retain(t.index-o).delete(n+1).retain(i.length()-2-o).retain(1,{list:l});return this.quill.updateContents(a,r.Ay.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,r.Ay.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(t){const[e,n]=this.quill.getLine(t.index);let i=2,o=e;for(;null!=o&&o.length()<=1&&o.formats()["code-block"];)if(o=o.prev,i-=1,i<=0){const i=(new s.Ay).retain(t.index+e.length()-n-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,r.Ay.sources.USER),this.quill.setSelection(t.index-1,r.Ay.sources.SILENT),!1}return!0}},"embed left":p("ArrowLeft",!1),"embed left shift":p("ArrowLeft",!0),"embed right":p("ArrowRight",!1),"embed right shift":p("ArrowRight",!0),"table down":g(!1),"table up":g(!0)}};function f(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler(e,n){let{event:s}=n;const i=this.quill.scroll.query("code-block"),{TAB:o}=i;if(0===e.length&&!s.shiftKey)return this.quill.insertText(e.index,o,r.Ay.sources.USER),void this.quill.setSelection(e.index+o.length,r.Ay.sources.SILENT);const l=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:c}=e;l.forEach(((e,n)=>{t?(e.insertAt(0,o),0===n?a+=o.length:c+=o.length):e.domNode.textContent.startsWith(o)&&(e.deleteAt(0,o.length),0===n?a-=o.length:c-=o.length)})),this.quill.update(r.Ay.sources.USER),this.quill.setSelection(a,c,r.Ay.sources.SILENT)}}}function p(t,e){return{key:t,shiftKey:e,altKey:null,["ArrowLeft"===t?"prefix":"suffix"]:/^$/,handler(n){let{index:s}=n;"ArrowRight"===t&&(s+=n.length+1);const[o]=this.quill.getLeaf(s);return!(o instanceof i.EmbedBlot&&("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,r.Ay.sources.USER):this.quill.setSelection(n.index-1,r.Ay.sources.USER):e?this.quill.setSelection(n.index,n.length+1,r.Ay.sources.USER):this.quill.setSelection(n.index+n.length+1,r.Ay.sources.USER),1))}}}function m(t){return{key:t[0],shortKey:!0,handler(e,n){this.quill.format(t,!n.format[t],r.Ay.sources.USER)}}}function g(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,n){const s=t?"prev":"next",i=n.line,o=i.parent[s];if(null!=o){if("table-row"===o.statics.blotName){let t=o.children.head,e=i;for(;null!=e.prev;)e=e.prev,t=t.next;const s=t.offset(this.quill.scroll)+Math.min(n.offset,t.length()-1);this.quill.setSelection(s,0,r.Ay.sources.USER)}}else{const e=i.table()[s];null!=e&&(t?this.quill.setSelection(e.offset(this.quill.scroll)+e.length()-1,0,r.Ay.sources.USER):this.quill.setSelection(e.offset(this.quill.scroll),0,r.Ay.sources.USER))}return!1}}}function b(t){let{quill:e,range:n}=t;const i=e.getLines(n);let o={};if(i.length>1){const t=i[0].formats(),e=i[i.length-1].formats();o=s.xb.diff(e,t)||{}}e.deleteText(n,r.Ay.sources.USER),Object.keys(o).length>0&&e.formatLine(n.index,1,o,r.Ay.sources.USER),e.setSelection(n.index,r.Ay.sources.SILENT)}u.DEFAULTS=d},636:function(t,e,n){n.d(e,{Ay:function(){return L},Op:function(){return A},xb:function(){return y}});var s,i,r=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,u=((t,e,n)=>(n=null!=t?r(c(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of a(e))h.call(t,n)||undefined===n||o(t,n,{get:()=>e[n],enumerable:!(s=l(e,n))||s.enumerable});return t})(t&&t.__esModule?n:o(n,"default",{value:t,enumerable:!0}),t)))((s={"node_modules/.pnpm/fast-diff@1.3.0/node_modules/fast-diff/diff.js"(t,e){var n=-1;function s(t,e,p,m,g){if(t===e)return t?[[0,t]]:[];if(null!=p){var b=function(t,e,n){var s="number"==typeof n?{index:n,length:0}:n.oldRange,i="number"==typeof n?null:n.newRange,r=t.length,o=e.length;if(0===s.length&&(null===i||0===i.length)){var l=s.index,a=t.slice(0,l),c=t.slice(l),h=i?i.index:null,u=l+o-r;if((null===h||h===u)&&!(u<0||u>o)){var d=e.slice(0,u);if((m=e.slice(u))===c){var f=Math.min(l,u);if((b=a.slice(0,f))===(N=d.slice(0,f)))return y(b,a.slice(f),d.slice(f),c)}}if(null===h||h===l){var p=l,m=(d=e.slice(0,p),e.slice(p));if(d===a){var g=Math.min(r-p,o-p);if((A=c.slice(c.length-g))===(v=m.slice(m.length-g)))return y(a,c.slice(0,c.length-g),m.slice(0,m.length-g),A)}}}if(s.length>0&&i&&0===i.length){var b=t.slice(0,s.index),A=t.slice(s.index+s.length);if(!(o<(f=b.length)+(g=A.length))){var N=e.slice(0,f),v=e.slice(o-g);if(b===N&&A===v)return y(b,t.slice(f,r-g),e.slice(f,o-g),A)}}return null}(t,e,p);if(b)return b}var A=r(t,e),N=t.substring(0,A);A=l(t=t.substring(A),e=e.substring(A));var v=t.substring(t.length-A),E=function(t,e){var o;if(!t)return[[1,e]];if(!e)return[[n,t]];var a=t.length>e.length?t:e,c=t.length>e.length?e:t,h=a.indexOf(c);if(-1!==h)return o=[[1,a.substring(0,h)],[0,c],[1,a.substring(h+c.length)]],t.length>e.length&&(o[0][0]=o[2][0]=n),o;if(1===c.length)return[[n,t],[1,e]];var u=function(t,e){var n=t.length>e.length?t:e,s=t.length>e.length?e:t;if(n.length<4||2*s.length<n.length)return null;function i(t,e,n){for(var s,i,o,a,c=t.substring(n,n+Math.floor(t.length/4)),h=-1,u="";-1!==(h=e.indexOf(c,h+1));){var d=r(t.substring(n),e.substring(h)),f=l(t.substring(0,n),e.substring(0,h));u.length<f+d&&(u=e.substring(h-f,h)+e.substring(h,h+d),s=t.substring(0,n-f),i=t.substring(n+d),o=e.substring(0,h-f),a=e.substring(h+d))}return 2*u.length>=t.length?[s,i,o,a,u]:null}var o,a,c,h,u,d=i(n,s,Math.ceil(n.length/4)),f=i(n,s,Math.ceil(n.length/2));return d||f?(o=f?d&&d[4].length>f[4].length?d:f:d,t.length>e.length?(a=o[0],c=o[1],h=o[2],u=o[3]):(h=o[0],u=o[1],a=o[2],c=o[3]),[a,c,h,u,o[4]]):null}(t,e);if(u){var d=u[0],f=u[1],p=u[2],m=u[3],g=u[4],b=s(d,p),y=s(f,m);return b.concat([[0,g]],y)}return function(t,e){for(var s=t.length,r=e.length,o=Math.ceil((s+r)/2),l=o,a=2*o,c=new Array(a),h=new Array(a),u=0;u<a;u++)c[u]=-1,h[u]=-1;c[l+1]=0,h[l+1]=0;for(var d=s-r,f=d%2!=0,p=0,m=0,g=0,b=0,y=0;y<o;y++){for(var A=-y+p;A<=y-m;A+=2){for(var N=l+A,v=(T=A===-y||A!==y&&c[N-1]<c[N+1]?c[N+1]:c[N-1]+1)-A;T<s&&v<r&&t.charAt(T)===e.charAt(v);)T++,v++;if(c[N]=T,T>s)m+=2;else if(v>r)p+=2;else if(f&&(L=l+d-A)>=0&&L<a&&-1!==h[L]&&T>=(x=s-h[L]))return i(t,e,T,v)}for(var E=-y+g;E<=y-b;E+=2){for(var x,L=l+E,S=(x=E===-y||E!==y&&h[L-1]<h[L+1]?h[L+1]:h[L-1]+1)-E;x<s&&S<r&&t.charAt(s-x-1)===e.charAt(r-S-1);)x++,S++;if(h[L]=x,x>s)b+=2;else if(S>r)g+=2;else if(!f){var T;if((N=l+d-E)>=0&&N<a&&-1!==c[N]&&(v=l+(T=c[N])-N,T>=(x=s-x)))return i(t,e,T,v)}}}return[[n,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-A),e=e.substring(0,e.length-A));return N&&E.unshift([0,N]),v&&E.push([0,v]),f(E,g),m&&function(t){for(var e=!1,s=[],i=0,r=null,p=0,m=0,g=0,b=0,y=0;p<t.length;)0==t[p][0]?(s[i++]=p,m=b,g=y,b=0,y=0,r=t[p][1]):(1==t[p][0]?b+=t[p][1].length:y+=t[p][1].length,r&&r.length<=Math.max(m,g)&&r.length<=Math.max(b,y)&&(t.splice(s[i-1],0,[n,r]),t[s[i-1]+1][0]=1,i--,p=--i>0?s[i-1]:-1,m=0,g=0,b=0,y=0,r=null,e=!0)),p++;for(e&&f(t),function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),s=e.charAt(0),i=n.match(a),r=s.match(a),o=i&&n.match(c),l=r&&s.match(c),f=o&&n.match(h),p=l&&s.match(h),m=f&&t.match(u),g=p&&e.match(d);return m||g?5:f||p?4:i&&!o&&l?3:o||l?2:i||r?1:0}for(var n=1;n<t.length-1;){if(0==t[n-1][0]&&0==t[n+1][0]){var s=t[n-1][1],i=t[n][1],r=t[n+1][1],o=l(s,i);if(o){var f=i.substring(i.length-o);s=s.substring(0,s.length-o),i=f+i.substring(0,i.length-o),r=f+r}for(var p=s,m=i,g=r,b=e(s,i)+e(i,r);i.charAt(0)===r.charAt(0);){s+=i.charAt(0),i=i.substring(1)+r.charAt(0),r=r.substring(1);var y=e(s,i)+e(i,r);y>=b&&(b=y,p=s,m=i,g=r)}t[n-1][1]!=p&&(p?t[n-1][1]=p:(t.splice(n-1,1),n--),t[n][1]=m,g?t[n+1][1]=g:(t.splice(n+1,1),n--))}n++}}(t),p=1;p<t.length;){if(t[p-1][0]==n&&1==t[p][0]){var A=t[p-1][1],N=t[p][1],v=o(A,N),E=o(N,A);v>=E?(v>=A.length/2||v>=N.length/2)&&(t.splice(p,0,[0,N.substring(0,v)]),t[p-1][1]=A.substring(0,A.length-v),t[p+1][1]=N.substring(v),p++):(E>=A.length/2||E>=N.length/2)&&(t.splice(p,0,[0,A.substring(0,E)]),t[p-1][0]=1,t[p-1][1]=N.substring(0,N.length-E),t[p+1][0]=n,t[p+1][1]=A.substring(E),p++),p++}p++}}(E),E}function i(t,e,n,i){var r=t.substring(0,n),o=e.substring(0,i),l=t.substring(n),a=e.substring(i),c=s(r,o),h=s(l,a);return c.concat(h)}function r(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,s=Math.min(t.length,e.length),i=s,r=0;n<i;)t.substring(r,i)==e.substring(r,i)?r=n=i:s=i,i=Math.floor((s-n)/2+n);return p(t.charCodeAt(i-1))&&i--,i}function o(t,e){var n=t.length,s=e.length;if(0==n||0==s)return 0;n>s?t=t.substring(n-s):n<s&&(e=e.substring(0,n));var i=Math.min(n,s);if(t==e)return i;for(var r=0,o=1;;){var l=t.substring(i-o),a=e.indexOf(l);if(-1==a)return r;o+=a,0!=a&&t.substring(i-o)!=e.substring(0,o)||(r=o,o++)}}function l(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,s=Math.min(t.length,e.length),i=s,r=0;n<i;)t.substring(t.length-i,t.length-r)==e.substring(e.length-i,e.length-r)?r=n=i:s=i,i=Math.floor((s-n)/2+n);return m(t.charCodeAt(t.length-i))&&i--,i}var a=/[^a-zA-Z0-9]/,c=/\s/,h=/[\r\n]/,u=/\n\r?\n$/,d=/^\r?\n\r?\n/;function f(t,e){t.push([0,""]);for(var s,i=0,o=0,a=0,c="",h="";i<t.length;)if(i<t.length-1&&!t[i][1])t.splice(i,1);else switch(t[i][0]){case 1:a++,h+=t[i][1],i++;break;case n:o++,c+=t[i][1],i++;break;case 0:var u=i-a-o-1;if(e){if(u>=0&&b(t[u][1])){var d=t[u][1].slice(-1);if(t[u][1]=t[u][1].slice(0,-1),c=d+c,h=d+h,!t[u][1]){t.splice(u,1),i--;var p=u-1;t[p]&&1===t[p][0]&&(a++,h=t[p][1]+h,p--),t[p]&&t[p][0]===n&&(o++,c=t[p][1]+c,p--),u=p}}g(t[i][1])&&(d=t[i][1].charAt(0),t[i][1]=t[i][1].slice(1),c+=d,h+=d)}if(i<t.length-1&&!t[i][1]){t.splice(i,1);break}if(c.length>0||h.length>0){c.length>0&&h.length>0&&(0!==(s=r(h,c))&&(u>=0?t[u][1]+=h.substring(0,s):(t.splice(0,0,[0,h.substring(0,s)]),i++),h=h.substring(s),c=c.substring(s)),0!==(s=l(h,c))&&(t[i][1]=h.substring(h.length-s)+t[i][1],h=h.substring(0,h.length-s),c=c.substring(0,c.length-s)));var m=a+o;0===c.length&&0===h.length?(t.splice(i-m,m),i-=m):0===c.length?(t.splice(i-m,m,[1,h]),i=i-m+1):0===h.length?(t.splice(i-m,m,[n,c]),i=i-m+1):(t.splice(i-m,m,[n,c],[1,h]),i=i-m+2)}0!==i&&0===t[i-1][0]?(t[i-1][1]+=t[i][1],t.splice(i,1)):i++,a=0,o=0,c="",h=""}""===t[t.length-1][1]&&t.pop();var y=!1;for(i=1;i<t.length-1;)0===t[i-1][0]&&0===t[i+1][0]&&(t[i][1].substring(t[i][1].length-t[i-1][1].length)===t[i-1][1]?(t[i][1]=t[i-1][1]+t[i][1].substring(0,t[i][1].length-t[i-1][1].length),t[i+1][1]=t[i-1][1]+t[i+1][1],t.splice(i-1,1),y=!0):t[i][1].substring(0,t[i+1][1].length)==t[i+1][1]&&(t[i-1][1]+=t[i+1][1],t[i][1]=t[i][1].substring(t[i+1][1].length)+t[i+1][1],t.splice(i+1,1),y=!0)),i++;y&&f(t,e)}function p(t){return t>=55296&&t<=56319}function m(t){return t>=56320&&t<=57343}function g(t){return m(t.charCodeAt(0))}function b(t){return p(t.charCodeAt(t.length-1))}function y(t,e,s,i){return b(t)||g(i)?null:function(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}([[0,t],[n,e],[1,s],[0,i]])}function A(t,e,n,i){return s(t,e,n,i,!0)}A.INSERT=1,A.DELETE=n,A.EQUAL=0,e.exports=A}},function(){return i||(0,s[a(s)[0]])((i={exports:{}}).exports,i),i.exports})()),d=function(t){return JSON.parse(JSON.stringify(t))};function f(t){return t!==Object(t)}var p,m,g=function t(e,n){if(e===n)return!0;if(f(e)||f(n))return e===n;if(Object.keys(e).length!==Object.keys(n).length)return!1;for(let s in e){if(!(s in n))return!1;if(!t(e[s],n[s]))return!1}return!0};(m=p||(p={})).compose=function(t={},e={},n=!1){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});let s=d(e);n||(s=Object.keys(s).reduce(((t,e)=>(null!=s[e]&&(t[e]=s[e]),t)),{}));for(const n in t)void 0!==t[n]&&void 0===e[n]&&(s[n]=t[n]);return Object.keys(s).length>0?s:void 0},m.diff=function(t={},e={}){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});const n=Object.keys(t).concat(Object.keys(e)).reduce(((n,s)=>(g(t[s],e[s])||(n[s]=void 0===e[s]?null:e[s]),n)),{});return Object.keys(n).length>0?n:void 0},m.invert=function(t={},e={}){t=t||{};const n=Object.keys(e).reduce(((n,s)=>(e[s]!==t[s]&&void 0!==t[s]&&(n[s]=e[s]),n)),{});return Object.keys(t).reduce(((n,s)=>(t[s]!==e[s]&&void 0===e[s]&&(n[s]=null),n)),n)},m.transform=function(t,e,n=!1){if("object"!=typeof t)return e;if("object"!=typeof e)return;if(!n)return e;const s=Object.keys(e).reduce(((n,s)=>(void 0===t[s]&&(n[s]=e[s]),n)),{});return Object.keys(s).length>0?s:void 0};var b,y=p;(b||(b={})).length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"object"==typeof t.retain&&null!==t.retain?1:"string"==typeof t.insert?t.insert.length:1};var A=b,N=class{ops;index;offset;constructor(t){this.ops=t,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(t){t||(t=1/0);const e=this.ops[this.index];if(e){const n=this.offset,s=A.length(e);if(t>=s-n?(t=s-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};{const s={};return e.attributes&&(s.attributes=e.attributes),"number"==typeof e.retain?s.retain=t:"object"==typeof e.retain&&null!==e.retain?s.retain=e.retain:"string"==typeof e.insert?s.insert=e.insert.substr(n,t):s.insert=e.insert,s}}return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?A.length(this.ops[this.index])-this.offset:1/0}peekType(){const t=this.ops[this.index];return t?"number"==typeof t.delete?"delete":"number"==typeof t.retain||"object"==typeof t.retain&&null!==t.retain?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);{const t=this.offset,e=this.index,n=this.next(),s=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(s)}}return[]}},v=String.fromCharCode(0),E=(t,e)=>{if("object"!=typeof t||null===t)throw new Error("cannot retain a "+typeof t);if("object"!=typeof e||null===e)throw new Error("cannot retain a "+typeof e);const n=Object.keys(t)[0];if(!n||n!==Object.keys(e)[0])throw new Error(`embed types not matched: ${n} != ${Object.keys(e)[0]}`);return[n,t[n],e[n]]},x=class t{static Op=A;static OpIterator=N;static AttributeMap=y;static handlers={};static registerEmbed(t,e){this.handlers[t]=e}static unregisterEmbed(t){delete this.handlers[t]}static getHandler(t){const e=this.handlers[t];if(!e)throw new Error(`no handlers for embed type "${t}"`);return e}ops;inverted;constructor(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?(this.ops=t.ops,this.inverted=t.inverted):this.ops=[]}insert(t,e){const n={};return"string"==typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))}delete(t){return t<=0?this:this.push({delete:t})}retain(t,e){if("number"==typeof t&&t<=0)return this;const n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)}push(t){let e=this.ops.length,n=this.ops[e-1];if(t=d(t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,n=this.ops[e-1],"object"!=typeof n))return this.ops.unshift(t),this;if(g(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this}chop(){const t=this.ops[this.ops.length-1];return t&&"number"==typeof t.retain&&!t.attributes&&this.ops.pop(),this}filter(t){return this.ops.filter(t)}forEach(t){this.ops.forEach(t)}map(t){return this.ops.map(t)}partition(t){const e=[],n=[];return this.forEach((s=>{(t(s)?e:n).push(s)})),[e,n]}reduce(t,e){return this.ops.reduce(t,e)}changeLength(){return this.reduce(((t,e)=>e.insert?t+A.length(e):e.delete?t-e.delete:t),0)}length(){return this.reduce(((t,e)=>t+A.length(e)),0)}slice(e=0,n=1/0){const s=[],i=new N(this.ops);let r=0;for(;r<n&&i.hasNext();){let t;r<e?t=i.next(e-r):(t=i.next(n-r),s.push(t)),r+=A.length(t)}return new t(s)}compose(e){const n=new N(this.ops),s=new N(e.ops),i=[],r=s.peek();if(null!=r&&"number"==typeof r.retain&&null==r.attributes){let t=r.retain;for(;"insert"===n.peekType()&&n.peekLength()<=t;)t-=n.peekLength(),i.push(n.next());r.retain-t>0&&s.next(r.retain-t)}const o=new t(i);for(;n.hasNext()||s.hasNext();)if("insert"===s.peekType())o.push(s.next());else if("delete"===n.peekType())o.push(n.next());else{const e=Math.min(n.peekLength(),s.peekLength()),i=n.next(e),r=s.next(e);if(r.retain){const l={};if("number"==typeof i.retain)l.retain="number"==typeof r.retain?e:r.retain;else if("number"==typeof r.retain)null==i.retain?l.insert=i.insert:l.retain=i.retain;else{const e=null==i.retain?"insert":"retain",[n,s,o]=E(i[e],r.retain),a=t.getHandler(n);l[e]={[n]:a.compose(s,o,"retain"===e)}}const a=y.compose(i.attributes,r.attributes,"number"==typeof i.retain);if(a&&(l.attributes=a),o.push(l),!s.hasNext()&&g(o.ops[o.ops.length-1],l)){const e=new t(n.rest());return o.concat(e).chop()}}else"number"==typeof r.delete&&("number"==typeof i.retain||"object"==typeof i.retain&&null!==i.retain)&&o.push(r)}return o.chop()}concat(e){const n=new t(this.ops.slice());return e.ops.length>0&&(n.push(e.ops[0]),n.ops=n.ops.concat(e.ops.slice(1))),n}diff(e,n){if(this.ops===e.ops)return new t;const s=[this,e].map((t=>t.map((n=>{if(null!=n.insert)return"string"==typeof n.insert?n.insert:v;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join(""))),i=new t,r=(0,u.default)(s[0],s[1],n,!0),o=new N(this.ops),l=new N(e.ops);return r.forEach((t=>{let e=t[1].length;for(;e>0;){let n=0;switch(t[0]){case u.default.INSERT:n=Math.min(l.peekLength(),e),i.push(l.next(n));break;case u.default.DELETE:n=Math.min(e,o.peekLength()),o.next(n),i.delete(n);break;case u.default.EQUAL:n=Math.min(o.peekLength(),l.peekLength(),e);const t=o.next(n),s=l.next(n);g(t.insert,s.insert)?i.retain(n,y.diff(t.attributes,s.attributes)):i.push(s).delete(n)}e-=n}})),i.chop()}eachLine(e,n="\n"){const s=new N(this.ops);let i=new t,r=0;for(;s.hasNext();){if("insert"!==s.peekType())return;const o=s.peek(),l=A.length(o)-s.peekLength(),a="string"==typeof o.insert?o.insert.indexOf(n,l)-l:-1;if(a<0)i.push(s.next());else if(a>0)i.push(s.next(a));else{if(!1===e(i,s.next(1).attributes||{},r))return;r+=1,i=new t}}i.length()>0&&e(i,{},r)}invert(e){const n=new t;return this.reduce(((s,i)=>{if(i.insert)n.delete(A.length(i));else{if("number"==typeof i.retain&&null==i.attributes)return n.retain(i.retain),s+i.retain;if(i.delete||"number"==typeof i.retain){const t=i.delete||i.retain;return e.slice(s,s+t).forEach((t=>{i.delete?n.push(t):i.retain&&i.attributes&&n.retain(A.length(t),y.invert(i.attributes,t.attributes))})),s+t}if("object"==typeof i.retain&&null!==i.retain){const r=e.slice(s,s+1),o=new N(r.ops).next(),[l,a,c]=E(i.retain,o.insert),h=t.getHandler(l);return n.retain({[l]:h.invert(a,c)},y.invert(i.attributes,o.attributes)),s+1}}return s}),0),n.chop()}transform(e,n=!1){if(n=!!n,"number"==typeof e)return this.transformPosition(e,n);const s=e,i=new N(this.ops),r=new N(s.ops),o=new t;for(;i.hasNext()||r.hasNext();)if("insert"!==i.peekType()||!n&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{const e=Math.min(i.peekLength(),r.peekLength()),s=i.next(e),l=r.next(e);if(s.delete)continue;if(l.delete)o.push(l);else{const i=s.retain,r=l.retain;let a="object"==typeof r&&null!==r?r:e;if("object"==typeof i&&null!==i&&"object"==typeof r&&null!==r){const e=Object.keys(i)[0];if(e===Object.keys(r)[0]){const s=t.getHandler(e);s&&(a={[e]:s.transform(i[e],r[e],n)})}}o.retain(a,y.transform(s.attributes,l.attributes,n))}}else o.retain(A.length(i.next()));return o.chop()}transformPosition(t,e=!1){e=!!e;const n=new N(this.ops);let s=0;for(;n.hasNext()&&s<=t;){const i=n.peekLength(),r=n.peekType();n.next(),"delete"!==r?("insert"===r&&(s<t||!e)&&(t+=i),s+=i):t-=Math.min(i,t-s)}return t}},L=x;"object"==typeof module&&(module.exports=x,module.exports.default=x)},3:function(t,e,n){n.r(e),n.d(e,{Attributor:function(){return i},AttributorStore:function(){return d},BlockBlot:function(){return L},ClassAttributor:function(){return c},ContainerBlot:function(){return T},EmbedBlot:function(){return k},InlineBlot:function(){return E},LeafBlot:function(){return g},ParentBlot:function(){return N},Registry:function(){return l},Scope:function(){return s},ScrollBlot:function(){return C},StyleAttributor:function(){return u},TextBlot:function(){return R}});var s=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(s||{});class i{constructor(t,e,n={}){this.attrName=t,this.keyName=e;const i=s.TYPE&s.ATTRIBUTE;this.scope=null!=n.scope?n.scope&s.LEVEL|i:s.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map((t=>t.name))}add(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)}canAdd(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class r extends Error{constructor(t){super(t="[Parchment] "+t),this.message=t,this.name=this.constructor.name}}const o=class t{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(null==t)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,e)}return null}create(e,n,s){const i=this.query(n);if(null==i)throw new r(`Unable to create ${n} blot`);const o=i,l=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(s),a=new o(e,l,s);return t.blots.set(a.domNode,a),a}find(e,n=!1){return t.find(e,n)}query(t,e=s.ANY){let n;return"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&s.LEVEL&s.BLOCK?n=this.types.block:t&s.LEVEL&s.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some((t=>(n=this.classes[t],!!n))),n=n||this.tags[t.tagName]),null==n?null:"scope"in n&&e&s.LEVEL&n.scope&&e&s.TYPE&n.scope?n:null}register(...t){return t.map((t=>{const e="blotName"in t,n="attrName"in t;if(!e&&!n)throw new r("Invalid definition");if(e&&"abstract"===t.blotName)throw new r("Cannot register abstract class");const s=e?t.blotName:n?t.attrName:void 0;return this.types[s]=t,n?"string"==typeof t.keyName&&(this.attributes[t.keyName]=t):e&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map((t=>t.toUpperCase())):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach((e=>{(null==this.tags[e]||null==t.className)&&(this.tags[e]=t)})))),t}))}};o.blots=new WeakMap;let l=o;function a(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((t=>0===t.indexOf(`${e}-`)))}const c=class extends i{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map((t=>t.split("-").slice(0,-1).join("-")))}add(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0)}remove(t){a(t,this.keyName).forEach((e=>{t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")}value(t){const e=(a(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}};function h(t){const e=t.split("-"),n=e.slice(1).map((t=>t[0].toUpperCase()+t.slice(1))).join("");return e[0]+n}const u=class extends i{static keys(t){return(t.getAttribute("style")||"").split(";").map((t=>t.split(":")[0].trim()))}add(t,e){return!!this.canAdd(t,e)&&(t.style[h(this.keyName)]=e,!0)}remove(t){t.style[h(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[h(this.keyName)];return this.canAdd(t,e)?e:""}},d=class{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=l.find(this.domNode);if(null==t)return;const e=i.keys(this.domNode),n=c.keys(this.domNode),r=u.keys(this.domNode);e.concat(n).concat(r).forEach((e=>{const n=t.scroll.query(e,s.ATTRIBUTE);n instanceof i&&(this.attributes[n.attrName]=n)}))}copy(t){Object.keys(this.attributes).forEach((e=>{const n=this.attributes[e].value(this.domNode);t.format(e,n)}))}move(t){this.copy(t),Object.keys(this.attributes).forEach((t=>{this.attributes[t].remove(this.domNode)})),this.attributes={}}values(){return Object.keys(this.attributes).reduce(((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t)),{})}},f=class{constructor(t,e){this.scroll=t,this.domNode=e,l.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(null==this.tagName)throw new r("Blot definition missing tagName");let e,n;return Array.isArray(this.tagName)?("string"==typeof t?(n=t.toUpperCase(),parseInt(n,10).toString()===n&&(n=parseInt(n,10))):"number"==typeof t&&(n=t),e="number"==typeof n?document.createElement(this.tagName[n-1]):n&&this.tagName.indexOf(n)>-1?document.createElement(n):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){null!=this.parent&&this.parent.removeChild(this),l.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,n,i){const r=this.isolate(t,e);if(null!=this.scroll.query(n,s.BLOT)&&i)r.wrap(n,i);else if(null!=this.scroll.query(n,s.ATTRIBUTE)){const t=this.scroll.create(this.statics.scope);r.wrap(t),t.format(n,i)}}insertAt(t,e,n){const s=null==n?this.scroll.create("text",e):this.scroll.create(e,n),i=this.split(t);this.parent.insertBefore(s,i||void 0)}isolate(t,e){const n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n}length(){return 1}offset(t=this.parent){return null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n}split(t,e){return 0===t?this:this.next}update(t,e){}wrap(t,e){const n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new r(`Cannot wrap ${t}`);return n.appendChild(this),n}};f.blotName="abstract";let p=f;const m=class extends p{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};m.scope=s.INLINE_BLOT;const g=m;class b{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let n=e();for(;n&&t>0;)t-=1,n=e();return n}contains(t){const e=this.iterator();let n=e();for(;n;){if(n===t)return!0;n=e()}return!1}indexOf(t){const e=this.iterator();let n=e(),s=0;for(;n;){if(n===t)return s;s+=1,n=e()}return-1}insertBefore(t,e){null!=t&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,n=this.head;for(;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return null!=t&&(t=t.next),e}}find(t,e=!1){const n=this.iterator();let s=n();for(;s;){const i=s.length();if(t<i||e&&t===i&&(null==s.next||0!==s.next.length()))return[s,t];t-=i,s=n()}return[null,0]}forEach(t){const e=this.iterator();let n=e();for(;n;)t(n),n=e()}forEachAt(t,e,n){if(e<=0)return;const[s,i]=this.find(t);let r=t-i;const o=this.iterator(s);let l=o();for(;l&&r<t+e;){const s=l.length();t>r?n(l,t-r,Math.min(e,r+s-t)):n(l,0,Math.min(s,t+e-r)),r+=s,l=o()}}map(t){return this.reduce(((e,n)=>(e.push(t(n)),e)),[])}reduce(t,e){const n=this.iterator();let s=n();for(;s;)e=t(e,s),s=n();return e}}function y(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const n=e.create(s.INLINE);return Array.from(t.childNodes).forEach((t=>{n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach(),n}}const A=class t extends p{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach((t=>{t.attach()}))}attachUI(e){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=e,t.uiClass&&this.uiNode.classList.add(t.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new b,Array.from(this.domNode.childNodes).filter((t=>t!==this.uiNode)).reverse().forEach((t=>{try{const e=y(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(t){if(t instanceof r)return;throw t}}))}deleteAt(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,((t,e,n)=>{t.deleteAt(e,n)}))}descendant(e,n=0){const[s,i]=this.children.find(n);return null==e.blotName&&e(s)||null!=e.blotName&&s instanceof e?[s,i]:s instanceof t?s.descendant(e,i):[null,-1]}descendants(e,n=0,s=Number.MAX_VALUE){let i=[],r=s;return this.children.forEachAt(n,s,((n,s,o)=>{(null==e.blotName&&e(n)||null!=e.blotName&&n instanceof e)&&i.push(n),n instanceof t&&(i=i.concat(n.descendants(e,s,r))),r-=o})),i}detach(){this.children.forEach((t=>{t.detach()})),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach((n=>{e||this.statics.allowedChildren.some((t=>n instanceof t))||(n.statics.scope===s.BLOCK_BLOT?(null!=n.next&&this.splitAfter(n),null!=n.prev&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof t?n.unwrap():n.remove())}))}formatAt(t,e,n,s){this.children.forEachAt(t,e,((t,e,i)=>{t.formatAt(e,i,n,s)}))}insertAt(t,e,n){const[s,i]=this.children.find(t);if(s)s.insertAt(i,e,n);else{const t=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(t)}}insertBefore(t,e){null!=t.parent&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce(((t,e)=>t+e.length()),0)}moveChildren(t,e){this.children.forEach((n=>{t.insertBefore(n,e)}))}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,n=!1){const[s,i]=this.children.find(e,n),r=[[this,e]];return s instanceof t?r.concat(s.path(i,n)):(null!=s&&r.push([s,i]),r)}removeChild(t){this.children.remove(t)}replaceWith(e,n){const s="string"==typeof e?this.scroll.create(e,n):e;return s instanceof t&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),((t,s,i)=>{const r=t.split(s,e);null!=r&&n.appendChild(r)})),n}splitAfter(t){const e=this.clone();for(;null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const n=[],s=[];t.forEach((t=>{t.target===this.domNode&&"childList"===t.type&&(n.push(...t.addedNodes),s.push(...t.removedNodes))})),s.forEach((t=>{if(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const e=this.scroll.find(t);null!=e&&(null==e.domNode.parentNode||e.domNode.parentNode===this.domNode)&&e.detach()})),n.filter((t=>t.parentNode===this.domNode&&t!==this.uiNode)).sort(((t,e)=>t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1)).forEach((t=>{let e=null;null!=t.nextSibling&&(e=this.scroll.find(t.nextSibling));const n=y(t,this.scroll);(n.next!==e||null==n.next)&&(null!=n.parent&&n.parent.removeChild(this),this.insertBefore(n,e||void 0))})),this.enforceAllowedChildren()}};A.uiClass="";const N=A,v=class t extends N{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){if(e!==this.statics.blotName||n){const t=this.scroll.query(e,s.INLINE);if(null==t)return;t instanceof i?this.attributes.attribute(t,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}else this.children.forEach((e=>{e instanceof t||(e=e.wrap(t.blotName,!0)),this.attributes.copy(e)})),this.unwrap()}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){null!=this.formats()[n]||this.scroll.query(n,s.ATTRIBUTE)?this.isolate(t,e).format(n,i):super.formatAt(t,e,n,i)}optimize(e){super.optimize(e);const n=this.formats();if(0===Object.keys(n).length)return this.unwrap();const s=this.next;s instanceof t&&s.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}(n,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}wrap(e,n){const s=super.wrap(e,n);return s instanceof t&&this.attributes.move(s),s}};v.allowedChildren=[v,g],v.blotName="inline",v.scope=s.INLINE_BLOT,v.tagName="SPAN";const E=v,x=class t extends N{static create(t){return super.create(t)}static formats(e,n){const s=n.query(t.blotName);if(null==s||e.tagName!==s.tagName){if("string"==typeof this.tagName)return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new d(this.domNode)}format(e,n){const r=this.scroll.query(e,s.BLOCK);null!=r&&(r instanceof i?this.attributes.attribute(r,n):e!==this.statics.blotName||n?n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n):this.replaceWith(t.blotName))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t}formatAt(t,e,n,i){null!=this.scroll.query(n,s.BLOCK)?this.format(n,i):super.formatAt(t,e,n,i)}insertAt(t,e,n){if(null==n||null!=this.scroll.query(e,s.INLINE))super.insertAt(t,e,n);else{const s=this.split(t);if(null==s)throw new Error("Attempt to insertAt after block boundaries");{const t=this.scroll.create(e,n);s.parent.insertBefore(t,s)}}}replaceWith(t,e){const n=super.replaceWith(t,e);return this.attributes.copy(n),n}update(t,e){super.update(t,e),t.some((t=>t.target===this.domNode&&"attributes"===t.type))&&this.attributes.build()}};x.blotName="block",x.scope=s.BLOCK_BLOT,x.tagName="P",x.allowedChildren=[E,x,g];const L=x,S=class extends N{checkMerge(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,n,s){super.formatAt(t,e,n,s),this.enforceAllowedChildren()}insertAt(t,e,n){super.insertAt(t,e,n),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};S.blotName="container",S.scope=s.BLOCK_BLOT;const T=S,k=class extends g{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,n,s){0===t&&e===this.length()?this.format(n,s):super.formatAt(t,e,n,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}},O={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},w=class extends N{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver((t=>{this.update(t)})),this.observer.observe(this.domNode,O),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null}query(t,e=s.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){null!=this.scroll&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),0===t&&e===this.length()?this.children.forEach((t=>{t.remove()})):super.deleteAt(t,e)}formatAt(t,e,n,s){this.update(),super.formatAt(t,e,n,s)}insertAt(t,e,n){this.update(),super.insertAt(t,e,n)}optimize(t=[],e={}){super.optimize(e);const n=e.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)t.push(s.pop());const i=(t,e=!0)=>{null==t||t===this||null!=t.domNode.parentNode&&(n.has(t.domNode)||n.set(t.domNode,[]),e&&i(t.parent))},r=t=>{n.has(t.domNode)&&(t instanceof N&&t.children.forEach(r),n.delete(t.domNode),t.optimize(e))};let o=t;for(let e=0;o.length>0;e+=1){if(e>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach((t=>{const e=this.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(i(this.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((t=>{const e=this.find(t,!1);i(e,!1),e instanceof N&&e.children.forEach((t=>{i(t,!1)}))}))):"attributes"===t.type&&i(e.prev)),i(e))})),this.children.forEach(r),o=Array.from(this.observer.takeRecords()),s=o.slice();s.length>0;)t.push(s.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const n=new WeakMap;t.map((t=>{const e=this.find(t.target,!0);return null==e?null:n.has(e.domNode)?(n.get(e.domNode).push(t),null):(n.set(e.domNode,[t]),e)})).forEach((t=>{null!=t&&t!==this&&n.has(t.domNode)&&t.update(n.get(t.domNode)||[],e)})),e.mutationsMap=n,n.has(this.domNode)&&super.update(n.get(this.domNode),e),this.optimize(t,e)}};w.blotName="scroll",w.defaultChild=L,w.allowedChildren=[L,T],w.scope=s.BLOCK_BLOT,w.tagName="DIV";const C=w,q=class t extends g{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,n){null==n?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,n)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof t&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(0===t)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,e){t.some((t=>"characterData"===t.type&&t.target===this.domNode))&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};q.blotName="text",q.scope=s.INLINE_BLOT;const R=q}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,n),r.exports}n.d=function(t,e){for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return function(){n.d(s,{default:function(){return $}});var t=n(729),e=n(276),i=n(912),r=n(3);class o extends r.ClassAttributor{add(t,e){let n=0;if("+1"===e||"-1"===e){const s=this.value(t)||0;n="+1"===e?s+1:s-1}else"number"==typeof e&&(n=e);return 0===n?(this.remove(t),!0):super.add(t,n.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}var l=new o("indent","ql-indent",{scope:r.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),a=n(698);class c extends a.Ay{static blotName="blockquote";static tagName="blockquote"}var h=c;class u extends a.Ay{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}var d=u,f=n(580),p=n(543);class m extends f.A{}m.blotName="list-container",m.tagName="OL";class g extends a.Ay{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){p.Ay.register(m)}constructor(t,e){super(t,e);const n=e.ownerDocument.createElement("span"),s=n=>{if(!t.isEnabled())return;const s=this.statics.formats(e,t);"checked"===s?(this.format("list","unchecked"),n.preventDefault()):"unchecked"===s&&(this.format("list","checked"),n.preventDefault())};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),this.attachUI(n)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}g.blotName="list",g.tagName="LI",m.allowedChildren=[g],g.requiredContainer=m;var b=n(922),y=n(638),A=n(772),N=n(664),v=n(850);class E extends v.A{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}var x=E;class L extends v.A{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return S(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("href",this.constructor.sanitize(e)):super.format(t,e)}}function S(t,e){const n=document.createElement("a");n.href=t;const s=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(s)>-1}class T extends v.A{static blotName="script";static tagName=["SUB","SUP"];static create(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):super.create(t)}static formats(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}var k=T;class O extends v.A{static blotName="underline";static tagName="U"}var w=O;const C=["alt","height","width"];class q extends r.EmbedBlot{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return"string"==typeof t&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return C.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return S(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){C.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}var R=q,B=n(508);const I=["height","width"];class D extends a.zo{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return I.reduce(((e,n)=>(t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e)),{})}static sanitize(t){return L.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){I.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const t=(0,B.X)(this.value().video);return`<a href="${t}">${t}</a>`}}var M=D,U=n(404),_=n(636),j=n(78),P=n(266);const z=(0,j.A)("quill:toolbar");class F extends P.A{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const e=document.createElement("div");e.setAttribute("role","toolbar"),function(t,e){Array.isArray(e[0])||(e=[e]),e.forEach((e=>{const n=document.createElement("span");n.classList.add("ql-formats"),e.forEach((t=>{if("string"==typeof t)K(n,t);else{const e=Object.keys(t)[0],s=t[e];Array.isArray(s)?function(t,e,n){const s=document.createElement("select");s.classList.add(`ql-${e}`),n.forEach((t=>{const e=document.createElement("option");!1!==t?e.setAttribute("value",String(t)):e.setAttribute("selected","selected"),s.appendChild(e)})),t.appendChild(s)}(n,e,s):K(n,e,s)}})),t.appendChild(n)}))}(e,this.options.container),t.container?.parentNode?.insertBefore(e,t.container),this.container=e}else if("string"==typeof this.options.container){const e=t.container.getRootNode();this.container=e.querySelector(this.options.container)}else this.container=this.options.container;this.container instanceof HTMLElement?(this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach((t=>{const e=this.options.handlers?.[t];e&&this.addHandler(t,e)})),Array.from(this.container.querySelectorAll("button, select")).forEach((t=>{this.attach(t)})),this.quill.on(p.Ay.events.EDITOR_CHANGE,(()=>{const[t]=this.quill.selection.getRange();this.update(t)}))):z.error("Container required for toolbar",this.options)}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find((t=>0===t.indexOf("ql-")));if(!e)return;if(e=e.slice(3),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[e]&&null==this.quill.scroll.query(e))return void z.warn("ignoring attaching to nonexistent format",e,t);const n="SELECT"===t.tagName?"change":"click";t.addEventListener(n,(n=>{let s;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;const e=t.options[t.selectedIndex];s=!e.hasAttribute("selected")&&(e.value||!1)}else s=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),n.preventDefault();this.quill.focus();const[i]=this.quill.selection.getRange();if(null!=this.handlers[e])this.handlers[e].call(this,s);else if(this.quill.scroll.query(e).prototype instanceof r.EmbedBlot){if(s=prompt(`Enter ${e}`),!s)return;this.quill.updateContents((new _.Ay).retain(i.index).delete(i.length).insert({[e]:s}),p.Ay.sources.USER)}else this.quill.format(e,s,p.Ay.sources.USER);this.update(i)})),this.controls.push([e,t])}update(t){const e=null==t?{}:this.quill.getFormat(t);this.controls.forEach((n=>{const[s,i]=n;if("SELECT"===i.tagName){let n=null;if(null==t)n=null;else if(null==e[s])n=i.querySelector("option[selected]");else if(!Array.isArray(e[s])){let t=e[s];"string"==typeof t&&(t=t.replace(/"/g,'\\"')),n=i.querySelector(`option[value="${t}"]`)}null==n?(i.value="",i.selectedIndex=-1):n.selected=!0}else if(null==t)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const t=e[s],n=t===i.getAttribute("value")||null!=t&&t.toString()===i.getAttribute("value")||null==t&&!i.getAttribute("value");i.classList.toggle("ql-active",n),i.setAttribute("aria-pressed",n.toString())}else{const t=null!=e[s];i.classList.toggle("ql-active",t),i.setAttribute("aria-pressed",t.toString())}}))}}function K(t,e,n){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${e}`),s.setAttribute("aria-pressed","false"),null!=n?(s.value=n,s.setAttribute("aria-label",`${e}: ${n}`)):s.setAttribute("aria-label",e),t.appendChild(s)}F.DEFAULTS={},F.DEFAULTS={container:null,handlers:{clean(){const t=this.quill.getSelection();if(null!=t)if(0===t.length){const t=this.quill.getFormat();Object.keys(t).forEach((t=>{null!=this.quill.scroll.query(t,r.Scope.INLINE)&&this.quill.format(t,!1,p.Ay.sources.USER)}))}else this.quill.removeFormat(t.index,t.length,p.Ay.sources.USER)},direction(t){const{align:e}=this.quill.getFormat();"rtl"===t&&null==e?this.quill.format("align","right",p.Ay.sources.USER):t||"right"!==e||this.quill.format("align",!1,p.Ay.sources.USER),this.quill.format("direction",t,p.Ay.sources.USER)},indent(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e),s=parseInt(n.indent||0,10);if("+1"===t||"-1"===t){let e="+1"===t?1:-1;"rtl"===n.direction&&(e*=-1),this.quill.format("indent",s+e,p.Ay.sources.USER)}},link(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,p.Ay.sources.USER)},list(t){const e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,p.Ay.sources.USER):this.quill.format("list","unchecked",p.Ay.sources.USER):this.quill.format("list",t,p.Ay.sources.USER)}}},t.default.register({"attributors/attribute/direction":i.Mc,"attributors/class/align":e.qh,"attributors/class/background":b.l,"attributors/class/color":y.g3,"attributors/class/direction":i.sY,"attributors/class/font":A.q,"attributors/class/size":N.U,"attributors/style/align":e.Hu,"attributors/style/background":b.s,"attributors/style/color":y.JM,"attributors/style/direction":i.VL,"attributors/style/font":A.z,"attributors/style/size":N.r},!0),t.default.register({"formats/align":e.qh,"formats/direction":i.sY,"formats/indent":l,"formats/background":b.s,"formats/color":y.JM,"formats/font":A.q,"formats/size":N.U,"formats/blockquote":h,"formats/code-block":U.Ay,"formats/header":d,"formats/list":g,"formats/bold":x,"formats/code":U.Cy,"formats/italic":class extends x{static blotName="italic";static tagName=["EM","I"]},"formats/link":L,"formats/script":k,"formats/strike":class extends x{static blotName="strike";static tagName=["S","STRIKE"]},"formats/underline":w,"formats/image":R,"formats/video":M,"modules/toolbar":F},!0);var $=t.default}(),s.default}()}));
9
9
  //# sourceMappingURL=vaadin-quill.js.map