/** 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([[2],{377:function(ia,ba,e){(function(e){(function(e,ba){ia.exports=ba()})("undefined"!==typeof self?self:this,function(){return function(e){function x(da){if(ba[da])return ba[da].exports;var aa=ba[da]={i:da,l:!1,exports:{}};e[da].call(aa.exports,aa,aa.exports,x);aa.l=!0;return aa.exports}var ba={};x.m=e;x.c=ba;x.d=function(e,aa,w){x.o(e,aa)||Object.defineProperty(e,aa,{configurable:!1,enumerable:!0,get:w})};x.n=function(e){var aa= e&&e.__esModule?function(){return e["default"]}:function(){return e};x.d(aa,"a",aa);return aa};x.o=function(e,x){return Object.prototype.hasOwnProperty.call(e,x)};x.p="";return x(x.s=109)}([function(e,ba,ca){Object.defineProperty(ba,"__esModule",{value:!0});e=ca(17);var x=ca(18),aa=ca(19),w=ca(45),y=ca(46),n=ca(47),h=ca(48),f=ca(49),r=ca(12),z=ca(32),fa=ca(33),ha=ca(31);ca=ca(1);ba.default={Scope:ca.Scope,create:ca.create,find:ca.find,query:ca.query,register:ca.register,Container:e.default,Format:x.default, Leaf:aa.default,Embed:h.default,Scroll:w.default,Block:n.default,Inline:y.default,Text:f.default,Attributor:{Attribute:r.default,Class:z.default,Style:fa.default,Store:ha.default}}},function(e,ba){function x(e,f){void 0===f&&(f=!1);return null==e?null:null!=e[ba.DATA_KEY]?e[ba.DATA_KEY].blot:f?x(e.parentNode,f):null}function da(e,w){void 0===w&&(w=z.ANY);if("string"===typeof e)var x=r[e]||n[e];else if(e instanceof Text||e.nodeType===Node.TEXT_NODE)x=r.text;else if("number"===typeof e)e&z.LEVEL&z.BLOCK? x=r.block:e&z.LEVEL&z.INLINE&&(x=r.inline);else if(e instanceof HTMLElement){var y=(e.getAttribute("class")||"").split(/\s+/),aa;for(aa in y)if(x=h[y[aa]])break;x=x||f[e.tagName]}return null==x?null:w&z.LEVEL&x.scope&&w&z.TYPE&x.scope?x:null}function aa(){for(var e=[],w=0;w=e?this:this.push({"delete":e})};x.prototype.retain=function(e,h){if(0>=e)return this;e={retain:e}; null!=h&&"object"===typeof h&&0y)r.push(f.next());else if(0=h||(fa.default.query(n,fa.default.Scope.BLOCK)? e+h===this.length()&&this.format(n,w):f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"formatAt",this).call(this,e,Math.min(h,this.length()-e-1),n,w),this.cache={})}},{key:"insertAt",value:function(e,h,n){if(null!=n)return f(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"insertAt",this).call(this,e,h,n);if(0!==h.length){h=h.split("\n");n=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(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"split",this).call(this, e,h);this.cache={};return h}}]);return r}(fa.default.Block);ia.blotName="block";ia.tagName="P";ia.defaultChild="break";ia.allowedChildren=[e.default,fa.default.Embed,ca.default];ba.bubbleFormats=n;ba.BlockEmbed=ea;ba.default=ia},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(e,f,h){f in e?Object.defineProperty(e,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):e[f]=h;return e}function w(e,f){f=(0,ra.default)(!0,{container:e,modules:{clipboard:!0,keyboard:!0, history:!0}},f);if(f.theme&&f.theme!==va.DEFAULTS.theme){if(f.theme=va.import("themes/"+f.theme),null==f.theme)throw Error("Invalid theme "+f.theme+". Did you register it?");}else f.theme=Da.default;e=(0,ra.default)(!0,{},f.theme.DEFAULTS);[e,f].forEach(function(e){e.modules=e.modules||{};Object.keys(e.modules).forEach(function(f){!0===e.modules[f]&&(e.modules[f]={})})});var h=Object.keys(e.modules).concat(Object.keys(f.modules)).reduce(function(e,f){var h=va.import("modules/"+f);null==h?qa.error("Cannot load "+ f+" module. Are you sure you registered it?"):e[f]=h.DEFAULTS||{};return e},{});null!=f.modules&&f.modules.toolbar&&f.modules.toolbar.constructor!==Object&&(f.modules.toolbar={container:f.modules.toolbar});f=(0,ra.default)(!0,{},va.DEFAULTS,{modules:h},e,f);["bounds","container","scrollingContainer"].forEach(function(e){"string"===typeof f[e]&&(f[e]=document.querySelector(f[e]))});f.modules=Object.keys(f.modules).reduce(function(e,h){f.modules[h]&&(e[h]=f.modules[h]);return e},{});return f}function y(e, f,n,r){if(this.options.strict&&!this.isEnabled()&&f===ea.default.sources.USER)return new fa.default;var w=null==n?null:this.getSelection(),x=this.editor.delta;e=e();null!=w&&(!0===n&&(n=w.index),null==r?w=h(w,e,f):0!==r&&(w=h(w,n,r,f)),this.setSelection(w,ea.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()}z(e,null,[{key:"debug",value:function(e){!0===e&&(e="log");sa.default.level(e)}},{key:"find",value:function(e){return e.__quill||ma.default.find(e)}},{key:"import",value:function(e){null==this.imports[e]&&qa.error("Cannot import "+e+". Are you sure it was registered?");return this.imports[e]}},{key:"register",value:function(e,f){var h=this,n=2f.compare(this.statics.blotName,x)&&y.default.query(x,y.default.Scope.BLOT)?(e=this.isolate(e,h),aa&&e.wrap(x,aa)):w(f.prototype.__proto__|| Object.getPrototypeOf(f.prototype),"formatAt",this).call(this,e,h,x,aa)}},{key:"optimize",value:function(e){w(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"optimize",this).call(this,e);this.parent instanceof f&&0r||r>=e+f)){var w=this.newlineIndex(e,!0)+1;r=r-w+1;var y=this.isolate(w,r),aa=y.next;y.format(h,n);aa instanceof x&&aa.formatAt(0,e-w+f-r,h,n)}}}},{key:"insertAt",value:function(e,f,h){null==h&&(e=this.descendant(ea.default,e),e=n(e,2),e[0].insertAt(e[1],f))}},{key:"length",value:function(){var e=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?e:e+1}},{key:"newlineIndex",value:function(e){if(1f[n].indexOf(e[n])&&(h[n]=f[n].concat([e[n]])):h[n]=[f[n],e[n]];return h},{})}function y(e){return e.reduce(function(e, f){if(1===f.insert){var h=(0,na.default)(f.attributes);delete h.image;return e.insert({image:f.attributes.image},h)}null==f.attributes||!0!==f.attributes.list&&!0!==f.attributes.bullet||(f=(0,na.default)(f),f.attributes.list?f.attributes.list="ordered":(f.attributes.list="bullet",delete f.attributes.bullet));return"string"===typeof f.insert?(h=f.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),e.insert(h,f.attributes)):e.push(f)},new r.default)}Object.defineProperty(ba,"__esModule",{value:!0});var n= "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},h=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(Fa){r=!0,w=Fa}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 e(e,f){for(var h=0;h=w&&!x.endsWith("\n")&&(r=!0);f.scroll.insertAt(e,x);x=f.scroll.line(e);x=h(x,2);var da=x[0],ba=x[1];x=(0,sa.default)({},(0,ia.bubbleFormats)(da));da instanceof ma.default&&(da=da.descendant(fa.default.Leaf,ba),da=h(da,1)[0],x=(0,sa.default)(x,(0,ia.bubbleFormats)(da)));aa=z.default.attributes.diff(x,aa)||{}}else if("object"===n(x.insert)){da=Object.keys(x.insert)[0];if(null==da)return e;f.scroll.insertAt(e,da,x.insert[da])}w+=y}Object.keys(aa).forEach(function(h){f.scroll.formatAt(e, y,h,aa[h])});return e+y},0);e.reduce(function(e,h){return"number"===typeof h.delete?(f.scroll.deleteAt(e,h.delete),e):e+(h.retain||h.insert.length||1)},0);this.scroll.batchEnd();return this.update(e)}},{key:"deleteText",value:function(e,f){this.scroll.deleteAt(e,f);return this.update((new r.default).retain(e).delete(f))}},{key:"formatLine",value:function(e,f){var h=this,n=2=e.rangeCount)return null;e=e.getRangeAt(0);if(null==e)return null;e=this.normalizeNative(e);ea.info("getNativeRange",e);return e}},{key:"getRange",value:function(){var e= this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(e){var h=this,r=[[e.start.node,e.start.offset]];e.native.collapsed||r.push([e.end.node,e.end.offset]);r=r.map(function(e){var r=n(e,2);e=r[0];r=r[1];var w=f.default.find(e,!0),x=w.offset(h.scroll);return 0===r?x:w instanceof f.default.Container?x+w.length():x+w.index(e,r)});e=Math.min(Math.max.apply(Math, aa(r)),this.scroll.length()-1);r=Math.min.apply(Math,[e].concat(aa(r)));return new ha(r,e-r)}},{key:"normalizeNative",value:function(e){if(!y(this.root,e.startContainer)||!e.collapsed&&!y(this.root,e.endContainer))return null;e={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};[e.start,e.end].forEach(function(e){for(var f=e.node,h=e.offset;!(f instanceof Text)&&0h)f=f.childNodes[h],h=0;else if(f.childNodes.length=== h)f=f.lastChild,h=f instanceof Text?f.data.length:f.childNodes.length+1;else break;e.node=f;e.offset=h});return e}},{key:"rangeToNative",value:function(e){var f=this;e=e.collapsed?[e.index]:[e.index,e.index+e.length];var h=[],r=this.scroll.length();e.forEach(function(e,w){e=Math.min(r-1,e);e=f.scroll.leaf(e);var x=n(e,2);e=x[1];w=x[0].position(e,0!==w);e=n(w,2);w=e[0];e=e[1];h.push(w,e)});2>h.length&&(h=h.concat(h));return h}},{key:"scrollIntoView",value:function(e){var f=this.lastRange;if(null!= f){var h=this.getBounds(f.index,f.length);if(null!=h){var r=this.scroll.length()-1,w=this.scroll.line(Math.min(f.index,r)),x=w=n(w,1)[0];0f.bottom&&(e.scrollTop+=h.bottom-f.bottom))}}}},{key:"setNativeRange",value:function(e,f){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=y.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]?y.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(),r=this.ops.slice(this.index);this.offset= e;this.index=h;return[f].concat(r)}return[]};e.exports=y},function(x){var ba=function(){function x(e,h){return null!=h&&e instanceof h}function da(f,r,z,aa,ba){function fa(f,z){if(null===f)return null;if(0===z||"object"!=typeof f)return f;if(x(f,y))var ja=new y;else if(x(f,n))ja=new n;else if(x(f,h))ja=new h(function(e,h){f.then(function(f){e(fa(f,z-1))},function(e){h(fa(e,z-1))})});else if(da.__isArray(f))ja=[];else if(da.__isRegExp(f))ja=new RegExp(f.source,w(f)),f.lastIndex&&(ja.lastIndex=f.lastIndex); else if(da.__isDate(f))ja=new Date(f.getTime());else{if(ha&&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 ia=Object.getPrototypeOf(f);ja=Object.create(ia)}else ja=Object.create(aa),ia=aa}if(r){var qa=ca.indexOf(f);if(-1!=qa)return ea[qa];ca.push(f);ea.push(ja)}x(f,y)&&f.forEach(function(e,f){f=fa(f,z-1);e=fa(e,z-1);ja.set(f,e)});x(f,n)&&f.forEach(function(e){e=fa(e,z-1);ja.add(e)}); for(var ka in f){var la;ia&&(la=Object.getOwnPropertyDescriptor(ia,ka));la&&null==la.set||(ja[ka]=fa(f[ka],z-1))}if(Object.getOwnPropertySymbols)for(qa=Object.getOwnPropertySymbols(f),ka=0;ka=this.length()?null==n||null==r.default.query(h,r.default.Scope.BLOCK)?(e=r.default.create(this.statics.defaultChild),this.appendChild(e),null==n&&h.endsWith("\n")&&(h=h.slice(0,-1)),e.insertAt(0,h,n)):(h=r.default.create(h,n),this.appendChild(h)):f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertAt",this).call(this,e,h,n),this.optimize()}},{key:"insertBefore", value:function(e,h){if(e.statics.scope===r.default.Scope.INLINE_BLOT){var n=r.default.create(this.statics.defaultChild);n.appendChild(e);e=n}f(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,e,h)}},{key:"leaf",value:function(e){return this.path(e).pop()||[null,-1]}},{key:"line",value:function(e){return e===this.length()?this.line(e-1):this.descendant(y,e)}},{key:"lines",value:function(){return function va(e,f,h){var n=[],w=h;e.children.forEachAt(f,h,function(e, f,h){y(e)?n.push(e):e instanceof r.default.Container&&(n=n.concat(va(e,f,w)));w-=h});return n}(this,0=this.quill.getLength())){var h=this.quill.getLine(e.index), n=ma(h,1)[0];h={};if(0===f.offset){var r=this.quill.getLine(e.index-1);r=ma(r,1)[0];null!=r&&1= this.quill.getLength()-h)){var n={},r=0,w=this.quill.getLine(e.index);w=ma(w,1)[0];f.offset>=w.length()-1&&(f=this.quill.getLine(e.index+1),f=ma(f,1)[0])&&(n=w.formats(),r=this.quill.getFormat(e.index,1),n=qa.default.attributes.diff(n,r)||{},r=f.length());this.quill.deleteText(e.index,h,oa.default.sources.USER);0=w.length(),format:e.quill.getFormat(r),offset:x,prefix:z,suffix:y};h.some(function(f){if(null!=f.collapsed&& f.collapsed!==ba.collapsed||null!=f.empty&&f.empty!==ba.empty||null!=f.offset&&f.offset!==ba.offset)return!1;if(Array.isArray(f.format)){if(f.format.every(function(e){return null==ba.format[e]}))return!1}else if("object"===ia(f.format)&&!Object.keys(f.format).every(function(e){return!0===f.format[e]?null!=ba.format[e]:!1===f.format[e]?null==ba.format[e]:(0,ra.default)(f.format[e],ba.format[e])}))return!1;return null!=f.prefix&&!f.prefix.test(ba.prefix)||null!=f.suffix&&!f.suffix.test(ba.suffix)?!1: !0!==f.handler.call(e,r,ba)})&&f.preventDefault()}}}})}}]);return n}(ca.default);ya.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};ya.DEFAULTS={bindings:{bold:ea("bold"),italic:ea("italic"),underline:ea("underline"),indent:{key:ya.keys.TAB,format:["blockquote","indent","list"],handler:function(e,f){if(f.collapsed&&0!==f.offset)return!0;this.quill.format("indent","+1",oa.default.sources.USER)}},outdent:{key:ya.keys.TAB,shiftKey:!0,format:["blockquote","indent", "list"],handler:function(e,f){if(f.collapsed&&0!==f.offset)return!0;this.quill.format("indent","-1",oa.default.sources.USER)}},"outdent backspace":{key:ya.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(e,f){null!=f.format.indent?this.quill.format("indent","-1",oa.default.sources.USER):null!=f.format.list&&this.quill.format("list",!1,oa.default.sources.USER)}},"indent code-block":fa(!0),"outdent code-block":fa(!1), "remove tab":{key:ya.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(e){this.quill.deleteText(e.index-1,1,oa.default.sources.USER)}},tab:{key:ya.keys.TAB,handler:function(e){this.quill.history.cutoff();var f=(new Da.default).retain(e.index).delete(e.length).insert("\t");this.quill.updateContents(f,oa.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(e.index+1,oa.default.sources.SILENT)}},"list empty enter":{key:ya.keys.ENTER,collapsed:!0,format:["list"],empty:!0, handler:function(e,f){this.quill.format("list",!1,oa.default.sources.USER);f.format.indent&&this.quill.format("indent",!1,oa.default.sources.USER)}},"checklist enter":{key:ya.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(e){var f=this.quill.getLine(e.index),h=ma(f,2);f=h[0];h=h[1];var n=(0,sa.default)({},f.formats(),{list:"checked"});f=(new Da.default).retain(e.index).insert("\n",n).retain(f.length()-h-1).retain(1,{list:"unchecked"});this.quill.updateContents(f,oa.default.sources.USER); this.quill.setSelection(e.index+1,oa.default.sources.SILENT);this.quill.scrollIntoView()}},"header enter":{key:ya.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(e,f){var h=this.quill.getLine(e.index),n=ma(h,2);h=n[0];n=n[1];f=(new Da.default).retain(e.index).insert("\n",f.format).retain(h.length()-n-1).retain(1,{header:null});this.quill.updateContents(f,oa.default.sources.USER);this.quill.setSelection(e.index+1,oa.default.sources.SILENT);this.quill.scrollIntoView()}},"list autofill":{key:" ", collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(e,f){var h=f.prefix.length,n=this.quill.getLine(e.index),r=ma(n,2);n=r[0];r=r[1];if(r>h)return!0;switch(f.prefix.trim()){case "[]":case "[ ]":f="unchecked";break;case "[x]":f="checked";break;case "-":case "*":f="bullet";break;default:f="ordered"}this.quill.insertText(e.index," ",oa.default.sources.USER);this.quill.history.cutoff();f=(new Da.default).retain(e.index-r).delete(h+1).retain(n.length()-2-r).retain(1, {list:f});this.quill.updateContents(f,oa.default.sources.USER);this.quill.history.cutoff();this.quill.setSelection(e.index-h,oa.default.sources.SILENT)}},"code exit":{key:ya.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(e){var f=this.quill.getLine(e.index),h=ma(f,2);f=h[0];h=h[1];e=(new Da.default).retain(e.index+f.length()-h-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(e,oa.default.sources.USER)}},"embed left":n(ya.keys.LEFT, !1),"embed left shift":n(ya.keys.LEFT,!0),"embed right":n(ya.keys.RIGHT,!1),"embed right shift":n(ya.keys.RIGHT,!0)}};ba.default=ya;ba.SHORTKEY=Ca},function(e,ba,ca){function x(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(ba, "__esModule",{value:!0});var aa=function(){return function(e,h){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var f=[],n=!0,r=!1,w=void 0;try{for(var x=e[Symbol.iterator](),y;!(n=(y=x.next()).done)&&(f.push(y.value),!h||f.length!==h);n=!0);}catch(la){r=!0,w=la}finally{try{if(!n&&x["return"])x["return"]()}finally{if(r)throw w;}}return f}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),w=function ka(e,h,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e, h);if(void 0===r){if(e=Object.getPrototypeOf(e),null!==e)return ka(e,h,n)}else{if("value"in r)return r.value;h=r.get;return void 0===h?void 0:h.call(n)}},y=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(e){this.stack.undo.forEach(function(f){f.undo=e.transform(f.undo,!0);f.redo=e.transform(f.redo,!0)});this.stack.redo.forEach(function(f){f.undo=e.transform(f.undo,!0);f.redo=e.transform(f.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]);return f}(x(ca).default);ca.DEFAULTS={delay:1E3,maxStack:100,userOnly:!1};ba.default=ca;ba.getLastChangeIndex=n},function(e, ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(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 y(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)}function n(e,f){var h=2=x))for(var y=this.find(e),n=e-y[1],h=this.iterator(y[0]);(y=h())&&nn?w(y,e-n,Math.min(x,n+f-e)):w(y,0,Math.min(f,e+x-n));n+=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,y=this.iterator();w=y();)x=e(x,w);return x};return e}();ba.default=e},function(e,ba,ca){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(ba,"__esModule",{value:!0});var aa=ca(17),w=ca(1),y= {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(e){h.update(e)});h.observer.observe(h.domNode,y);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(e){e.remove()}):e.prototype.deleteAt.call(this, f,h)};h.prototype.formatAt=function(f,h,n,w){this.update();e.prototype.formatAt.call(this,f,h,n,w)};h.prototype.insertAt=function(f,h,n){this.update();e.prototype.insertAt.call(this,f,h,n)};h.prototype.optimize=function(f,h){function n(e){null!=e.domNode[w.DATA_KEY]&&null!=e.domNode[w.DATA_KEY].mutations&&(e instanceof aa.default&&e.children.forEach(n),e.optimize(h))}function r(e,f){void 0===f&&(f=!0);null!=e&&e!==x&&null!=e.domNode.parentNode&&(null==e.domNode[w.DATA_KEY].mutations&&(e.domNode[w.DATA_KEY].mutations= []),f&&r(e.parent))}var x=this;void 0===f&&(f=[]);void 0===h&&(h={});e.prototype.optimize.call(this,h);for(var y=[].slice.call(this.observer.takeRecords());0aa.length)x=aa.length;x-=e.length;e=aa.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 aa=Object(this),w=aa.length>>>0,y,n=0;nx||e.lengthf.length?e:f;var n=e.length>f.length?f:e,r=h.indexOf(n);if(-1!=r)return h=[[1,h.substring(0,r)],[0,n],[1,h.substring(r+n.length)]],e.length>f.length&&(h[0][0]=h[2][0]=-1),h;if(1==n.length)return[[-1,e],[1,f]];if(h=y(e,f))return f=h[1],n=h[3],e=h[4],h=x(h[0],h[2]),f=x(f,n),h.concat([[0,e]],f);a:{h=e.length;n=f.length;r=Math.ceil((h+n)/2);for(var w= 2*r,z=Array(w),aa=Array(w),ba=0;bah)ea+=2;else if(Aa>n)ca+=2;else if(fa&&(ya=r+ba-Ca,0<=ya&&ya=Fa){e=da(e,f,Ea,Aa);break a}}}for(Ca=-ua+ha;Ca<=ua-ia;Ca+=2){ya=r+Ca;Fa= Ca==-ua||Ca!=ua&&aa[ya-1]h)ia+=2;else if(Ea>n)ha+=2;else if(!fa&&(ya=r+ba-Ca,0<=ya&&ya=Fa))){e=da(e,f,Ea,Aa);break a}}}e=[[-1,e],[1,f]]}return e}function da(e,f,h,n){var r=e.substring(h),w=f.substring(n);e=x(e.substring(0,h),f.substring(0,n));r=x(r,w);return e.concat(r)}function aa(e,f){if(!e||!f||e.charAt(0)!=f.charAt(0))return 0;for(var h= 0,n=Math.min(e.length,f.length),r=n,w=0;h=e.length?[y,z,ba,da,x]:null}var n=e.length>f.length?e:f,r=e.length>f.length?f:e;if(4>n.length||2*r.lengthn[4].length?x:n:n:x;else return null;e.length> f.length?(e=x[0],f=x[1],n=x[2],r=x[3]):(n=x[0],r=x[1],e=x[2],f=x[3]);return[e,f,n,r,x[4]]}function n(e){e.push([0,""]);for(var f=0,h=0,r=0,x="",y="",z;f=e.charCodeAt(e.length-1)}function h(e){return 56320<=e.charCodeAt(0)&&57343>=e.charCodeAt(0)}for(var n=!1,r=2;r=f-1;h--)if(h+1e.offsetTop+1.5*w&&n.insert("\n")}return n}function la(e,f){var n=e.data;if("O:P"===e.parentNode.tagName)return f.insert(n.trim());if(0===n.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};n=n.replace(/\r\n/g," ").replace(/\n/g," ");n=n.replace(/\s\s+/g,w.bind(w,!0));if(null==e.previousSibling&&r(e.parentNode)||null!=e.previousSibling&&r(e.previousSibling))n=n.replace(/^\s+/,w.bind(w,!1));if(null==e.nextSibling&&r(e.parentNode)||null!=e.nextSibling&&r(e.nextSibling))n=n.replace(/\s+$/,w.bind(w,!1))}return f.insert(n)}Object.defineProperty(ba,"__esModule",{value:!0});ba.matchText=ba.matchSpacing=ba.matchNewline=ba.matchBlot=ba.matchAttributor=ba.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},ra=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](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(Pa){r=!0,w=Pa}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");}}(),sa=function(){function e(e,f){for(var h=0;h=n?h:h.compose((new qa.default).retain(h.length()-1).retain(1,{indent:n}))}],["b",fa.bind(fa,"bold")],["i",fa.bind(fa,"italic")],["style",function(){return new qa.default}]], Ja=[Ca.AlignAttribute,Fa.DirectionAttribute].reduce(function(e,f){e[f.keyName]=f;return e},{}),za=[Ca.AlignStyle,ya.BackgroundStyle,Ea.ColorStyle,Fa.DirectionStyle,Ga.FontStyle,ca.SizeStyle].reduce(function(e,f){e[f.keyName]=f;return e},{});ca=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=ra(e,2);var h=e[1];(f.matchVisual||h!==ma)&&n.addMatcher(e[0],h)});return n}y(h,e);sa(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 qa.default).insert(h,aa({},Aa.default.blotName,e[Aa.default.blotName]))}e=this.prepareMatching();e=ra(e,2);e=z(this.container,e[0],e[1]);f(e,"\n")&&null==e.ops[e.ops.length-1].attributes&&(e=e.compose((new qa.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"), n.preventDefault();f.quill.focus();n=f.quill.selection.getRange();n=r(n,1)[0];if(null!=f.handlers[h])f.handlers[h].call(f,w);else if(ea.default.query(h).prototype instanceof ea.default.Embed){w=prompt("Enter "+h);if(!w)return;f.quill.updateContents((new fa.default).retain(n.index).delete(n.length).insert(aa({},h,w)),ha.default.sources.USER)}else f.quill.format(h,w,ha.default.sources.USER);f.update(n)});this.controls.push([h,e])}}},{key:"update",value:function(e){var f=null==e?{}:this.quill.getFormat(e); this.controls.forEach(function(h){h=r(h,2);var n=h[0];h=h[1];if("SELECT"===h.tagName){var w=void 0;null==e?w=null:null==f[n]?w=h.querySelector("option[selected]"):Array.isArray(f[n])||(n=f[n],"string"===typeof n&&(n=n.replace(/"/g,'\\"')),w=h.querySelector('option[value="'+n+'"]'));null==w?(h.value="",h.selectedIndex=-1):w.selected=!0}else null==e?h.classList.remove("ql-active"):h.hasAttribute("value")?(n=f[n]===h.getAttribute("value")||null!=f[n]&&f[n].toString()===h.getAttribute("value")||null== f[n]&&!h.getAttribute("value"),h.classList.toggle("ql-active",n)):h.classList.toggle("ql-active",null!=f[n])})}}]);return f}(ca.default);ca.DEFAULTS={};ca.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!=ea.default.query(f,ea.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)}}};ba.default=ca;ba.addControls=h},function(e){e.exports=' '}, function(e,ba,ca){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 aa(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(ba, "__esModule",{value:!0});var w=function(){function e(e,f){for(var h=0;hn.right&&(f=n.right-h.right,this.root.style.left=w+f+"px");h.leftn.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}();ba.default=e},function(e,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(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 y(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(ba,"__esModule",{value:!0});var n=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](),y;!(n=(y=x.next()).done)&&(h.push(y.value),!f||h.length!==f);n=!0);}catch(ya){r=!0,w=ya}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 va(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 va(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,ba,ca){function x(e){return e&&e.__esModule?e:{default:e}}function aa(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 y(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(ba,"__esModule",{value:!0});ba.default=ba.BubbleTooltip=void 0;var n=function sa(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 sa(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