text: /*! Quill Editor v0.16.0
   *  https://quilljs.com/
   *  Copyright (c) 2014, Jason Chen
   *  Copyright (c) 2013, salesforce.com
   */
  !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.Quill=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({"M4+//f":[function(b,c,d){(function(b){(function(){function e(a,b,c){for(var d=(c||0)-1,e=a?a.length:0;++d<e;)if(a[d]===b)return d;return-1}function f(a,b){var c=typeof b;if(a=a.cache,"boolean"==c||null==b)return a[b]?0:-1;"number"!=c&&"string"!=c&&(c="object");var d="number"==c?b:fb+b;return a=(a=a[c])&&a[d],"object"==c?a&&e(a,b)>-1?0:-1:a?0:-1}function g(a){var b=this.cache,c=typeof a;if("boolean"==c||null==a)b[a]=!0;else{"number"!=c&&"string"!=c&&(c="object");var d="number"==c?a:fb+a,e=b[c]||(b[c]={});"object"==c?(e[d]||(e[d]=[])).push(a):e[d]=!0}}function h(a){var b=-1,c=a.length,d=a[0],e=a[c/2|0],f=a[c-1];if(d&&"object"==typeof d&&e&&"object"==typeof e&&f&&"object"==typeof f)return!1;var h=j();h["false"]=h["null"]=h["true"]=h.undefined=!1;var i=j();for(i.array=a,i.cache=h,i.push=g;++b<c;)i.push(a[b]);return i}function i(){return cb.pop()||[]}function j(){return db.pop()||{array:null,cache:null,"false":!1,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1}}function k(a){a.length=0,cb.length<hb&&cb.push(a)}function l(a){var b=a.cache;b&&l(b),a.array=a.cache=a.object=a.number=a.string=null,db.length<hb&&db.push(a)}function m(a,b,c){b||(b=0),"undefined"==typeof c&&(c=a?a.length:0);for(var d=-1,e=c-b||0,f=Array(0>e?0:e);++d<e;)f[d]=a[b+d];return f}function n(){}function o(a){function b(){if(d){var a=m(d);Ib.apply(a,arguments)}if(this instanceof b){var f=q(c.prototype),g=c.apply(f,a||arguments);return F(g)?g:f}return c.apply(e,a||arguments)}var c=a[0],d=a[2],e=a[4];return Rb(b,a),b}function p(a,b,c,d,e){if(c){var f=c(a);if("undefined"!=typeof f)return f}var g=F(a);if(!g)return a;var h=Eb.call(a);if(!ub[h])return a;var j=Pb[h];switch(h){case nb:case ob:return new j(+a);case qb:case tb:return new j(a);case sb:return f=j(a.source,ib.exec(a)),f.lastIndex=a.lastIndex,f}var l=Sb(a);if(b){var n=!d;d||(d=i()),e||(e=i());for(var o=d.length;o--;)if(d[o]==a)return e[o];f=l?j(a.length):{}}else f=l?m(a):Vb({},a);return l&&(Hb.call(a,"index")&&(f.index=a.index),Hb.call(a,"input")&&(f.input=a.input)),b?(d.push(a),e.push(f),(l?L:Yb)(a,function(a,g){f[g]=p(a,b,c,d,e)}),n&&(k(d),k(e)),f):f}function q(a){return F(a)?Lb(a):{}}function r(a,b,c){if("function"!=typeof a)return Z;if("undefined"==typeof b||!("prototype"in a))return a;var d=a.__bindData__;if("undefined"==typeof d&&(Qb.funcNames&&(d=!a.name),d=d||!Qb.funcDecomp,!d)){var e=Gb.call(a);Qb.funcNames||(d=!jb.test(e)),d||(d=kb.test(e),Rb(a,d))}if(d===!1||d!==!0&&1&d[1])return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return V(a,b)}function s(a){function b(){var a=i?g:this;if(e){var o=m(e);Ib.apply(o,arguments)}if((f||k)&&(o||(o=m(arguments)),f&&Ib.apply(o,f),k&&o.length<h))return d|=16,s([c,l?d:-4&d,o,null,g,h]);if(o||(o=arguments),j&&(c=a[n]),this instanceof b){a=q(c.prototype);var p=c.apply(a,o);return F(p)?p:a}return c.apply(a,o)}var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],i=1&d,j=2&d,k=4&d,l=8&d,n=c;return Rb(b,a),b}function t(a,b){var c=-1,d=x(),g=a?a.length:0,i=g>=gb&&d===e,j=[];if(i){var k=h(b);k?(d=f,b=k):i=!1}for(;++c<g;){var m=a[c];d(b,m)<0&&j.push(m)}return i&&l(b),j}function u(a,b,c,d){for(var e=(d||0)-1,f=a?a.length:0,g=[];++e<f;){var h=a[e];if(h&&"object"==typeof h&&"number"==typeof h.length&&(Sb(h)||z(h))){b||(h=u(h,b,c));var i=-1,j=h.length,k=g.length;for(g.length+=j;++i<j;)g[k++]=h[i]}else c||g.push(h)}return g}function v(a,b,c,d,e,f){if(c){var g=c(a,b);if("undefined"!=typeof g)return!!g}if(a===b)return 0!==a||1/a==1/b;var h=typeof a,j=typeof b;if(!(a!==a||a&&wb[h]||b&&wb[j]))return!1;if(null==a||null==b)return a===b;var l=Eb.call(a),m=Eb.call(b);if(l==lb&&(l=rb),m==lb&&(m=rb),l!=m)return!1;switch(l){case nb:case ob:return+a==+b;case qb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case sb:case tb:return a==String(b)}var n=l==mb;if(!n){var o=Hb.call(a,"__wrapped__"),p=Hb.call(b,"__wrapped__");if(o||p)return v(o?a.__wrapped__:a,p?b.__wrapped__:b,c,d,e,f);if(l!=rb)return!1;var q=a.constructor,r=b.constructor;if(q!=r&&!(E(q)&&q instanceof q&&E(r)&&r instanceof r)&&"constructor"in a&&"constructor"in b)return!1}var s=!e;e||(e=i()),f||(f=i());for(var t=e.length;t--;)if(e[t]==a)return f[t]==b;var u=0;if(g=!0,e.push(a),f.push(b),n){if(t=a.length,u=b.length,g=u==t,g||d)for(;u--;){var w=t,x=b[u];if(d)for(;w--&&!(g=v(a[w],x,c,d,e,f)););else if(!(g=v(a[u],x,c,d,e,f)))break}}else Xb(b,function(b,h,i){return Hb.call(i,h)?(u++,g=Hb.call(a,h)&&v(a[h],b,c,d,e,f)):void 0}),g&&!d&&Xb(a,function(a,b,c){return Hb.call(c,b)?g=--u>-1:void 0});return e.pop(),f.pop(),s&&(k(e),k(f)),g}function w(a,b,c,d,e,f){var g=1&b,h=2&b,i=4&b,j=16&b,k=32&b;if(!h&&!E(a))throw new TypeError;j&&!c.length&&(b&=-17,j=c=!1),k&&!d.length&&(b&=-33,k=d=!1);var l=a&&a.__bindData__;if(l&&l!==!0)return l=m(l),l[2]&&(l[2]=m(l[2])),l[3]&&(l[3]=m(l[3])),!g||1&l[1]||(l[4]=e),!g&&1&l[1]&&(b|=8),!i||4&l[1]||(l[5]=f),j&&Ib.apply(l[2]||(l[2]=[]),c),k&&Jb.apply(l[3]||(l[3]=[]),d),l[1]|=b,w.apply(null,l);var n=1==b||17===b?o:s;return n([a,b,c,d,e,f])}function x(){var a=(a=n.indexOf)===R?e:a;return a}function y(a){return"function"==typeof a&&Fb.test(a)}function z(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Eb.call(a)==lb||!1}function A(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c=b,b=!1),p(a,b,"function"==typeof c&&r(c,d,1))}function B(a,b){return a?Hb.call(a,b):!1}function C(a){return a&&1===a.nodeType||!1}function D(a,b,c,d){return v(a,b,"function"==typeof c&&r(c,d,2))}function E(a){return"function"==typeof a}function F(a){return!(!a||!wb[typeof a])}function G(a){return"number"==typeof a||a&&"object"==typeof a&&Eb.call(a)==qb||!1}function H(a){return"string"==typeof a||a&&"object"==typeof a&&Eb.call(a)==tb||!1}function I(a,b,c){var d={};if("function"!=typeof b){var e=[];Xb(a,function(a,b){e.push(b)}),e=t(e,u(arguments,!0,!1,1));for(var f=-1,g=e.length;++f<g;){var h=e[f];d[h]=a[h]}}else b=n.createCallback(b,c,3),Xb(a,function(a,c,e){b(a,c,e)||(d[c]=a)});return d}function J(a){for(var b=-1,c=Ub(a),d=c.length,e=Array(d);++b<d;)e[b]=a[c[b]];return e}function K(a,b,c){var d=!0;b=n.createCallback(b,c,3);var e=-1,f=a?a.length:0;if("number"==typeof f)for(;++e<f&&(d=!!b(a[e],e,a)););else Yb(a,function(a,c,e){return d=!!b(a,c,e)});return d}function L(a,b,c){var d=-1,e=a?a.length:0;if(b=b&&"undefined"==typeof c?b:r(b,c,3),"number"==typeof e)for(;++d<e&&b(a[d],d,a)!==!1;);else Yb(a,b);return a}function M(a,b){var c=m(arguments,2),d=-1,e="function"==typeof b,f=a?a.length:0,g=Array("number"==typeof f?f:0);return L(a,function(a){g[++d]=(e?b:a[b]).apply(a,c)}),g}function N(a,b,c){var d=-1,e=a?a.length:0;if(b=n.createCallback(b,c,3),"number"==typeof e)for(var f=Array(e);++d<e;)f[d]=b(a[d],d,a);else f=[],Yb(a,function(a,c,e){f[++d]=b(a,c,e)});return f}function O(a,b,c,d){if(!a)return c;var e=arguments.length<3;b=n.createCallback(b,d,4);var f=-1,g=a.length;if("number"==typeof g)for(e&&(c=a[++f]);++f<g;)c=b(c,a[f],f,a);else Yb(a,function(a,d,f){c=e?(e=!1,a):b(c,a,d,f)});return c}function P(a){return t(a,u(arguments,!0,!0,1))}function Q(a,b,c,d){return"boolean"!=typeof b&&null!=b&&(d=c,c="function"!=typeof b&&d&&d[b]===a?null:b,b=!1),null!=c&&(a=N(a,c,d)),u(a,b)}function R(a,b,c){if("number"==typeof c){var d=a?a.length:0;c=0>c?Ob(0,d+c):c||0}else if(c){var f=U(a,b);return a[f]===b?f:-1}return e(a,b,c)}function S(){for(var a=[],b=-1,c=arguments.length,d=i(),g=x(),j=g===e,m=i();++b<c;){var n=arguments[b];(Sb(n)||z(n))&&(a.push(n),d.push(j&&n.length>=gb&&h(b?a[b]:m)))}var o=a[0],p=-1,q=o?o.length:0,r=[];a:for(;++p<q;){var s=d[0];if(n=o[p],(s?f(s,n):g(m,n))<0){for(b=c,(s||m).push(n);--b;)if(s=d[b],(s?f(s,n):g(a[b],n))<0)continue a;r.push(n)}}for(;c--;)s=d[c],s&&l(s);return k(d),k(m),r}function T(a,b,c){var d=0,e=a?a.length:0;if("number"!=typeof b&&null!=b){var f=e;for(b=n.createCallback(b,c,3);f--&&b(a[f],f,a);)d++}else if(d=b,null==d||c)return a?a[e-1]:bb;return m(a,Ob(0,e-d))}function U(a,b,c,d){var e=0,f=a?a.length:e;for(c=c?n.createCallback(c,d,1):Z,b=c(b);f>e;){var g=e+f>>>1;c(a[g])<b?e=g+1:f=g}return e}function V(a,b){return arguments.length>2?w(a,17,m(arguments,2),null,b):w(a,1,null,null,b)}function W(a){if(!E(a))throw new TypeError;var b=m(arguments,1);return setTimeout(function(){a.apply(bb,b)},1)}function X(a){return w(a,16,m(arguments,1))}function Y(a,b,c){var d=typeof a;if(null==a||"function"==d)return r(a,b,c);if("object"!=d)return _(a);var e=Ub(a),f=e[0],g=a[f];return 1!=e.length||g!==g||F(g)?function(b){for(var c=e.length,d=!1;c--&&(d=v(b[e[c]],a[e[c]],null,!0)););return d}:function(a){var b=a[f];return g===b&&(0!==g||1/g==1/b)}}function Z(a){return a}function $(){}function _(a){return function(b){return b[a]}}function ab(a){var b=++eb;return String(null==a?"":a)+b}var bb,cb=[],db=[],eb=0,fb=+new Date+"",gb=75,hb=40,ib=/\w*$/,jb=/^\s*function[ \n\r\t]+\w/,kb=/\bthis\b/,lb="[object Arguments]",mb="[object Array]",nb="[object Boolean]",ob="[object Date]",pb="[object Function]",qb="[object Number]",rb="[object Object]",sb="[object RegExp]",tb="[object String]",ub={};ub[pb]=!1,ub[lb]=ub[mb]=ub[nb]=ub[ob]=ub[qb]=ub[rb]=ub[sb]=ub[tb]=!0;var vb={configurable:!1,enumerable:!1,value:null,writable:!1},wb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},xb=wb[typeof window]&&window||this,yb=wb[typeof d]&&d&&!d.nodeType&&d,zb=wb[typeof c]&&c&&!c.nodeType&&c,Ab=zb&&zb.exports===yb&&yb,Bb=wb[typeof b]&&b;!Bb||Bb.global!==Bb&&Bb.window!==Bb||(xb=Bb);var Cb=[],Db=Object.prototype,Eb=Db.toString,Fb=RegExp("^"+String(Eb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Gb=Function.prototype.toString,Hb=Db.hasOwnProperty,Ib=Cb.push,Jb=Cb.unshift,Kb=function(){try{var a={},b=y(b=Object.defineProperty)&&b,c=b(a,a,a)&&b}catch(d){}return c}(),Lb=y(Lb=Object.create)&&Lb,Mb=y(Mb=Array.isArray)&&Mb,Nb=y(Nb=Object.keys)&&Nb,Ob=Math.max,Pb={};Pb[mb]=Array,Pb[nb]=Boolean,Pb[ob]=Date,Pb[pb]=Function,Pb[rb]=Object,Pb[qb]=Number,Pb[sb]=RegExp,Pb[tb]=String;var Qb=n.support={};Qb.funcDecomp=!y(xb.WinRTError)&&kb.test(function(){return this}),Qb.funcNames="string"==typeof Function.name,Lb||(q=function(){function a(){}return function(b){if(F(b)){a.prototype=b;var c=new a;a.prototype=null}return c||xb.Object()}}());var Rb=Kb?function(a,b){vb.value=b,Kb(a,"__bindData__",vb)}:$,Sb=Mb||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&Eb.call(a)==mb||!1},Tb=function(a){var b,c=a,d=[];if(!c)return d;if(!wb[typeof a])return d;for(b in c)Hb.call(c,b)&&d.push(b);return d},Ub=Nb?function(a){return F(a)?Nb(a):[]}:Tb,Vb=function(a,b,c){var d,e=a,f=e;if(!e)return f;var g=arguments,h=0,i="number"==typeof c?2:g.length;if(i>3&&"function"==typeof g[i-2])var j=r(g[--i-1],g[i--],2);else i>2&&"function"==typeof g[i-1]&&(j=g[--i]);for(;++h<i;)if(e=g[h],e&&wb[typeof e])for(var k=-1,l=wb[typeof e]&&Ub(e),m=l?l.length:0;++k<m;)d=l[k],f[d]=j?j(f[d],e[d]):e[d];return f},Wb=function(a,b,c){var d,e=a,f=e;if(!e)return f;for(var g=arguments,h=0,i="number"==typeof c?2:g.length;++h<i;)if(e=g[h],e&&wb[typeof e])for(var j=-1,k=wb[typeof e]&&Ub(e),l=k?k.length:0;++j<l;)d=k[j],"undefined"==typeof f[d]&&(f[d]=e[d]);return f},Xb=function(a,b,c){var d,e=a,f=e;if(!e)return f;if(!wb[typeof e])return f;b=b&&"undefined"==typeof c?b:r(b,c,3);for(d in e)if(b(e[d],d,a)===!1)return f;return f},Yb=function(a,b,c){var d,e=a,f=e;if(!e)return f;if(!wb[typeof e])return f;b=b&&"undefined"==typeof c?b:r(b,c,3);for(var g=-1,h=wb[typeof e]&&Ub(e),i=h?h.length:0;++g<i;)if(d=h[g],b(e[d],d,a)===!1)return f;return f},Zb=N;n.assign=Vb,n.bind=V,n.createCallback=Y,n.defaults=Wb,n.defer=W,n.difference=P,n.flatten=Q,n.forEach=L,n.forIn=Xb,n.forOwn=Yb,n.intersection=S,n.invoke=M,n.keys=Ub,n.map=N,n.omit=I,n.partial=X,n.pluck=Zb,n.property=_,n.values=J,n.collect=N,n.each=L,n.extend=Vb,n.clone=A,n.every=K,n.has=B,n.identity=Z,n.indexOf=R,n.isArguments=z,n.isArray=Sb,n.isElement=C,n.isEqual=D,n.isFunction=E,n.isNumber=G,n.isObject=F,n.isString=H,n.noop=$,n.reduce=O,n.sortedIndex=U,n.uniqueId=ab,n.all=K,n.foldl=O,n.inject=O,n.last=T,n.VERSION="2.4.1","function"==typeof a&&"object"==typeof a.amd&&a.amd?(xb._=n,a(function(){return n})):yb&&zb?Ab?(zb.exports=n)._=n:yb._=n:xb._=n}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],lodash:[function(a,b){b.exports=a("M4+//f")},{}],3:[function(b,c,d){!function(){function b(){this._events={},this._conf&&c.call(this,this._conf)}function c(a){a&&(this._conf=a,a.delimiter&&(this.delimiter=a.delimiter),a.maxListeners&&(this._events.maxListeners=a.maxListeners),a.wildcard&&(this.wildcard=a.wildcard),a.newListener&&(this.newListener=a.newListener),this.wildcard&&(this.listenerTree={}))}function e(a){this._events={},this.newListener=!1,c.call(this,a)}function f(a,b,c,d){if(!c)return[];var e,g,h,i,j,k,l,m=[],n=b.length,o=b[d],p=b[d+1];if(d===n&&c._listeners){if("function"==typeof c._listeners)return a&&a.push(c._listeners),[c];for(e=0,g=c._listeners.length;g>e;e++)a&&a.push(c._listeners[e]);return[c]}if("*"===o||"**"===o||c[o]){if("*"===o){for(h in c)"_listeners"!==h&&c.hasOwnProperty(h)&&(m=m.concat(f(a,b,c[h],d+1)));return m}if("**"===o){l=d+1===n||d+2===n&&"*"===p,l&&c._listeners&&(m=m.concat(f(a,b,c,n)));for(h in c)"_listeners"!==h&&c.hasOwnProperty(h)&&("*"===h||"**"===h?(c[h]._listeners&&!l&&(m=m.concat(f(a,b,c[h],n))),m=m.concat(f(a,b,c[h],d))):m=m.concat(h===p?f(a,b,c[h],d+2):f(a,b,c[h],d)));return m}m=m.concat(f(a,b,c[o],d+1))}if(i=c["*"],i&&f(a,b,i,d+1),j=c["**"])if(n>d){j._listeners&&f(a,b,j,n);for(h in j)"_listeners"!==h&&j.hasOwnProperty(h)&&(h===p?f(a,b,j[h],d+2):h===o?f(a,b,j[h],d+1):(k={},k[h]=j[h],f(a,b,{"**":k},d+1)))}else j._listeners?f(a,b,j,n):j["*"]&&j["*"]._listeners&&f(a,b,j["*"],n);return m}function g(a,b){a="string"==typeof a?a.split(this.delimiter):a.slice();for(var c=0,d=a.length;d>c+1;c++)if("**"===a[c]&&"**"===a[c+1])return;for(var e=this.listenerTree,f=a.shift();f;){if(e[f]||(e[f]={}),e=e[f],0===a.length){if(e._listeners){if("function"==typeof e._listeners)e._listeners=[e._listeners,b];else if(h(e._listeners)&&(e._listeners.push(b),!e._listeners.warned)){var g=i;"undefined"!=typeof this._events.maxListeners&&(g=this._events.maxListeners),g>0&&e._listeners.length>g&&(e._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",e._listeners.length),console.trace())}}else e._listeners=b;return!0}f=a.shift()}return!0}var h=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},i=10;e.prototype.delimiter=".",e.prototype.setMaxListeners=function(a){this._events||b.call(this),this._events.maxListeners=a,this._conf||(this._conf={}),this._conf.maxListeners=a},e.prototype.event="",e.prototype.once=function(a,b){return this.many(a,1,b),this},e.prototype.many=function(a,b,c){function d(){0===--b&&e.off(a,d),c.apply(this,arguments)}var e=this;if("function"!=typeof c)throw new Error("many only accepts instances of Function");return d._origin=c,this.on(a,d),e},e.prototype.emit=function(){this._events||b.call(this);var a=arguments[0];if("newListener"===a&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var c=arguments.length,d=new Array(c-1),e=1;c>e;e++)d[e-1]=arguments[e];for(e=0,c=this._all.length;c>e;e++)this.event=a,this._all[e].apply(this,d)}if("error"===a&&!(this._all||this._events.error||this.wildcard&&this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var g;if(this.wildcard){g=[];var h="string"==typeof a?a.split(this.delimiter):a.slice();f.call(this,g,h,this.listenerTree,0)}else g=this._events[a];if("function"==typeof g){if(this.event=a,1===arguments.length)g.call(this);else if(arguments.length>1)switch(arguments.length){case 2:g.call(this,arguments[1]);break;case 3:g.call(this,arguments[1],arguments[2]);break;default:for(var c=arguments.length,d=new Array(c-1),e=1;c>e;e++)d[e-1]=arguments[e];g.apply(this,d)}return!0}if(g){for(var c=arguments.length,d=new Array(c-1),e=1;c>e;e++)d[e-1]=arguments[e];for(var i=g.slice(),e=0,c=i.length;c>e;e++)this.event=a,i[e].apply(this,d);return i.length>0||!!this._all}return!!this._all},e.prototype.on=function(a,c){if("function"==typeof a)return this.onAny(a),this;if("function"!=typeof c)throw new Error("on only accepts instances of Function");if(this._events||b.call(this),this.emit("newListener",a,c),this.wildcard)return g.call(this,a,c),this;if(this._events[a]){if("function"==typeof this._events[a])this._events[a]=[this._events[a],c];else if(h(this._events[a])&&(this._events[a].push(c),!this._events[a].warned)){var d=i;"undefined"!=typeof this._events.maxListeners&&(d=this._events.maxListeners),d>0&&this._events[a].length>d&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}}else this._events[a]=c;return this},e.prototype.onAny=function(a){if("function"!=typeof a)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(a),this},e.prototype.addListener=e.prototype.on,e.prototype.off=function(a,b){if("function"!=typeof b)throw new Error("removeListener only takes instances of Function");var c,d=[];if(this.wildcard){var e="string"==typeof a?a.split(this.delimiter):a.slice();d=f.call(this,null,e,this.listenerTree,0)}else{if(!this._events[a])return this;c=this._events[a],d.push({_listeners:c})}for(var g=0;g<d.length;g++){var i=d[g];if(c=i._listeners,h(c)){for(var j=-1,k=0,l=c.length;l>k;k++)if(c[k]===b||c[k].listener&&c[k].listener===b||c[k]._origin&&c[k]._origin===b){j=k;break}if(0>j)continue;return this.wildcard?i._listeners.splice(j,1):this._events[a].splice(j,1),0===c.length&&(this.wildcard?delete i._listeners:delete this._events[a]),this}(c===b||c.listener&&c.listener===b||c._origin&&c._origin===b)&&(this.wildcard?delete i._listeners:delete this._events[a])}return this},e.prototype.offAny=function(a){var b,c=0,d=0;if(a&&this._all&&this._all.length>0){for(b=this._all,c=0,d=b.length;d>c;c++)if(a===b[c])return b.splice(c,1),this}else this._all=[];return this},e.prototype.removeListener=e.prototype.off,e.prototype.removeAllListeners=function(a){if(0===arguments.length)return!this._events||b.call(this),this;if(this.wildcard)for(var c="string"==typeof a?a.split(this.delimiter):a.slice(),d=f.call(this,null,c,this.listenerTree,0),e=0;e<d.length;e++){var g=d[e];g._listeners=null}else{if(!this._events[a])return this;this._events[a]=null}return this},e.prototype.listeners=function(a){if(this.wildcard){var c=[],d="string"==typeof a?a.split(this.delimiter):a.slice();return f.call(this,c,d,this.listenerTree,0),c}return this._events||b.call(this),this._events[a]||(this._events[a]=[]),h(this._events[a])||(this._events[a]=[this._events[a]]),this._events[a]},e.prototype.listenersAny=function(){return this._all?this._all:[]},"function"==typeof a&&a.amd?a(function(){return e}):"object"==typeof d?d.EventEmitter2=e:window.EventEmitter2=e}()},{}],4:[function(a,b){(function(){var c,d,e,f,g,h;h=a("lodash"),g=a("diff"),e=a("./op"),d=a("./insert"),f=a("./retain"),c=function(){function a(a,b,c){var d;if(this.startLength=a,this.endLength=b,this.ops=c,null==this.ops&&(this.ops=this.endLength,this.endLength=null),this.ops=h.map(this.ops,function(a){if(e.isRetain(a))return a;if(e.isInsert(a))return a;throw new Error("Creating delta with invalid op. Expecting an insert or retain.")}),this.compact(),d=h.reduce(this.ops,function(a,b){return a+b.getLength()},0),null!=this.endLength&&d!==this.endLength)throw new Error("Expecting end length of "+d);this.endLength=d}var b,c;return a.getIdentity=function(b){return new a(b,b,[new f(0,b)])},a.getInitial=function(b){return new a(0,b.length,[new d(b)])},a.isDelta=function(a){var b,c,d,f;if(null!=a&&"object"==typeof a&&"number"==typeof a.startLength&&"number"==typeof a.endLength&&"object"==typeof a.ops){for(f=a.ops,c=0,d=f.length;d>c;c++)if(b=f[c],!e.isRetain(b)&&!e.isInsert(b))return!1;return!0}return!1},a.makeDelta=function(b){return new a(b.startLength,b.endLength,h.map(b.ops,function(a){return e.isInsert(a)?new d(a.value,a.attributes):e.isRetain(a)?new f(a.start,a.end,a.attributes):null}))},a.makeDeleteDelta=function(b,c,d){var e;return e=[],c>0&&e.push(new f(0,c)),b>c+d&&e.push(new f(c+d,b)),new a(b,e)},a.makeInsertDelta=function(b,c,e,g){var h;return h=[new d(e,g)],c>0&&h.unshift(new f(0,c)),b>c&&h.push(new f(c,b)),new a(b,h)},a.makeRetainDelta=function(b,c,d,e){var g;return g=[new f(c,c+d,e)],c>0&&g.unshift(new f(0,c)),b>c+d&&g.push(new f(c+d,b)),new a(b,g)},a.prototype.apply=function(a,b,c,d){var g,i,j;return null==a&&(a=function(){}),null==b&&(b=function(){}),null==c&&(c=function(){}),null==d&&(d=null),this.isIdentity()?void 0:(g=0,i=0,j=[],h.each(this.ops,function(){return function(c){return e.isInsert(c)?(a.call(d,g+i,c.value,c.attributes),i+=c.getLength()):e.isRetain(c)?(c.start>g&&(b.call(d,g+i,c.start-g),i-=c.start-g),j.push(new f(c.start+i,c.end+i,c.attributes)),g=c.end):void 0}}(this)),this.endLength<this.startLength+i&&b.call(d,this.endLength,this.startLength+i-this.endLength),h.each(j,function(){return function(a){return h.each(a.attributes,function(b,e){return null===b?c.call(d,a.start,a.end-a.start,e,b):void 0}),h.each(a.attributes,function(b,e){return null!=b?c.call(d,a.start,a.end-a.start,e,b):void 0})}}(this)))},a.prototype.applyToText=function(a){var b,c,d,f,g,h,i;if(c=this,a.length!==c.startLength)throw new Error("Start length of delta: "+c.startLength+" is not equal to the text: "+a.length);for(b=[],i=c.ops,g=0,h=i.length;h>g;g++)d=i[g],b.push(e.isInsert(d)?d.value:a.substring(d.start,d.end));if(f=b.join(""),c.endLength!==f.length)throw new Error("End length of delta: "+c.endLength+" is not equal to result text: "+f.length);return f},a.prototype.canCompose=function(b){return a.isDelta(b)&&this.endLength===b.startLength},a.prototype.compact=function(){var a;return a=[],h.each(this.ops,function(b){var c;if(0!==b.getLength())return 0===a.length?a.push(b):(c=h.last(a),e.isInsert(c)&&e.isInsert(b)&&c.attributesMatch(b)?a[a.length-1]=new d(c.value+b.value,b.attributes):e.isRetain(c)&&e.isRetain(b)&&c.end===b.start&&c.attributesMatch(b)?a[a.length-1]=new f(c.start,b.end,b.attributes):a.push(b))}),this.ops=a},a.prototype.compose=function(b){var c,g,i,j,k,l,m;if(!this.canCompose(b))throw new Error("Cannot compose delta");for(g=this,c=[],m=b.ops,k=0,l=m.length;l>k;k++)if(i=m[k],e.isInsert(i))c.push(i);else{if(!e.isRetain(i))throw new Error("Invalid op in deltaB when composing");j=g.getOpsAt(i.start,i.getLength()),j=h.map(j,function(a){return e.isInsert(a)?new d(a.value,a.composeAttributes(i.attributes)):new f(a.start,a.end,a.composeAttributes(i.attributes))}),c=c.concat(j)}return new a(g.startLength,b.endLength,c)},a.prototype.decompose=function(b){var c,g,i,j,k,l;if(i=this,!a.isDelta(b))throw new Error("Decompose called when deltaA is not a Delta, type: "+typeof b);if(b.startLength!==this.startLength)throw new Error("startLength "+b.startLength+" / startLength "+this.startLength+" mismatch");if(!h.all(b.ops,function(a){return e.isInsert(a)}))throw new Error("DeltaA has retain in decompose");if(!h.all(i.ops,function(a){return e.isInsert(a)}))throw new Error("DeltaC has retain in decompose");return c=function(a,b){var d,e,f;d={};for(e in b)f=b[e],(void 0===a[e]||a[e]!==f)&&(d[e]=null!==a[e]&&"object"==typeof a[e]&&null!==f&&"object"==typeof f?c(a[e],f):f);for(e in a)f=a[e],void 0===b[e]&&(d[e]=null);return d},j=b.diff(i),l=[],k=0,h.each(j.ops,function(a){var g,j;return j=i.getOpsAt(k,a.getLength()),g=0,h.each(j,function(i){var j,k,m;if(e.isInsert(a))j=new d(a.value.substring(g,g+i.getLength()),i.attributes),l.push(j);else{if(!e.isRetain(a))throw new Error("Invalid delta in deltaB when composing");m=b.getOpsAt(a.start+g,i.getLength()),k=0,h.each(m,function(b){var d,e,h;return d=c(b.attributes,i.attributes),h=a.start+k+g,e=new f(h,h+b.getLength(),d),l.push(e),k+=b.getLength()})}return g+=i.getLength()}),k+=a.getLength()}),g=new a(j.startLength,j.endLength,l)},a.prototype.diff=function(b){var c,e,i,j,k,l,m,n;if(n=h.map([this,b],function(a){return h.map(a.ops,function(a){return null!=a.value?a.value:""}).join("")}),l=n[0],m=n[1],""!==l||""!==m){if(c=g.diffChars(l,m),c.length<=0)throw new Error("diffToDelta called with diff with length <= 0");k=0,e=0,j=[],h.each(c,function(a){return a.added?(j.push(new d(a.value)),e+=a.value.length):a.removed?k+=a.value.length:(j.push(new f(k,k+a.value.length)),k+=a.value.length,e+=a.value.length)}),i=new a(k,e,j)}else i=new a(0,0,[]);return i},b=function(a,b,c,d){var e,g;if(g=h.extend({},c),e=Math.min(a.getLength(),b.getLength()),d)if(g.transformOp=new f(g.indexA,g.indexA+e),g.indexA+=e,e===a.getLength())g.elemIndexA++;else{if(!(e<a.getLength()))throw new Error("Invalid elem length in transform");g.elemA=h.last(a.split(e))}else g.transformOp=h.first(b.split(e)),g.indexB+=e,e===b.getLength()?g.elemIndexB++:g.elemB=h.last(b.split(e));return g},c=function(a,b,c){var d,e,g,i,j,k,l,m;if(j=c.indexA,k=c.indexB,e=c.elemIndexA,g=c.elemIndexB,m=h.extend({},c),a.end<b.start)m.indexA+=a.getLength(),m.elemIndexA++;else if(b.end<a.start)m.indexB+=b.getLength(),m.elemIndexB++;else{if(a.start<b.start?(m.indexA+=b.start-a.start,a=m.elemA=new f(b.start,a.end,a.attributes)):b.start<a.start&&(m.indexB+=a.start-b.start,b=m.elemB=new f(a.start,b.end,b.attributes)),i="RetainOps must have same start length in transform",a.start!==b.start)throw new Error(i);l=Math.min(a.end,b.end)-a.start,d=a.addAttributes(b.attributes),m.transformOp=new f(m.indexA,m.indexA+l,d),m.indexA+=l,m.indexB+=l,a.end===b.end?(m.elemIndexA++,m.elemIndexB++):a.end<b.end?(m.elemIndexA++,m.elemB=h.last(b.split(l))):(m.elemIndexB++,m.elemA=h.last(a.split(l)))}return m.elemIndexA!==c.elemIndexA&&(m.elemA=null),m.elemIndexB!==c.elemIndexB&&(m.elemB=null),m},a.prototype.transform=function(d,g){var i,j,k,l,m,n,o,p,q,r,s,t,u,v;if(null==g&&(g=!1),!a.isDelta(d))throw n="Transform called when deltaA is not a Delta, type: ",new Error(n+typeof d);for(d=new a(d.startLength,d.endLength,d.ops),i=new a(this.startLength,this.endLength,this.ops),s=[],o=p=0,l=m=0,u=function(a){return null!=a.indexA&&(o=a.indexA),null!=a.indexB&&(p=a.indexB),null!=a.elemIndexA&&(l=a.elemIndexA),null!=a.elemIndexB&&(m=a.elemIndexB),null!=a.elemA&&(d.ops[l]=a.elemA),null!=a.elemB&&(i.ops[m]=a.elemB),null!=a.transformOp?s.push(a.transformOp):void 0},v=function(){return{indexA:o,indexB:p,elemIndexA:l,elemIndexB:m}};l<d.ops.length&&m<i.ops.length;)j=d.ops[l],k=i.ops[m],e.isInsert(j)&&e.isInsert(k)?(q=b(j,k,v(),g),u(q)):e.isRetain(j)&&e.isRetain(k)?(q=c(j,k,v()),u(q)):e.isInsert(j)&&e.isRetain(k)?(s.push(new f(o,o+j.getLength())),o+=j.getLength(),l++):e.isRetain(j)&&e.isInsert(k)&&(s.push(k),p+=k.getLength(),m++);for(;l<d.ops.length;)j=d.ops[l],e.isInsert(j)&&s.push(new f(o,o+j.getLength())),o+=j.getLength(),l++;for(;m<i.ops.length;)k=i.ops[m],e.isInsert(k)&&s.push(k),p+=k.getLength(),m++;return t=d.endLength,r=h.reduce(s,function(a,b){return a+b.getLength()},0),new a(t,r,s)},a.prototype.getOpsAt=function(a,b){var c,d,e,f,g,h,i,j,k;for(c=[],e=null!=this.savedOpOffset&&this.savedOpOffset<a?this.savedOpOffset:this.savedOpOffset=this.savedOpIndex=0,k=this.ops.slice(this.savedOpIndex),i=0,j=k.length;j>i&&(f=k[i],!(e>=a+b));i++)g=f.getLength(),e+g>a&&(h=Math.max(a-e,0),d=Math.min(g-h,a+b-e-h),c.push(f.getAt(h,d))),e+=g,this.savedOpIndex+=1,this.savedOpOffset+=g;return c},a.prototype.invert=function(a){var b,c,d;if(!this.isInsertsOnly())throw new Error("Invert called on invalid delta containing non-insert ops");return b=this,c=b.compose(a),d=b.decompose(c)},a.prototype.isEqual=function(a){return a?this.startLength!==a.startLength||this.endLength!==a.endLength?!1:h.isArray(a.ops)&&this.ops.length===a.ops.length?h.all(this.ops,function(b,c){return b.isEqual(a.ops[c])}):!1:!1},a.prototype.isIdentity=function(){var a,b,c,d,f;if(this.startLength===this.endLength){if(0===this.ops.length)return!0;for(a=0,f=this.ops,c=0,d=f.length;d>c;c++){if(b=f[c],!e.isRetain(b))return!1;if(b.start!==a)return!1;if(!(0===b.numAttributes()||1===b.numAttributes()&&h.has(b.attributes,"authorId")))return!1;a=b.end}return a!==this.endLength?!1:!0}return!1},a.prototype.isInsertsOnly=function(){return h.every(this.ops,function(a){return e.isInsert(a)})},a.prototype.merge=function(b){var c;return c=h.map(b.ops,function(a){return function(b){return e.isRetain(b)?new f(b.start+a.startLength,b.end+a.startLength,b.attributes):b}}(this)),c=this.ops.concat(c),new a(this.startLength+b.startLength,c)},a.prototype.split=function(b){var c,d;if(!this.isInsertsOnly())throw new Error("Split only implemented for inserts only");if(!(b>=0&&b<=this.endLength))throw new Error("Split at invalid index");return c=[],d=[],h.reduce(this.ops,function(a,e){var f,g,h;return a+e.getLength()<=b?c.push(e):a>=b?d.push(e):(h=e.split(b-a),f=h[0],g=h[1],c.push(f),d.push(g)),a+e.getLength()},0),[new a(0,c),new a(0,d)]},a.prototype.toString=function(){return"{("+this.startLength+"->"+this.endLength+") ["+this.ops.join(", ")+"]}"},a}(),b.exports=c}).call(this)},{"./insert":6,"./op":7,"./retain":8,diff:11,lodash:"M4+//f"}],5:[function(a,b){(function(){var c,d,e,f,g,h,i,j;i=a("lodash"),c=a("./delta"),e=a("./insert"),f=a("./retain"),j={alphabet:"abcdefghijklmnopqrstuvwxyz\n\n\n\n  ",booleanAttributes:{bold:[!0,!1],italic:[!0,!1],strike:[!0,!1]},nonBooleanAttributes:{"back-color":["white","black","red","blue","lime","teal","magenta","yellow"],"fore-color":["white","black","red","blue","lime","teal","magenta","yellow"],"font-name":["monospace","serif"],"font-size":["huge","large","small"]},defaultAttributeValue:{"back-color":"white","fore-color":"black","font-name":"san-serif","font-size":"normal"}},h=function(a){return null!=a?j=a:void 0},g=function(a){if(a=a||j,null==a)throw new Error("Must provide DeltaGenerator with a domain.");if(null==a.alphabet)throw new Error("Domain must define alphabet.");if(null==a.booleanAttributes)throw new Error("Domain must define booleanAttributes.");if(null==a.nonBooleanAttributes)throw new Error("Domain must define nonBooleanAttributes.");if(null==a.defaultAttributeValue)throw new Error("Domain must define defaultAttributeValue.");return{getDomain:function(){return j},getRandomString:function(b){var c;return i.map(function(){c=[];for(var a=0,d=b-1;d>=0?d>=a:a>=d;d>=0?a++:a--)c.push(a);return c}.apply(this),function(){return a.alphabet[i.random(0,a.alphabet.length-1)]}).join("")},getRandomLength:function(){var a;return a=Math.random(),.6>a?i.random(1,2):.8>a?i.random(3,4):.9>a?i.random(5,9):i.random(10,50)},insertAt:function(a,b,c){var d,f,g,h,i,j,k,l,m;for(d=h=0,l=a.ops,j=0,k=l.length;k>j&&(g=l[j],d!==b);j++){if(b<d+g.getLength()){m=g.split(b-d),f=m[0],i=m[1],a.ops.splice(h,1,f,i),h++;break}d+=g.getLength(),h++}return a.ops.splice(h,0,new e(c)),a.endLength+=c.length,a.compact()},deleteAt:function(a,b,c){var d,g,h,j,k,l,m,n,o,p,q;for(d=0,l=[],q=a.ops,o=0,p=q.length;p>o;o++){if(k=q[o],m=d===b||b<d+k.getLength(),c>0&&m){if(g=Math.min(c,k.getLength()-(b-d)),c-=g,e.isInsert(k))j=k.value.substring(0,b-d)+k.value.substring(b-d+g),j.length>0&&l.push(new e(j));
  else{if(!f.isRetain(k))throw new Error("Expected retain but got "+k);h=new f(k.start,k.start+b-d,i.clone(k.attributes)),n=new f(k.start+b-d+g,k.end,i.clone(k.attributes)),h.start<h.end&&l.push(h),n.start<n.end&&l.push(n)}b+=g}else l.push(k);d+=k.getLength()}return a.ops=l,a.endLength=i.reduce(l,function(a,b){return a+b.getLength()},0)},formatAt:function(b,c,d,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;for(B=function(a,b,c,d){var g,h,j,k,l,m,n,o,p,q,r,s;if(e.isInsert(a))k=a.value.substring(0,b),j=new e(k,i.clone(a.attributes)),h=a.value.substring(b,b+c),g=new e(h,i.clone(a.attributes)),q=a.value.substring(b+c),p=new e(q,i.clone(a.attributes)),-1!==h.indexOf("\n")&&(m=h.substring(0,h.indexOf("\n")),q=h.substring(h.indexOf("\n"))+q,g=new e(m,i.clone(a.attributes)),p=new e(q,i.clone(a.attributes)));else{if(!f.isRetain(a))throw new Error("Expected retain but got "+a);if(j=new f(a.start,a.start+b,i.clone(a.attributes)),g=new f(j.end,j.end+c,i.clone(a.attributes)),p=new f(g.end,a.end,i.clone(a.attributes)),o=d.getOpsAt(g.start,g.getLength()),!i.every(o,function(a){return e.isInsert(a)}))throw new Error("Non insert op in backref");for(l=g.start,r=0,s=o.length;s>r;r++){if(n=o[r],!e.isInsert(n))throw new Error("Got retainOp in reference delta!");if(-1!==n.value.indexOf("\n")){g=new f(g.start,l+n.value.indexOf("\n"),i.clone(g.attributes)),p=new f(l+n.value.indexOf("\n"),p.end,i.clone(p.attributes));break}l+=n.getLength()}}return[j,g,p]},y=function(a,b,c,d){var e,f,g,h,i,j;for(e=0,g=d[0].attributes[c],j=[],h=0,i=d.length;i>h;h++){if(f=d[h],f.attributes[c]!==g){a.end=a.start+e,b.start=a.end;break}j.push(e+=f.getLength())}return j},s=function(a,b,c,d){var g;if(e.isInsert(a))return null!=a.attributes[c]?delete a.attributes[c]:a.attributes[c]=!0;if(!f.isRetain(a))throw new Error("Expected retain but got "+a);if(null!=a.attributes[c])return delete a.attributes[c];if(g=d.getOpsAt(a.start,a.getLength()),!i.every(g,function(a){return e.isInsert(a)}))throw new Error("Formatting a retain that does not refer to an insert.");if(g.length>0){if(y(a,b,c,g),null!=g[0].attributes[c]){if(!g[0].attributes[c])throw new Error("Boolean attribute on reference delta should only be true!");return a.attributes[c]=null}return a.attributes[c]=!0}},t=function(){return function(b,c,d,g){var h,j;if(h=function(b){return i.first(null!=b?i.shuffle(i.without(a.nonBooleanAttributes[d],b)):i.shuffle(i.without(a.nonBooleanAttributes[d],a.defaultAttributeValue[d])))},e.isInsert(b))return b.attributes[d]=h(d,b.attributes[d]);if(!f.isRetain(b))throw new Error("Expected retain but got "+b);if(j=g.getOpsAt(b.start,b.getLength()),!i.every(j,function(a){return e.isInsert(a)}))throw new Error("Formatting a retain that does not refer to an insert.");return j.length>0?(y(b,c,d,j),null!=b.attributes[d]&&Math.random()<.5?delete b.attributes[d]:b.attributes[d]=h(b.attributes[d])):void 0}}(this),k=0,p=[],z=b.ops,u=0,w=z.length;w>u;u++){if(o=z[u],q=k===c||k+o.getLength()>c,d>0&&q){for(m=Math.min(d,o.getLength()-(c-k)),d-=m,A=B(o,c-k,m,h),n=A[0],l=A[1],r=A[2],p.push(n),p.push(l),p.push(r),v=0,x=g.length;x>v;v++)if(j=g[v],i.has(a.booleanAttributes,j))s(l,r,j,h);else{if(!i.has(a.nonBooleanAttributes,j))throw new Error("Received unknown attribute: "+j);t(l,r,j,h)}c+=m}else p.push(o);k+=o.getLength()}return b.endLength=i.reduce(p,function(a,b){return a+b.getLength()},0),b.ops=p,b.compact()},addRandomOp:function(b,c){var d,e,f,g,h,j,k;if(e=c.endLength-1,g=i.random(0,e),j=Math.random(),.5>j)h=this.getRandomLength(),this.insertAt(b,g,this.getRandomString(h));else if(.75>j){if(c.endLength<=1)return b;g=i.random(0,e-1),h=i.random(1,e-g),this.deleteAt(b,g,h)}else k=i.shuffle(i.keys(a.booleanAttributes).concat(i.keys(a.nonBooleanAttributes))),f=i.random(1,k.length),d=k.slice(0,f),h=i.random(1,e-g),this.formatAt(b,g,h,d,c);return b},getRandomDelta:function(a,b){var d,e,g;for(e=new c(a.endLength,a.endLength,[new f(0,a.endLength)]),b||(b=i.random(1,10)),d=g=0;b>=0?b>g:g>b;d=b>=0?++g:--g)this.addRandomOp(e,a);return e}}},d={setDomain:h,getUtils:g},b.exports=d}).call(this)},{"./delta":4,"./insert":6,"./retain":8,lodash:"M4+//f"}],6:[function(a,b){(function(){var c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=a("lodash"),d=a("./op"),c=function(a){function b(a,b){this.value=a,null==b&&(b={}),this.attributes=e.clone(b)}return g(b,a),b.prototype.getAt=function(a,c){return new b(this.value.substr(a,c),this.attributes)},b.prototype.getLength=function(){return this.value.length},b.prototype.isEqual=function(a){return null!=a&&this.value===a.value&&e.isEqual(this.attributes,a.attributes)},b.prototype.join=function(a){if(e.isEqual(this.attributes,a.attributes))return new b(this.value+second.value,this.attributes);throw Error},b.prototype.split=function(a){var c,d;return c=new b(this.value.substr(0,a),this.attributes),d=new b(this.value.substr(a),this.attributes),[c,d]},b.prototype.toString=function(){return"{"+this.value+", "+this.printAttributes()+"}"},b}(d),b.exports=c}).call(this)},{"./op":7,lodash:"M4+//f"}],7:[function(a,b){(function(){var c,d;d=a("lodash"),c=function(){function a(a){null==a&&(a={}),this.attributes=d.clone(a)}return a.isInsert=function(a){return null!=a&&"string"==typeof a.value},a.isRetain=function(a){return null!=a&&"number"==typeof a.start&&"number"==typeof a.end},a.prototype.addAttributes=function(a){var b,c,d;b={};for(c in a)d=a[c],void 0===this.attributes[c]&&(b[c]=d);return b},a.prototype.attributesMatch=function(a){var b;return b=a.attributes||{},d.isEqual(this.attributes,b)},a.prototype.composeAttributes=function(b){var c;return(c=function(b){return function(e,f){var g,h,i;if(!f)return e;h=d.clone(e);for(g in f)i=f[g],a.isInsert(b)&&null===i?delete h[g]:"undefined"!=typeof i&&(h[g]="object"==typeof h[g]&&"object"==typeof i&&d.all([h[g],f[g]],function(a){return null!==a})?c(h[g],i):i);return h}}(this))(this.attributes,b)},a.prototype.numAttributes=function(){return d.keys(this.attributes).length},a.prototype.printAttributes=function(){return JSON.stringify(this.attributes)},a}(),b.exports=c}).call(this)},{lodash:"M4+//f"}],8:[function(a,b){(function(){var c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=a("lodash"),c=a("./op"),d=function(a){function b(a,b,c){this.start=a,this.end=b,null==c&&(c={}),this.attributes=e.clone(c)}return g(b,a),b.prototype.getAt=function(a,c){return new b(this.start+a,this.start+a+c,this.attributes)},b.prototype.getLength=function(){return this.end-this.start},b.prototype.isEqual=function(a){return null!=a&&this.start===a.start&&this.end===a.end&&e.isEqual(this.attributes,a.attributes)},b.prototype.split=function(a){var c,d;return c=new b(this.start,this.start+a,this.attributes),d=new b(this.start+a,this.end,this.attributes),[c,d]},b.prototype.toString=function(){return"{{"+this.start+" - "+this.end+"), "+this.printAttributes()+"}"},b}(c),b.exports=d}).call(this)},{"./op":7,lodash:"M4+//f"}],9:[function(a,b){(function(){b.exports={Delta:a("./delta"),DeltaGen:a("./delta_generator"),Op:a("./op"),InsertOp:a("./insert"),RetainOp:a("./retain")}}).call(this)},{"./delta":4,"./delta_generator":5,"./insert":6,"./op":7,"./retain":8}],10:[function(a,b){b.exports=a("./build/tandem-core")},{"./build/tandem-core":9}],11:[function(a,b){var c=function(){function a(a){return{newPos:a.newPos,components:a.components.slice(0)}}function b(a){for(var b=[],c=0;c<a.length;c++)a[c]&&b.push(a[c]);return b}function c(a){var b=a;return b=b.replace(/&/g,"&amp;"),b=b.replace(/</g,"&lt;"),b=b.replace(/>/g,"&gt;"),b=b.replace(/"/g,"&quot;")}var d=function(a){this.ignoreWhitespace=a};d.prototype={diff:function(b,c){if(c===b)return[{value:c}];if(!c)return[{value:b,removed:!0}];if(!b)return[{value:c,added:!0}];c=this.tokenize(c),b=this.tokenize(b);var d=c.length,e=b.length,f=d+e,g=[{newPos:-1,components:[]}],h=this.extractCommon(g[0],c,b,0);if(g[0].newPos+1>=d&&h+1>=e)return g[0].components;for(var i=1;f>=i;i++)for(var j=-1*i;i>=j;j+=2){var k,l=g[j-1],m=g[j+1];h=(m?m.newPos:0)-j,l&&(g[j-1]=void 0);var n=l&&l.newPos+1<d,o=m&&h>=0&&e>h;if(n||o){!n||o&&l.newPos<m.newPos?(k=a(m),this.pushComponent(k.components,b[h],void 0,!0)):(k=a(l),k.newPos++,this.pushComponent(k.components,c[k.newPos],!0,void 0));var h=this.extractCommon(k,c,b,j);if(k.newPos+1>=d&&h+1>=e)return k.components;g[j]=k}else g[j]=void 0}},pushComponent:function(a,b,c,d){var e=a[a.length-1];e&&e.added===c&&e.removed===d?a[a.length-1]={value:this.join(e.value,b),added:c,removed:d}:a.push({value:b,added:c,removed:d})},extractCommon:function(a,b,c,d){for(var e=b.length,f=c.length,g=a.newPos,h=g-d;e>g+1&&f>h+1&&this.equals(b[g+1],c[h+1]);)g++,h++,this.pushComponent(a.components,b[g],void 0,void 0);return a.newPos=g,h},equals:function(a,b){var c=/\S/;return!this.ignoreWhitespace||c.test(a)||c.test(b)?a===b:!0},join:function(a,b){return a+b},tokenize:function(a){return a}};var e=new d,f=new d(!0),g=new d;f.tokenize=g.tokenize=function(a){return b(a.split(/(\s+|\b)/))};var h=new d(!0);h.tokenize=function(a){return b(a.split(/([{}:;,]|\s+)/))};var i=new d;return i.tokenize=function(a){for(var b=[],c=a.split(/^/m),d=0;d<c.length;d++){var e=c[d],f=c[d-1];"\n"==e&&f&&"\r"===f[f.length-1]?b[b.length-1]+="\n":e&&b.push(e)}return b},{Diff:d,diffChars:function(a,b){return e.diff(a,b)},diffWords:function(a,b){return f.diff(a,b)},diffWordsWithSpace:function(a,b){return g.diff(a,b)},diffLines:function(a,b){return i.diff(a,b)},diffCss:function(a,b){return h.diff(a,b)},createPatch:function(a,b,c,d,e){function f(a){return a.map(function(a){return" "+a})}function g(a,b,c){var d=j[j.length-2],e=b===j.length-2,f=b===j.length-3&&(c.added!==d.added||c.removed!==d.removed);/\n$/.test(c.value)||!e&&!f||a.push("\\ No newline at end of file")}var h=[];h.push("Index: "+a),h.push("==================================================================="),h.push("--- "+a+("undefined"==typeof d?"":"	"+d)),h.push("+++ "+a+("undefined"==typeof e?"":"	"+e));var j=i.diff(b,c);j[j.length-1].value||j.pop(),j.push({value:"",lines:[]});for(var k=0,l=0,m=[],n=1,o=1,p=0;p<j.length;p++){var q=j[p],r=q.lines||q.value.replace(/\n$/,"").split("\n");if(q.lines=r,q.added||q.removed){if(!k){var s=j[p-1];k=n,l=o,s&&(m=f(s.lines.slice(-4)),k-=m.length,l-=m.length)}m.push.apply(m,r.map(function(a){return(q.added?"+":"-")+a})),g(m,p,q),q.added?o+=r.length:n+=r.length}else{if(k)if(r.length<=8&&p<j.length-2)m.push.apply(m,f(r));else{var t=Math.min(r.length,4);h.push("@@ -"+k+","+(n-k+t)+" +"+l+","+(o-l+t)+" @@"),h.push.apply(h,m),h.push.apply(h,f(r.slice(0,t))),r.length<=4&&g(h,p,q),k=0,l=0,m=[]}n+=r.length,o+=r.length}}return h.join("\n")+"\n"},applyPatch:function(a,b){for(var c=b.split("\n"),d=[],e=!1,f=!1,g="I"===c[0][0]?4:0;g<c.length;g++)if("@"===c[g][0]){var h=c[g].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/);d.unshift({start:h[3],oldlength:h[2],oldlines:[],newlength:h[4],newlines:[]})}else"+"===c[g][0]?d[0].newlines.push(c[g].substr(1)):"-"===c[g][0]?d[0].oldlines.push(c[g].substr(1)):" "===c[g][0]?(d[0].newlines.push(c[g].substr(1)),d[0].oldlines.push(c[g].substr(1))):"\\"===c[g][0]&&("+"===c[g-1][0]?e=!0:"-"===c[g-1][0]&&(f=!0));for(var i=a.split("\n"),g=d.length-1;g>=0;g--){for(var j=d[g],k=0;k<j.oldlength;k++)if(i[j.start-1+k]!==j.oldlines[k])return!1;Array.prototype.splice.apply(i,[j.start-1,+j.oldlength].concat(j.newlines))}if(e)for(;!i[i.length-1];)i.pop();else f&&i.push("");return i.join("\n")},convertChangesToXML:function(a){for(var b=[],d=0;d<a.length;d++){var e=a[d];e.added?b.push("<ins>"):e.removed&&b.push("<del>"),b.push(c(e.value)),e.added?b.push("</ins>"):e.removed&&b.push("</del>")}return b.join("")},convertChangesToDMP:function(a){for(var b,c=[],d=0;d<a.length;d++)b=a[d],c.push([b.added?1:b.removed?-1:0,b.value]);return c}}}();"undefined"!=typeof b&&(b.exports=c)},{}],12:[function(b,c,d){!function(b,e){"use strict";function f(a,b){var c,d,e=a.toLowerCase();for(b=[].concat(b),c=0;c<b.length;c+=1)if(d=b[c]){if(d.test&&d.test(a))return!0;if(d.toLowerCase()===e)return!0}}var g=e.prototype.trim,h=e.prototype.trimRight,i=e.prototype.trimLeft,j=function(a){return 1*a||0},k=function(a,b){if(1>b)return"";for(var c="";b>0;)1&b&&(c+=a),b>>=1,a+=a;return c},l=[].slice,m=function(a){return null==a?"\\s":a.source?a.source:"["+r.escapeRegExp(a)+"]"},n={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},o={};for(var p in n)o[n[p]]=p;o["'"]="#39";var q=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var b=k,c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var f,g,h,i,j,k,l,m=1,n=c.length,o="",p=[];for(g=0;n>g;g++)if(o=a(c[g]),"string"===o)p.push(c[g]);else if("array"===o){if(i=c[g],i[2])for(f=d[m],h=0;h<i[2].length;h++){if(!f.hasOwnProperty(i[2][h]))throw new Error(q('[_.sprintf] property "%s" does not exist',i[2][h]));f=f[i[2][h]]}else f=i[1]?d[i[1]]:d[m++];if(/[^s]/.test(i[8])&&"number"!=a(f))throw new Error(q("[_.sprintf] expecting number but found %s",a(f)));switch(i[8]){case"b":f=f.toString(2);break;case"c":f=e.fromCharCode(f);break;case"d":f=parseInt(f,10);break;case"e":f=i[7]?f.toExponential(i[7]):f.toExponential();break;case"f":f=i[7]?parseFloat(f).toFixed(i[7]):parseFloat(f);break;case"o":f=f.toString(8);break;case"s":f=(f=e(f))&&i[7]?f.substring(0,i[7]):f;break;case"u":f=Math.abs(f);break;case"x":f=f.toString(16);break;case"X":f=f.toString(16).toUpperCase()}f=/[def]/.test(i[8])&&i[3]&&f>=0?"+"+f:f,k=i[4]?"0"==i[4]?"0":i[4].charAt(1):" ",l=i[6]-e(f).length,j=i[6]?b(k,l):"",p.push(i[5]?f+j:j+f)}return p.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw new Error("[_.sprintf] huh?");if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw new Error("[_.sprintf] huh?");for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw new Error("[_.sprintf] huh?");f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");d.push(c)}b=b.substring(c[0].length)}return d},c}(),r={VERSION:"2.3.0",isBlank:function(a){return null==a&&(a=""),/^\s*$/.test(a)},stripTags:function(a){return null==a?"":e(a).replace(/<\/?[^>]+>/g,"")},capitalize:function(a){return a=null==a?"":e(a),a.charAt(0).toUpperCase()+a.slice(1)},chop:function(a,b){return null==a?[]:(a=e(a),b=~~b,b>0?a.match(new RegExp(".{1,"+b+"}","g")):[a])},clean:function(a){return r.strip(a).replace(/\s+/g," ")},count:function(a,b){if(null==a||null==b)return 0;a=e(a),b=e(b);for(var c=0,d=0,f=b.length;;){if(d=a.indexOf(b,d),-1===d)break;c++,d+=f}return c},chars:function(a){return null==a?[]:e(a).split("")},swapCase:function(a){return null==a?"":e(a).replace(/\S/g,function(a){return a===a.toUpperCase()?a.toLowerCase():a.toUpperCase()})},escapeHTML:function(a){return null==a?"":e(a).replace(/[&<>"']/g,function(a){return"&"+o[a]+";"})},unescapeHTML:function(a){return null==a?"":e(a).replace(/\&([^;]+);/g,function(a,b){var c;return b in n?n[b]:(c=b.match(/^#x([\da-fA-F]+)$/))?e.fromCharCode(parseInt(c[1],16)):(c=b.match(/^#(\d+)$/))?e.fromCharCode(~~c[1]):a})},escapeRegExp:function(a){return null==a?"":e(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(a,b,c,d){var e=r.chars(a);return e.splice(~~b,~~c,d),e.join("")},insert:function(a,b,c){return r.splice(a,b,0,c)},include:function(a,b){return""===b?!0:null==a?!1:-1!==e(a).indexOf(b)},join:function(){var a=l.call(arguments),b=a.shift();return null==b&&(b=""),a.join(b)},lines:function(a){return null==a?[]:e(a).split("\n")},reverse:function(a){return r.chars(a).reverse().join("")},startsWith:function(a,b){return""===b?!0:null==a||null==b?!1:(a=e(a),b=e(b),a.length>=b.length&&a.slice(0,b.length)===b)},endsWith:function(a,b){return""===b?!0:null==a||null==b?!1:(a=e(a),b=e(b),a.length>=b.length&&a.slice(a.length-b.length)===b)},succ:function(a){return null==a?"":(a=e(a),a.slice(0,-1)+e.fromCharCode(a.charCodeAt(a.length-1)+1))},titleize:function(a){return null==a?"":(a=e(a).toLowerCase(),a.replace(/(?:^|\s|-)\S/g,function(a){return a.toUpperCase()}))},camelize:function(a){return r.trim(a).replace(/[-_\s]+(.)?/g,function(a,b){return b?b.toUpperCase():""})},underscored:function(a){return r.trim(a).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(a){return r.trim(a).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(a){return r.titleize(e(a).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(a){return r.capitalize(r.underscored(a).replace(/_id$/,"").replace(/_/g," "))},trim:function(a,b){return null==a?"":!b&&g?g.call(a):(b=m(b),e(a).replace(new RegExp("^"+b+"+|"+b+"+$","g"),""))},ltrim:function(a,b){return null==a?"":!b&&i?i.call(a):(b=m(b),e(a).replace(new RegExp("^"+b+"+"),""))},rtrim:function(a,b){return null==a?"":!b&&h?h.call(a):(b=m(b),e(a).replace(new RegExp(b+"+$"),""))},truncate:function(a,b,c){return null==a?"":(a=e(a),c=c||"...",b=~~b,a.length>b?a.slice(0,b)+c:a)},prune:function(a,b,c){if(null==a)return"";if(a=e(a),b=~~b,c=null!=c?e(c):"...",a.length<=b)return a;var d=function(a){return a.toUpperCase()!==a.toLowerCase()?"A":" "},f=a.slice(0,b+1).replace(/.(?=\W*\w*$)/g,d);return f=f.slice(f.length-2).match(/\w\w/)?f.replace(/\s*\S+$/,""):r.rtrim(f.slice(0,f.length-1)),(f+c).length>a.length?a:a.slice(0,f.length)+c},words:function(a,b){return r.isBlank(a)?[]:r.trim(a,b).split(b||/\s+/)},pad:function(a,b,c,d){a=null==a?"":e(a),b=~~b;var f=0;switch(c?c.length>1&&(c=c.charAt(0)):c=" ",d){case"right":return f=b-a.length,a+k(c,f);case"both":return f=b-a.length,k(c,Math.ceil(f/2))+a+k(c,Math.floor(f/2));default:return f=b-a.length,k(c,f)+a}},lpad:function(a,b,c){return r.pad(a,b,c)},rpad:function(a,b,c){return r.pad(a,b,c,"right")},lrpad:function(a,b,c){return r.pad(a,b,c,"both")},sprintf:q,vsprintf:function(a,b){return b.unshift(a),q.apply(null,b)},toNumber:function(a,b){return a?(a=r.trim(a),a.match(/^-?\d+(?:\.\d+)?$/)?j(j(a).toFixed(~~b)):0/0):0},numberFormat:function(a,b,c,d){if(isNaN(a)||null==a)return"";a=a.toFixed(~~b),d="string"==typeof d?d:",";var e=a.split("."),f=e[0],g=e[1]?(c||".")+e[1]:"";return f.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+d)+g},strRight:function(a,b){if(null==a)return"";a=e(a),b=null!=b?e(b):b;var c=b?a.indexOf(b):-1;return~c?a.slice(c+b.length,a.length):a},strRightBack:function(a,b){if(null==a)return"";a=e(a),b=null!=b?e(b):b;var c=b?a.lastIndexOf(b):-1;return~c?a.slice(c+b.length,a.length):a},strLeft:function(a,b){if(null==a)return"";a=e(a),b=null!=b?e(b):b;var c=b?a.indexOf(b):-1;return~c?a.slice(0,c):a},strLeftBack:function(a,b){if(null==a)return"";a+="",b=null!=b?""+b:b;var c=a.lastIndexOf(b);return~c?a.slice(0,c):a},toSentence:function(a,b,c,d){b=b||", ",c=c||" and ";var e=a.slice(),f=e.pop();return a.length>2&&d&&(c=r.rtrim(b)+c),e.length?e.join(b)+c+f:f},toSentenceSerial:function(){var a=l.call(arguments);return a[3]=!0,r.toSentence.apply(r,a)},slugify:function(a){if(null==a)return"";var b="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",c="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",d=new RegExp(m(b),"g");return a=e(a).toLowerCase().replace(d,function(a){var d=b.indexOf(a);return c.charAt(d)||"-"}),r.dasherize(a.replace(/[^\w\s-]/g,""))},surround:function(a,b){return[b,a,b].join("")},quote:function(a,b){return r.surround(a,b||'"')},unquote:function(a,b){return b=b||'"',a[0]===b&&a[a.length-1]===b?a.slice(1,a.length-1):a},exports:function(){var a={};for(var b in this)this.hasOwnProperty(b)&&!b.match(/^(?:include|contains|reverse)$/)&&(a[b]=this[b]);return a},repeat:function(a,b,c){if(null==a)return"";if(b=~~b,null==c)return k(e(a),b);for(var d=[];b>0;d[--b]=a);return d.join(c)},naturalCmp:function(a,b){if(a==b)return 0;if(!a)return-1;if(!b)return 1;for(var c=/(\.\d+)|(\d+)|(\D+)/g,d=e(a).toLowerCase().match(c),f=e(b).toLowerCase().match(c),g=Math.min(d.length,f.length),h=0;g>h;h++){var i=d[h],j=f[h];if(i!==j){var k=parseInt(i,10);if(!isNaN(k)){var l=parseInt(j,10);if(!isNaN(l)&&k-l)return k-l}return j>i?-1:1}}return d.length===f.length?d.length-f.length:b>a?-1:1},levenshtein:function(a,b){if(null==a&&null==b)return 0;if(null==a)return e(b).length;if(null==b)return e(a).length;a=e(a),b=e(b);for(var c,d,f=[],g=0;g<=b.length;g++)for(var h=0;h<=a.length;h++)d=g&&h?a.charAt(h-1)===b.charAt(g-1)?c:Math.min(f[h],f[h-1],c)+1:g+h,c=f[h],f[h]=d;return f.pop()},toBoolean:function(a,b,c){return"number"==typeof a&&(a=""+a),"string"!=typeof a?!!a:(a=r.trim(a),f(a,b||["true","1"])?!0:f(a,c||["false","0"])?!1:void 0)}};r.strip=r.trim,r.lstrip=r.ltrim,r.rstrip=r.rtrim,r.center=r.lrpad,r.rjust=r.lpad,r.ljust=r.rpad,r.contains=r.include,r.q=r.quote,r.toBool=r.toBoolean,"undefined"!=typeof d&&("undefined"!=typeof c&&c.exports&&(c.exports=r),d._s=r),"function"==typeof a&&a.amd&&a("underscore.string",[],function(){return r}),b._=b._||{},b._.string=b._.str=r}(this,String)},{}],13:[function(a,b){b.exports={name:"quilljs",version:"0.16.0",description:"Cross browser rich text editor",author:"Jason Chen <jhchen7@gmail.com>",homepage:"http://quilljs.com",contributors:["Byron Milligan <byronner@gmail.com>","Keegan Poppen <keegan.poppen@gmail.com>"],main:"index.js",dependencies:{eventemitter2:"~0.4.13",lodash:"~2.4.1","tandem-core":"~0.6.2","underscore.string":"~2.3.3"},devDependencies:{async:"~0.9.0","coffee-script":"~1.7.1",coffeeify:"~0.6.0",glob:"~4.0.4",grunt:"~0.4.3","grunt-browserify":"~2.1.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.10.1","grunt-contrib-compress":"~0.9.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.8.0","grunt-contrib-copy":"~0.5.0","grunt-contrib-stylus":"~0.18.0","grunt-contrib-uglify":"~0.5.0","grunt-karma":"~0.8.0","grunt-lodash":"~0.3.0","grunt-protractor-runner":"~1.0.0",harp:"~0.12.1",istanbul:"~0.3.0",jquery:"~2.1.1",karma:"~0.12.0","karma-chrome-launcher":"~0.1.2","karma-coffee-preprocessor":"~0.2.1","karma-coverage":"~0.2.0","karma-firefox-launcher":"~0.1.3","karma-html2js-preprocessor":"~0.1.0","karma-jasmine":"~0.2.0","karma-phantomjs-launcher":"~0.1.2","karma-safari-launcher":"~0.1.1","karma-sauce-launcher":"~0.2.2","load-grunt-tasks":"~0.6.0",protractor:"~0.24.2",stylus:"~0.47.1",watchify:"~0.10.2"},engines:{node:">=0.10"},license:"BSD-3-Clause",repository:{type:"git",url:"https://github.com/quilljs/quill"},bugs:{url:"https://github.com/quilljs/quill/issues"},scripts:{prepublish:"grunt coffee:quill",postpublish:"grunt clean:coffee",test:"grunt test"},keywords:["editor","rich text","wysiwyg"]}},{}],14:[function(a,b){var c,d,e,f,g,h,i,j,k;k=a("lodash"),c=a("./dom"),e=a("./format"),f=a("./line"),g=a("./lib/linked-list"),h=a("./normalizer"),j=a("./utils"),i=a("tandem-core"),d=function(){function a(a,b){this.root=a,null==b&&(b={}),this.formats={},k.each(b.formats,k.bind(this.addFormat,this)),this.setHTML(this.root.innerHTML)}return a.prototype.addFormat=function(a,b){return k.isObject(b)||(b=e.FORMATS[a]),null!=this.formats[a]&&console.warn("Overwriting format",a,this.formats[a]),this.formats[a]=new e(this.root.ownerDocument,b)},a.prototype.appendLine=function(a){return this.insertLineBefore(a,null)},a.prototype.findLeafAt=function(a,b){var c,d,e;return e=this.findLineAt(a),c=e[0],d=e[1],null!=c?c.findLeafAt(d,b):[null,d]},a.prototype.findLine=function(a){for(var b;null!=a&&null==c.BLOCK_TAGS[a.tagName];)a=a.parentNode;return b=null!=a?this.lineMap[a.id]:null,(null!=b?b.node:void 0)===a?b:null},a.prototype.findLineAt=function(a){var b,c;if(!(this.lines.length>0))return[null,a];if(c=this.toDelta().endLength,a===c)return[this.lines.last,this.lines.last.length];if(a>c)return[null,a-c];for(b=this.lines.first;null!=b;){if(a<b.length)return[b,a];a-=b.length,b=b.next}return[null,a]},a.prototype.insertLineBefore=function(a,b){var d;return d=new f(this,a),null!=b?(c.isElement(a.parentNode)||this.root.insertBefore(a,b.node),this.lines.insertAfter(b.prev,d)):(c.isElement(a.parentNode)||this.root.appendChild(a),this.lines.append(d)),this.lineMap[d.id]=d,d},a.prototype.mergeLines=function(a,b){return b.length>1&&(1===a.length&&c.removeNode(a.leaves.last.node),k.each(c.getChildNodes(b.node),function(b){return b.tagName!==c.DEFAULT_BREAK_TAG?a.node.appendChild(b):void 0})),this.removeLine(b),a.rebuild()},a.prototype.optimizeLines=function(){return k.each(this.lines.toArray(),function(a){return a.optimize(),!0})},a.prototype.rebuild=function(){var a,b,d;for(b=this.lines.toArray(),a=this.root.firstChild,null!=a&&null!=c.LIST_TAGS[a.tagName]&&(a=a.firstChild),k.each(b,function(b){return function(c){for(var d,e;c.node!==a;){if(c.node.parentNode!==b.root&&(null!=(e=c.node.parentNode)?e.parentNode:void 0)!==b.root)return b.removeLine(c);a=h.normalizeLine(a),d=b.insertLineBefore(a,c),a=j.getNextLineNode(a,b.root)}return c.outerHTML!==a.outerHTML&&(c.node=h.normalizeLine(c.node),c.rebuild()),a=j.getNextLineNode(a,b.root)}}(this)),d=[];null!=a;)a=h.normalizeLine(a),this.appendLine(a),d.push(a=j.getNextLineNode(a,this.root));return d},a.prototype.removeLine=function(a){return null!=a.node.parentNode&&c.removeNode(c.LIST_TAGS[a.node.parentNode.tagName]&&1===a.node.parentNode.childNodes.length?a.node.parentNode:a.node),delete this.lineMap[a.id],this.lines.remove(a)},a.prototype.setHTML=function(a){return a=h.stripComments(a),a=h.stripWhitespace(a),this.root.innerHTML=a,this.lines=new g,this.lineMap={},this.rebuild()},a.prototype.splitLine=function(a,b){var c,d,e,f;return b=Math.min(b,a.length-1),f=j.splitNode(a.node,b,!0),c=f[0],d=f[1],a.node=c,a.rebuild(),e=this.insertLineBefore(d,a.next),e.formats=k.clone(a.formats),e.resetContent(),e},a.prototype.toDelta=function(){var a,b;return a=this.lines.toArray(),b=k.flatten(k.map(a,function(a){return k.clone(a.delta.ops)}),!0),new i.Delta(0,b)},a}(),b.exports=d},{"./dom":15,"./format":17,"./lib/linked-list":20,"./line":23,"./normalizer":33,"./utils":39,lodash:"M4+//f","tandem-core":10}],15:[function(a,b){var c,d,e;e=a("lodash"),e.str=a("underscore.string"),d=null,c={ELEMENT_NODE:1,NOBREAK_SPACE:"&nbsp;",TEXT_NODE:3,ZERO_WIDTH_NOBREAK_SPACE:"﻿",DEFAULT_BLOCK_TAG:"DIV",DEFAULT_BREAK_TAG:"BR",DEFAULT_INLINE_TAG:"SPAN",EMBED_TEXT:"!",FONT_SIZES:{"10px":1,"13px":2,"16px":3,"18px":4,"24px":5,"32px":6,"48px":7},KEYS:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},BLOCK_TAGS:{ADDRESS:"ADDRESS",ARTICLE:"ARTICLE",ASIDE:"ASIDE",AUDIO:"AUDIO",BLOCKQUOTE:"BLOCKQUOTE",CANVAS:"CANVAS",DD:"DD",DIV:"DIV",DL:"DL",FIGCAPTION:"FIGCAPTION",FIGURE:"FIGURE",FOOTER:"FOOTER",FORM:"FORM",H1:"H1",H2:"H2",H3:"H3",H4:"H4",H5:"H5",H6:"H6",HEADER:"HEADER",HGROUP:"HGROUP",LI:"LI",OL:"OL",OUTPUT:"OUTPUT",P:"P",PRE:"PRE",SECTION:"SECTION",TABLE:"TABLE",TBODY:"TBODY",TD:"TD",TFOOT:"TFOOT",TH:"TH",THEAD:"THEAD",TR:"TR",UL:"UL",VIDEO:"VIDEO"},EMBED_TAGS:{IMG:"IMG"},LIST_TAGS:{OL:"OL",UL:"UL"},VOID_TAGS:{AREA:"AREA",BASE:"BASE",BR:"BR",COL:"COL",COMMAND:"COMMAND",EMBED:"EMBED",HR:"HR",IMG:"IMG",INPUT:"INPUT",KEYGEN:"KEYGEN",LINK:"LINK",META:"META",PARAM:"PARAM",SOURCE:"SOURCE",TRACK:"TRACK",WBR:"WBR"},addClass:function(a,b){return c.hasClass(a,b)?void 0:null!=a.classList?a.classList.add(b):null!=a.className?a.className=e.str.trim(a.className+" "+b):void 0},addEventListener:function(a,b,c){return a.addEventListener(b,function(a){var e,f;return e=!d||"keydown"!==b&&"keyup"!==b?a:d,f=c(e),f||(a.preventDefault(),a.stopPropagation()),f})},addStyles:function(a,b){return b=e.defaults(b,c.getStyles(a)),c.setStyles(a,b)},clearAttributes:function(a,b){return null==b&&(b=[]),e.isString(b)&&(b=[b]),e.each(c.getAttributes(a),function(c,d){return e.indexOf(b,d)>-1?void 0:a.removeAttribute(d)})},getAttributes:function(a){var b,c,d,e,f,g,h;if(null==a.attributes)return{};for(c={},h=a.attributes,d=f=0,g=h.length;g>f;d=++f)e=h[d],b=a.attributes[d],c[b.name]=b.value;return c},getChildNodes:function(a){return e.map(a.childNodes)},getChildren:function(a){return e.map(a.children)},getDescendants:function(a){return e.map(a.getElementsByTagName("*"))},getClasses:function(a){return a.className.split(/\s+/)},getDefaultOption:function(a){return a.querySelector("option[selected]")},getSelectValue:function(a){return a.selectedIndex>-1?a.options[a.selectedIndex].value:""},getStyles:function(a){var b,c;return c=a.getAttribute("style")||"",b=e.reduce(c.split(";"),function(a,b){var c,d,f;return f=b.split(":"),c=f[0],d=f[1],c&&d&&(c=e.str.trim(c),d=e.str.trim(d),a[c.toLowerCase()]=d),a},{})},getText:function(a){switch(a.nodeType){case c.ELEMENT_NODE:return a.tagName===c.DEFAULT_BREAK_TAG?"":null!=c.EMBED_TAGS[a.tagName]?c.EMBED_TEXT:null!=a.textContent?a.textContent:"";case c.TEXT_NODE:return a.data||"";default:return""}},getTextNodes:function(a){var b,c,d;for(d=a.ownerDocument.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1),c=[];b=d.nextNode();)c.push(b);return c},getWindow:function(a){return a.ownerDocument.defaultView||a.ownerDocument.parentWindow},hasClass:function(a,b){return null!=a.classList?a.classList.contains(b):null!=a.className?e.indexOf(c.getClasses(a),b)>-1:!1},isElement:function(a){return(null!=a?a.nodeType:void 0)===c.ELEMENT_NODE},isTextNode:function(a){return(null!=a?a.nodeType:void 0)===c.TEXT_NODE},moveChildren:function(a,b){return e.each(c.getChildNodes(b),function(b){return a.appendChild(b)})},normalize:function(a){var b,d,e,f;for(b=a.firstChild,f=[];null!=b;)e=b.nextSibling,c.isTextNode(b)&&(0===c.getText(b).length?c.removeNode(b):c.isTextNode(e)&&(e=e.nextSibling,d=c.getText(b)+c.getText(b.nextSibling),c.setText(b,d),c.removeNode(b.nextSibling))),f.push(b=e);return f},isIE:function(a){var b;return b=document.documentMode,b&&a>=b},isIOS:function(){return/iPhone|iPad/i.test(navigator.userAgent)},removeClass:function(a,b){var d;if(c.hasClass(a,b))return null!=a.classList?a.classList.remove(b):null!=a.className?(d=c.getClasses(a),d.splice(e.indexOf(d,b),1),a.className=d.join(" ")):void 0},removeNode:function(a){var b;return null!=(b=a.parentNode)?b.removeChild(a):void 0},replaceNode:function(a,b){return b.parentNode.replaceChild(a,b),a},resetSelect:function(a,b){var d;return null==b&&(b=!0),d=c.getDefaultOption(a),null!=d?d.selected=!0:a.selectedIndex=0,b?c.triggerEvent(a,"change"):void 0},selectOption:function(a,b,d){var f;return null==d&&(d=!0),f=e.isElement(b)?b.value:b,f?a.value=f:a.selectedIndex=-1,d?c.triggerEvent(a,"change"):void 0},setAttributes:function(a,b){return e.each(b,function(b,c){return a.setAttribute(c,b)})},setStyles:function(a,b){var c;return c=e.map(b,function(a,b){return""+b+": "+a}).join("; ")+";",a.setAttribute("style",c)},setText:function(a,b){switch(a.nodeType){case c.ELEMENT_NODE:return a.textContent=b;case c.TEXT_NODE:return a.data=b}},switchTag:function(a,b){var d,f;return b=b.toUpperCase(),a.tagName===b?a:(f=a.ownerDocument.createElement(b),d=c.getAttributes(a),null==c.VOID_TAGS[b]&&this.moveChildren(f,a),a.parentNode.replaceChild(f,a),e.each(d,function(a,b){return f.setAttribute(b,a)}),f)},toggleClass:function(a,b,d){return null==d&&(d=!c.hasClass(a,b)),d?c.addClass(a,b):c.removeClass(a,b)},triggerEvent:function(a,b,f){var g,h,i;return null==f&&(f={}),e.indexOf(["keypress","keydown","keyup"],b)<0?(g=a.ownerDocument.createEvent("Event"),g.initEvent(b,f.bubbles,f.cancelable)):(g=a.ownerDocument.createEvent("KeyboardEvent"),d=e.clone(f),d.which=e.isNumber(f.key)?f.key:e.isString(f.key)?f.key.toUpperCase().charCodeAt(0):0,c.isIE(10)?(i=[],f.altKey&&i.push("Alt"),f.ctrlKey&&i.push("Control"),f.metaKey&&i.push("Meta"),f.shiftKey&&i.push("Shift"),g.initKeyboardEvent(b,f.bubbles,f.cancelable,a.ownerDocument.defaultView.window,0,0,i.join(" "),null,null)):(h=e.isFunction(g.initKeyboardEvent)?"initKeyboardEvent":"initKeyEvent",g[h](b,f.bubbles,f.cancelable,a.ownerDocument.defaultView.window,f.ctrlKey,f.altKey,f.shiftKey,f.metaKey,0,0))),a.dispatchEvent(g),d=null
  },unwrap:function(a){var b,d;return d=a.firstChild,b=a.nextSibling,e.each(c.getChildNodes(a),function(c){return a.parentNode.insertBefore(c,b)}),c.removeNode(a),d},wrap:function(a,b){var c;for(null!=b.parentNode&&b.parentNode.insertBefore(a,b),c=a;null!=c.firstChild;)c=a.firstChild;return c.appendChild(b),c}},b.exports=c},{lodash:"M4+//f","underscore.string":12}],16:[function(a,b){var c,d,e,f,g,h,i,j;j=a("lodash"),c=a("./dom"),d=a("./document"),f=a("./line"),g=a("./renderer"),h=a("./selection"),i=a("tandem-core"),e=function(){function a(a,b,c){this.iframeContainer=a,this.quill=b,this.options=null!=c?c:{},this.renderer=new g(this.iframeContainer,this.options),this.root=this.renderer.root,this.doc=new d(this.root,this.options),this.delta=this.doc.toDelta(),this.selection=new h(this.doc,this.renderer.iframe,this.quill),this.timer=setInterval(j.bind(this.checkUpdate,this),this.options.pollInterval),this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(a){return function(b){return a.savedRange=b}}(this)),this.options.readOnly||this.enable()}return a.prototype.disable=function(){return this.enable(!1)},a.prototype.enable=function(a){return null==a&&(a=!0),this.root.setAttribute("contenteditable",a)},a.prototype.applyDelta=function(a,b){var c,d;return c=this._update(),c&&(d=c,c=c.transform(a,!0),a=a.transform(d,!1),this.delta=this.doc.toDelta()),a.isIdentity()||(a.startLength!==this.delta.endLength&&console.warn("Trying to apply delta to incorrect doc length",a,this.delta),a=this._trackDelta(function(b){return function(){return a.apply(b._insertAt,b._deleteAt,b._formatAt,b),b.selection.shiftAfter(0,0,j.bind(b.doc.optimizeLines,b.doc))}}(this)),this.delta=this.doc.toDelta(),this.innerHTML=this.root.innerHTML,a&&"silent"!==b&&this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,a,b)),c&&!c.isIdentity()&&"silent"!==b?this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,c,"user"):void 0},a.prototype.checkUpdate=function(a){var b,c;return null==a&&(a="user"),null==this.renderer.iframe.parentNode||null==this.root.parentNode?clearInterval(this.timer):(b=this._update(),b&&(c=this.delta,this.delta=c.compose(b),this.quill.emit(this.quill.constructor.events.TEXT_CHANGE,b,a)),b&&(a="silent"),this.selection.update(a))},a.prototype.getDelta=function(){return this.delta},a.prototype._deleteAt=function(a,b){return 0>=b?void 0:this.selection.shiftAfter(a,-1*b,function(c){return function(){var d,e,f,g,h,i,j;for(j=c.doc.findLineAt(a),f=j[0],i=j[1],d=f,g=f.length-i<=b&&i>0;null!=d&&b>0;)h=d.next,e=Math.min(d.length-i,b),0===i&&b>=d.length?c.doc.removeLine(d):d.deleteText(i,e),b-=e,d=h,i=0;return g&&f.next?c.doc.mergeLines(f,f.next):void 0}}(this))},a.prototype._formatAt=function(a,b,c,d){return this.selection.shiftAfter(a,0,function(e){return function(){var f,g,h,i,j;for(i=e.doc.findLineAt(a),g=i[0],h=i[1],j=[];null!=g&&b>0;)f=Math.min(b,g.length-h-1),g.formatText(h,f,c,d),b-=f,b>0&&g.format(c,d),b-=1,h=0,j.push(g=g.next);return j}}(this))},a.prototype._insertAt=function(a,b,d){return null==d&&(d={}),this.selection.shiftAfter(a,b.length,function(e){return function(){var f,g,h,i;return b=b.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),g=b.split("\n"),i=e.doc.findLineAt(a),f=i[0],h=i[1],j.each(g,function(a,b){var i;return null==f||f.length<=h?(b<g.length-1||a.length>0)&&(f=e.doc.appendLine(e.root.ownerDocument.createElement(c.DEFAULT_BLOCK_TAG)),h=0,f.insertText(h,a,d),f.format(d),i=null):(f.insertText(h,a,d),b<g.length-1&&(i=e.doc.splitLine(f,h+a.length),j.each(j.defaults({},d,f.formats),function(a,b){return f.format(b,d[b])}),h=0)),f=i})}}(this))},a.prototype._trackDelta=function(a){var b,c,d,e,f,g,h,i,k,l,m,n,o,p,q,r,s,t,u,v;o=null!=(r=this.savedRange)?r.start:void 0,a(),k=this.doc.toDelta();try{l=null!=(s=this.selection.getRange())?s.start:void 0,null!=o&&null!=l&&o<=this.delta.endLength&&l<=k.endLength&&(t=this.delta.split(o),p=t[0],q=t[1],u=k.split(l),m=u[0],n=u[1],e=m.decompose(p),f=n.decompose(q),c=e.merge(f))}catch(w){g=w}return d=k.decompose(this.delta),c&&d?(v=j.map([c,d],function(a){return j.reduce(a.ops,function(a,b){return null!=b.value&&(a+=b.value.length),a},0)}),h=v[0],i=v[1],b=h>h?c:d):b=c||d,b},a.prototype._update=function(){var a;return this.innerHTML===this.root.innerHTML?!1:(a=this._trackDelta(function(a){return function(){return a.selection.preserve(j.bind(a.doc.rebuild,a.doc)),a.selection.shiftAfter(0,0,j.bind(a.doc.optimizeLines,a.doc))}}(this)),this.innerHTML=this.root.innerHTML,a.isIdentity()?!1:a)},a}(),b.exports=e},{"./document":14,"./dom":15,"./line":23,"./renderer":35,"./selection":36,lodash:"M4+//f","tandem-core":10}],17:[function(a,b){var c,d,e,f;f=a("lodash"),c=a("./dom"),e=a("./utils"),d=function(){function a(a,b){this.document=a,this.config=b}return a.types={LINE:"line"},a.FORMATS={bold:{tag:"B",prepare:"bold"},italic:{tag:"I",prepare:"italic"},underline:{tag:"U",prepare:"underline"},strike:{tag:"S",prepare:"strikeThrough"},color:{style:"color","default":"rgb(0, 0, 0)",prepare:"foreColor"},background:{style:"backgroundColor","default":"rgb(255, 255, 255)",prepare:"backColor"},font:{style:"fontFamily","default":"'Helvetica', 'Arial', sans-serif",prepare:"fontName"},size:{style:"fontSize","default":"13px",prepare:function(a,b){return a.execCommand("fontSize",!1,e.convertFontSize(b))}},link:{tag:"A",attribute:"href"},image:{tag:"IMG",attribute:"src"},align:{type:a.types.LINE,style:"textAlign","default":"left"},bullet:{type:a.types.LINE,exclude:"list",parentTag:"UL",tag:"LI"},list:{type:a.types.LINE,exclude:"bullet",parentTag:"OL",tag:"LI"}},a.prototype.add=function(b,d){var g,h,i,j;return d?this.value(b)===d?b:(f.isString(this.config.parentTag)&&(h=this.document.createElement(this.config.parentTag),c.wrap(h,b),b.parentNode.tagName===(null!=(i=b.parentNode.previousSibling)?i.tagName:void 0)&&e.mergeNodes(b.parentNode.previousSibling,b.parentNode),b.parentNode.tagName===(null!=(j=b.parentNode.nextSibling)?j.tagName:void 0)&&e.mergeNodes(b.parentNode,b.parentNode.nextSibling)),f.isString(this.config.tag)&&(g=this.document.createElement(this.config.tag),null!=c.VOID_TAGS[g.tagName]?(null!=b.parentNode&&b.parentNode.insertBefore(g,b),c.removeNode(b),b=g):b=this.isType(a.types.LINE)?c.switchTag(b,this.config.tag):c.wrap(g,b)),(f.isString(this.config.style)||f.isString(this.config.attribute)||f.isString(this.config["class"]))&&(f.isString(this.config["class"])&&(b=this.remove(b)),c.isTextNode(b)&&(b=c.wrap(this.document.createElement(c.DEFAULT_INLINE_TAG),b)),f.isString(this.config.style)&&d!==this.config["default"]&&(b.style[this.config.style]=d),f.isString(this.config.attribute)&&b.setAttribute(this.config.attribute,d),f.isString(this.config["class"])&&c.addClass(b,this.config["class"]+d)),b):this.remove(b)},a.prototype.isType=function(a){return a===this.config.type},a.prototype.match=function(a){var b,d,e,g,h;if(!c.isElement(a))return!1;if(f.isString(this.config.parentTag)&&(null!=(g=a.parentNode)?g.tagName:void 0)!==this.config.parentTag)return!1;if(f.isString(this.config.tag)&&a.tagName!==this.config.tag)return!1;if(f.isString(this.config.style)&&(!a.style[this.config.style]||a.style[this.config.style]===this.config["default"]))return!1;if(f.isString(this.config.attribute)&&!a.hasAttribute(this.config.attribute))return!1;if(f.isString(this.config["class"])){for(h=c.getClasses(a),d=0,e=h.length;e>d;d++)if(b=h[d],0===b.indexOf(this.config["class"]))return!0;return!1}return!0},a.prototype.prepare=function(a){return f.isString(this.config.prepare)?this.document.execCommand(this.config.prepare,!1,a):f.isFunction(this.config.prepare)?this.config.prepare(this.document,a):void 0},a.prototype.remove=function(b){var d,g,h,i;if(!this.match(b))return b;if(f.isString(this.config.style)&&(b.style[this.config.style]="",b.getAttribute("style")||b.removeAttribute("style")),f.isString(this.config.attribute)&&b.removeAttribute(this.config.attribute),f.isString(this.config["class"])){for(i=c.getClasses(b),g=0,h=i.length;h>g;g++)d=i[g],0===d.indexOf(this.config["class"])&&c.removeClass(b,d);b.getAttribute("class")||b.removeAttribute("class")}return f.isString(this.config.tag)&&(this.isType(a.types.LINE)?(null!=b.previousSibling&&e.splitAncestors(b,b.parentNode.parentNode),null!=b.nextSibling&&e.splitAncestors(b.nextSibling,b.parentNode.parentNode),b=c.switchTag(b,c.DEFAULT_BLOCK_TAG)):(b=c.switchTag(b,c.DEFAULT_INLINE_TAG),null!=c.EMBED_TAGS[this.config.tag]&&c.setText(b,c.EMBED_TEXT))),f.isString(this.config.parentTag)&&c.unwrap(b.parentNode),b.tagName!==c.DEFAULT_INLINE_TAG||b.hasAttributes()||(b=c.unwrap(b)),b},a.prototype.value=function(a){var b,d,e,g;if(!this.match(a))return void 0;if(f.isString(this.config.attribute))return a.getAttribute(this.config.attribute)||void 0;if(f.isString(this.config.style))return a.style[this.config.style]||void 0;if(f.isString(this.config["class"])){for(g=c.getClasses(a),d=0,e=g.length;e>d;d++)if(b=g[d],0===b.indexOf(this.config["class"]))return b.slice(this.config["class"].length)}else if(f.isString(this.config.tag))return!0;return void 0},a}(),b.exports=d},{"./dom":15,"./utils":39,lodash:"M4+//f"}],18:[function(a,b){var c,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};h=a("lodash"),c=a("./dom"),d=a("./format"),f=a("./lib/linked-list"),g=a("./utils"),e=function(a){function b(a,d){this.node=a,this.formats=h.clone(d),this.id=h.uniqueId(b.ID_PREFIX),this.text=c.getText(this.node),this.length=this.text.length}return j(b,a),b.ID_PREFIX="leaf-",b.isLeafNode=function(a){return c.isTextNode(a)||null==a.firstChild},b.prototype.getFormats=function(){return this.formats},b.prototype.deleteText=function(a,b){var d;if(b>0)return this.text=this.text.slice(0,a)+this.text.slice(a+b),this.length=this.text.length,null!=c.EMBED_TAGS[this.node.tagName]?(d=this.node.ownerDocument.createTextNode(this.text),this.node=c.replaceNode(d,this.node)):c.setText(this.node,this.text)},b.prototype.insertText=function(a,b){var d;return this.text=this.text.slice(0,a)+b+this.text.slice(a),c.isTextNode(this.node)?c.setText(this.node,this.text):(d=this.node.ownerDocument.createTextNode(b),this.node.tagName===c.DEFAULT_BREAK_TAG?c.replaceNode(d,this.node):this.node.appendChild(d),this.node=d),this.length=this.text.length},b}(f.Node),b.exports=e},{"./dom":15,"./format":17,"./lib/linked-list":20,"./utils":39,lodash:"M4+//f"}],19:[function(a,b){var c,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("../dom"),e=a("./picker"),c=function(a){function b(){b.__super__.constructor.apply(this,arguments),d.addClass(this.container,"ql-color-picker")}return g(b,a),b.prototype.buildItem=function(a,c,d){var e;return e=b.__super__.buildItem.call(this,a,c,d),e.style.backgroundColor=c.value,e},b}(e),b.exports=c},{"../dom":15,"./picker":21}],20:[function(a,b){var c,d;d=function(){function a(a){this.data=a,this.prev=this.next=null}return a}(),c=function(){function a(){this.length=0,this.first=this.last=null}return a.Node=d,a.prototype.append=function(a){return null!=this.first?(a.next=null,this.last.next=a):this.first=a,a.prev=this.last,this.last=a,this.length+=1},a.prototype.insertAfter=function(a,b){return b.prev=a,null!=a?(b.next=a.next,null!=a.next&&(a.next.prev=b),a.next=b,a===this.last&&(this.last=b)):(b.next=this.first,this.first.prev=b,this.first=b),this.length+=1},a.prototype.remove=function(a){return this.length>1?(null!=a.prev&&(a.prev.next=a.next),null!=a.next&&(a.next.prev=a.prev),a===this.first&&(this.first=a.next),a===this.last&&(this.last=a.prev)):this.first=this.last=null,a.prev=a.next=null,this.length-=1},a.prototype.toArray=function(){var a,b;for(a=[],b=this.first;null!=b;)a.push(b),b=b.next;return a},a}(),b.exports=c},{}],21:[function(a,b){var c,d,e,f;f=a("lodash"),c=a("../dom"),d=a("../normalizer"),e=function(){function a(a){this.select=a,this.container=this.select.ownerDocument.createElement("span"),this.buildPicker(),c.addClass(this.container,"ql-picker"),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),c.addEventListener(this.select.ownerDocument,"click",function(a){return function(){return a.close(),!0}}(this)),c.addEventListener(this.label,"click",function(a){return function(){return f.defer(function(){return c.toggleClass(a.container,"ql-expanded")})}}(this)),c.addEventListener(this.select,"change",function(a){return function(){var b,d;return a.select.selectedIndex>-1&&(b=a.container.querySelectorAll(".ql-picker-item")[a.select.selectedIndex],d=a.select.options[a.select.selectedIndex]),a.selectItem(b,!1),c.toggleClass(a.label,"ql-active",d!==c.getDefaultOption(a.select))}}(this))}return a.TEMPLATE='<span class="ql-picker-label"></span><span class="ql-picker-options"></span>',a.prototype.buildItem=function(a,b,d){var e;return e=this.select.ownerDocument.createElement("span"),e.setAttribute("data-value",b.getAttribute("value")),c.addClass(e,"ql-picker-item"),c.setText(e,c.getText(b)),this.select.selectedIndex===d&&this.selectItem(e,!1),c.addEventListener(e,"click",function(a){return function(){return a.selectItem(e,!0),a.close()}}(this)),e},a.prototype.buildPicker=function(){var b;return f.each(c.getAttributes(this.select),function(a){return function(b,c){return a.container.setAttribute(c,b)}}(this)),this.container.innerHTML=d.stripWhitespace(a.TEMPLATE),this.label=this.container.querySelector(".ql-picker-label"),b=this.container.querySelector(".ql-picker-options"),f.each(this.select.options,function(a){return function(c,d){var e;return e=a.buildItem(b,c,d),b.appendChild(e)}}(this))},a.prototype.close=function(){return c.removeClass(this.container,"ql-expanded")},a.prototype.selectItem=function(a,b){var d,e;return d=this.container.querySelector(".ql-selected"),null!=d&&c.removeClass(d,"ql-selected"),null!=a?(e=a.getAttribute("data-value"),c.addClass(a,"ql-selected"),c.setText(this.label,c.getText(a)),c.selectOption(this.select,e,b),this.label.setAttribute("data-value",e)):(this.label.innerHTML="&nbsp;",this.label.removeAttribute("data-value"))},a}(),b.exports=e},{"../dom":15,"../normalizer":33,lodash:"M4+//f"}],22:[function(a,b){var c,d;d=a("lodash"),c=function(){function a(a,b){this.start=a,this.end=b}return a.compare=function(a,b){return a===b?!0:null==a||null==b?!1:a.equals(b)},a.prototype.equals=function(a){return null==a?!1:this.start===a.start&&this.end===a.end},a.prototype.shift=function(a,b){var c;return c=d.map([this.start,this.end],function(c){return a>c?c:b>=0?c+b:Math.max(a,c+b)}),this.start=c[0],this.end=c[1],c},a.prototype.isCollapsed=function(){return this.start===this.end},a}(),b.exports=c},{lodash:"M4+//f"}],23:[function(a,b){var c,d,e,f,g,h,i,j,k,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};k=a("lodash"),c=a("./dom"),d=a("./format"),e=a("./leaf"),f=a("./line"),g=a("./lib/linked-list"),h=a("./normalizer"),j=a("./utils"),i=a("tandem-core"),f=function(a){function b(a,d){this.doc=a,this.node=d,this.id=k.uniqueId(b.ID_PREFIX),this.formats={},c.addClass(this.node,b.CLASS_NAME),this.rebuild(),b.__super__.constructor.call(this,this.node)}return m(b,a),b.CLASS_NAME="line",b.ID_PREFIX="line-",b.prototype.buildLeaves=function(a,b){return k.each(c.getChildNodes(a),function(a){return function(c){var f;return c=h.normalizeNode(c),f=k.clone(b),k.each(a.doc.formats,function(a,b){return!a.isType(d.types.LINE)&&a.match(c)?f[b]=a.value(c):void 0}),e.isLeafNode(c)?a.leaves.append(new e(c,f)):a.buildLeaves(c,f)}}(this))},b.prototype.deleteText=function(a,b){var c,d,e;if(b>0){for(e=this.findLeafAt(a),d=e[0],a=e[1];null!=d&&b>0;)c=Math.min(b,d.length-a),d.deleteText(a,c),b-=c,d=d.next,a=0;return this.rebuild()}},b.prototype.findLeaf=function(a){var b;for(b=this.leaves.first;null!=b;){if(b.node===a)return b;b=b.next}return null},b.prototype.findLeafAt=function(a,b){var c;if(null==b&&(b=!1),a>=this.length-1)return[this.leaves.last,this.leaves.last.length];for(c=this.leaves.first;null!=c;){if(a<c.length||a===c.length&&b)return[c,a];a-=c.length,c=c.next}return[this.leaves.last,a-this.leaves.last.length]},b.prototype.format=function(a,b){var c;return k.isObject(a)?c=a:(c={},c[a]=b),k.each(c,function(a){return function(b,c){var e,f;return f=a.doc.formats[c],f.isType(d.types.LINE)&&(f.config.exclude&&a.formats[f.config.exclude]&&(e=a.doc.formats[f.config.exclude],null!=e&&(a.node=e.remove(a.node),delete a.formats[f.config.exclude])),a.node=f.add(a.node,b)),b?a.formats[c]=b:delete a.formats[c]}}(this)),this.resetContent()},b.prototype.formatText=function(a,b,c,e){var f,g,h,i,k,l,m,n,o,p;if(n=this.findLeafAt(a),g=n[0],h=n[1],f=this.doc.formats[c],null!=f&&f.config.type!==d.types.LINE){for(;null!=g&&b>0;){if(k=g.next,e&&g.formats[c]!==e||!e&&null!=g.formats[c]){if(m=g.node,null!=g.formats[c])for(j.splitAncestors(m,this.node);!f.match(m);)m=m.parentNode;h>0&&(o=j.splitNode(m,h),i=o[0],m=o[1]),g.length>h+b&&(p=j.splitNode(m,b),m=p[0],l=p[1]),f.add(m,e)}b-=g.length-h,h=0,g=k}return this.rebuild()}},b.prototype.insertText=function(a,b,c){var d,e,f,g,h,i,l;return null==c&&(c={}),b.length>0?(i=this.findLeafAt(a),d=i[0],e=i[1],k.isEqual(d.formats,c)?(d.insertText(e,b),this.resetContent()):(g=k.reduce(c,function(a){return function(b,c,d){return a.doc.formats[d].add(b,c)}}(this),this.node.ownerDocument.createTextNode(b)),l=j.splitNode(d.node,e),h=l[0],f=l[1],f&&(f=j.splitAncestors(f,this.node)),this.node.insertBefore(g,f),this.rebuild())):void 0},b.prototype.optimize=function(){return h.optimizeLine(this.node),this.rebuild()},b.prototype.rebuild=function(a){return null==a&&(a=!1),!a&&null!=this.outerHTML&&this.outerHTML===this.node.outerHTML&&k.all(this.leaves.toArray(),function(a){return null!=a.node.parentNode})?!1:(this.node=h.normalizeNode(this.node),0!==j.getNodeLength(this.node)||this.node.querySelector(c.DEFAULT_BREAK_TAG)||this.node.appendChild(this.node.ownerDocument.createElement(c.DEFAULT_BREAK_TAG)),this.leaves=new g,this.formats=k.reduce(this.doc.formats,function(a){return function(b,c,e){return c.isType(d.types.LINE)&&(c.match(a.node)?b[e]=c.value(a.node):delete b[e]),b}}(this),this.formats),this.buildLeaves(this.node,{}),this.resetContent(),!0)},b.prototype.resetContent=function(){var a;return this.node.id!==this.id&&(this.node.id=this.id),this.outerHTML=this.node.outerHTML,this.length=1,a=k.map(this.leaves.toArray(),function(a){return function(b){return a.length+=b.length,new i.InsertOp(b.text,b.formats)}}(this)),a.push(new i.InsertOp("\n",this.formats)),this.delta=new i.Delta(0,this.length,a)},b}(g.Node),b.exports=f},{"./dom":15,"./format":17,"./leaf":18,"./lib/linked-list":20,"./line":23,"./normalizer":33,"./utils":39,lodash:"M4+//f","tandem-core":10}],24:[function(a,b){var c,d,e,f;f=a("lodash"),d=a("../dom"),e=a("tandem-core"),c=function(){function a(a,b){this.quill=a,this.options=b,null!=this.options.button&&this.attachButton(this.options.button),this.options.enabled&&this.enable(),this.quill.addFormat("author",{"class":"author-"}),null!=this.options.authorId&&(this.quill.on(this.quill.constructor.events.PRE_EVENT,function(a){return function(b,c,d){var g,h;return b===a.quill.constructor.events.TEXT_CHANGE&&"user"===d?(f.each(c.ops,function(b){return e.InsertOp.isInsert(b)||f.keys(b.attributes).length>0?b.attributes.author=a.options.authorId:void 0}),h=new e.Delta(c.endLength,[new e.RetainOp(0,c.endLength)]),g={author:a.options.authorId},c.apply(function(a,b){return h=h.compose(e.Delta.makeRetainDelta(c.endLength,a,b.length,g))},function(){},function(a,b){return h=h.compose(e.Delta.makeRetainDelta(c.endLength,a,b,g))}),a.quill.updateContents(h,"silent")):void 0}}(this)),this.addAuthor(this.options.authorId,this.options.color))}return a.DEFAULTS={authorId:null,color:"white",enabled:!1},a.prototype.addAuthor=function(a,b){var c;return c={},c[".authorship .author-"+a]={"background-color":""+b},this.quill.addStyles(c)},a.prototype.attachButton=function(a){return d.addEventListener(a,"click",function(b){return function(){return d.toggleClass(a,"ql-on"),b.enable(d.hasClass(a,"ql-on"))}}(this))},a.prototype.enable=function(a){return null==a&&(a=!0),d.toggleClass(this.quill.root,"authorship",a)},a.prototype.disable=function(){return this.enable(!1)},a}(),b.exports=c},{"../dom":15,lodash:"M4+//f","tandem-core":10}],25:[function(a,b){var c,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=a("lodash"),c=a("../dom"),e=a("./tooltip"),d=function(a){function b(a,d){this.quill=a,this.options=d,this.options.styles=f.defaults(this.options.styles,e.DEFAULTS.styles),this.options=f.defaults(this.options,e.DEFAULTS),b.__super__.constructor.call(this,this.quill,this.options),this.preview=this.container.querySelector(".preview"),this.textbox=this.container.querySelector(".input"),c.addClass(this.container,"image-tooltip-container"),this.initListeners()}return h(b,a),b.DEFAULTS={styles:{".image-tooltip-container":{margin:"25px",padding:"10px",width:"300px"},".image-tooltip-container:after":{clear:"both",content:'""',display:"table"},".image-tooltip-container .preview":{margin:"10px 0px",position:"relative",border:"1px dashed #000",height:"200px"},".image-tooltip-container .preview span":{display:"inline-block",position:"absolute","text-align":"center",top:"40%",width:"100%"},".image-tooltip-container img":{bottom:"0",left:"0",margin:"auto","max-height":"100%","max-width":"100%",position:"absolute",right:"0",top:"0"},".image-tooltip-container .input":{"box-sizing":"border-box",width:"100%"},".image-tooltip-container a":{border:"1px solid black","box-sizing":"border-box",display:"inline-block","float":"left",padding:"5px","text-align":"center",width:"50%"}},template:'<input class="input" type="textbox"> <div class="preview"> <span>Preview</span> </div> <a href="javascript:;" class="cancel">Cancel</a> <a href="javascript:;" class="insert">Insert</a>'},b.prototype.initListeners=function(){return c.addEventListener(this.container.querySelector(".insert"),"click",f.bind(this.insertImage,this)),c.addEventListener(this.container.querySelector(".cancel"),"click",f.bind(this.hide,this)),c.addEventListener(this.textbox,"input",f.bind(this._preview,this)),this.initTextbox(this.textbox,this.insertImage,this.hide),this.quill.onModuleLoad("toolbar",function(a){return function(b){return b.initFormat("image",f.bind(a._onToolbar,a))}}(this))},b.prototype.insertImage=function(){var a,b;return b=this._normalizeURL(this.textbox.value),null==this.range&&(this.range=new Range(0,0)),this.range&&(this.preview.innerHTML="<span>Preview</span>",this.textbox.value="",a=this.range.end,this.quill.insertEmbed(a,"image",b,"user"),this.quill.setSelection(a+1,a+1)),this.hide()},b.prototype._onToolbar=function(a,b){return b?(this.textbox.value||(this.textbox.value="http://"),this.show(),this.textbox.focus(),f.defer(function(a){return function(){return a.textbox.setSelectionRange(a.textbox.value.length,a.textbox.value.length)}}(this))):this.quill.deleteText(a,"user")},b.prototype._preview=function(){var a;if(this._matchImageURL(this.textbox.value))return"IMG"===this.preview.firstChild.tagName?this.preview.firstChild.setAttribute("src",this.textbox.value):(a=this.preview.ownerDocument.createElement("img"),a.setAttribute("src",this.textbox.value),this.preview.replaceChild(a,this.preview.firstChild))},b.prototype._matchImageURL=function(a){return/^https?:\/\/.+\.(jp?g|gif|png)$/.test(a)},b.prototype._normalizeURL=function(a){return/^https?:\/\//.test(a)||(a="http://"+a),a},b}(e),b.exports=d},{"../dom":15,"./tooltip":31,lodash:"M4+//f"}],26:[function(a,b){var c,d,e,f;f=a("lodash"),c=a("../dom"),e=a("tandem-core"),d=function(){function a(a){this.quill=a,this.hotkeys={},this._initListeners(),this._initHotkeys(),this._initDeletes()}return a.hotkeys={BOLD:{key:"B",metaKey:!0},INDENT:{key:c.KEYS.TAB,shiftKey:!1},ITALIC:{key:"I",metaKey:!0},OUTDENT:{key:c.KEYS.TAB,shiftKey:!0},UNDERLINE:{key:"U",metaKey:!0}},a.prototype.addHotkey=function(a,b){var c,d;return a=f.isObject(a)?f.clone(a):{key:a},a.callback=b,c=f.isNumber(a.key)?a.key:a.key.toUpperCase().charCodeAt(0),null==(d=this.hotkeys)[c]&&(d[c]=[]),this.hotkeys[c].push(a)},a.prototype.toggleFormat=function(a,b){var c,d,e;return c=a.isCollapsed()?this.quill.getContents(Math.max(0,a.start-1),a.end):this.quill.getContents(a),e=0===c.ops.length||!f.all(c.ops,function(a){return a.attributes[b]}),a.isCollapsed()?this.quill.prepareFormat(b,e):this.quill.formatText(a,b,e,"user"),d=this.quill.getModule("toolbar"),null!=d?d.setActive(b,e):void 0},a.prototype._initDeletes=function(){return f.each([c.KEYS.DELETE,c.KEYS.BACKSPACE],function(a){return function(b){return a.addHotkey(b,function(){return a.quill.getLength()>1})}}(this))},a.prototype._initHotkeys=function(){return this.addHotkey(a.hotkeys.INDENT,function(a){return function(b){return a._onTab(b,!1),!1}}(this)),this.addHotkey(a.hotkeys.OUTDENT,function(){return function(){return!1}}(this)),f.each(["bold","italic","underline"],function(b){return function(c){return b.addHotkey(a.hotkeys[c.toUpperCase()],function(a){return b.toggleFormat(a,c),!1})}}(this))},a.prototype._initListeners=function(){return c.addEventListener(this.quill.root,"keydown",function(a){return function(b){var c,d;return c=!1,d=a.quill.getSelection(),f.each(a.hotkeys[b.which],function(a){return null!=a.metaKey&&b.metaKey!==a.metaKey&&b.ctrlKey!==a.metaKey||null!=a.shiftKey&&b.shiftKey!==a.shiftKey?void 0:c=a.callback(d)===!1||c}),!c}}(this))},a.prototype._onTab=function(a,b){var c;return null==b&&(b=!1),c=e.Delta.makeDelta({startLength:this.quill.getLength(),ops:[{start:0,end:a.start},{value:"	"},{start:a.end,end:this.quill.getLength()}]}),this.quill.updateContents(c),this.quill.setSelection(a.start+1,a.start+1)},a}(),b.exports=d},{"../dom":15,lodash:"M4+//f","tandem-core":10}],27:[function(a,b){var c,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=a("lodash"),c=a("../dom"),e=a("./tooltip"),d=function(a){function b(a,d){this.quill=a,this.options=d,this.options.styles=f.defaults(this.options.styles,e.DEFAULTS.styles),this.options=f.defaults(this.options,e.DEFAULTS),b.__super__.constructor.call(this,this.quill,this.options),c.addClass(this.container,"link-tooltip-container"),this.textbox=this.container.querySelector(".input"),this.link=this.container.querySelector(".url"),this.initListeners()}return h(b,a),b.DEFAULTS={maxLength:50,styles:{".link-tooltip-container":{padding:"5px 10px"},".link-tooltip-container input.input":{width:"170px"},".link-tooltip-container input.input, .link-tooltip-container a.done, .link-tooltip-container.editing a.url, .link-tooltip-container.editing a.change":{display:"none"},".link-tooltip-container.editing input.input, .link-tooltip-container.editing a.done":{display:"inline-block"}},template:'<span class="title">Visit URL:&nbsp;</span> <a href="#" class="url" target="_blank" href="about:blank"></a> <input class="input" type="text"> <span>&nbsp;&#45;&nbsp;</span> <a href="javascript:;" class="change">Change</a> <a href="javascript:;" class="done">Done</a>'},b.prototype.initListeners=function(){return this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(a){return function(b){var c;if(null!=b&&b.isCollapsed())return c=a._findAnchor(b),c?(a.setMode(c.href,!1),a.show(c)):(a.range=null,a.hide())}}(this)),c.addEventListener(this.container.querySelector(".done"),"click",f.bind(this.saveLink,this)),c.addEventListener(this.container.querySelector(".change"),"click",function(a){return function(){return a.setMode(a.link.href,!0)}}(this)),this.initTextbox(this.textbox,this.saveLink,this.hide),this.quill.onModuleLoad("toolbar",function(a){return function(b){return b.initFormat("link",f.bind(a._onToolbar,a))}}(this))},b.prototype.saveLink=function(){var a,b;return b=this._normalizeURL(this.textbox.value),null!=this.range&&(this.range.isCollapsed()?(a=this._findAnchor(this.range),null!=a&&(a.href=b)):this.quill.formatText(this.range,"link",b,"user")),this.setMode(b,!1)},b.prototype.setMode=function(a,b){var d;return null==b&&(b=!1),b?(this.textbox.value=a,this.textbox.focus(),f.defer(function(b){return function(){return b.textbox.setSelectionRange(a.length,a.length)}}(this))):(this.link.href=a,d=a.length>this.options.maxLength?a.slice(0,this.options.maxLength)+"...":a,c.setText(this.link,d)),c.toggleClass(this.container,"editing",b)},b.prototype._findAnchor=function(a){var b,c,d,e;for(e=this.quill.editor.doc.findLeafAt(a.start,!0),b=e[0],d=e[1],null!=b&&(c=b.node);null!=c;){if("A"===c.tagName)return c;c=c.parentNode}return null},b.prototype._onToolbar=function(a,b){var c;if(a&&!a.isCollapsed())return b?(this.setMode(this._suggestURL(a),!0),c=this.quill.editor.selection._getNativeRange(),this.show(c)):this.quill.formatText(a,"link",!1,"user")},b.prototype._normalizeURL=function(a){return/^https?:\/\//.test(a)||(a="http://"+a),a},b.prototype._suggestURL=function(a){var b;return b=this.quill.getText(a),this._normalizeURL(b)},b}(e),b.exports=d},{"../dom":15,"./tooltip":31,lodash:"M4+//f"}],28:[function(a,b){var c,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=a("lodash"),d=a("eventemitter2").EventEmitter2,c=a("../dom"),f=a("../utils"),e=function(a){function b(a,b){this.quill=a,this.options=b,this.cursors={},this.container=this.quill.addContainer("cursor-container",!0),this.quill.addStyles({".cursor-container":{position:"absolute",left:"0",top:"0","z-index":"1000"},".cursor":{"margin-left":"-1px",position:"absolute"},".cursor-flag":{bottom:"100%",position:"absolute","white-space":"nowrap"},".cursor-name":{display:"inline-block",color:"white",padding:"2px 8px"},".cursor-caret":{height:"100%",position:"absolute",width:"2px"},".cursor.hidden .cursor-flag":{display:"none"},".cursor.top > .cursor-flag":{bottom:"auto",top:"100%"},".cursor.right > .cursor-flag":{right:"-2px"}}),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,g.bind(this._applyDelta,this))}return i(b,a),b.DEFAULTS={template:'<span class="cursor-flag"> <span class="cursor-name"></span> </span> <span class="cursor-caret"></span>',timeout:2500},b.events={CURSOR_ADDED:"cursor-addded",CURSOR_MOVED:"cursor-moved",CURSOR_REMOVED:"cursor-removed"},b.prototype.clearCursors=function(){return g.each(g.keys(this.cursors),g.bind(this.removeCursor,this)),this.cursors={}},b.prototype.moveCursor=function(a,b){var d;return d=this.cursors[a],d.index=b,c.removeClass(d.elem,"hidden"),clearTimeout(d.timer),d.timer=setTimeout(function(){return function(){return c.addClass(d.elem,"hidden"),d.timer=null}}(this),this.options.timeout),this._updateCursor(d),d},b.prototype.removeCursor=function(a){var c;return c=this.cursors[a],this.emit(b.events.CURSOR_REMOVED,c),null!=c&&c.elem.parentNode.removeChild(c.elem),delete this.cursors[a]},b.prototype.setCursor=function(a,c,d,e){var f;return null==this.cursors[a]&&(this.cursors[a]=f={userId:a,index:c,color:e,elem:this._buildCursor(d,e)},this.emit(b.events.CURSOR_ADDED,f)),g.defer(function(b){return function(){return b.moveCursor(a,c)}}(this)),this.cursors[a]},b.prototype.shiftCursors=function(a,b,c){return null==c&&(c=null),g.each(this.cursors,function(){return function(d){return d&&(d.index>a||d.userId===c)?d.index+=Math.max(b,a-d.index):void 0}}(this))},b.prototype.update=function(){return g.each(this.cursors,function(a){return function(b){return null!=b?(a._updateCursor(b),!0):void 0
  }}(this))},b.prototype._applyDelta=function(a){return a.apply(function(a){return function(b,c,d){return a.shiftCursors(b,c.length,d.author)}}(this),function(a){return function(b,c){return a.shiftCursors(b,-1*c,null)}}(this),function(a){return function(b){return a.shiftCursors(b,0,null)}}(this)),this.update()},b.prototype._buildCursor=function(a,b){var d,e,f,g;return d=this.container.ownerDocument.createElement("span"),c.addClass(d,"cursor"),d.innerHTML=this.options.template,f=d.querySelector(".cursor-flag"),g=d.querySelector(".cursor-name"),c.setText(g,a),e=d.querySelector(".cursor-caret"),e.style.backgroundColor=g.style.backgroundColor=b,this.container.appendChild(d),d},b.prototype._moveCursor=function(a,d,e){var f,g;return null==e&&(e="left"),f=d.getBoundingClientRect(),a.elem.style.top=f.top+"px",a.elem.style.left=f[e]+"px",a.elem.style.height=f.height+"px",g=a.elem.querySelector(".cursor-flag"),c.toggleClass(a.elem,"top",parseInt(a.elem.style.top)<=g.offsetHeight),c.toggleClass(a.elem,"left",parseInt(a.elem.style.left)<=g.offsetWidth),c.toggleClass(a.elem,"right",this.quill.root.offsetWidth-parseInt(a.elem.style.left)<=g.offsetWidth),this.emit(b.events.CURSOR_MOVED,a)},b.prototype._updateCursor=function(a){var b,d,e,g,h,i,j,k;return this.quill.editor.checkUpdate(),j=this.quill.editor.doc.findLeafAt(a.index,!0),e=j[0],h=j[1],d=this.container.ownerDocument.createElement("span"),null!=e?(k=f.splitNode(e.node,h),g=k[0],i=k[1],b=k[2],c.setText(d,c.ZERO_WIDTH_NOBREAK_SPACE),e.node.parentNode.insertBefore(d,i)):(c.setText(d,c.NOBREAK_SPACE),this.quill.root.appendChild(d)),this._moveCursor(a,d),c.removeNode(d),b&&c.normalize(e.node.parentNode),this.quill.editor.selection.update("silent")},b}(d),b.exports=e},{"../dom":15,"../utils":39,eventemitter2:3,lodash:"M4+//f"}],29:[function(a,b){var c,d,e,f,g;g=a("lodash"),c=a("../dom"),d=a("../document"),f=a("tandem-core"),e=function(){function a(a,b){this.quill=a,this.options=b,this.container=this.quill.addContainer("paste-container"),this.container.setAttribute("contenteditable",!0),this.quill.addStyles({".paste-container":{left:"-10000px",position:"absolute",top:"50%"}}),c.addEventListener(this.quill.root,"paste",g.bind(this._paste,this))}return a.prototype._paste=function(){var a,b,c,e;return b=this.quill.getLength(),c=this.quill.getSelection(),null!=c?(this.container.innerHTML="",a=this.quill.root.ownerDocument.defaultView,e=a.scrollY,this.container.focus(),g.defer(function(g){return function(){var h,i,j;return i=new d(g.container,g.quill.options),h=i.toDelta(),h=h.compose(f.Delta.makeDeleteDelta(h.endLength,h.endLength-1,1)),j=h.endLength,c.start>0&&h.ops.unshift(new f.RetainOp(0,c.start)),c.end<b&&h.ops.push(new f.RetainOp(c.end,b)),h.endLength+=g.quill.getLength()-(c.end-c.start),h.startLength=b,g.quill.updateContents(h,"user"),g.quill.focus(),g.quill.setSelection(c.start+j,c.start+j),a.scrollTo(0,e)}}(this))):void 0},a}(),b.exports=e},{"../document":14,"../dom":15,lodash:"M4+//f","tandem-core":10}],30:[function(a,b){var c,d,e;e=a("lodash"),c=a("../dom"),d=function(){function a(b,d){if(this.quill=b,this.options=d,null==this.options.container)throw new Error("container required for toolbar",this.options);this.container=e.isString(this.options.container)?document.querySelector(this.options.container):this.options.container,this.inputs={},this.preventUpdate=!1,this.triggering=!1,e.each(this.quill.options.formats,function(b){return function(c){return null==a.formats.TOOLTIP[c]?b.initFormat(c,function(d,f){return b.triggering?void 0:(d.isCollapsed()?b.quill.prepareFormat(c,f):null!=a.formats.LINE[c]?b.quill.formatLine(d,c,f,"user"):b.quill.formatText(d,c,f,"user"),e.defer(function(){return b.updateActive(d),b.setActive(c,f)}))}):void 0}}(this)),this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,e.bind(this.updateActive,this)),c.addClass(this.container,"ql-toolbar-container"),c.isIOS()&&c.addClass(this.container,"ios"),(c.isIE(11)||c.isIOS())&&c.addEventListener(this.container,"mousedown",function(){return function(){return!1}}(this))}return a.DEFAULTS={container:null},a.formats={LINE:{align:"align",bullet:"bullet",list:"list"},SELECT:{align:"align",background:"background",color:"color",font:"font",size:"size"},TOGGLE:{bold:"bold",bullet:"bullet",image:"image",italic:"italic",link:"link",list:"list",strike:"strike",underline:"underline"},TOOLTIP:{image:"image",link:"link"}},a.prototype.initFormat=function(b,d){var e,f,g;return g=".ql-"+b,null!=a.formats.SELECT[b]?(g="select"+g,e="change"):e="click",f=this.container.querySelector(g),null!=f?(this.inputs[b]=f,c.addEventListener(f,e,function(a){return function(){var b,g;return g="change"===e?c.getSelectValue(f):!c.hasClass(f,"ql-active"),a.preventUpdate=!0,a.quill.focus(),b=a.quill.getSelection(),null!=b&&d(b,g),a.preventUpdate=!1,!0}}(this))):void 0},a.prototype.setActive=function(a,b){var d,f;return d=this.inputs[a],null!=d?"SELECT"===d.tagName?(this.triggering=!0,f=c.getSelectValue(d),e.isArray(b)&&(b=""),b!==f&&(null!=b?c.selectOption(d,b):c.resetSelect(d)),this.triggering=!1):c.toggleClass(d,"ql-active",b||!1):void 0},a.prototype.updateActive=function(a){var b;if(null!=a&&!this.preventUpdate)return b=this._getActive(a),e.each(this.inputs,function(a){return function(c,d){return a.setActive(d,b[d]),!0}}(this))},a.prototype._getActive=function(a){var b,c;return b=this._getLeafActive(a),c=this._getLineActive(a),e.defaults({},b,c)},a.prototype._getLeafActive=function(a){var b,c,d,f,g;return a.isCollapsed()?(g=this.quill.editor.doc.findLineAt(a.start),d=g[0],f=g[1],b=0===f?this.quill.getContents(a.start,a.end+1):this.quill.getContents(a.start-1,a.end)):b=this.quill.getContents(a),c=e.map(b.ops,"attributes"),this._intersectFormats(c)},a.prototype._getLineActive=function(a){var b,c,d,f,g,h;for(c=[],g=this.quill.editor.doc.findLineAt(a.start),b=g[0],f=g[1],h=this.quill.editor.doc.findLineAt(a.end),d=h[0],f=h[1],null!=d&&d===b&&(d=d.next);null!=b&&b!==d;)c.push(e.clone(b.formats)),b=b.next;return this._intersectFormats(c)},a.prototype._intersectFormats=function(b){return e.reduce(b.slice(1),function(b,c){var d,f,g,h,i;return d=e.keys(b),g=e.keys(c),h=e.intersection(d,g),i=e.difference(d,g),f=e.difference(g,d),e.each(h,function(d){if(null!=a.formats.SELECT[d])if(e.isArray(b[d])){if(e.indexOf(b[d],c[d])<0)return b[d].push(c[d])}else if(b[d]!==c[d])return b[d]=[b[d],c[d]]}),e.each(i,function(c){return null!=a.formats.TOGGLE[c]?delete b[c]:null==a.formats.SELECT[c]||e.isArray(b[c])?void 0:b[c]=[b[c]]}),e.each(f,function(d){return null!=a.formats.SELECT[d]?b[d]=[c[d]]:void 0}),b},b[0]||{})},a}(),b.exports=d},{"../dom":15,lodash:"M4+//f"}],31:[function(a,b){var c,d,e,f;f=a("lodash"),c=a("../dom"),d=a("../normalizer"),e=function(){function a(b,e){this.quill=b,this.options=e,this.quill.addStyles(this.options.styles),this.container=this.quill.addContainer("tooltip"),this.container.innerHTML=d.stripWhitespace(this.options.template),this.container.style.position="absolute",c.addEventListener(this.quill.root,"focus",f.bind(this.hide,this)),this.hide(),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(b){return function(c,d){return"user"===d&&b.container.style.left!==a.HIDE_MARGIN?(b.range=null,b.hide()):void 0}}(this))}return a.DEFAULTS={offset:10,styles:{".tooltip":{"background-color":"#fff",border:"1px solid #000",top:"0px","white-space":"nowrap","z-index":"2000"},".tooltip a":{cursor:"pointer","text-decoration":"none"}},template:""},a.HIDE_MARGIN="-10000px",a.prototype.initTextbox=function(a,b,d){return c.addEventListener(a,"keyup",function(a){return function(e){switch(e.which){case c.KEYS.ENTER:return b.call(a);case c.KEYS.ESCAPE:return d.call(a);default:return!0}}}(this))},a.prototype.hide=function(){return this.container.style.left=a.HIDE_MARGIN,this.range&&this.quill.setSelection(this.range),this.range=null},a.prototype.show=function(a){var b,c,d,e;return this.range=this.quill.getSelection(),d=this._position(a),b=d[0],c=d[1],e=this._limit(b,c),b=e[0],c=e[1],b+=this.quill.root.ownerDocument.defaultView.window.pageXOffset,c+=this.quill.root.ownerDocument.defaultView.window.pageYOffset,this.container.style.left=""+b+"px",this.container.style.top=""+c+"px",this.container.focus()},a.prototype._getBounds=function(){var a,b,c;return a=this.quill.root.getBoundingClientRect(),b=this.quill.root.ownerDocument.defaultView.window.pageXOffset,c=this.quill.root.ownerDocument.defaultView.window.pageYOffset,{left:a.left+b,right:a.right+b,top:a.top+c,bottom:a.bottom+c,width:a.width,height:a.height}},a.prototype._limit=function(a,b){var c,d;return c=this._getBounds(),d=this.container.getBoundingClientRect(),a=Math.min(c.right-d.width,a),a=Math.max(c.left,a),b=Math.min(c.bottom-d.height,b),b=Math.max(c.top,b),[a,b]},a.prototype._position=function(a){var b,c,d,e,f;return e=this.container.getBoundingClientRect(),b=this._getBounds(),null!=a?(d=a.getBoundingClientRect(),c=d.left+d.width/2-e.width/2,f=d.top+d.height+this.options.offset,f+e.height>b.bottom&&(f=d.top-e.height-this.options.offset)):(c=b.left+b.width/2-e.width/2,f=b.top+b.height/2-e.height/2),[c,f]},a}(),b.exports=e},{"../dom":15,"../normalizer":33,lodash:"M4+//f"}],32:[function(a,b){var c,d,e;e=a("lodash"),c=a("tandem-core"),d=function(){function a(a,b){this.quill=a,this.options=null!=b?b:{},this.lastRecorded=0,this.emittedDelta=null,this.clear(),this.initListeners()}return a.DEFAULTS={delay:1e3,maxStack:100},a.hotkeys={UNDO:{key:"Z",metaKey:!0,shiftKey:!1},REDO:{key:"Z",metaKey:!0,shiftKey:!0}},a.prototype.initListeners=function(){return this.quill.onModuleLoad("keyboard",function(b){return function(c){return c.addHotkey(a.hotkeys.UNDO,function(){return b.undo(),!1}),c.addHotkey(a.hotkeys.REDO,function(){return b.redo(),!1})}}(this)),this.quill.on(this.quill.constructor.events.TEXT_CHANGE,function(a){return function(b){return b.isEqual(a.emittedDelta)?void(a.emittedDelta=null):(a.record(b,a.oldDelta),a.oldDelta=a.quill.getContents())}}(this))},a.prototype.clear=function(){return this.stack={undo:[],redo:[]},this.oldDelta=this.quill.getContents()},a.prototype.record=function(a,b){var c,d,e,f;if(!a.isIdentity()){this.stack.redo=[];try{if(f=b.invert(a),e=(new Date).getTime(),this.lastRecorded+this.options.delay>e&&this.stack.undo.length>0?(c=this.stack.undo.pop(),f.canCompose(c.undo)&&c.redo.canCompose(a)?(f=f.compose(c.undo),a=c.redo.compose(a)):(this.clear(),this.lastRecorded=e)):this.lastRecorded=e,this.stack.undo.push({redo:a,undo:f}),this.stack.undo.length>this.options.maxStack)return this.stack.undo.unshift()}catch(g){return d=g,this.clear()}}},a.prototype.redo=function(){return this._change("redo","undo")},a.prototype.undo=function(){return this._change("undo","redo")},a.prototype._getLastChangeIndex=function(a){var b;return b=0,a.apply(function(a,c){return b=Math.max(a+c.length,b)},function(a){return b=Math.max(a,b)},function(a,c){return b=Math.max(a+c,b)}),b},a.prototype._change=function(a,b){var c,d;return this.stack[a].length>0?(c=this.stack[a].pop(),this.lastRecorded=0,this.emittedDelta=c[a],this.quill.updateContents(c[a],"user"),this.emittedDelta=null,d=this._getLastChangeIndex(c[a]),this.quill.setSelection(d,d),this.stack[b].push(c)):void 0},a}(),b.exports=d},{lodash:"M4+//f","tandem-core":10}],33:[function(a,b){var c,d,e,f;f=a("lodash"),c=a("./dom"),e=a("./utils"),d={ALIASES:{STRONG:"B",EM:"I",DEL:"S",STRIKE:"S"},ATTRIBUTES:{color:"color",face:"fontFamily",size:"fontSize"},STYLES:{"background-color":"background-color",color:"color","font-family":"font-family","font-size":"font-size","text-align":"text-align"},TAGS:{DIV:"DIV",BR:"BR",SPAN:"SPAN",B:"B",I:"I",S:"S",U:"U",A:"A",IMG:"IMG",UL:"UL",LI:"LI"},handleBreaks:function(a){var b;return b=f.map(a.querySelectorAll(c.DEFAULT_BREAK_TAG)),f.each(b,function(){return function(b){return null==b.nextSibling||c.isIE(10)&&null==b.previousSibling?void 0:e.splitAncestors(b.nextSibling,a.parentNode)}}(this)),a},normalizeLine:function(a){return a=d.wrapInline(a),a=d.handleBreaks(a),a=d.pullBlocks(a),a=d.normalizeNode(a),d.unwrapText(a),a},normalizeNode:function(a){return c.isTextNode(a)?a:(f.each(d.ATTRIBUTES,function(b,c){var d;return a.hasAttribute(c)?(d=a.getAttribute(c),"size"===c&&(d=e.convertFontSize(d)),a.style[b]=d,a.removeAttribute(c)):void 0}),d.whitelistStyles(a),d.whitelistTags(a))},optimizeLine:function(a){var b,d,g,h;for(b=e.getNodeLength(a),g=c.getDescendants(a),h=[];g.length>0;)d=g.pop(),null!=(null!=d?d.parentNode:void 0)&&null==c.EMBED_TAGS[d.tagName]&&(d.tagName===c.DEFAULT_BREAK_TAG?h.push(0!==b?c.removeNode(d):void 0):0===e.getNodeLength(d)?(g.push(d.nextSibling),h.push(c.unwrap(d))):null!=d.previousSibling&&d.tagName===d.previousSibling.tagName&&f.isEqual(c.getAttributes(d),c.getAttributes(d.previousSibling))?(g.push(d.firstChild),h.push(e.mergeNodes(d.previousSibling,d))):h.push(void 0));return h},pullBlocks:function(a){var b;for(b=a.firstChild;null!=b;){if(null!=c.BLOCK_TAGS[b.tagName]&&"LI"!==b.tagName){null!=b.previousSibling&&e.splitAncestors(b,a.parentNode),null!=b.nextSibling&&e.splitAncestors(b.nextSibling,a.parentNode),null==c.LIST_TAGS[b.tagName]?(c.unwrap(b),d.pullBlocks(a)):(c.unwrap(b.parentNode),null==a.parentNode&&(a=b));break}b=b.nextSibling}return a},stripComments:function(a){return a.replace(/<!--[\s\S]*?-->/g,"")},stripWhitespace:function(a){return a=a.replace(/^\s+/,"").replace(/\s+$/,""),a=a.replace(/\>\s+\</g,"><")},whitelistStyles:function(a){var b,e;return b=c.getStyles(a),e=f.omit(b,function(a,b){return null==d.STYLES[b]}),f.keys(e).length<f.keys(b).length?f.keys(e).length>0?c.setStyles(a,e):a.removeAttribute("style"):void 0},whitelistTags:function(a){return c.isElement(a)?(null!=d.ALIASES[a.tagName]&&(a=c.switchTag(a,d.ALIASES[a.tagName])),null==d.TAGS[a.tagName]&&(a=null!=c.BLOCK_TAGS[a.tagName]?c.switchTag(a,c.DEFAULT_BLOCK_TAG):a.hasAttributes()||null==a.firstChild?c.switchTag(a,c.DEFAULT_INLINE_TAG):c.unwrap(a)),a):a},wrapInline:function(a){var b,d;if(null!=c.BLOCK_TAGS[a.tagName])return a;for(b=a.ownerDocument.createElement(c.DEFAULT_BLOCK_TAG),a.parentNode.insertBefore(b,a);null!=a&&null==c.BLOCK_TAGS[a.tagName];)d=a.nextSibling,b.appendChild(a),a=d;return b},unwrapText:function(a){var b;return b=f.map(a.querySelectorAll(c.DEFAULT_INLINE_TAG)),f.each(b,function(a){var b;return b=c.getAttributes(a),0===f.keys(b).length?c.unwrap(a):void 0})}},b.exports=d},{"./dom":15,"./utils":39,lodash:"M4+//f"}],34:[function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n={}.hasOwnProperty,o=function(a,b){function c(){this.constructor=a}for(var d in b)n.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},p=[].slice;m=a("lodash"),m.str=a("underscore.string"),l=a("../package.json"),e=a("eventemitter2").EventEmitter2,c=a("./dom"),d=a("./editor"),f=a("./format"),i=a("./lib/range"),j=a("tandem-core"),g={Authorship:a("./modules/authorship"),ImageTooltip:a("./modules/image-tooltip"),Keyboard:a("./modules/keyboard"),LinkTooltip:a("./modules/link-tooltip"),MultiCursor:a("./modules/multi-cursor"),PasteManager:a("./modules/paste-manager"),Toolbar:a("./modules/toolbar"),UndoManager:a("./modules/undo-manager")},k={Default:a("./themes/default"),Snow:a("./themes/snow")},h=function(a){function b(a,c){var e,f,g;if(null==c&&(c={}),m.isString(a)&&(a=document.querySelector(a)),null==a)throw new Error("Invalid Quill container");f=m.defaults(c.modules||{},b.DEFAULTS.modules),e=a.innerHTML,this.options=m.defaults(c,b.DEFAULTS),this.options.modules=f,this.options.id=this.id="quill-"+(b.editors.length+1),this.options.emitter=this,this.modules={},this.editor=new d(a,this,this.options),this.root=this.editor.doc.root,b.editors.push(this),this.setHTML(e,b.sources.SILENT),g=m.str.capitalize(m.str.camelize(this.options.theme)),this.theme=new b.Theme[g](this,this.options),m.each(this.options.modules,function(a){return function(b,c){return a.addModule(c,b)}}(this))}return o(b,a),b.version=l.version,b.editors=[],b.Module=g,b.Theme=k,b.DEFAULTS={formats:["align","bold","italic","strike","underline","color","background","font","size","link","image","bullet","list"],modules:{keyboard:!0,"paste-manager":!0,"undo-manager":!0},pollInterval:100,readOnly:!1,theme:"default"},b.events={MODULE_INIT:"module-init",POST_EVENT:"post-event",PRE_EVENT:"pre-event",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},b.prototype.addContainer=function(a,b){return null==b&&(b=!1),this.editor.renderer.addContainer(a,b)},b.prototype.addFormat=function(a,b){return this.editor.doc.addFormat(a,b)},b.prototype.addModule=function(a,c){var d,e;if(d=m.str.capitalize(m.str.camelize(a)),e=b.Module[d],null==e)throw new Error("Cannot load "+a+" module. Are you sure you included it?");return m.isObject(c)||(c={}),c=m.defaults(c,this.theme.constructor.OPTIONS[a]||{},e.DEFAULTS||{}),this.modules[a]=new e(this,c),this.emit(b.events.MODULE_INIT,a,this.modules[a]),this.modules[a]},b.prototype.addStyles=function(a){return this.editor.renderer.addStyles(a)},b.prototype.deleteText=function(a,c,d){var e,f,g;return null==d&&(d=b.sources.API),g=this._buildParams(a,c,{},d),a=g[0],c=g[1],f=g[2],d=g[3],c>a?(e=j.Delta.makeDeleteDelta(this.getLength(),a,c-a),this.editor.applyDelta(e,d)):void 0},b.prototype.emit=function(){var a,c;return c=arguments[0],a=2<=arguments.length?p.call(arguments,1):[],b.__super__.emit.apply(this,[b.events.PRE_EVENT,c].concat(p.call(a))),b.__super__.emit.apply(this,[c].concat(p.call(a))),b.__super__.emit.apply(this,[b.events.POST_EVENT,c].concat(p.call(a)))},b.prototype.focus=function(){return this.root.focus()},b.prototype.formatLine=function(a,b,c,d,e){var f,g,h,i,j;return i=this._buildParams(a,b,c,d,e),a=i[0],b=i[1],f=i[2],e=i[3],j=this.editor.doc.findLineAt(b),g=j[0],h=j[1],null!=g&&(b+=g.length-h),this.formatText(a,b,f,e)},b.prototype.formatText=function(a,b,c,d,e){var f,g,h;return h=this._buildParams(a,b,c,d,e),a=h[0],b=h[1],g=h[2],e=h[3],g=m.reduce(g,function(a){return function(b,c,d){var e;return e=a.editor.doc.formats[d],c&&c!==e.config["default"]||(b[d]=null),b}}(this),g),f=j.Delta.makeRetainDelta(this.getLength(),a,b-a,g),this.editor.applyDelta(f,e)},b.prototype.getContents=function(a,b){var c;return null==a&&(a=0),null==b&&(b=null),m.isObject(a)?(b=a.end,a=a.start):null==b&&(b=this.getLength()),c=this.editor.getDelta().getOpsAt(a,b-a),new j.Delta(0,c)},b.prototype.getHTML=function(){return this.root.innerHTML},b.prototype.getLength=function(){return this.editor.getDelta().endLength},b.prototype.getModule=function(a){return this.modules[a]},b.prototype.getSelection=function(){return this.editor.checkUpdate(),this.editor.selection.getRange()},b.prototype.getText=function(a,b){return null==a&&(a=0),null==b&&(b=null),m.pluck(this.getContents(a,b).ops,"value").join("")},b.prototype.insertEmbed=function(a,b,d,e){return this.insertText(a,c.EMBED_TEXT,b,d,e)},b.prototype.insertText=function(a,b,c,d,e){var f,g,h,i;return i=this._buildParams(a,0,c,d,e),a=i[0],g=i[1],h=i[2],e=i[3],b.length>0?(f=j.Delta.makeInsertDelta(this.getLength(),a,b,h),this.editor.applyDelta(f,e)):void 0},b.prototype.onModuleLoad=function(a,c){return this.modules[a]?c(this.modules[a]):this.on(b.events.MODULE_INIT,function(b,d){return b===a?c(d):void 0})},b.prototype.prepareFormat=function(a,c){var d,e;return d=this.editor.doc.formats[a],null!=d&&(e=this.getSelection(),null!=e?e.isCollapsed():void 0)?d.isType(f.types.LINE)?this.formatLine(e,a,c,b.sources.USER):d.prepare(c):void 0},b.prototype.setContents=function(a,c){return null==c&&(c=b.sources.API),m.isArray(a)?a={startLength:this.getLength(),ops:a}:a.startLength=this.getLength(),this.updateContents(a,c)},b.prototype.setHTML=function(a,d){return null==d&&(d=b.sources.API),a||(a="<"+c.DEFAULT_BLOCK_TAG+"><"+c.DEFAULT_BREAK_TAG+"></"+c.DEFAULT_BLOCK_TAG+">"),this.editor.doc.setHTML(a),this.editor.checkUpdate(d)},b.prototype.setSelection=function(a,c,d){var e;return null==d&&(d=b.sources.API),m.isNumber(a)&&m.isNumber(c)?e=new i(a,c):(e=a,d=c||d),this.editor.selection.setRange(e,d)},b.prototype.updateContents=function(a,c){return null==c&&(c=b.sources.API),a=j.Delta.makeDelta(a),this.editor.applyDelta(a,c)},b.prototype._buildParams=function(){var a,c;return c=1<=arguments.length?p.call(arguments,0):[],m.isObject(c[0])&&c.splice(0,1,c[0].start,c[0].end),m.isString(c[2])&&(a={},a[c[2]]=c[3],c.splice(2,2,a)),null==c[3]&&(c[3]=b.sources.API),c},b}(e),b.exports=h},{"../package.json":13,"./dom":15,"./editor":16,"./format":17,"./lib/range":22,"./modules/authorship":24,"./modules/image-tooltip":25,"./modules/keyboard":26,"./modules/link-tooltip":27,"./modules/multi-cursor":28,"./modules/paste-manager":29,"./modules/toolbar":30,"./modules/undo-manager":32,"./themes/default":37,"./themes/snow":38,eventemitter2:3,lodash:"M4+//f","tandem-core":10,"underscore.string":12}],35:[function(a,b){var c,d,e,f,g,h,i,j;j=a("lodash"),d=a("./dom"),h=a("./utils"),f=a("./normalizer"),c={html:{height:"100%",width:"100%"},body:{"box-sizing":"border-box",cursor:"text","font-family":"'Helvetica', 'Arial', sans-serif","font-size":"13px",height:"100%","line-height":"1.42",margin:"0px","overflow-x":"hidden","overflow-y":"auto",padding:"12px 15px"},".editor-container":{height:"100%",outline:"none",position:"relative","tab-size":"4","white-space":"pre-wrap"},".editor-container div":{margin:"0",padding:"0"},".editor-container a":{"text-decoration":"underline"},".editor-container b":{"font-weight":"bold"},".editor-container i":{"font-style":"italic"},".editor-container s":{"text-decoration":"line-through"},".editor-container u":{"text-decoration":"underline"},".editor-container img":{"max-width":"100%"},".editor-container blockquote":{margin:"0 0 0 2em",padding:"0"},".editor-container ol":{margin:"0 0 0 2em",padding:"0","list-style-type":"decimal"},".editor-container ul":{margin:"0 0 0 2em",padding:"0","list-style-type":"disc"}},e=["decimal","lower-alpha","lower-roman"],i=".editor-container ol > li",j.each([1,2,3,4,5,6,7,8,9],function(a){return i+=" > ol",c[i]={"list-style-type":e[a%3]},i+=" > li"}),h.isIE(10)&&(c[d.DEFAULT_BREAK_TAG]={display:"none"}),g=function(){function a(b,e){var f;this.container=b,this.options=null!=e?e:{},this.container.innerHTML="",f=a.buildFrame(this.container),this.root=f[0],this.iframe=f[1],this.root.id=this.options.id,d.addClass(this.root,"editor-container"),d.addClass(this.container,"ql-container"),d.addEventListener(this.container,"focus",function(a){return function(){return a.root.focus()}}(this)),d.isIOS()&&d.addStyles(this.container,{overflow:"auto","-webkit-overflow-scrolling":"touch"}),this.addStyles(c),null!=this.options.styles&&j.defer(j.bind(this.addStyles,this,this.options.styles))}return a.objToCss=function(a){return j.map(a,function(a,b){var c;return c=j.map(a,function(a,b){return""+b+": "+a+";"}).join(" "),""+b+" { "+c+" }"}).join("\n")},a.buildFrame=function(a){var b,c,e;return b=a.ownerDocument.createElement("iframe"),d.setAttributes(b,{frameBorder:"0",height:"100%",width:"100%",title:"Quill Rich Text Editor",role:"presentation"}),a.appendChild(b),c=b.contentWindow.document,c.open(),c.write("<!DOCTYPE html>"),c.close(),e=c.createElement("div"),c.body.appendChild(e),[e,b]},a.prototype.addContainer=function(a,b){var c,e;return null==b&&(b=!1),e=b?this.root:null,c=this.root.ownerDocument.createElement("div"),d.addClass(c,a),this.root.parentNode.insertBefore(c,e),c},a.prototype.addStyles=function(b){var c,e;return"object"==typeof b?(e=this.root.ownerDocument.createElement("style"),e.type="text/css",b=a.objToCss(b),e.appendChild(this.root.ownerDocument.createTextNode(b)),this.root.ownerDocument.head.appendChild(e)):"string"==typeof b?(c=this.root.ownerDocument.createElement("link"),d.setAttributes(c,{type:"text/css",rel:"stylesheet",href:b}),this.root.ownerDocument.head.appendChild(c)):void 0},a}(),b.exports=g},{"./dom":15,"./normalizer":33,"./utils":39,lodash:"M4+//f"}],36:[function(a,b){var c,d,e,f,g,h,i;i=a("lodash"),c=a("./dom"),d=a("./leaf"),e=a("./normalizer"),f=a("./lib/range"),h=a("./utils"),g=function(){function a(a,b,c){this.doc=a,this.iframe=b,this.emitter=c,this.document=this.doc.root.ownerDocument,this.range=this.getRange(),this.nullDelay=!1}return a.prototype.checkFocus=function(){return this.document.activeElement!==this.doc.root?!1:null!=document.activeElement&&"IFRAME"===document.activeElement.tagName?document.activeElement===this.iframe:!0},a.prototype.getRange=function(){var a,b,c;return this.checkFocus()?(b=this._getNativeRange(),null==b?null:(c=this._positionToIndex(b.startContainer,b.startOffset),a=b.startContainer===b.endContainer&&b.startOffset===b.endOffset?c:this._positionToIndex(b.endContainer,b.endOffset),new f(Math.min(c,a),Math.max(c,a)))):null},a.prototype.preserve=function(a){var b,c,d,e,f,g,h,i,j;return d=this._getNativeRange(),null!=d&&this.checkFocus()?(g=this._encodePosition(d.startContainer,d.startOffset),e=g[0],f=g[1],h=this._encodePosition(d.endContainer,d.endOffset),b=h[0],c=h[1],a(),i=this._decodePosition(e,f),e=i[0],f=i[1],j=this._decodePosition(b,c),b=j[0],c=j[1],this._setNativeRange(e,f,b,c)):a()},a.prototype.setRange=function(a,b){var c,d,e,f,g,h,i;return null!=a?(g=this._indexToPosition(a.start),e=g[0],f=g[1],a.isCollapsed()?(h=[e,f],c=h[0],d=h[1]):(i=this._indexToPosition(a.end),c=i[0],d=i[1]),this._setNativeRange(e,f,c,d)):this._setNativeRange(null),this.update(b)},a.prototype.shiftAfter=function(a,b,c){var d;return d=this.getRange(),c(),null!=d?(d.shift(a,b),this.setRange(d,"silent")):void 0},a.prototype.update=function(a){var b,c;return c=this.getRange(),b="silent"!==a&&!f.compare(c,this.range),null!==c||"user"!==a||this.nullDelay?(this.nullDelay=!1,this.range=c,b?this.emitter.emit(this.emitter.constructor.events.SELECTION_CHANGE,c,a):void 0):this.nullDelay=!0},a.prototype._decodePosition=function(a,b){var d;return c.isElement(a)&&(d=i.indexOf(c.getChildNodes(a.parentNode),a),b+=d,a=a.parentNode),[a,b]},a.prototype._encodePosition=function(a,b){for(var d;;){if(c.isTextNode(a)||a.tagName===c.DEFAULT_BREAK_TAG||null!=c.EMBED_TAGS[a.tagName])return[a,b];if(b<a.childNodes.length)a=a.childNodes[b],b=0;else{if(0===a.childNodes.length)return null==e.TAGS[a.tagName]&&(d=a.ownerDocument.createTextNode(""),a.appendChild(d),a=d),[a,0];if(a=a.lastChild,!c.isElement(a))return[a,h.getNodeLength(a)];if(a.tagName===c.DEFAULT_BREAK_TAG||null!=c.EMBED_TAGS[a.tagName])return[a,1];b=a.childNodes.length}}},a.prototype._getNativeSelection=function(){return null!=this.document.getSelection?this.document.getSelection():null},a.prototype._getNativeRange=function(){var a;return a=this._getNativeSelection(),(null!=a?a.rangeCount:void 0)>0?a.getRangeAt(0):null},a.prototype._indexToPosition=function(a){var b,c,d;return 0===this.doc.lines.length?[this.doc.root,0]:(d=this.doc.findLeafAt(a,!0),b=d[0],c=d[1],this._decodePosition(b.node,c))},a.prototype._positionToIndex=function(a,b){var c,d,e,f,g,h;if(h=this._encodePosition(a,b),d=h[0],b=h[1],f=this.doc.findLine(d),null==f)return 0;for(c=f.findLeaf(d),g=0;null!=f.prev;)f=f.prev,g+=f.length;if(null==c)return g;for(e=0;null!=c.prev;)c=c.prev,e+=c.length;return g+e+b},a.prototype._setNativeRange=function(a,b,c,d){var e,f;return(f=this._getNativeSelection())?null==a?(f.removeAllRanges(),this.doc.root.blur()):(this.doc.root.focus(),e=this._getNativeRange(),null==e||a!==e.startContainer||b!==e.startOffset||c!==e.endContainer||d!==e.endOffset?(null!=e&&f.removeAllRanges(),f.removeAllRanges(),e=this.document.createRange(),e.setStart(a,b),e.setEnd(c,d),f.addRange(e),this.doc.root.focus()):void 0):void 0},a}(),b.exports=g},{"./dom":15,"./leaf":18,"./lib/range":22,"./normalizer":33,"./utils":39,lodash:"M4+//f"}],37:[function(a,b){var c;c=function(){function a(a){this.quill=a,this.editor=this.quill.editor,this.editorContainer=this.editor.root}return a.OPTIONS={},a}(),b.exports=c},{}],38:[function(a,b){var c,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};h=a("lodash"),c=a("../../lib/color-picker"),e=a("../default"),d=a("../../dom"),f=a("../../lib/picker"),g=function(a){function b(a){this.quill=a,b.__super__.constructor.apply(this,arguments),this.quill.addStyles(b.STYLES),this.pickers=[],this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,function(a){return function(b){return null!=b?h.invoke(a.pickers,"close"):void 0}}(this)),d.addClass(this.quill.root.ownerDocument.body,"snow"),this.quill.onModuleLoad("multi-cursor",h.bind(this.extendMultiCursor,this)),this.quill.onModuleLoad("toolbar",h.bind(this.extendToolbar,this))}return j(b,a),b.COLORS=["#000000","#e60000","#ff9900","#ffff00","#008A00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],b.OPTIONS={"multi-cursor":{template:'<span class="cursor-flag"> <span class="cursor-triangle top"></span> <span class="cursor-name"></span> <span class="cursor-triangle bottom"></span> </span> <span class="cursor-caret"></span>'}},b.STYLES={".snow .image-tooltip-container a":{border:"1px solid #06c"},".snow .image-tooltip-container a.insert":{"background-color":"#06c",color:"#fff"},".snow .cursor-name":{"border-radius":"4px","font-size":"11px","font-family":"Arial","margin-left":"-50%",padding:"4px 10px"},".snow .cursor-triangle":{"border-left":"4px solid transparent","border-right":"4px solid transparent",height:"0px","margin-left":"-3px",width:"0px"},".snow .cursor.left .cursor-name":{"margin-left":"-8px"},".snow .cursor.right .cursor-flag":{right:"auto"},".snow .cursor.right .cursor-name":{"margin-left":"-100%","margin-right":"-8px"},".snow .cursor-triangle.bottom":{"border-top":"4px solid transparent",display:"block","margin-bottom":"-1px"},".snow .cursor-triangle.top":{"border-bottom":"4px solid transparent",display:"none","margin-top":"-1px"},".snow .cursor.top .cursor-triangle.bottom":{display:"none"},".snow .cursor.top .cursor-triangle.top":{display:"block"},".snow a":{color:"#06c"},".snow .tooltip":{border:"1px solid #ccc","box-shadow":"0px 0px 5px #ddd",color:"#222"},".snow .tooltip a":{color:"#06c"},".snow .tooltip .input":{border:"1px solid #ccc",margin:"0px",padding:"5px"},".snow .image-tooltip-container .preview":{"border-color":"#ccc",color:"#ccc"},".snow .link-tooltip-container a, .snow .link-tooltip-container span":{display:"inline-block","line-height":"25px"}},b.prototype.extendMultiCursor=function(a){return a.on(a.constructor.events.CURSOR_ADDED,function(a){var b,c;return b=a.elem.querySelector(".cursor-triangle.bottom"),c=a.elem.querySelector(".cursor-triangle.top"),b.style.borderTopColor=c.style.borderBottomColor=a.color})},b.prototype.extendToolbar=function(a){return h.each(["color","background","font","size","align"],function(b){return function(e){var g,i;if(i=a.container.querySelector(".ql-"+e),null!=i){switch(e){case"font":case"size":case"align":g=new f(i);break;case"color":case"background":g=new c(i),h.each(g.container.querySelectorAll(".ql-picker-item"),function(a,b){return 7>b?d.addClass(a,"ql-primary-color"):void 0})}return null!=g?b.pickers.push(g):void 0}}}(this)),h.each(d.getTextNodes(a.container),function(a){return 0===d.getText(a).trim().length?d.removeNode(a):void 0})},b}(e),b.exports=g},{"../../dom":15,"../../lib/color-picker":19,"../../lib/picker":21,"../default":37,lodash:"M4+//f"}],39:[function(a,b){var c,d,e;e=a("lodash"),c=a("./dom"),d={convertFontSize:function(a){var b,d,f,g;e.isString(a)&&a.indexOf("px")>-1?(f=e.keys(c.FONT_SIZES),g=e.values(c.FONT_SIZES)):(g=e.keys(c.FONT_SIZES),f=e.values(c.FONT_SIZES));for(b in f)if(d=f[b],parseInt(a)<=parseInt(d))return g[b];return e.last(g)},getChildAtOffset:function(a,b){var c,e;for(c=a.firstChild,e=d.getNodeLength(c);null!=c&&!(e>b);)b-=e,c=c.nextSibling,e=d.getNodeLength(c);
  return null==c&&(c=a.lastChild,b=d.getNodeLength(c)),[c,b]},getNextLineNode:function(a,b){var d;return d=a.nextSibling,null==d&&a.parentNode!==b&&(d=a.parentNode.nextSibling),null!=d&&null!=c.LIST_TAGS[d.tagName]&&(d=d.firstChild),d},getNodeLength:function(a){var b;return null==a?0:(b=c.getText(a).length,c.isElement(a)&&(b+=a.querySelectorAll(e.keys(c.EMBED_TAGS).join(",")).length),b)},isIE:function(a){var b;return b=document.documentMode,b&&a>=b},mergeNodes:function(a,b){var d;return c.isElement(a)?(c.moveChildren(a,b),c.normalize(a)):(d=c.getText(a)+c.getText(b),c.setText(a,d)),c.removeNode(b)},splitAncestors:function(a,b,c){var e,f,g;if(null==c&&(c=!1),a===b||a.parentNode===b)return a;if(null!=a.previousSibling||c){for(g=a.parentNode,f=g.cloneNode(!1),g.parentNode.insertBefore(f,g.nextSibling);null!=a;)e=a.nextSibling,f.appendChild(a),a=e;return d.splitAncestors(f,b)}return d.splitAncestors(a.parentNode,b)},splitNode:function(a,b,e){var f,g,h,i,j,k,l,m,n,o;if(null==e&&(e=!1),l=d.getNodeLength(a),b=Math.max(0,b),b=Math.min(b,l),!e&&0===b)return[a.previousSibling,a,!1];if(!e&&b===l)return[a,a.nextSibling,!1];if(a.nodeType===c.TEXT_NODE)return f=a.splitText(b),[a,f,!0];for(j=a,m=a.cloneNode(!1),a.parentNode.insertBefore(m,j.nextSibling),n=d.getChildAtOffset(a,b),g=n[0],b=n[1],o=d.splitNode(g,b),h=o[0],i=o[1];null!==i;)k=i.nextSibling,m.appendChild(i),i=k;return[j,m,!0]}},b.exports=d},{"./dom":15,lodash:"M4+//f"}]},{},[34])(34)});