!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}("undefined"!=typeof self?self:this,function(){return r={},o.m=n=[function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),l=n(48),a=n(49),s=n(50),u=n(51),c=n(52),f=n(11),h=n(29),p=n(30),d=n(28),d={Scope:(n=n(1)).Scope,create:n.create,find:n.find,query:n.query,register:n.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=d},function(t,o,e){"use strict";function r(t,e){var n;if(void 0===e&&(e=u.ANY),"string"==typeof t)n=p[t]||c[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=p.text;else if("number"==typeof t)t&u.LEVEL&u.BLOCK?n=p.block:t&u.LEVEL&u.INLINE&&(n=p.inline);else if(t instanceof HTMLElement){var o,r=(t.getAttribute("class")||"").split(/\s+/);for(o in r)if(n=f[r[o]])break;n=n||h[t.tagName]}return null!=n&&e&u.LEVEL&n.scope&&e&u.TYPE&n.scope?n:null}var i,n=this&&this.__extends||(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}),function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(o,"__esModule",{value:!0});n(s,l=Error);var l,a=s;function s(t){var e=this;return(e=l.call(this,t="[Parchment] "+t)||this).message=t,e.name=e.constructor.name,e}o.ParchmentError=a;var u,c={},f={},h={},p={};o.DATA_KEY="__blot",(n=u=o.Scope||(o.Scope={}))[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",o.create=function(t,e){var n=r(t);if(null==n)throw new a("Unable to create "+t+" blot");return new n(t instanceof Node||t.nodeType===Node.TEXT_NODE?t:n.create(e),e)},o.find=function t(e,n){return void 0===n&&(n=!1),null==e?null:null!=e[o.DATA_KEY]?e[o.DATA_KEY].blot:n?t(e.parentNode,n):null},o.query=r,o.register=function e(){for(var t=[],n=0;n=this.length()-1)?(e=this.clone(),0===t?(this.parent.insertBefore(e,this),this):(this.parent.insertBefore(e,this.next),e)):(n=s(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"split",this).call(this,t,n),this.cache={},n)}}]);var g=m;function m(t){return r(this,m),(t=i(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,t))).cache={},t}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[d.default,h.default.Embed,y.default],e.bubbleFormats=a,e.BlockEmbed=n,e.default=g},function(t,e,n){function s(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}var u=n(54),c=n(12),o=n(2),f=n(20),r=String.fromCharCode(0);s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&0"+t+"


"),this.setContents(t),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}k.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},k.events=y.default.events,k.sources=y.default.sources,k.version="1.3.6",k.imports={delta:p.default,parchment:v.default,"core/module":b.default,"core/theme":w.default},e.expandConfig=l,e.overload=s,e.default=k},function(t,e,n){"use strict";function o(t){var e=1n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),t):null}},{key:"rangeToNative",value:function(t){var o=this,t=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return t.forEach(function(t,e){t=Math.min(i-1,t);var n=(t=s(n=o.scroll.leaf(t),2))[0],t=t[1],n=(e=s(e=n.position(t,0!==e),2))[0],t=e[1];r.push(n,t)}),r=r.length<2?r.concat(r):r}},{key:"scrollIntoView",value:function(t){var e,n,o,r,i=this.lastRange;null!=i&&null!=(e=this.getBounds(i.index,i.length))&&(o=this.scroll.length()-1,r=n=s(r=this.scroll.line(Math.min(i.index,o)),1)[0],0r.bottom&&(t.scrollTop+=e.bottom-r.bottom))}},{key:"setNativeRange",value:function(t,e){var n,o,r=2=this.quill.getLength()-l||(r={},i=0,n=this.quill.getLine(t.index),o=y(n,1)[0],e.offset>=o.length()-1&&(n=this.quill.getLine(t.index+1),e=y(n,1)[0])&&(n=o.formats(),o=this.quill.getFormat(t.index,1),r=_.default.attributes.diff(n,o)||{},i=e.length()),this.quill.deleteText(t.index,l,w.default.sources.USER),0 '},function(t,e,n){"use strict";function r(t,e,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,e);return void 0!==o?"value"in o?o.value:void 0!==(o=o.get)?o.call(n):void 0:null===(t=Object.getPrototypeOf(t))?void 0:r(t,e,n)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t},o=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(i,((n=n(16))&&n.__esModule?n:{default:n}).default),o(i,[{key:"buildItem",value:function(t){var e=r(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"buildItem",this).call(this,t);return e.style.backgroundColor=t.getAttribute("value")||"",e}},{key:"selectItem",value:function(t,e){r(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"selectItem",this).call(this,t,e),e=this.label.querySelector(".ql-color-label"),t=t&&t.getAttribute("data-value")||"",e&&("line"===e.tagName?e.style.stroke=t:e.style.fill=t)}}]),i);function i(t,e){if(this instanceof i)return(t=function(t,e){if(t)return!e||"object"!=typeof e&&"function"!=typeof e?t:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,t))).label.innerHTML=e,t.container.classList.add("ql-color-picker"),[].slice.call(t.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),t;throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;no.right&&(i=o.right-r.right,this.root.style.left=e+i+"px"),r.lefto.bottom&&(r=r.bottom-r.top,r=t.bottom-t.top+r,this.root.style.top=n-r+"px",this.root.classList.add("ql-flip")),i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}],i=0;in.length)&&(e=n.length),e-=t.length,-1!==(t=n.indexOf(t,e))&&t===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),o=n.length>>>0,r=arguments[1],i=0;ie.length?t:e,i=t.length>e.length?e:t;if(-1!=(n=r.indexOf(i)))return o=[[V,r.substring(0,n)],[W,i],[V,r.substring(n+i.length)]],t.length>e.length&&(o[0][0]=o[2][0]=Z),o;if(1==i.length)return[[Z,t],[V,e]];if(a=e,p=(l=t).length>a.length?l:a,d=l.length>a.length?a:l,d=!(p.length<4||2*d.lengthp[4].length?h:p,l.length>a.length?(s=p[0],u=p[1],c=p[2],f=p[3]):(c=p[0],f=p[1],s=p[2],u=p[3]),[s,u,c,f,p[4]]):null)return r=d[0],n=d[1],o=d[2],i=d[3],d=d[4],o=F(r,o),i=F(n,i),o.concat([[W,d]],i);for(var l,a,s,u,c,f,h,p,d,y=t,b=e,v=y.length,g=b.length,m=Math.ceil((v+g)/2),_=m,O=2*m,w=new Array(O),x=new Array(O),k=0;k=t.length?[o,r,i,l,u]:null}}(t=t.substring(0,t.length-o),e=e.substring(0,e.length-o)),l=(r&&e.unshift([W,r]),i&&e.push([W,i]),function t(e){e.push([W,""]);for(var n,o=0,r=0,i=0,l="",a="";o=this.length()?null==n||null==u.default.query(e,u.default.Scope.BLOCK)?(o=u.default.create(this.statics.defaultChild),this.appendChild(o),null==n&&e.endsWith("\n")&&(e=e.slice(0,-1)),o.insertAt(0,e,n)):(o=u.default.create(e,n),this.appendChild(o)):a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"insertAt",this).call(this,t,e,n),this.optimize())}},{key:"insertBefore",value:function(t,e){var n;t.statics.scope===u.default.Scope.INLINE_BLOT&&((n=u.default.create(this.statics.defaultChild)).appendChild(t),t=n),a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"insertBefore",this).call(this,t,e)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(l,t)}},{key:"lines",value:function(){return function o(t,e,n){var r=[],i=n;return t.children.forEachAt(e,n,function(t,e,n){l(t)?r.push(t):t instanceof u.default.Container&&(r=r.concat(o(t,e,i))),i-=n}),r}(this,0t.offsetTop+1.5*n)&&e.insert("\n"),e}function p(t,e){var n,o=t.data;return"O:P"===t.parentNode.tagName?e.insert(o.trim()):0===o.trim().length&&t.parentNode.classList.contains("ql-clipboard")?e:(!i(t.parentNode).whiteSpace.startsWith("pre")&&(n=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e},o=(o=o.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,n.bind(n,!0)),(null==t.previousSibling&&s(t.parentNode)||null!=t.previousSibling&&s(t.previousSibling))&&(o=o.replace(/^\s+/,n.bind(n,!1))),null==t.nextSibling&&s(t.parentNode)||null!=t.nextSibling&&s(t.nextSibling))&&(o=o.replace(/\s+$/,n.bind(n,!1))),e.insert(o))}Object.defineProperty(t,"__esModule",{value:!0}),t.matchText=t.matchSpacing=t.matchNewline=t.matchBlot=t.matchAttributor=t.default=void 0;function d(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var n=t,o=e,r=[],i=!0,t=!1,e=void 0;try{for(var l,a=n[Symbol.iterator]();!(i=(l=a.next()).done)&&(r.push(l.value),!o||r.length!==o);i=!0);}catch(n){t=!0,e=n}finally{try{!i&&a.return&&a.return()}finally{if(t)throw e}}return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b=function(t,e,n){return e&&M(t.prototype,e),n&&M(t,n),t},v=n(e(2)),g=n(e(4)),m=n(e(0)),_=n(e(6)),O=n(e(10)),w=n(e(7)),x=e(34),k=e(35),E=n(e(13)),N=e(24),j=e(36),A=e(37),e=e(38),q=(0,O.default)("quill:clipboard"),T="__ql-matcher",P=[[Node.TEXT_NODE,p],[Node.TEXT_NODE,f],["br",function(t,e){return a(e,"\n")||e.insert("\n"),e}],[Node.ELEMENT_NODE,f],[Node.ELEMENT_NODE,c],[Node.ELEMENT_NODE,h],[Node.ELEMENT_NODE,u],[Node.ELEMENT_NODE,function(t,e){var n={},o=t.style||{};return o.fontStyle&&"italic"===i(t).fontStyle&&(n.italic=!0),o.fontWeight&&(i(t).fontWeight.startsWith("bold")||700<=parseInt(i(t).fontWeight))&&(n.bold=!0),0\r?\n +\<"),this.convert()):(t=this.quill.getFormat(this.quill.selection.savedRange.index))[E.default.blotName]?(e=this.container.innerText,this.container.innerHTML="",(new g.default).insert(e,r({},E.default.blotName,t[E.default.blotName]))):(e=this.prepareMatching(),e=(t=d(e,2))[0],t=t[1],a(t=function o(r,i,l){return r.nodeType===r.TEXT_NODE?l.reduce(function(t,e){return e(r,t)},new g.default):r.nodeType===r.ELEMENT_NODE?[].reduce.call(r.childNodes||[],function(t,n){var e=o(n,i,l);return n.nodeType===r.ELEMENT_NODE&&(e=i.reduce(function(t,e){return e(n,t)},e),e=(n[T]||[]).reduce(function(t,e){return e(n,t)},e)),t.concat(e)},new g.default):new g.default}(this.container,e,t),"\n")&&null==t.ops[t.ops.length-1].attributes&&(t=t.compose((new g.default).retain(t.length()-1).delete(1))),q.log("convert",this.container.innerHTML,t),this.container.innerHTML="",t)}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=2n&&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(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)}),this.stack.redo.forEach(function(t){t.undo=e.transform(t.undo,!0),t.redo=e.transform(t.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),(i=s).DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=i,e.getLastChangeIndex=r},function(t,e,n){"use strict";function r(t,e,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,e);return void 0!==o?"value"in o?o.value:void 0!==(o=o.get)?o.call(n):void 0:null===(t=Object.getPrototypeOf(t))?void 0:r(t,e,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)})(o,(n=(n=n(0))&&n.__esModule?n:{default:n}).default.Attributor.Class),i(o.prototype,[{key:"add",value:function(t,e){var n;return"+1"!==e&&"-1"!==e||(n=this.value(t)||0,e="+1"===e?n+1:n-1),0===e?(this.remove(t),!0):r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"add",this).call(this,t,e)}},{key:"canAdd",value:function(t,e){return r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"canAdd",this).call(this,t,e)||r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"canAdd",this).call(this,t,parseInt(e))}},{key:"value",value:function(t){return parseInt(r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"value",this).call(this,t))||void 0}}]),n=new o("indent","ql-indent",{scope:n.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});function o(){var t=this;if(!(t instanceof o))throw new TypeError("Cannot call a class as a function");var t=this,e=(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments);if(t)return!e||"object"!=typeof e&&"function"!=typeof e?t:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function i(t,e){for(var n=0;n '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){if(t)return!e||"object"!=typeof e&&"function"!=typeof e?t:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,e);return void 0!==o?"value"in o?o.value:void 0!==(o=o.get)?o.call(n):void 0:null===(t=Object.getPrototypeOf(t))?void 0:a(t,e,n)}function s(t,e,n){e&&v(t.prototype,e),n&&v(t,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var u=o(n(2)),c=o(n(9)),f=n(44),h=o(f),p=n(22),d=o(n(26)),y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];function b(t,e){return i(this,b),null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=y),(e=l(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,t,e))).quill.container.classList.add("ql-bubble"),e}function v(t,e){for(var n=0;n','
','','',"
"].join(""),e.BubbleTooltip=g,e.default=n},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(t)return!e||"object"!=typeof e&&"function"!=typeof e?t:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,e);return void 0!==o?"value"in o?o.value:void 0!==(o=o.get)?o.call(n):void 0:null===(t=Object.getPrototypeOf(t))?void 0:a(t,e,n)}function s(t,e,n){e&&g(t.prototype,e),n&&g(t,n)}Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(2)),c=o(n(9)),f=n(44),h=o(f),p=o(n(15)),d=n(22),y=o(n(26)),b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];function v(t,e){return r(this,v),null!=e.modules.toolbar&&null==e.modules.toolbar.container&&(e.modules.toolbar.container=b),(e=i(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,t,e))).quill.container.classList.add("ql-snow"),e}function g(t,e){for(var n=0;n','','',''].join(""),e.default=n}],o.c=r,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=45).default;function o(t){var e;return(r[t]||(e=r[t]={i:t,l:!1,exports:{}},n[t].call(e.exports,e,e.exports,o),e.l=!0,e)).exports}var n,r}); //# sourceMappingURL=quill.min.js.map