!function (t) { var e = {}; function n(r) { if (e[r]) return e[r].exports; var o = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(o.exports, o, o.exports, n), o.l = !0, o.exports } n.m = t, n.c = e, n.d = function (t, e, r) { n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r }) }, n.r = function (t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) }, n.t = function (t, e) { if (1 & e && (t = n(t)), 8 & e) return t; if (4 & e && "object" == typeof t && t && t.__esModule) return t; var r = Object.create(null); if (n.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t) for (var o in t) n.d(r, o, function (e) { return t[e] }.bind(null, o)); return r }, n.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return n.d(e, "a", e), e }, n.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, n.p = "/dist/", n(n.s = 44) }([function (t, e) { var n = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = n) }, function (t, e, n) { var r = n(32)("wks"), o = n(33), i = n(0).Symbol, u = "function" == typeof i; (t.exports = function (t) { return r[t] || (r[t] = u && i[t] || (u ? i : o)("Symbol." + t)) }).store = r }, function (t, e) { var n = t.exports = { version: "2.6.10" }; "number" == typeof __e && (__e = n) }, function (t, e, n) { var r = n(9); t.exports = function (t) { if (!r(t)) throw TypeError(t + " is not an object!"); return t } }, function (t, e) { t.exports = {} }, function (t, e, n) { var r = n(8), o = n(30); t.exports = n(6) ? function (t, e, n) { return r.f(t, e, o(1, n)) } : function (t, e, n) { return t[e] = n, t } }, function (t, e, n) { t.exports = !n(29)((function () { return 7 != Object.defineProperty({}, "a", { get: function () { return 7 } }).a })) }, function (t, e, n) { var r = n(0), o = n(2), i = n(12), u = n(5), c = n(14), a = function (t, e, n) { var s, f, l, h = t & a.F, p = t & a.G, v = t & a.S, d = t & a.P, y = t & a.B, m = t & a.W, g = p ? o : o[e] || (o[e] = {}), x = g.prototype, _ = p ? r : v ? r[e] : (r[e] || {}).prototype; for (s in p && (n = e), n) (f = !h && _ && void 0 !== _[s]) && c(g, s) || (l = f ? _[s] : n[s], g[s] = p && "function" != typeof _[s] ? n[s] : y && f ? i(l, r) : m && _[s] == l ? function (t) { var e = function (e, n, r) { if (this instanceof t) { switch (arguments.length) { case 0: return new t; case 1: return new t(e); case 2: return new t(e, n) }return new t(e, n, r) } return t.apply(this, arguments) }; return e.prototype = t.prototype, e }(l) : d && "function" == typeof l ? i(Function.call, l) : l, d && ((g.virtual || (g.virtual = {}))[s] = l, t & a.R && x && !x[s] && u(x, s, l))) }; a.F = 1, a.G = 2, a.S = 4, a.P = 8, a.B = 16, a.W = 32, a.U = 64, a.R = 128, t.exports = a }, function (t, e, n) { var r = n(3), o = n(51), i = n(52), u = Object.defineProperty; e.f = n(6) ? Object.defineProperty : function (t, e, n) { if (r(t), e = i(e, !0), r(n), o) try { return u(t, e, n) } catch (t) { } if ("get" in n || "set" in n) throw TypeError("Accessors not supported!"); return "value" in n && (t[e] = n.value), t } }, function (t, e) { t.exports = function (t) { return "object" == typeof t ? null !== t : "function" == typeof t } }, function (t, e, n) { t.exports = n(83) }, function (t, e) { var n = {}.toString; t.exports = function (t) { return n.call(t).slice(8, -1) } }, function (t, e, n) { var r = n(13); t.exports = function (t, e, n) { if (r(t), void 0 === e) return t; switch (n) { case 1: return function (n) { return t.call(e, n) }; case 2: return function (n, r) { return t.call(e, n, r) }; case 3: return function (n, r, o) { return t.call(e, n, r, o) } }return function () { return t.apply(e, arguments) } } }, function (t, e) { t.exports = function (t) { if ("function" != typeof t) throw TypeError(t + " is not a function!"); return t } }, function (t, e) { var n = {}.hasOwnProperty; t.exports = function (t, e) { return n.call(t, e) } }, function (t, e, n) { n(47); for (var r = n(0), o = n(5), i = n(4), u = n(1)("toStringTag"), c = "CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","), a = 0; a < c.length; a++) { var s = c[a], f = r[s], l = f && f.prototype; l && !l[u] && o(l, u, s), i[s] = i.Array } }, function (t, e, n) { var r = n(50), o = n(17); t.exports = function (t) { return r(o(t)) } }, function (t, e) { t.exports = function (t) { if (null == t) throw TypeError("Can't call method on " + t); return t } }, function (t, e) { t.exports = !0 }, function (t, e, n) { var r = n(9), o = n(0).document, i = r(o) && r(o.createElement); t.exports = function (t) { return i ? o.createElement(t) : {} } }, function (t, e) { var n = Math.ceil, r = Math.floor; t.exports = function (t) { return isNaN(t = +t) ? 0 : (t > 0 ? r : n)(t) } }, function (t, e, n) { var r = n(32)("keys"), o = n(33); t.exports = function (t) { return r[t] || (r[t] = o(t)) } }, function (t, e, n) { var r = n(8).f, o = n(14), i = n(1)("toStringTag"); t.exports = function (t, e, n) { t && !o(t = n ? t : t.prototype, i) && r(t, i, { configurable: !0, value: e }) } }, function (t, e, n) { "use strict"; var r = n(63)(!0); n(28)(String, "String", (function (t) { this._t = String(t), this._i = 0 }), (function () { var t, e = this._t, n = this._i; return n >= e.length ? { value: void 0, done: !0 } : (t = r(e, n), this._i += t.length, { value: t, done: !1 }) })) }, function (t, e, n) { var r = n(11), o = n(1)("toStringTag"), i = "Arguments" == r(function () { return arguments }()); t.exports = function (t) { var e, n, u; return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (n = function (t, e) { try { return t[e] } catch (t) { } }(e = Object(t), o)) ? n : i ? r(e) : "Object" == (u = r(e)) && "function" == typeof e.callee ? "Arguments" : u } }, function (t, e, n) { "use strict"; var r = n(13); function o(t) { var e, n; this.promise = new t((function (t, r) { if (void 0 !== e || void 0 !== n) throw TypeError("Bad Promise constructor"); e = t, n = r })), this.resolve = r(e), this.reject = r(n) } t.exports.f = function (t) { return new o(t) } }, function (t, e, n) { t.exports = { default: n(68), __esModule: !0 } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r, o = n(26), i = (r = o) && r.__esModule ? r : { default: r }; e.default = function (t) { return function () { var e = t.apply(this, arguments); return new i.default((function (t, n) { return function r(o, u) { try { var c = e[o](u), a = c.value } catch (t) { return void n(t) } if (!c.done) return i.default.resolve(a).then((function (t) { r("next", t) }), (function (t) { r("throw", t) })); t(a) }("next") })) } } }, function (t, e, n) { "use strict"; var r = n(18), o = n(7), i = n(53), u = n(5), c = n(4), a = n(54), s = n(22), f = n(61), l = n(1)("iterator"), h = !([].keys && "next" in [].keys()), p = function () { return this }; t.exports = function (t, e, n, v, d, y, m) { a(n, e, v); var g, x, _, w = function (t) { if (!h && t in L) return L[t]; switch (t) { case "keys": case "values": return function () { return new n(this, t) } }return function () { return new n(this, t) } }, b = e + " Iterator", O = "values" == d, j = !1, L = t.prototype, S = L[l] || L["@@iterator"] || d && L[d], P = S || w(d), E = d ? O ? w("entries") : P : void 0, T = "Array" == e && L.entries || S; if (T && (_ = f(T.call(new t))) !== Object.prototype && _.next && (s(_, b, !0), r || "function" == typeof _[l] || u(_, l, p)), O && S && "values" !== S.name && (j = !0, P = function () { return S.call(this) }), r && !m || !h && !j && L[l] || u(L, l, P), c[e] = P, c[b] = p, d) if (g = { values: O ? P : w("values"), keys: y ? P : w("keys"), entries: E }, m) for (x in g) x in L || i(L, x, g[x]); else o(o.P + o.F * (h || j), e, g); return g } }, function (t, e) { t.exports = function (t) { try { return !!t() } catch (t) { return !0 } } }, function (t, e) { t.exports = function (t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } } }, function (t, e, n) { var r = n(20), o = Math.min; t.exports = function (t) { return t > 0 ? o(r(t), 9007199254740991) : 0 } }, function (t, e, n) { var r = n(2), o = n(0), i = o["__core-js_shared__"] || (o["__core-js_shared__"] = {}); (t.exports = function (t, e) { return i[t] || (i[t] = void 0 !== e ? e : {}) })("versions", []).push({ version: r.version, mode: n(18) ? "pure" : "global", copyright: "© 2019 Denis Pushkarev (zloirock.ru)" }) }, function (t, e) { var n = 0, r = Math.random(); t.exports = function (t) { return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++n + r).toString(36)) } }, function (t, e) { t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") }, function (t, e, n) { var r = n(0).document; t.exports = r && r.documentElement }, function (t, e, n) { var r = n(24), o = n(1)("iterator"), i = n(4); t.exports = n(2).getIteratorMethod = function (t) { if (null != t) return t[o] || t["@@iterator"] || i[r(t)] } }, function (t, e, n) { var r = n(3), o = n(13), i = n(1)("species"); t.exports = function (t, e) { var n, u = r(t).constructor; return void 0 === u || null == (n = r(u)[i]) ? e : o(n) } }, function (t, e, n) { var r, o, i, u = n(12), c = n(75), a = n(35), s = n(19), f = n(0), l = f.process, h = f.setImmediate, p = f.clearImmediate, v = f.MessageChannel, d = f.Dispatch, y = 0, m = {}, g = function () { var t = +this; if (m.hasOwnProperty(t)) { var e = m[t]; delete m[t], e() } }, x = function (t) { g.call(t.data) }; h && p || (h = function (t) { for (var e = [], n = 1; arguments.length > n;)e.push(arguments[n++]); return m[++y] = function () { c("function" == typeof t ? t : Function(t), e) }, r(y), y }, p = function (t) { delete m[t] }, "process" == n(11)(l) ? r = function (t) { l.nextTick(u(g, t, 1)) } : d && d.now ? r = function (t) { d.now(u(g, t, 1)) } : v ? (i = (o = new v).port2, o.port1.onmessage = x, r = u(i.postMessage, i, 1)) : f.addEventListener && "function" == typeof postMessage && !f.importScripts ? (r = function (t) { f.postMessage(t + "", "*") }, f.addEventListener("message", x, !1)) : r = "onreadystatechange" in s("script") ? function (t) { a.appendChild(s("script")).onreadystatechange = function () { a.removeChild(this), g.call(t) } } : function (t) { setTimeout(u(g, t, 1), 0) }), t.exports = { set: h, clear: p } }, function (t, e) { t.exports = function (t) { try { return { e: !1, v: t() } } catch (t) { return { e: !0, v: t } } } }, function (t, e, n) { var r = n(3), o = n(9), i = n(25); t.exports = function (t, e) { if (r(t), o(e) && e.constructor === t) return e; var n = i.f(t); return (0, n.resolve)(e), n.promise } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r = i(n(45)), o = i(n(65)); function i(t) { return t && t.__esModule ? t : { default: t } } e.default = function (t, e) { if (Array.isArray(t)) return t; if ((0, r.default)(Object(t))) return function (t, e) { var n = [], r = !0, i = !1, u = void 0; try { for (var c, a = (0, o.default)(t); !(r = (c = a.next()).done) && (n.push(c.value), !e || n.length !== e); r = !0); } catch (t) { i = !0, u = t } finally { try { !r && a.return && a.return() } finally { if (i) throw u } } return n }(t, e); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }, function (t, e, n) { "use strict"; e.__esModule = !0, e.default = function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } }, function (t, e, n) { "use strict"; e.__esModule = !0; var r, o = n(85), i = (r = o) && r.__esModule ? r : { default: r }; e.default = function () { function t(t, e) { for (var n = 0; n < e.length; n++) { var r = e[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), (0, i.default)(t, r.key, r) } } return function (e, n, r) { return n && t(e.prototype, n), r && t(e, r), e } }() }, function (t, e, n) { "use strict"; n.r(e), n.d(e, "imageCompressor", (function () { return m })); var r, o = n(41), i = n.n(o), u = n(26), c = n.n(u), a = n(10), s = n.n(a), f = n(27), l = n.n(f), h = n(42), p = n.n(h), v = n(43), d = n.n(v), y = (r = l()(s.a.mark((function t(e, n, r, o, u, a) { var f, l, h, p, v, d, y; return s.a.wrap((function (t) { for (; ;)switch (t.prev = t.next) { case 0: return o = o || "image/jpeg", u = u || .7, (f = new Image).src = e, t.next = 6, new c.a((function (t) { f.onload = function () { t() } })); case 6: return l = g(f.width, f.height, n, r), h = i()(l, 2), p = h[0], v = h[1], (d = document.createElement("canvas")).width = p, d.height = v, d.getContext("2d").drawImage(f, 0, 0, p, v), y = d.toDataURL(o, u), t.abrupt("return", y); case 15: case "end": return t.stop() } }), t, this) }))), function (t, e, n, o, i, u) { return r.apply(this, arguments) }); var m = function () { function t(e, n) { p()(this, t), this.quill = e, this.range = null, this.options = n, this.debug = null == n.debug || 1 == n.debug, function (t) { t.maxWidth = t.maxWidth || 1e3, t.maxHeight = t.maxHeight || 1e3, t.maxWidth && "number" != typeof t.maxWidth && (t.maxWidth = 1e3), t.maxHeight && "number" != typeof t.maxHeight && (t.maxHeight = 1e3), t.quality && "number" != typeof t.quality && (t.quality = .7), !t.imageType || "string" == typeof t.imageType && t.imageType.startsWith("image/") || (t.imageType = "image/jpeg") }(n), this.quill.getModule("toolbar").addHandler("image", this.selectLocalImage.bind(this)) } return d()(t, [{ key: "selectLocalImage", value: function () { var t = this; this.range = this.quill.getSelection(), this.fileHolder = document.createElement("input"), this.fileHolder.setAttribute("type", "file"), this.fileHolder.setAttribute("accept", "image/*"), this.fileHolder.setAttribute("style", "visibility:hidden"), this.fileHolder.onchange = this.fileChanged.bind(this), document.body.appendChild(this.fileHolder), this.fileHolder.click(), window.requestAnimationFrame((function () { document.body.removeChild(t.fileHolder) })) } }, { key: "fileChanged", value: function () { var t = this, e = this.fileHolder.files[0]; if (e) { var n = new FileReader; n.addEventListener("load", l()(s.a.mark((function e() { var r, o; return s.a.wrap((function (e) { for (; ;)switch (e.prev = e.next) { case 0: return r = n.result, e.next = 3, y(r, t.options.maxWidth, t.options.maxHeight, t.options.imageType, t.options.quality, t.debug); case 3: o = e.sent, t.insertToEditor(o); case 5: case "end": return e.stop() } }), e, t) }))), !1), n.readAsDataURL(e) } } }, { key: "insertToEditor", value: function (t) { var e = this.range; this.logFileSize(t), this.quill.insertEmbed(e.index, "image", "" + t), e.index++, this.quill.setSelection(e, "api") } }, { key: "logFileSize", value: function (t) { (Math.round(3 * (t.length - "data:image/png;base64,".length) / 4) / 1024).toFixed(0); this.debug } }]), t }(); function g(t, e, n, r) { if (t < n && e < r) return [t, e]; if (t > n) { var o = n, i = Math.floor(e / t * o); if (i > r) { var u = r; return [Math.floor(t / e * u), u] } return [o, i] } if (e > r) { var c = r; return [Math.floor(t / e * c), c] } } window.imageCompressor = m, e.default = m }, function (t, e, n) { t.exports = { default: n(46), __esModule: !0 } }, function (t, e, n) { n(15), n(23), t.exports = n(64) }, function (t, e, n) { "use strict"; var r = n(48), o = n(49), i = n(4), u = n(16); t.exports = n(28)(Array, "Array", (function (t, e) { this._t = u(t), this._i = 0, this._k = e }), (function () { var t = this._t, e = this._k, n = this._i++; return !t || n >= t.length ? (this._t = void 0, o(1)) : o(0, "keys" == e ? n : "values" == e ? t[n] : [n, t[n]]) }), "values"), i.Arguments = i.Array, r("keys"), r("values"), r("entries") }, function (t, e) { t.exports = function () { } }, function (t, e) { t.exports = function (t, e) { return { value: e, done: !!t } } }, function (t, e, n) { var r = n(11); t.exports = Object("z").propertyIsEnumerable(0) ? Object : function (t) { return "String" == r(t) ? t.split("") : Object(t) } }, function (t, e, n) { t.exports = !n(6) && !n(29)((function () { return 7 != Object.defineProperty(n(19)("div"), "a", { get: function () { return 7 } }).a })) }, function (t, e, n) { var r = n(9); t.exports = function (t, e) { if (!r(t)) return t; var n, o; if (e && "function" == typeof (n = t.toString) && !r(o = n.call(t))) return o; if ("function" == typeof (n = t.valueOf) && !r(o = n.call(t))) return o; if (!e && "function" == typeof (n = t.toString) && !r(o = n.call(t))) return o; throw TypeError("Can't convert object to primitive value") } }, function (t, e, n) { t.exports = n(5) }, function (t, e, n) { "use strict"; var r = n(55), o = n(30), i = n(22), u = {}; n(5)(u, n(1)("iterator"), (function () { return this })), t.exports = function (t, e, n) { t.prototype = r(u, { next: o(1, n) }), i(t, e + " Iterator") } }, function (t, e, n) { var r = n(3), o = n(56), i = n(34), u = n(21)("IE_PROTO"), c = function () { }, a = function () { var t, e = n(19)("iframe"), r = i.length; for (e.style.display = "none", n(35).appendChild(e), e.src = "javascript:", (t = e.contentWindow.document).open(), t.write("