/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/ (function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[3],{317:function(ia,y,e){(function(e){(function(e,y){ia.exports=y()})("undefined"!==typeof self?self:this,function(){return function(e){function x(da){if(y[da])return y[da].exports;var ba=y[da]={i:da,l:!1,exports:{}};e[da].call(ba.exports,ba,ba.exports,x);ba.l=!0;return ba.exports}var y={};x.m=e;x.c=y;x.d=function(e,ba,w){x.o(e,ba)||Object.defineProperty(e,ba,{configurable:!1,enumerable:!0,get:w})};x.n=function(e){var ba=e&&e.__esModule? function(){return e["default"]}:function(){return e};x.d(ba,"a",ba);return ba};x.o=function(e,x){return Object.prototype.hasOwnProperty.call(e,x)};x.p="";return x(x.s=109)}([function(e,y,ea){Object.defineProperty(y,"__esModule",{value:!0});e=ea(17);var x=ea(18),ba=ea(19),w=ea(45),z=ea(46),r=ea(47),h=ea(48),f=ea(49),n=ea(12),ca=ea(32),aa=ea(33),ha=ea(31);ea=ea(1);y.default={Scope:ea.Scope,create:ea.create,find:ea.find,query:ea.query,register:ea.register,Container:e.default,Format:x.default,Leaf:ba.default, Embed:h.default,Scroll:w.default,Block:r.default,Inline:z.default,Text:f.default,Attributor:{Attribute:n.default,Class:ca.default,Style:aa.default,Store:ha.default}}},function(e,y){function x(f,e){void 0===e&&(e=!1);return null==f?null:null!=f[y.DATA_KEY]?f[y.DATA_KEY].blot:e?x(f.parentNode,e):null}function da(e,w){void 0===w&&(w=ca.ANY);if("string"===typeof e)var x=n[e]||r[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)x=n.text;else if("number"===typeof e)e&ca.LEVEL&ca.BLOCK?x=n.block: e&ca.LEVEL&ca.INLINE&&(x=n.inline);else if(e instanceof HTMLElement){var aa=(e.getAttribute("class")||"").split(/\s+/),z;for(z in aa)if(x=h[aa[z]])break;x=x||f[e.tagName]}return null==x?null:w&ca.LEVEL&x.scope&&w&ca.TYPE&x.scope?x:null}function ba(){for(var e=[],w=0;w=f?this:this.push({"delete":f})};x.prototype.retain=function(f,e){if(0>=f)return this;f={retain:f};null!=e&&"object"=== typeof e&&0z)n.push(h.next());else if(0=h||(aa.default.query(r,aa.default.Scope.BLOCK)? e+h===this.length()&&this.format(r,w):f(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"formatAt",this).call(this,e,Math.min(h,this.length()-e-1),r,w),this.cache={})}},{key:"insertAt",value:function(e,h,r){if(null!=r)return f(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"insertAt",this).call(this,e,h,r);if(0!==h.length){h=h.split("\n");r=h.shift();0=this.length()-1)){h=this.clone();if(0===e)return this.parent.insertBefore(h,this),this;this.parent.insertBefore(h,this.next);return h}h=f(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"split",this).call(this, e,h);this.cache={};return h}}]);return n}(aa.default.Block);ia.blotName="block";ia.tagName="P";ia.defaultChild="break";ia.allowedChildren=[e.default,aa.default.Embed,ea.default];y.bubbleFormats=r;y.BlockEmbed=fa;y.default=ia},function(e,y,ea){function x(f){return f&&f.__esModule?f:{default:f}}function ba(f,e,h){e in f?Object.defineProperty(f,e,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[e]=h;return f}function w(f,e){e=(0,za.default)(!0,{container:f,modules:{clipboard:!0,keyboard:!0,history:!0}}, e);if(e.theme&&e.theme!==oa.DEFAULTS.theme){if(e.theme=oa.import("themes/"+e.theme),null==e.theme)throw Error("Invalid theme "+e.theme+". Did you register it?");}else e.theme=Da.default;f=(0,za.default)(!0,{},e.theme.DEFAULTS);[f,e].forEach(function(f){f.modules=f.modules||{};Object.keys(f.modules).forEach(function(e){!0===f.modules[e]&&(f.modules[e]={})})});var h=Object.keys(f.modules).concat(Object.keys(e.modules)).reduce(function(f,e){var h=oa.import("modules/"+e);null==h?sa.error("Cannot load "+ e+" module. Are you sure you registered it?"):f[e]=h.DEFAULTS||{};return f},{});null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar});e=(0,za.default)(!0,{},oa.DEFAULTS,{modules:h},f,e);["bounds","container","scrollingContainer"].forEach(function(f){"string"===typeof e[f]&&(e[f]=document.querySelector(e[f]))});e.modules=Object.keys(e.modules).reduce(function(f,h){e.modules[h]&&(f[h]=e.modules[h]);return f},{});return e}function z(f, e,n,r){if(this.options.strict&&!this.isEnabled()&&e===fa.default.sources.USER)return new aa.default;var w=null==n?null:this.getSelection(),x=this.editor.delta;f=f();null!=w&&(!0===n&&(n=w.index),null==r?w=h(w,f,e):0!==r&&(w=h(w,n,r,e)),this.setSelection(w,fa.default.sources.SILENT));if(0"+n+"


");this.setContents(n);this.history.clear();this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder); this.options.readOnly&&this.disable()}ca(f,null,[{key:"debug",value:function(f){!0===f&&(f="log");ra.default.level(f)}},{key:"find",value:function(f){return f.__quill||xa.default.find(f)}},{key:"import",value:function(f){null==this.imports[f]&&sa.error("Cannot import "+f+". Are you sure it was registered?");return this.imports[f]}},{key:"register",value:function(f,e){var h=this,n=2f.compare(this.statics.blotName,x)&&z.default.query(x,z.default.Scope.BLOT)?(e=this.isolate(e,h),y&&e.wrap(x,y)):w(f.prototype.__proto__||Object.getPrototypeOf(f.prototype), "formatAt",this).call(this,e,h,x,y)}},{key:"optimize",value:function(e){w(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"optimize",this).call(this,e);this.parent instanceof f&&0r||r>=f+ e)){var w=this.newlineIndex(f,!0)+1;r=r-w+1;var aa=this.isolate(w,r),z=aa.next;aa.format(h,n);z instanceof x&&z.formatAt(0,f-w+e-r,h,n)}}}},{key:"insertAt",value:function(f,e,h){null==h&&(f=this.descendant(ha.default,f),f=r(f,2),f[0].insertAt(f[1],e))}},{key:"length",value:function(){var f=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?f:f+1}},{key:"newlineIndex",value:function(f){if(1e[n].indexOf(f[n])&&(h[n]=e[n].concat([f[n]])):h[n]=[e[n],f[n]];return h},{})}function z(f){return f.reduce(function(f, e){if(1===e.insert){var h=(0,na.default)(e.attributes);delete h.image;return f.insert({image:e.attributes.image},h)}null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||(e=(0,na.default)(e),e.attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet));return"string"===typeof e.insert?(h=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),f.insert(h,e.attributes)):f.push(e)},new n.default)}Object.defineProperty(y,"__esModule",{value:!0});var r= "function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},h=function(){return function(f,e){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=f[Symbol.iterator](),aa;!(n=(aa=x.next()).done)&&(h.push(aa.value),!e||h.length!==e);n=!0);}catch(Ea){r=!0,w=Ea}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w; }}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function f(f,e){for(var h=0;h=w&&!x.endsWith("\n")&&(n=!0);e.scroll.insertAt(f,x);x=e.scroll.line(f);x=h(x,2);var ba=x[0],da=x[1];x=(0,ra.default)({},(0,ia.bubbleFormats)(ba));ba instanceof xa.default&&(ba=ba.descendant(aa.default.Leaf,da),ba=h(ba,1)[0],x=(0,ra.default)(x,(0,ia.bubbleFormats)(ba)));y=ca.default.attributes.diff(x,y)||{}}else if("object"===r(x.insert)){ba=Object.keys(x.insert)[0];if(null==ba)return f;e.scroll.insertAt(f,ba,x.insert[ba])}w+=z}Object.keys(y).forEach(function(h){e.scroll.formatAt(f, z,h,y[h])});return f+z},0);f.reduce(function(f,h){return"number"===typeof h.delete?(e.scroll.deleteAt(f,h.delete),f):f+(h.retain||h.insert.length||1)},0);this.scroll.batchEnd();return this.update(f)}},{key:"deleteText",value:function(f,e){this.scroll.deleteAt(f,e);return this.update((new n.default).retain(f).delete(e))}},{key:"formatLine",value:function(f,e){var h=this,r=2=f.rangeCount)return null;f=f.getRangeAt(0);if(null==f)return null;f=this.normalizeNative(f);ha.info("getNativeRange",f);return f}},{key:"getRange",value:function(){var f= this.getNativeRange();return null==f?[null,null]:[this.normalizedToRange(f),f]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var h=this,n=[[e.start.node,e.start.offset]];e.native.collapsed||n.push([e.end.node,e.end.offset]);n=n.map(function(e){var n=r(e,2);e=n[0];n=n[1];var w=f.default.find(e,!0),x=w.offset(h.scroll);return 0===n?x:w instanceof f.default.Container?x+w.length():x+w.index(e,n)});e=Math.min(Math.max.apply(Math, ba(n)),this.scroll.length()-1);n=Math.min.apply(Math,[e].concat(ba(n)));return new fa(n,e-n)}},{key:"normalizeNative",value:function(f){if(!z(this.root,f.startContainer)||!f.collapsed&&!z(this.root,f.endContainer))return null;f={start:{node:f.startContainer,offset:f.startOffset},end:{node:f.endContainer,offset:f.endOffset},native:f};[f.start,f.end].forEach(function(f){for(var e=f.node,h=f.offset;!(e instanceof Text)&&0h)e=e.childNodes[h],h=0;else if(e.childNodes.length=== h)e=e.lastChild,h=e instanceof Text?e.data.length:e.childNodes.length+1;else break;f.node=e;f.offset=h});return f}},{key:"rangeToNative",value:function(f){var e=this;f=f.collapsed?[f.index]:[f.index,f.index+f.length];var h=[],n=this.scroll.length();f.forEach(function(f,w){f=Math.min(n-1,f);f=e.scroll.leaf(f);var x=r(f,2);f=x[1];w=x[0].position(f,0!==w);f=r(w,2);w=f[0];f=f[1];h.push(w,f)});2>h.length&&(h=h.concat(h));return h}},{key:"scrollIntoView",value:function(f){var e=this.lastRange;if(null!= e){var h=this.getBounds(e.index,e.length);if(null!=h){var n=this.scroll.length()-1,w=this.scroll.line(Math.min(e.index,n)),x=w=r(w,1)[0];0e.bottom&&(f.scrollTop+=h.bottom-e.bottom))}}}},{key:"setNativeRange",value:function(f,e){var h=2this.peekLength()};x.prototype.next=function(e){e||(e=Infinity);var h=this.ops[this.index];if(h){var f=this.offset,n=z.length(h);e>=n-f?(e=n-f,this.index+=1,this.offset=0):this.offset+=e;if("number"===typeof h["delete"])return{"delete":e};n={};h.attributes&&(n.attributes=h.attributes);"number"===typeof h.retain?n.retain=e:n.insert="string"===typeof h.insert?h.insert.substr(f,e):h.insert;return n}return{retain:Infinity}};x.prototype.peek=function(){return this.ops[this.index]}; x.prototype.peekLength=function(){return this.ops[this.index]?z.length(this.ops[this.index])-this.offset:Infinity};x.prototype.peekType=function(){if(this.ops[this.index]){if("number"===typeof this.ops[this.index]["delete"])return"delete";if("number"!==typeof this.ops[this.index].retain)return"insert"}return"retain"};x.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var e=this.offset,h=this.index,f=this.next(),n=this.ops.slice(this.index);this.offset= e;this.index=h;return[f].concat(n)}return[]};e.exports=z},function(x){var y=function(){function x(f,e){return null!=e&&f instanceof e}function y(f,n,ca,aa,ba){function da(f,ca){if(null===f)return null;if(0===ca||"object"!=typeof f)return f;if(x(f,z))var ja=new z;else if(x(f,r))ja=new r;else if(x(f,h))ja=new h(function(e,h){f.then(function(f){e(da(f,ca-1))},function(f){h(da(f,ca-1))})});else if(y.__isArray(f))ja=[];else if(y.__isRegExp(f))ja=new RegExp(f.source,w(f)),f.lastIndex&&(ja.lastIndex=f.lastIndex); else if(y.__isDate(f))ja=new Date(f.getTime());else{if(fa&&e.isBuffer(f))return ja=e.allocUnsafe?e.allocUnsafe(f.length):new e(f.length),f.copy(ja),ja;if(x(f,Error))ja=Object.create(f);else if("undefined"==typeof aa){var ka=Object.getPrototypeOf(f);ja=Object.create(ka)}else ja=Object.create(aa),ka=aa}if(n){var ia=ea.indexOf(f);if(-1!=ia)return ha[ia];ea.push(f);ha.push(ja)}x(f,z)&&f.forEach(function(f,e){e=da(e,ca-1);f=da(f,ca-1);ja.set(e,f)});x(f,r)&&f.forEach(function(f){f=da(f,ca-1);ja.add(f)}); for(var la in f){var ma;ka&&(ma=Object.getOwnPropertyDescriptor(ka,la));ma&&null==ma.set||(ja[la]=da(f[la],ca-1))}if(Object.getOwnPropertySymbols)for(ia=Object.getOwnPropertySymbols(f),la=0;la=this.length()?null==r||null==n.default.query(h,n.default.Scope.BLOCK)?(e=n.default.create(this.statics.defaultChild),this.appendChild(e),null==r&&h.endsWith("\n")&&(h=h.slice(0,-1)),e.insertAt(0,h,r)):(h=n.default.create(h,r),this.appendChild(h)):f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertAt",this).call(this,e,h,r),this.optimize()}}, {key:"insertBefore",value:function(e,h){if(e.statics.scope===n.default.Scope.INLINE_BLOT){var r=n.default.create(this.statics.defaultChild);r.appendChild(e);e=r}f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,e,h)}},{key:"leaf",value:function(f){return this.path(f).pop()||[null,-1]}},{key:"line",value:function(f){return f===this.length()?this.line(f-1):this.descendant(z,f)}},{key:"lines",value:function(){return function oa(f,e,h){var r=[],w=h;f.children.forEachAt(e, h,function(f,e,h){z(f)?r.push(f):f instanceof n.default.Container&&(r=r.concat(oa(f,e,w)));w-=h});return r}(this,0=this.quill.getLength())){var h=this.quill.getLine(f.index), n=xa(h,1)[0];h={};if(0===e.offset){var r=this.quill.getLine(f.index-1);r=xa(r,1)[0];null!=r&&1= this.quill.getLength()-h)){var n={},r=0,w=this.quill.getLine(f.index);w=xa(w,1)[0];e.offset>=w.length()-1&&(e=this.quill.getLine(f.index+1),e=xa(e,1)[0])&&(n=w.formats(),r=this.quill.getFormat(f.index,1),n=sa.default.attributes.diff(n,r)||{},r=e.length());this.quill.deleteText(f.index,h,ma.default.sources.USER);0=w.length(),format:f.quill.getFormat(n),offset:x,prefix:aa, suffix:z};h.some(function(e){if(null!=e.collapsed&&e.collapsed!==ba.collapsed||null!=e.empty&&e.empty!==ba.empty||null!=e.offset&&e.offset!==ba.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(f){return null==ba.format[f]}))return!1}else if("object"===ia(e.format)&&!Object.keys(e.format).every(function(f){return!0===e.format[f]?null!=ba.format[f]:!1===e.format[f]?null==ba.format[f]:(0,za.default)(e.format[f],ba.format[f])}))return!1;return null!=e.prefix&&!e.prefix.test(ba.prefix)|| null!=e.suffix&&!e.suffix.test(ba.suffix)?!1:!0!==e.handler.call(f,n,ba)})&&e.preventDefault()}}}})}}]);return r}(ea.default);ua.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};ua.DEFAULTS={bindings:{bold:ha("bold"),italic:ha("italic"),underline:ha("underline"),indent:{key:ua.keys.TAB,format:["blockquote","indent","list"],handler:function(f,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",ma.default.sources.USER)}},outdent:{key:ua.keys.TAB, shiftKey:!0,format:["blockquote","indent","list"],handler:function(f,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",ma.default.sources.USER)}},"outdent backspace":{key:ua.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(f,e){null!=e.format.indent?this.quill.format("indent","-1",ma.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,ma.default.sources.USER)}},"indent code-block":aa(!0), "outdent code-block":aa(!1),"remove tab":{key:ua.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(f){this.quill.deleteText(f.index-1,1,ma.default.sources.USER)}},tab:{key:ua.keys.TAB,handler:function(f){this.quill.history.cutoff();var e=(new Da.default).retain(f.index).delete(f.length).insert("\t");this.quill.updateContents(e,ma.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(f.index+1,ma.default.sources.SILENT)}},"list empty enter":{key:ua.keys.ENTER,collapsed:!0, format:["list"],empty:!0,handler:function(f,e){this.quill.format("list",!1,ma.default.sources.USER);e.format.indent&&this.quill.format("indent",!1,ma.default.sources.USER)}},"checklist enter":{key:ua.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(f){var e=this.quill.getLine(f.index),h=xa(e,2);e=h[0];h=h[1];var n=(0,ra.default)({},e.formats(),{list:"checked"});e=(new Da.default).retain(f.index).insert("\n",n).retain(e.length()-h-1).retain(1,{list:"unchecked"});this.quill.updateContents(e, ma.default.sources.USER);this.quill.setSelection(f.index+1,ma.default.sources.SILENT);this.quill.scrollIntoView()}},"header enter":{key:ua.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(f,e){var h=this.quill.getLine(f.index),n=xa(h,2);h=n[0];n=n[1];e=(new Da.default).retain(f.index).insert("\n",e.format).retain(h.length()-n-1).retain(1,{header:null});this.quill.updateContents(e,ma.default.sources.USER);this.quill.setSelection(f.index+1,ma.default.sources.SILENT);this.quill.scrollIntoView()}}, "list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(f,e){var h=e.prefix.length,n=this.quill.getLine(f.index),r=xa(n,2);n=r[0];r=r[1];if(r>h)return!0;switch(e.prefix.trim()){case "[]":case "[ ]":e="unchecked";break;case "[x]":e="checked";break;case "-":case "*":e="bullet";break;default:e="ordered"}this.quill.insertText(f.index," ",ma.default.sources.USER);this.quill.history.cutoff();e=(new Da.default).retain(f.index-r).delete(h+1).retain(n.length()- 2-r).retain(1,{list:e});this.quill.updateContents(e,ma.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(f.index-h,ma.default.sources.SILENT)}},"code exit":{key:ua.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(f){var e=this.quill.getLine(f.index),h=xa(e,2);e=h[0];h=h[1];f=(new Da.default).retain(f.index+e.length()-h-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(f,ma.default.sources.USER)}},"embed left":r(ua.keys.LEFT, !1),"embed left shift":r(ua.keys.LEFT,!0),"embed right":r(ua.keys.RIGHT,!1),"embed right shift":r(ua.keys.RIGHT,!0)}};y.default=ua;y.SHORTKEY=Fa},function(e,y,ea){function x(f,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);f.prototype=Object.create(e&&e.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(f,e):f.__proto__=e)}Object.defineProperty(y, "__esModule",{value:!0});var ba=function(){return function(f,e){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=f[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!e||h.length!==e);n=!0);}catch(la){r=!0,w=la}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),w=function ja(e,h,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e, h);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return ja(e,h,r)}else{if("value"in n)return n.value;h=n.get;return void 0===h?void 0:h.call(r)}},z=function(){function e(e,h){for(var n=0;nh&&0this.options.maxStack&& this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(f){this.stack.undo.forEach(function(e){e.undo=f.transform(e.undo,!0);e.redo=f.transform(e.redo,!0)});this.stack.redo.forEach(function(e){e.undo=f.transform(e.undo,!0);e.redo=f.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]);return e}(x(ea).default);ea.DEFAULTS={delay:1E3,maxStack:100,userOnly:!1};y.default=ea;y.getLastChangeIndex=r},function(e,y, ea){function x(f){return f&&f.__esModule?f:{default:f}}function ba(f,e){if(!(f instanceof e))throw new TypeError("Cannot call a class as a function");}function w(f,e){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?f:e}function z(f,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);f.prototype=Object.create(e&&e.prototype,{constructor:{value:f, enumerable:!1,writable:!0,configurable:!0}});e&&(Object.setPrototypeOf?Object.setPrototypeOf(f,e):f.__proto__=e)}function r(f,e){var h=2=x))for(var z=this.find(e),r=e-z[1],h=this.iterator(z[0]);(z=h())&&rr?w(z,e-r,Math.min(x,r+f-e)):w(z,0,Math.min(f,e+x-r));r+=f}};e.prototype.map=function(e){return this.reduce(function(x,w){x.push(e(w));return x},[])};e.prototype.reduce=function(e, x){for(var w,z=this.iterator();w=z();)x=e(x,w);return x};return e}();y.default=e},function(e,y,ea){var x=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,f){e.__proto__=f}||function(e,f){for(var h in f)f.hasOwnProperty(h)&&(e[h]=f[h])};return function(h,f){function n(){this.constructor=h}e(h,f);h.prototype=null===f?Object.create(f):(n.prototype=f.prototype,new n)}}();Object.defineProperty(y,"__esModule",{value:!0});var ba=ea(17),w=ea(1),z={attributes:!0, characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};e=function(e){function h(f){var h=e.call(this,f)||this;h.scroll=h;h.observer=new MutationObserver(function(f){h.update(f)});h.observer.observe(h.domNode,z);h.attach();return h}x(h,e);h.prototype.detach=function(){e.prototype.detach.call(this);this.observer.disconnect()};h.prototype.deleteAt=function(f,h){this.update();0===f&&h===this.length()?this.children.forEach(function(f){f.remove()}):e.prototype.deleteAt.call(this,f,h)};h.prototype.formatAt= function(f,h,r,w){this.update();e.prototype.formatAt.call(this,f,h,r,w)};h.prototype.insertAt=function(f,h,r){this.update();e.prototype.insertAt.call(this,f,h,r)};h.prototype.optimize=function(f,h){function n(f){null!=f.domNode[w.DATA_KEY]&&null!=f.domNode[w.DATA_KEY].mutations&&(f instanceof ba.default&&f.children.forEach(n),f.optimize(h))}function r(f,e){void 0===e&&(e=!0);null!=f&&f!==x&&null!=f.domNode.parentNode&&(null==f.domNode[w.DATA_KEY].mutations&&(f.domNode[w.DATA_KEY].mutations=[]),e&& r(f.parent))}var x=this;void 0===f&&(f=[]);void 0===h&&(h={});e.prototype.optimize.call(this,h);for(var z=[].slice.call(this.observer.takeRecords());0y.length)x=y.length;x-=e.length;e=y.indexOf(e,x);return-1!==e&&e===x});Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e,x){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!==typeof e)throw new TypeError("predicate must be a function");for(var y=Object(this),w=y.length>>>0,z,r=0;rx||e.lengthe.length?f:e;var n=f.length>e.length?e:f,r=h.indexOf(n);if(-1!=r)return h=[[1,h.substring(0,r)],[0,n],[1,h.substring(r+n.length)]],f.length>e.length&&(h[0][0]=h[2][0]=-1),h;if(1==n.length)return[[-1,f],[1,e]];if(h=z(f,e))return e=h[1],n=h[3],f=h[4],h=x(h[0],h[2]),e=x(e,n),h.concat([[0,f]],e);a:{h=f.length;n=e.length;r=Math.ceil((h+n)/2);for(var w=2*r,aa=Array(w),y=Array(w),ba=0;bah)ha+=2;else if(Aa>n)ea+=2;else if(ca&&(ua=r+ba-Fa,0<=ua&&ua=Ea){f=da(f,e,Ca,Aa);break a}}}for(Fa=-va+fa;Fa<=va-ia;Fa+=2){ua=r+Fa;Ea=Fa==-va||Fa!=va&&y[ua-1]h)ia+=2;else if(Ca>n)fa+=2;else if(!ca&&(ua=r+ba-Fa,0<=ua&&ua=Ea))){f=da(f,e,Ca,Aa);break a}}}f=[[-1,f],[1,e]]}return f}function da(f,e,h,n){var r=f.substring(h),w=e.substring(n);f=x(f.substring(0,h),e.substring(0,n));r=x(r,w);return f.concat(r)}function ba(f,e){if(!f||!e||f.charAt(0)!=e.charAt(0))return 0;for(var h=0,n=Math.min(f.length,e.length),r=n,w=0;h=f.length?[aa,z,y,ca,x]:null}var n=f.length>e.length?f:e,r=f.length>e.length?e:f;if(4>n.length||2*r.lengthn[4].length?x:n:n:x;else return null;f.length>e.length?(f=x[0],e=x[1],n=x[2],r=x[3]):(n=x[0],r=x[1], f=x[2],e=x[3]);return[f,e,n,r,x[4]]}function r(f){f.push([0,""]);for(var e=0,h=0,n=0,x="",z="",y;e=f.charCodeAt(f.length-1)}function h(f){return 56320<=f.charCodeAt(0)&&57343>=f.charCodeAt(0)}for(var n=!1,r=2;r=e-1;h--)if(h+1e.offsetTop+1.5*w&&r.insert("\n")}return r}function la(e,f){var r=e.data;if("O:P"===e.parentNode.tagName)return f.insert(r.trim());if(0===r.trim().length&&e.parentNode.classList.contains("ql-clipboard"))return f;if(!h(e.parentNode).whiteSpace.startsWith("pre")){var w=function(e,f){f=f.replace(/[^\u00a0]/g,"");return 1>f.length&&e?" ":f};r=r.replace(/\r\n/g," ").replace(/\n/g," ");r=r.replace(/\s\s+/g,w.bind(w,!0));if(null==e.previousSibling&&n(e.parentNode)||null!=e.previousSibling&& n(e.previousSibling))r=r.replace(/^\s+/,w.bind(w,!1));if(null==e.nextSibling&&n(e.parentNode)||null!=e.nextSibling&&n(e.nextSibling))r=r.replace(/\s+$/,w.bind(w,!1))}return f.insert(r)}Object.defineProperty(y,"__esModule",{value:!0});y.matchText=y.matchSpacing=y.matchNewline=y.matchBlot=y.matchAttributor=y.default=void 0;var na="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype? "symbol":typeof e},za=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(Qa){r=!0,w=Qa}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),ra=function(){function e(e,f){for(var h=0;h=n?h:h.compose((new sa.default).retain(h.length()-1).retain(1,{indent:n}))}],["b",aa.bind(aa,"bold")],["i",aa.bind(aa,"italic")],["style",function(){return new sa.default}]],Ja=[Fa.AlignAttribute,Ea.DirectionAttribute].reduce(function(e,f){e[f.keyName]=f;return e},{}),ya=[Fa.AlignStyle,ua.BackgroundStyle,Ca.ColorStyle,Ea.DirectionStyle,Ga.FontStyle, ea.SizeStyle].reduce(function(e,f){e[f.keyName]=f;return e},{});ea=function(e){function h(e,f){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var n=w(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,e,f));n.quill.root.addEventListener("paste",n.onPaste.bind(n));n.container=n.quill.addContainer("ql-clipboard");n.container.setAttribute("contenteditable",!0);n.container.setAttribute("tabindex",-1);n.matchers=[];Ia.concat(n.options.matchers).forEach(function(e){e= za(e,2);var h=e[1];(f.matchVisual||h!==xa)&&n.addMatcher(e[0],h)});return n}z(h,e);ra(h,[{key:"addMatcher",value:function(e,f){this.matchers.push([e,f])}},{key:"convert",value:function(e){if("string"===typeof e)return this.container.innerHTML=e.replace(/>\r?\n +<"),this.convert();e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[Aa.default.blotName]){var h=this.container.innerText;this.container.innerHTML="";return(new sa.default).insert(h,ba({},Aa.default.blotName,e[Aa.default.blotName]))}e= this.prepareMatching();e=za(e,2);e=ca(this.container,e[0],e[1]);f(e,"\n")&&null==e.ops[e.ops.length-1].attributes&&(e=e.compose((new sa.default).retain(e.length()-1).delete(1)));Ba.log("convert",this.container.innerHTML,e);this.container.innerHTML="";return e}},{key:"dangerouslyPasteHTML",value:function(e,f){var h=2e.selectedIndex)return;var w=e.options[e.selectedIndex];w=w.hasAttribute("selected")?!1:w.value||!1}else w=e.classList.contains("ql-active")?!1:e.value||!e.hasAttribute("value"),r.preventDefault();f.quill.focus();r=f.quill.selection.getRange();r=n(r,1)[0];if(null!=f.handlers[h])f.handlers[h].call(f,w);else if(fa.default.query(h).prototype instanceof fa.default.Embed){w=prompt("Enter "+h);if(!w)return;f.quill.updateContents((new aa.default).retain(r.index).delete(r.length).insert(ba({},h,w)),ha.default.sources.USER)}else f.quill.format(h,w,ha.default.sources.USER);f.update(r)});this.controls.push([h,e])}}},{key:"update",value:function(e){var f=null==e?{}:this.quill.getFormat(e);this.controls.forEach(function(h){h=n(h,2);var r=h[0];h=h[1];if("SELECT"===h.tagName){var w=void 0;null==e?w=null:null==f[r]?w=h.querySelector("option[selected]"):Array.isArray(f[r])|| (r=f[r],"string"===typeof r&&(r=r.replace(/"/g,'\\"')),w=h.querySelector('option[value="'+r+'"]'));null==w?(h.value="",h.selectedIndex=-1):w.selected=!0}else null==e?h.classList.remove("ql-active"):h.hasAttribute("value")?(r=f[r]===h.getAttribute("value")||null!=f[r]&&f[r].toString()===h.getAttribute("value")||null==f[r]&&!h.getAttribute("value"),h.classList.toggle("ql-active",r)):h.classList.toggle("ql-active",null!=f[r])})}}]);return f}(ea.default);ea.DEFAULTS={};ea.DEFAULTS={container:null,handlers:{clean:function(){var e= this,f=this.quill.getSelection();null!=f&&(0==f.length?(f=this.quill.getFormat(),Object.keys(f).forEach(function(f){null!=fa.default.query(f,fa.default.Scope.INLINE)&&e.quill.format(f,!1)})):this.quill.removeFormat(f,ha.default.sources.USER))},direction:function(e){var f=this.quill.getFormat().align;"rtl"===e&&null==f?this.quill.format("align","right",ha.default.sources.USER):e||"right"!==f||this.quill.format("align",!1,ha.default.sources.USER);this.quill.format("direction",e,ha.default.sources.USER)}, indent:function(e){var f=this.quill.getFormat(this.quill.getSelection()),h=parseInt(f.indent||0);if("+1"===e||"-1"===e)e="+1"===e?1:-1,"rtl"===f.direction&&(e*=-1),this.quill.format("indent",h+e,ha.default.sources.USER)},link:function(e){!0===e&&(e=prompt("Enter link URL:"));this.quill.format("link",e,ha.default.sources.USER)},list:function(e){var f=this.quill.getFormat(this.quill.getSelection());"check"===e?"checked"===f.list||"unchecked"===f.list?this.quill.format("list",!1,ha.default.sources.USER): this.quill.format("list","unchecked",ha.default.sources.USER):this.quill.format("list",e,ha.default.sources.USER)}}};y.default=ea;y.addControls=h},function(e){e.exports=' '},function(e,y,ea){function x(e,h){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return!h||"object"!==typeof h&&"function"!==typeof h?e:h}function ba(e,h){if("function"!==typeof h&&null!==h)throw new TypeError("Super expression must either be null or a function, not "+typeof h);e.prototype=Object.create(h&&h.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});h&&(Object.setPrototypeOf?Object.setPrototypeOf(e,h):e.__proto__=h)}Object.defineProperty(y,"__esModule",{value:!0});var w=function(){function e(e,f){for(var h=0;hr.right&&(f=r.right-h.right,this.root.style.left=w+f+"px");h.leftr.bottom&&(this.root.style.top=x-(e.bottom-e.top+(h.bottom-h.top))+"px",this.root.classList.add("ql-flip"));return f}},{key:"show",value:function(){this.root.classList.remove("ql-editing");this.root.classList.remove("ql-hidden")}}]); return e}();y.default=e},function(e,y,ea){function x(e){return e&&e.__esModule?e:{default:e}}function ba(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!==typeof f?e:f}function z(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype= Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(y,"__esModule",{value:!0});var r=function(){return function(e,f){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var h=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),z;!(n=(z=x.next()).done)&&(h.push(z.value),!f||h.length!==f);n=!0);}catch(ua){r=!0,w=ua}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w; }}return h}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=function oa(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return oa(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}},f=function(){function e(e,f){for(var h=0;h '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '},function(e){e.exports= ' '},function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '}, function(e){e.exports=' '},function(e){e.exports=' '}, function(e){e.exports=' '},function(e,y,ea){function x(e){return e&&e.__esModule?e:{default:e}}function ba(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function");}function w(e,f){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!f||"object"!==typeof f&&"function"!== typeof f?e:f}function z(e,f){if("function"!==typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function, not "+typeof f);e.prototype=Object.create(f&&f.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});f&&(Object.setPrototypeOf?Object.setPrototypeOf(e,f):e.__proto__=f)}Object.defineProperty(y,"__esModule",{value:!0});y.default=y.BubbleTooltip=void 0;var r=function ra(e,f,h){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e, f);if(void 0===n){if(e=Object.getPrototypeOf(e),null!==e)return ra(e,f,h)}else{if("value"in n)return n.value;f=n.get;return void 0===f?void 0:f.call(h)}},h=function(){function e(e,f){for(var h=0;h