Files
17168ERP/web/App_Script/ContentBuilder/contentbuilder/contentbuilder.js
2025-08-29 01:27:25 +08:00

21423 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var ContentBuilder = function () {
"use strict";
function e(t) {
return (e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(t)
}
function t(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}
function i(e, t) {
for (var i = 0; i < t.length; i++) {
var n = t[i];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function n(e, t, n) {
return t && i(e.prototype, t), n && i(e, n), e
}
var o, r, a, l, s, c, d, u, p = function () {
function e(i) {
t(this, e), this.builder = i
}
return n(e, [{
key: "cellSelected",
value: function () {
return document.querySelector(".cell-active")
}
}, {
key: "builderStuff",
value: function () {
return document.querySelector("#_cbhtml")
}
}, {
key: "cellNext",
value: function (e) {
var t = new v,
i = e.nextElementSibling;
return i ? t.hasClass(i, "is-row-tool") || t.hasClass(i, "is-rowadd-tool") ? null : i : null
}
}, {
key: "out",
value: function (e) {
if (this.builder) {
var t = this.builder.opts.lang[e];
return t || (this.builder.checkLang && console.log(e), e)
}
return e
}
}, {
key: "confirm",
value: function (e, t) {
var i = this,
n = new v,
o = '<div class="is-modal is-confirm">\n <div style="max-width:526px;text-align:center;">\n <p>'.concat(e, '</p>\n <button title="').concat(this.out("Delete"), '" class="input-ok classic">').concat(this.out("Delete"), "</button>\n </div>\n </div>"),
r = this.builderStuff(),
a = r.querySelector(".is-confirm");
a || (n.appendHtml(r, o), a = r.querySelector(".is-confirm")), this.showModal(a, !1, (function () {
a.parentNode.removeChild(a), t(!1)
}), !0);
var l = a.querySelector(".is-confirm .input-ok");
n.addEventListener(l, "click", (function () {
i.hideModal(a), a.parentNode.removeChild(a), t(!0)
}))
}
}, {
key: "showModal",
value: function (e, t, i, n) {
var o = this,
r = new v;
r.addClass(e, "active");
var a, l = !1;
if (this.builder ? this.builder.opts.animateModal && (l = !0, n || (l = !1)) : n && (l = !0), l && this.builder) {
var s = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(s, (function (e) {
e.style.transform = "scale(0.98)", e.style.WebkitTransform = "scale(0.98)", e.style.MozTransform = "scale(0.98)"
}))
}
if (!e.querySelector(".is-modal-overlay") && (a = t ? '<div class="is-modal-overlay" style="position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.3);z-index:-1;"></div>' : '<div class="is-modal-overlay" style="position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.000001);z-index:-1;"></div>', e.insertAdjacentHTML("afterbegin", a), !t)) {
var c = e.querySelector(".is-modal-overlay");
r.addEventListener(c, "click", (function () {
i && i(), o.hideModal(e)
}))
}
}
}, {
key: "hideModal",
value: function (e) {
if (this.builder) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (e) {
e.style.transform = "", e.style.WebkitTransform = "", e.style.MozTransform = ""
}))
}(new v).removeClass(e, "active")
}
}, {
key: "fixLayout",
value: function (e) {
var t = new v,
i = e.childElementCount - 2,
n = this.builder.opts.row,
o = this.builder.opts.cols,
r = this.builder.opts.colequal;
if (r.length > 0) t.elementChildren(e).forEach((function (e) {
if (!t.hasClass(e, "is-row-tool") && !t.hasClass(e, "is-rowadd-tool")) {
for (var n = 0; n <= o.length - 1; n++) t.removeClass(e, o[n]);
for (var a = 0; a <= r.length - 1; a++)
if (r[a].length === i) {
t.addClass(e, r[a][0]);
break
} 1 === i && t.addClass(e, o[o.length - 1])
}
}));
else if ("" !== n && o.length > 0) {
var a = 0;
t.elementChildren(e).forEach((function (e) {
if (!t.hasClass(e, "is-row-tool") && !t.hasClass(e, "is-rowadd-tool")) {
a++;
for (var n = 0; n <= o.length - 1; n++) t.removeClass(e, o[n]);
1 === i && t.addClass(e, o[11]), 2 === i && t.addClass(e, o[5]), 3 === i && t.addClass(e, o[3]), 4 === i && t.addClass(e, o[2]), 5 === i && (5 === a ? t.addClass(e, o[3]) : t.addClass(e, o[1])), 6 === i && t.addClass(e, o[1]), 7 === i && (a >= 6 ? t.addClass(e, o[0]) : t.addClass(e, o[1])), 8 === i && (a >= 5 ? t.addClass(e, o[0]) : t.addClass(e, o[1])), 9 === i && (a >= 4 ? t.addClass(e, o[0]) : t.addClass(e, o[1])), 10 === i && (a >= 3 ? t.addClass(e, o[0]) : t.addClass(e, o[1])), 11 === i && (a >= 2 ? t.addClass(e, o[0]) : t.addClass(e, o[1])), 12 === i && t.addClass(e, o[0])
}
}))
}
}
}, {
key: "addContent",
value: function (e, t, i) {
var n, o = new v,
r = this.cellSelected();
if (r) n = r.parentNode;
else {
if (!(n = document.querySelector(".row-active"))) return;
t = "row"
}
if ("cell" === t || "cell-left" === t || "cell-right" === t) {
var a, l = 4;
if (this.builder.maxColumns && (l = this.builder.maxColumns), n.childElementCount >= l + 2) return alert(this.out("You have reached the maximum number of columns")), !1;
if (this.builder.uo.saveForUndo(), "" === this.builder.opts.row) {
var s = this.builder.opts.cellFormat,
c = s.indexOf("</");
e = s.substring(0, c) + e + s.substring(c), a = this.createElementFromHTML(e)
} else {
(a = r.cloneNode(!0)).removeAttribute("data-noedit"), a.removeAttribute("data-protected"), a.removeAttribute("data-module"), a.removeAttribute("data-module-desc"), a.removeAttribute("data-dialog-width"), a.removeAttribute("data-html"), a.removeAttribute("data-settings");
for (var d = 1; d <= 20; d++) a.removeAttribute("data-html-" + d);
a.removeAttribute("data-noedit"), o.removeClass(a, "cell-active"), a.removeAttribute("data-click"), i && a.setAttribute(i, ""), a.innerHTML = e
}
n.insertBefore(a, r), "cell" !== t && "cell-right" !== t || o.moveAfter(a, r), this.builder.applyBehavior(), this.fixLayout(n), a.click()
}
if ("row" === t) {
var u, p;
if (this.builder.uo.saveForUndo(), "" === this.builder.opts.row) {
u = this.htmlToElement(this.builder.opts.rowFormat);
var h = this.builder.opts.cellFormat,
f = h.indexOf("</");
e = h.substring(0, f) + e + h.substring(f);
for (var g = o.elementChildren(u); g.length > 0 && (g = g[0], o.elementChildren(g).length > 0);) g = o.elementChildren(g);
g.innerHTML = e, p = g.firstChild, i && p.setAttribute(i, "")
} else p = o.createElement("div"), o.addClass(p, this.builder.opts.cols[this.builder.opts.cols.length - 1]), p.innerHTML = e, i && p.setAttribute(i, ""), u = o.createElement("div"), o.addClass(u, this.builder.opts.row), o.appendChild(u, p);
n.parentNode.insertBefore(u, n), o.moveAfter(u, n), this.builder.applyBehavior(), p.click()
}
if ("elm" === t) {
var m = this.builder.activeElement;
if (!m) return;
this.builder.uo.saveForUndo();
var y = m;
y.insertAdjacentHTML("afterend", e), this.builder.applyBehavior();
var b, x = y.nextElementSibling;
if ("img" === x.tagName.toLowerCase()) clearTimeout(b), b = setTimeout((function () {
x.complete && x.click()
}), 200);
else x.click()
}
this.builder.opts.onChange()
}
}, {
key: "htmlToElement",
value: function (e) {
var t = document.createElement("template");
return e = e.trim(), t.innerHTML = e, t.content.firstChild
}
}, {
key: "addSnippet",
value: function (e, t, i) {
var n = this;
this.builder.uo.saveForUndo();
var o, r, a, l, s = new v,
c = !1,
d = this.builderStuff().querySelector(".quickadd").getAttribute("data-mode");
if (!t || "cell" !== d && "cell-left" !== d && "cell-right" !== d) {
if (t && "row" === d) {
var u;
if ((a = document.createElement("div")).className = this.builder.opts.cols[this.builder.opts.cols.length - 1], a.innerHTML = e, i && a.setAttribute("data-noedit", ""), (o = document.createElement("div")).className = this.builder.opts.row, o.appendChild(a), (r = this.builder.cellSelected()) ? u = r.parentNode : (u = document.querySelector(".row-active")) || (c = !0), c) {
var p = document.querySelectorAll(".is-builder"),
h = p[p.length - 1],
f = s.elementChildren(h);
u = f[f.length - 1]
}
u.parentNode.insertBefore(o, u), s.moveAfter(o, u), this.builder.applyBehavior(), a.click(), o.className = o.className.replace("row-outline", ""), (l = document.querySelector(".is-column-tool")).className = l.className.replace("active", "")
} else {
var g = document.createElement("div");
g.innerHTML = e;
var m, y = g.querySelectorAll("[data-html]");
if (Array.prototype.forEach.call(y, (function (t) {
e = (e = decodeURIComponent(t.getAttribute("data-html"))).replace(/{id}/g, n.makeId());
for (var i = 1; i <= 20; i++) e = e.replace("[%HTML" + i + "%]", void 0 === t.getAttribute("data-html-" + i) ? "" : decodeURIComponent(t.getAttribute("data-html-" + i)));
t.innerHTML = e
})), (r = this.builder.activeCol) ? m = r.parentNode : (m = document.querySelector(".row-active")) || (c = !0), c) {
var b = document.querySelectorAll(".is-builder"),
x = b[b.length - 1],
w = s.elementChildren(x);
m = w[w.length - 1]
}
var S = document.createRange();
m.parentNode.insertBefore(S.createContextualFragment(g.innerHTML), m.nextSibling), o = g.childNodes[0];
var C = m.getBoundingClientRect().top + m.offsetHeight + window.pageYOffset - 120;
window.scroll({
top: C,
behavior: "smooth"
}), o = m.nextElementSibling, this.builder.applyBehavior(), (a = o.childNodes[0]).click(), o.className = o.className.replace("row-outline", ""), (l = document.querySelector(".is-column-tool")).className = l.className.replace("active", "")
}
this.builder.opts.onChange()
} else i ? this.addContent(e, d, "data-noedit") : this.addContent(e, d)
}
}, {
key: "clearActiveCell",
value: function () {
for (var e = new v, t = document.getElementsByClassName("cell-active"); t.length;) t[0].classList.remove("cell-active");
for (t = document.getElementsByClassName("row-outline"); t.length;) t[0].classList.remove("row-outline");
for (t = document.getElementsByClassName("row-active"); t.length;) t[0].classList.remove("row-active");
for (t = document.getElementsByClassName("builder-active"); t.length;) t[0].classList.remove("builder-active");
var i = this.builderStuff();
if (i) {
var n = i.querySelector(".is-column-tool");
e.removeClass(n, "active"), i.querySelector(".is-element-tool").style.display = ""
}
this.builder.activeCol = null
}
}, {
key: "clearAfterUndoRedo",
value: function () {
var e = new v,
t = this.builderStuff(),
i = t.querySelectorAll(".is-tool");
Array.prototype.forEach.call(i, (function (e) {
e.style.display = ""
})), this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none", this.builder.activeSpacer = null, this.builder.activeCodeBlock = null, this.builder.activeLink = null, this.builder.activeIframe = null, this.builder.activeTd = null, this.builder.activeTable = null, this.builder.activeModule = null;
var n = document.querySelectorAll(".icon-active");
Array.prototype.forEach.call(n, (function (t) {
e.removeClass(t, "icon-active")
})), this.builder.activeIcon = null;
var o = t.querySelector(".is-rte-tool").querySelectorAll("button");
Array.prototype.forEach.call(o, (function (t) {
e.removeClass(t, "on")
}));
var r = t.querySelectorAll(".is-pop");
Array.prototype.forEach.call(r, (function (e) {
e.style.display = ""
}))
}
}, {
key: "hideControls",
value: function () {
var e = this.builderStuff().querySelectorAll(".is-tool");
Array.prototype.forEach.call(e, (function (e) {
e.style.display = ""
})), this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
}
}, {
key: "clearControls",
value: function () {
var e = new v,
t = this.builderStuff();
if (t) {
var i = t.querySelectorAll(".is-tool");
Array.prototype.forEach.call(i, (function (e) {
e.style.display = ""
})), this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none", this.builder.activeSpacer = null, this.builder.activeCodeBlock = null, this.builder.activeLink = null, this.builder.activeIframe = null, this.builder.activeTd = null, this.builder.activeTable = null, this.builder.activeModule = null, this.builder.activeImage = null;
var n = document.querySelectorAll(".icon-active");
Array.prototype.forEach.call(n, (function (t) {
e.removeClass(t, "icon-active")
})), this.builder.activeIcon = null;
var o = document.querySelectorAll(".ovl");
Array.prototype.forEach.call(o, (function (e) {
e.style.display = "block"
}));
var r = t.querySelectorAll(".is-side.elementstyles");
Array.prototype.forEach.call(r, (function (t) {
e.removeClass(t, "active")
}));
var a = document.querySelectorAll("[data-saveforundo]");
Array.prototype.forEach.call(a, (function (e) {
e.removeAttribute("data-saveforundo")
})), a = document.querySelectorAll(".elm-inspected"), Array.prototype.forEach.call(a, (function (t) {
e.removeClass(t, "elm-inspected")
})), t.querySelector(".is-rte-tool").style.display = "none", a = document.querySelectorAll(".elm-active"), Array.prototype.forEach.call(a, (function (t) {
e.removeClass(t, "elm-active")
}))
}
}
}, {
key: "makeId",
value: function () {
for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", i = 0; i < 2; i++) e += t.charAt(Math.floor(Math.random() * t.length));
for (var n = "", o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = 0; r < 5; r++) n += o.charAt(Math.floor(Math.random() * o.length));
return e + n
}
}, {
key: "saveSelection",
value: function () {
if (window.getSelection) {
var e = window.getSelection();
if (e.getRangeAt && e.rangeCount) {
for (var t = [], i = 0, n = e.rangeCount; i < n; ++i) t.push(e.getRangeAt(i));
return this.builder.selection = t, t
}
} else if (document.selection && document.selection.createRange) return this.builder.selection = document.selection.createRange(), document.selection.createRange();
return this.builder.selection = null, null
}
}, {
key: "restoreSelection",
value: function () {
var e = this.builder.selection;
if (e)
if (window.getSelection) {
var t = window.getSelection();
if (document.body.createTextRange) {
var i = document.body.createTextRange();
i.collapse(), i.select()
} else window.getSelection ? window.getSelection().empty ? window.getSelection().empty() : window.getSelection().removeAllRanges && window.getSelection().removeAllRanges() : document.selection && document.selection.empty();
for (var n = 0, o = e.length; n < o; ++n) t.addRange(e[n])
} else document.selection && e.select && e.select()
}
}, {
key: "cleanHTML",
value: function (e, t) {
var i, n = e.replace(/(\n|\r| class=(")?Mso[a-zA-Z]+(")?)/g, " "),
o = new RegExp("\x3c!--(.*?)--\x3e", "g");
n = n.replace(o, ""), i = t ? new RegExp("<(/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>", "gi") : new RegExp("<(/)*(meta|link|\\?xml:|st1:|o:|font)(.*?)>", "gi"), n = n.replace(i, "");
for (var r, a = ["style", "script", "applet", "embed", "noframes", "noscript"], l = 0; l < a.length; l++) i = new RegExp("<" + a[l] + ".*?" + a[l] + "(.*?)>", "gi"), n = n.replace(i, "");
r = t ? ["style", "start"] : ["start"];
for (var s = 0; s < r.length; s++) {
var c = new RegExp(" " + r[s] + '="(.*?)"', "gi");
n = n.replace(c, "")
}
return n = (n = (n = (n = (n = n.replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s/>]))[^>]*>/gi, "")).replace(/<(\/?)s>/gi, "<$1strike>")).replace(/&nbsp;/gi, " ")).replace(/background-color: rgba\(200, 200, 201, 0.11\);/gi, "")).replace(/background-color: rgba\(200, 200, 201, 0.11\)/gi, "")
}
}, {
key: "checkEmpty",
value: function () {
var e = this,
t = new v,
i = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(i, (function (i) {
var n = t.elementChildren(i),
o = !0;
if (n.forEach((function (e) {
t.hasClass(e, "row-add-initial") || t.hasClass(e, "dummy-space") || (o = !1)
})), o) {
var r = i.querySelector(".row-add-initial");
r || (i.innerHTML = '<button class="row-add-initial">'.concat(e.out("Empty"), "<br><span>").concat(e.out("+ Click to add content"), "</span></div>"), r = i.querySelector(".row-add-initial")), r.addEventListener("click", (function () {
e.clearActiveCell(), t.addClass(r, "row-active");
var i = e.builderStuff().querySelector(".quickadd"),
n = window.innerHeight,
o = r.getBoundingClientRect().top,
a = r.getBoundingClientRect().left + r.offsetWidth / 2 - 11;
i.style.display = "flex";
var l = i.offsetWidth,
s = i.offsetHeight;
n - o > s ? (o = o + r.offsetHeight - 19, i.style.top = o + window.pageYOffset + 27 + "px", i.style.left = a - l / 2 + 7 + "px", t.removeClass(i, "arrow-bottom"), t.removeClass(i, "arrow-right"), t.removeClass(i, "arrow-left"), t.removeClass(i, "center"), t.addClass(i, "arrow-top"), t.addClass(i, "center")) : (i.style.top = o + window.pageYOffset - s - 8 + "px", i.style.left = a - l / 2 + 7 + "px", t.removeClass(i, "arrow-top"), t.removeClass(i, "arrow-right"), t.removeClass(i, "arrow-left"), t.removeClass(i, "center"), t.addClass(i, "arrow-bottom"), t.addClass(i, "center")), i.setAttribute("data-mode", "row")
}))
} else {
var a = i.querySelector(".row-add-initial");
a && a.parentNode.removeChild(a)
}
}))
}
}, {
key: "clearPreferences",
value: function () {
localStorage.removeItem("_buildermode"), localStorage.removeItem("_editingtoolbar"), localStorage.removeItem("_editingtoolbardisplay"), localStorage.removeItem("_hidecelltool"), localStorage.removeItem("_rowtool"), localStorage.removeItem("_hideelementtool"), localStorage.removeItem("_hidesnippetaddtool"), localStorage.removeItem("_outlinemode"), localStorage.removeItem("_hiderowcoloutline"), localStorage.removeItem("_outlinestyle"), localStorage.removeItem("_hideelementhighlight"), localStorage.removeItem("_opensnippets"), localStorage.removeItem("_toolstyle"), localStorage.removeItem("_snippetssidebardisplay"), localStorage.removeItem("_pasteresult"), localStorage.removeItem("_scrollableeditor"), localStorage.removeItem("_animatedsorting"), localStorage.removeItem("_addbuttonplace"), localStorage.removeItem("_hiderowtool"), localStorage.removeItem("_dragwithouthandle"), localStorage.removeItem("_advancedhtmleditor"), localStorage.removeItem("_hidecolhtmleditor"), localStorage.removeItem("_hiderowhtmleditor")
}
}, {
key: "pasteHtmlAtCaret",
value: function (e, t) {
var i, n;
if (this.restoreSelection(), window.getSelection) {
if (!this.builder.activeCol) return;
if ((i = window.getSelection()).getRangeAt && i.rangeCount) {
(n = i.getRangeAt(0)).deleteContents();
var o = document.createElement("div");
o.innerHTML = e;
for (var r, a, l = document.createDocumentFragment(); r = o.firstChild;) a = l.appendChild(r);
var s = l.firstChild;
n.insertNode(l), a && ((n = n.cloneRange()).setStartAfter(a), t ? n.setStartBefore(s) : n.collapse(!0), i.removeAllRanges(), this.builder.isTouchSupport || i.addRange(n))
}
} else if ((i = document.selection) && "Control" != i.type) {
if (!this.builder.activeCol) return;
var c = i.createRange();
c.collapse(!0), i.createRange().pasteHTML(e), t && ((n = i.createRange()).setEndPoint("StartToStart", c), this.builder.isTouchSupport || n.select())
}
}
}, {
key: "refreshModule",
value: function () {
var e = this.builder.activeModule;
if (e) {
var t = 1,
i = e.querySelectorAll("[data-subblock]");
Array.prototype.forEach.call(i, (function (i) {
var n = i.innerHTML;
e.setAttribute("data-html-" + t, encodeURIComponent(n)), t++
}));
var n = decodeURIComponent(e.getAttribute("data-html"));
n = n.replace(/{id}/g, this.makeId()), e.innerHTML = "";
var o = document.createRange();
o.setStart(e, 0), e.appendChild(o.createContextualFragment(n)), i = e.querySelectorAll("[data-subblock]");
var r = 1;
Array.prototype.forEach.call(i, (function (t) {
e.getAttribute("data-html-" + r) && (t.innerHTML = decodeURIComponent(e.getAttribute("data-html-" + r))), r++
}))
}
}
}, {
key: "isTouchSupport",
value: function () {
return "ontouchstart" in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0
}
}, {
key: "detectIE",
value: function () {
var e = window.navigator.userAgent,
t = e.indexOf("MSIE ");
if (t > 0) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
if (e.indexOf("Trident/") > 0) {
var i = e.indexOf("rv:");
return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10)
}
var n = e.indexOf("Edge/");
return n > 0 && parseInt(e.substring(n + 5, e.indexOf(".", n)), 10)
}
}, {
key: "LightenDarkenColor",
value: function (e, t) {
var i = !1;
"#" == e[0] && (e = e.slice(1), i = !0);
var n = parseInt(e, 16),
o = (n >> 16) + t;
o > 255 ? o = 255 : o < 0 && (o = 0);
var r = (n >> 8 & 255) + t;
r > 255 ? r = 255 : r < 0 && (r = 0);
var a = (255 & n) + t;
return a > 255 ? a = 255 : a < 0 && (a = 0), (i ? "#" : "") + String("000000" + (a | r << 8 | o << 16).toString(16)).slice(-6)
}
}, {
key: "getFontFamilyHTML",
value: function () {
var e = this.builder.fontAssetPath;
return '\n <!DOCTYPE HTML>\n <html>\n <head>\n <meta charset="utf-8">\n <title>Fonts</title>\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="description" content=""> \n <style>\n html, body {height:100%}\n body {overflow:hidden;margin:0;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size:100%; \n line-height:1.7;\n }\n #divFontList {margin:0;padding:9px 11px 9px 9px;height:100%;overflow-y:scroll !important;box-sizing:border-box;}\n #divFontList > div {width:100%;cursor:pointer;overflow:hidden;text-align:center;position:relative;}\n #divFontList > div img {margin:7px 5px 0px 5px;max-width: 230px;max-height: 27px;}\n #divFontList > div.on div {\n background:rgba(0,0,0,0.03);; \n }\n #divFontList > div div {position:absolute;top:0;left:0;width:100%;height:100%;}\n #divFontList > div:hover div {background:rgba(0,0,0,0.03);}\n </style>\n </head>\n <body>\n\n <div id="divFontList">\n <div data-provider="" data-font-family="" style="font-size:12px;padding:10px 7px;box-sizing:border-box;"><div></div>None</div>\n <div data-provider="" data-font-family="Arial, sans-serif"><div></div><img src="'.concat(e, 'arial.png"></div>\n <div data-provider="" data-font-family="courier"><div></div><img src="').concat(e, 'courier.png"></div>\n <div data-provider="" data-font-family="Georgia, serif"><div></div><img src="').concat(e, 'georgia.png"></div>\n \x3c!--<div data-provider="" data-font-family="Helvetica Neue, Helvetica, Arial, sans-serif"><div></div><img src="').concat(e, 'helvetica_neue.png"></div>--\x3e\n <div data-provider="" data-font-family="monospace"><div></div><img src="').concat(e, 'monospace.png"></div>\n <div data-provider="" data-font-family="sans-serif"><div></div><img src="').concat(e, 'sans_serif.png"></div>\n <div data-provider="" data-font-family="serif"><div></div><img src="').concat(e, 'serif.png"></div>\n <div data-provider="google" data-font-family="Abel, sans-serif"><div></div><img src="').concat(e, 'abel.png"></div>\n <div data-provider="google" data-font-family="Abril Fatface"><div></div><img src="').concat(e, 'abril_fatface.png"></div>\n <div data-provider="google" data-font-family="Advent Pro, sans-serif" data-font-style="300"><div></div><img src="').concat(e, 'advent_pro.png"></div>\n <div data-provider="google" data-font-family="Aladin, cursive"><div></div><img src="').concat(e, 'aladin.png"></div>\n <div data-provider="google" data-font-family="Alegreya, serif" data-font-style="400,400i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'alegreya.png"></div>\n <div data-provider="google" data-font-family="Alegreya Sans SC, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'alegreya_sans_sc.png"></div>\n <div data-provider="google" data-font-family="Alegreya SC, serif" data-font-style="400,400i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'alegreya_sc.png"></div>\n <div data-provider="google" data-font-family="Alice, serif"><div></div><img src="').concat(e, 'alice.png"></div>\n <div data-provider="google" data-font-family="Allerta Stencil, sans-serif"><div></div><img src="').concat(e, 'allerta_stencil.png"></div>\n <div data-provider="google" data-font-family="Allura, cursive"><div></div><img src="').concat(e, 'allura.png"></div>\n <div data-provider="google" data-font-family="Almendra Display, cursive"><div></div><img src="').concat(e, 'almendra_display.png"></div>\n <div data-provider="google" data-font-family="Amatic SC, cursive" data-font-style="400,700"><div></div><img src="').concat(e, 'amatic_sc.png"></div>\n <div data-provider="google" data-font-family="Andika, sans-serif"><div></div><img src="').concat(e, 'andika.png"></div>\n <div data-provider="google" data-font-family="Anonymous Pro, monospace" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'anonymous_pro.png"></div>\n <div data-provider="google" data-font-family="Architects Daughter, cursive"><div></div><img src="').concat(e, 'architects_daughter.png"></div>\n <div data-provider="google" data-font-family="Arimo, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'arimo.png"></div>\n <div data-provider="google" data-font-family="Arsenal, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'arsenal.png"></div>\n <div data-provider="google" data-font-family="Assistant" data-font-style="300,700"><div></div><img src="').concat(e, 'assistant.png"></div>\n <div data-provider="google" data-font-family="Aubrey, cursive"><div></div><img src="').concat(e, 'aubrey.png"></div>\n <div data-provider="google" data-font-family="Anton, sans-serif"><div></div><img src="').concat(e, 'anton.png"></div>\n <div data-provider="google" data-font-family="Archivo Narrow, sans-serif"><div></div><img src="').concat(e, 'archivo_narrow.jpg"></div>\n <div data-provider="google" data-font-family="Bad Script, cursive"><div></div><img src="').concat(e, 'bad_script.jpg"></div>\n <div data-provider="google" data-font-family="BenchNine, sans-serif"><div></div><img src="').concat(e, 'benchNine.jpg"></div>\n <div data-provider="google" data-font-family="Bevan, cursive"><div></div><img src="').concat(e, 'bevan.png"></div>\n <div data-provider="google" data-font-family="Bigelow Rules, cursive"><div></div><img src="').concat(e, 'bigelow_rules.png"></div>\n <div data-provider="google" data-font-family="Bilbo, cursive"><div></div><img src="').concat(e, 'bilbo.jpg"></div>\n <div data-provider="google" data-font-family="Bonbon, cursive"><div></div><img src="').concat(e, 'bonbon.jpg"></div>\n <div data-provider="google" data-font-family="Bowlby One SC, cursive"><div></div><img src="').concat(e, 'bowlby_one_sc.jpg"></div>\n <div data-provider="google" data-font-family="Cabin Condensed, sans-serif"><div></div><img src="').concat(e, 'cabin_condensed.jpg"></div>\n <div data-provider="google" data-font-family="Carrois Gothic SC, sans-serif"><div></div><img src="').concat(e, 'carrois_gothic_sc.jpg"></div>\n <div data-provider="google" data-font-family="Caveat, cursive" data-font-style="400,700"><div></div><img src="').concat(e, 'caveat.png"></div>\n <div data-provider="google" data-font-family="Chewy, cursive"><div></div><img src="').concat(e, 'chewy.png"></div>\n <div data-provider="google" data-font-family="Cinzel, serif"><div></div><img src="').concat(e, 'cinzel.jpg"></div>\n <div data-provider="google" data-font-family="Comfortaa, cursive" data-font-style="300"><div></div><img src="').concat(e, 'comfortaa.jpg"></div>\n <div data-provider="google" data-font-family="Concert One, cursive"><div></div><img src="').concat(e, 'concert_one.jpg"></div>\n <div data-provider="google" data-font-family="Cormorant, serif" data-font-style="300,300i,600,600i,700,700i"><div></div><img src="').concat(e, 'cormorant.png"></div>\n <div data-provider="google" data-font-family="Cormorant Garamond, serif" data-font-style="300,300i,600,600i,700,700i"><div></div><img src="').concat(e, 'cormorant_garamond.png"></div>\n <div data-provider="google" data-font-family="Cormorant Infant, serif" data-font-style="300,300i,600,600i,700,700i"><div></div><img src="').concat(e, 'cormorant_infant.png"></div>\n <div data-provider="google" data-font-family="Cormorant SC, serif" data-font-style="300,600,700"><div></div><img src="').concat(e, 'cormorant_sc.png"></div>\n <div data-provider="google" data-font-family="Cormorant Unicase, serif" data-font-style="300,600,700"><div></div><img src="').concat(e, 'cormorant_unicase.png"></div>\n <div data-provider="google" data-font-family="Cousine" data-font-style="400,700"><div></div><img src="').concat(e, 'cousine.png"></div>\n <div data-provider="google" data-font-family="Crafty Girls, cursive"><div></div><img src="').concat(e, 'crafty_girls.png"></div>\n <div data-provider="google" data-font-family="Cuprum, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'cuprum.png"></div>\n <div data-provider="google" data-font-family="Cutive Mono, monospace"><div></div><img src="').concat(e, 'cutive_mono.png"></div>\n <div data-provider="google" data-font-family="Devonshire, cursive"><div></div><img src="').concat(e, 'devonshire.jpg"></div>\n <div data-provider="google" data-font-family="Didact Gothic, sans-serif"><div></div><img src="').concat(e, 'didact_gothic.jpg"></div>\n <div data-provider="google" data-font-family="Diplomata SC, cursive"><div></div><img src="').concat(e, 'diplomata_sc.jpg"></div>\n <div data-provider="google" data-font-family="Dosis, sans-serif" data-font-style="200"><div></div><img src="').concat(e, 'dosis.jpg"></div>\n <div data-provider="google" data-font-family="EB Garamond, serif" data-font-style="400,400i,600,600i,700,700i,800,800i"><div></div><img src="').concat(e, 'eb_garamond.png"></div>\n <div data-provider="google" data-font-family="El Messiri, sans-serif" data-font-style="400,600,700"><div></div><img src="').concat(e, 'el_messiri.png"></div>\n <div data-provider="google" data-font-family="Elsie, cursive" data-font-style="400,900"><div></div><img src="').concat(e, 'elsie.png"></div>\n <div data-provider="google" data-font-family="Encode Sans, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'encode_sans.png"></div>\n <div data-provider="google" data-font-family="Exo, sans-serif" data-font-style="100"><div></div><img src="').concat(e, 'exo.jpg"></div>\n <div data-provider="google" data-font-family="\'Exo 2\', sans-serif" data-font-style="200,200i,600,600i,700,700i,800,800i,900,900i" data-font-display="swap"><div></div><img src="').concat(e, 'exo_2.png"></div>\n <div data-provider="google" data-font-family="Felipa, cursive"><div></div><img src="').concat(e, 'felipa.jpg"></div>\n <div data-provider="google" data-font-family="Fira Code, monospace" data-font-style="300,500,600,700"><div></div><img src="').concat(e, 'fira_code.png"></div>\n <div data-provider="google" data-font-family="Fira Mono, monospace" data-font-style="400,500,700"><div></div><img src="').concat(e, 'fira_mono.png"></div>\n <div data-provider="google" data-font-family="Fira Sans, sans-serif" data-font-style="200,200i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'fira_sans.png"></div>\n <div data-provider="google" data-font-family="Fira Sans Condensed, sans-serif" data-font-style="200,200i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'fira_sans_condensed.png"></div>\n <div data-provider="google" data-font-family="Fira Sans Extra Condensed, sans-serif" data-font-style="200,200i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'fira_sans_extra_condensed.png"></div>\n <div data-provider="google" data-font-family="Fjalla One, sans-serif"><div></div><img src="').concat(e, 'fjalla_one.png"></div>\n <div data-provider="google" data-font-family="Forum, cursive"><div></div><img src="').concat(e, 'forum.png"></div>\n <div data-provider="google" data-font-family="Frank Ruhl Libre" data-font-style="300,700"><div></div><img src="').concat(e, 'frank_ruhl_libre.png"></div>\n <div data-provider="google" data-font-family="Fredericka the Great, cursive"><div></div><img src="').concat(e, 'fredericka_the_great.jpg"></div>\n <div data-provider="google" data-font-family="Gabriela, serif"><div></div><img src="').concat(e, 'gabriela.png"></div>\n <div data-provider="google" data-font-family="Gilda Display, serif"><div></div><img src="').concat(e, 'gilda_display.jpg"></div>\n <div data-provider="google" data-font-family="Give You Glory, cursive"><div></div><img src="').concat(e, 'give_you_glory.jpg"></div>\n <div data-provider="google" data-font-family="Gruppo, cursive"><div></div><img src="').concat(e, 'gruppo.png"></div>\n <div data-provider="google" data-font-family="Handlee, cursive"><div></div><img src="').concat(e, 'handlee.jpg"></div>\n <div data-provider="google" data-font-family="Happy Monkey, cursive"><div></div><img src="').concat(e, 'happy_monkey.jpg"></div>\n <div data-provider="google" data-font-family="Hind" data-font-style="300,700"><div></div><img src="').concat(e, 'hind.png"></div>\n <div data-provider="google" data-font-family="IBM Plex Mono, monospace" data-font-style="300,300i,500,500i,600,600i,700,700i"><div></div><img src="').concat(e, 'ibm_plex_mono.png"></div>\n <div data-provider="google" data-font-family="IBM Plex Sans, sans-serif" data-font-style="300,300i,500,500i,600,600i,700,700i"><div></div><img src="').concat(e, 'ibm_plex_sans.png"></div>\n <div data-provider="google" data-font-family="IBM Plex Serif, serif" data-font-style="300,300i,500,500i,600,600i,700,700i"><div></div><img src="').concat(e, 'ibm_plex_serif.png"></div>\n <div data-provider="google" data-font-family="Iceland, cursive"><div></div><img src="').concat(e, 'iceland.png"></div>\n <div data-provider="google" data-font-family="Inconsolata, monospace" data-font-style="400,700"><div></div><img src="').concat(e, 'inconsolata.png"></div>\n <div data-provider="google" data-font-family="Josefin Sans, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'josefin_sans.jpg"></div>\n <div data-provider="google" data-font-family="Istok Web, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'istok_web.png"></div>\n <div data-provider="google" data-font-family="Julee, cursive"><div></div><img src="').concat(e, 'julee.png"></div>\n <div data-provider="google" data-font-family="Julius Sans One, sans-serif"><div></div><img src="').concat(e, 'julius_sans_one.jpg"></div>\n <div data-provider="google" data-font-family="Junge, serif"><div></div><img src="').concat(e, 'junge.jpg"></div>\n <div data-provider="google" data-font-family="Jura, sans-serif" data-font-style="300,600,700"><div></div><img src="').concat(e, 'jura.png"></div>\n <div data-provider="google" data-font-family="Just Me Again Down Here, cursive"><div></div><img src="').concat(e, 'just_me_again_down_here.png"></div>\n <div data-provider="google" data-font-family="Kaushan Script, cursive"><div></div><img src="').concat(e, 'kaushan_script.png"></div>\n <div data-provider="google" data-font-family="Kelly Slab, cursive"><div></div><img src="').concat(e, 'kelly_slab.png"></div>\n <div data-provider="google" data-font-family="Kite One, sans-serif"><div></div><img src="').concat(e, 'kite_one.jpg"></div>\n <div data-provider="google" data-font-family="Kosugi, sans-serif"><div></div><img src="').concat(e, 'kosugi.png"></div>\n <div data-provider="google" data-font-family="Kosugi Maru, sans-serif"><div></div><img src="').concat(e, 'kosugi_maru.png"></div>\n <div data-provider="google" data-font-family="Kurale, serif"><div></div><img src="').concat(e, 'kurale.png"></div>\n <div data-provider="google" data-font-family="Lato, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'lato.png"></div>\n <div data-provider="google" data-font-family="Ledger, serif" data-font-style="300,700" data-font-display="swap"><div></div><img src="').concat(e, 'ledger.png"></div>\n <div data-provider="google" data-font-family="Lekton, sans-serif" data-font-style="400,700"><div></div><img src="').concat(e, 'lekton.png"></div>\n <div data-provider="google" data-font-family="Life Savers, cursive"><div></div><img src="').concat(e, 'life_savers.jpg"></div>\n <div data-provider="google" data-font-family="Literata, serif" data-font-style="400,400i,600,600i,700,700i"><div></div><img src="').concat(e, 'literata.png"></div>\n <div data-provider="google" data-font-family="Lobster, cursive"><div></div><img src="').concat(e, 'lobster.png"></div>\n <div data-provider="google" data-font-family="Lobster Two, cursive"><div></div><img src="').concat(e, 'lobster_two.jpg"></div>\n <div data-provider="google" data-font-family="Londrina Shadow, cursive"><div></div><img src="').concat(e, 'londrina_shadow.jpg"></div>\n <div data-provider="google" data-font-family="Lora, serif" data-font-style="400,700"><div></div><img src="').concat(e, 'lora.png"></div>\n <div data-provider="google" data-font-family="Lovers Quarrel, cursive"><div></div><img src="').concat(e, 'lovers_quarrel.jpg"></div>\n <div data-provider="google" data-font-family="\'M PLUS 1p\', sans-serif" data-font-style="300,500,700,800,900" data-font-display="swap"><div></div><img src="').concat(e, 'm_plus_1p.png"></div>\n <div data-provider="google" data-font-family="\'M PLUS Rounded 1c\', sans-serif" data-font-style="300,500,700,800,900" data-font-display="swap"><div></div><img src="').concat(e, 'm_plus_rounded_1c.png"></div>\n <div data-provider="google" data-font-family="Macondo, cursive"><div></div><img src="').concat(e, 'macondo.png"></div>\n <div data-provider="google" data-font-family="Marcellus SC, serif"><div></div><img src="').concat(e, 'marcellus_sc.jpg"></div>\n <div data-provider="google" data-font-family="Marck Script, cursive"><div></div><img src="').concat(e, 'marck_script.png"></div>\n <div data-provider="google" data-font-family="Martel, serif" data-font-style="300,700"><div></div><img src="').concat(e, 'martel.png"></div>\n <div data-provider="google" data-font-family="Maven Pro, sans-serif"><div></div><img src="').concat(e, 'maven_pro.png"></div>\n <div data-provider="google" data-font-family="Merriweather, serif" data-font-style="300,700"><div></div><img src="').concat(e, 'merriweather.png"></div>\n <div data-provider="google" data-font-family="Merriweather Sans" data-font-style="300,700"><div></div><img src="').concat(e, 'merriweather_sans.png"></div>\n <div data-provider="google" data-font-family="Monoton, cursive"><div></div><img src="').concat(e, 'monoton.png"></div>\n <div data-provider="google" data-font-family="Montez, cursive"><div></div><img src="').concat(e, 'montez.png"></div>\n <div data-provider="google" data-font-family="Montserrat, sans-serif" data-font-style="300,400,700"><div></div><img src="').concat(e, 'montserrat.png"></div>\n <div data-provider="google" data-font-family="Montserrat Alternates, sans-serif" data-font-style="300,300i,500,500i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'montserrat_alternates.png"></div>\n <div data-provider="google" data-font-family="Montserrat Subrayada, sans-serif"><div></div><img src="').concat(e, 'montserrat_subrayada.jpg"></div>\n <div data-provider="google" data-font-family="Muli, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'muli.png"></div>\n <div data-provider="google" data-font-family="Neucha, cursive"><div></div><img src="').concat(e, 'neucha.png"></div>\n <div data-provider="google" data-font-family="Neuton, serif" data-font-style="200,700"><div></div><img src="').concat(e, 'neuton.png"></div>\n <div data-provider="google" data-font-family="Nixie One, cursive"><div></div><img src="').concat(e, 'nixie_one.png"></div>\n <div data-provider="google" data-font-family="Nothing You Could Do, cursive"><div></div><img src="').concat(e, 'nothing_you_could_do.jpg"></div>\n <div data-provider="google" data-font-family="Noto Sans, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'noto_sans.png"></div>\n <div data-provider="google" data-font-family="Noto Sans SC, sans-serif" data-font-style="300,500,700,900"><div></div><img src="').concat(e, 'noto_sans_sc.png"></div>\n <div data-provider="google" data-font-family="Noto Serif, serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'noto_serif.png"></div>\n <div data-provider="google" data-font-family="Noto Serif TC, serif" data-font-style="300,600,700,900"><div></div><img src="').concat(e, 'noto_serif_tc.png"></div>\n <div data-provider="google" data-font-family="Nunito, sans-serif" data-font-style="200,200i,600,600i,700,700i,800,800i,900,900i"><div></div><img src="').concat(e, 'nunito.png"></div>\n <div data-provider="google" data-font-family="Old Standard TT, serif" data-font-style="400,400i,700"><div></div><img src="').concat(e, 'old_standard_tt.png"></div>\n <div data-provider="google" data-font-family="Open Sans, sans-serif" data-font-style="300,400,600,800"><div></div><img src="').concat(e, 'open_sans.jpg"></div>\n <div data-provider="google" data-font-family="Open Sans Condensed, sans-serif" data-font-style="300,300i,700"><div></div><img src="').concat(e, 'open_sans_condensed.png"></div>\n <div data-provider="google" data-font-family="Oranienbaum, serif"><div></div><img src="').concat(e, 'oranienbaum.jpg"></div>\n <div data-provider="google" data-font-family="Oswald, sans-serif" data-font-style="300,400,700"><div></div><img src="').concat(e, 'oswald.png"></div>\n <div data-provider="google" data-font-family="Oxygen, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'oxygen.png"></div>\n <div data-provider="google" data-font-family="Pacifico, cursive"><div></div><img src="').concat(e, 'pacifico.png"></div>\n <div data-provider="google" data-font-family="Pangolin, cursive"><div></div><img src="').concat(e, 'pangolin.png"></div>\n <div data-provider="google" data-font-family="Passion One, cursive"><div></div><img src="').concat(e, 'passion_one.jpg"></div>\n <div data-provider="google" data-font-family="Pathway Gothic One, sans-serif"><div></div><img src="').concat(e, 'pathway_gothic_one.png"></div>\n <div data-provider="google" data-font-family="Pattaya, sans-serif"><div></div><img src="').concat(e, 'pattaya.png"></div>\n <div data-provider="google" data-font-family="Petit Formal Script, cursive"><div></div><img src="').concat(e, 'petit_formal_script.png"></div>\n <div data-provider="google" data-font-family="Philosopher, sans-serif"><div></div><img src="').concat(e, 'philosopher.jpg"></div>\n <div data-provider="google" data-font-family="Play, sans-serif" data-font-style="400,700"><div></div><img src="').concat(e, 'play.png"></div>\n <div data-provider="google" data-font-family="Playfair Display, serif" data-font-style="400,400i,700,700i,900,900i"><div></div><img src="').concat(e, 'playfair_display.png"></div>\n <div data-provider="google" data-font-family="Playfair Display SC, serif" data-font-style="400,400i,700,700i,900,900i"><div></div><img src="').concat(e, 'playfair_display_sc.png"></div>\n <div data-provider="google" data-font-family="Podkova, serif" data-font-style="400,600,700,800"><div></div><img src="').concat(e, 'podkova.png"></div>\n <div data-provider="google" data-font-family="Poiret One, cursive"><div></div><img src="').concat(e, 'poiret_one.jpg"></div>\n <div data-provider="google" data-font-family="Pompiere, cursive"><div></div><img src="').concat(e, 'pompiere.png"></div>\n <div data-provider="google" data-font-family="Poppins, sans-serif" data-font-style="400,600"><div></div><img src="').concat(e, 'poppins.png"></div>\n <div data-provider="google" data-font-family="Prata, serif"><div></div><img src="').concat(e, 'prata.png"></div>\n <div data-provider="google" data-font-family="\'Press Start 2P\', cursive" data-font-display="swap"><div></div><img src="').concat(e, 'press_start_2p.png"></div>\n <div data-provider="google" data-font-family="Prosto One, cursive"><div></div><img src="').concat(e, 'prosto_one.png"></div>\n <div data-provider="google" data-font-family="PT Mono, monospace"><div></div><img src="').concat(e, 'pt_mono.png"></div>\n <div data-provider="google" data-font-family="PT Sans, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'pt_sans.png"></div>\n <div data-provider="google" data-font-family="PT Sans Caption, sans-serif" data-font-style="400,700"><div></div><img src="').concat(e, 'pt_sans_caption.png"></div>\n <div data-provider="google" data-font-family="PT Sans Narrow, sans-serif" data-font-style="400,700"><div></div><img src="').concat(e, 'pt_sans_narrow.png"></div>\n <div data-provider="google" data-font-family="PT Serif, serif" data-font-style="400,700"><div></div><img src="').concat(e, 'pt_serif.png"></div>\n <div data-provider="google" data-font-family="PT Serif Caption, serif" data-font-style="400,700"><div></div><img src="').concat(e, 'pt_serif_caption.png"></div>\n <div data-provider="google" data-font-family="Quattrocento Sans, sans-serif"><div></div><img src="').concat(e, 'quattrocento_sans.jpg"></div>\n <div data-provider="google" data-font-family="Quattrocento, serif"><div></div><img src="').concat(e, 'quattrocento.jpg"></div>\n <div data-provider="google" data-font-family="Quicksand, sans-serif"><div></div><img src="').concat(e, 'quicksand.jpg"></div>\n <div data-provider="google" data-font-family="Qwigley, cursive"><div></div><img src="').concat(e, 'qwigley.jpg"></div>\n <div data-provider="google" data-font-family="Raleway, sans-serif" data-font-style="100"><div></div><img src="').concat(e, 'raleway.png"></div>\n <div data-provider="google" data-font-family="Raleway Dots, sans-serif"><div></div><img src="').concat(e, 'raleway_dots.png"></div>\n <div data-provider="google" data-font-family="Redressed, cursive"><div></div><img src="').concat(e, 'redressed.jpg"></div>\n <div data-provider="google" data-font-family="Ribeye Marrow, cursive"><div></div><img src="').concat(e, 'ribeye_marrow.png"></div>\n <div data-provider="google" data-font-family="Righteous, cursive"><div></div><img src="').concat(e, 'righteous.png"></div>\n <div data-provider="google" data-font-family="Roboto, sans-serif" data-font-style="300"><div></div><img src="').concat(e, 'roboto.jpg"></div>\n <div data-provider="google" data-font-family="Roboto Condensed, sans-serif" data-font-style="300,300i,700,700i"><div></div><img src="').concat(e, 'roboto_condensed.png"></div>\n <div data-provider="google" data-font-family="Roboto Mono, monospace" data-font-style="300,700"><div></div><img src="').concat(e, 'roboto_mono.png"></div>\n <div data-provider="google" data-font-family="Roboto Slab, serif" data-font-style="200,600,700,800,900"><div></div><img src="').concat(e, 'roboto_slab.png"></div>\n <div data-provider="google" data-font-family="Rochester, cursive"><div></div><img src="').concat(e, 'rochester.png"></div>\n <div data-provider="google" data-font-family="Rouge Script, cursive"><div></div><img src="').concat(e, 'rouge_script.png"></div>\n <div data-provider="google" data-font-family="Rubik, sans-serif" data-font-style="300,300i,500,500i,700,700i,900,900i"><div></div><img src="').concat(e, 'rubik.png"></div>\n <div data-provider="google" data-font-family="Rubik Mono One, sans-serif"><div></div><img src="').concat(e, 'rubik_mono_one.png"></div>\n <div data-provider="google" data-font-family="Ruslan Display, cursive"><div></div><img src="').concat(e, 'ruslan_display.png"></div>\n <div data-provider="google" data-font-family="Russo One, sans-serif"><div></div><img src="').concat(e, 'russo_one.png"></div>\n <div data-provider="google" data-font-family="Sacramento, cursive"><div></div><img src="').concat(e, 'sacramento.jpg"></div>\n <div data-provider="google" data-font-family="Sanchez, serif"><div></div><img src="').concat(e, 'sanchez.jpg"></div>\n <div data-provider="google" data-font-family="Satisfy, cursive"><div></div><img src="').concat(e, 'satisfy.jpg"></div>\n <div data-provider="google" data-font-family="Sawarabi Gothic, sans-serif"><div></div><img src="').concat(e, 'sawarabi_gothic.png"></div>\n <div data-provider="google" data-font-family="Scada, sans-serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'scada.png"></div>\n <div data-provider="google" data-font-family="Seaweed Script, cursive"><div></div><img src="').concat(e, 'seaweed_script.jpg"></div>\n <div data-provider="google" data-font-family="Seymour One, sans-serif"><div></div><img src="').concat(e, 'seymour_one.jpg"></div>\n <div data-provider="google" data-font-family="Shadows Into Light Two, cursive"><div></div><img src="').concat(e, 'shadows_into_light_two.jpg"></div>\n <div data-provider="google" data-font-family="Six Caps, sans-serif"><div></div><img src="').concat(e, 'six_caps.png"></div>\n <div data-provider="google" data-font-family="Snowburst One, cursive"><div></div><img src="').concat(e, 'snowburst_one.jpg"></div>\n <div data-provider="google" data-font-family="Source Code Pro, monospace" data-font-style="300,700"><div></div><img src="').concat(e, 'source_code_pro.png"></div>\n <div data-provider="google" data-font-family="Source Sans Pro, sans-serif" data-font-style="200"><div></div><img src="').concat(e, 'source_sans_pro.jpg"></div>\n <div data-provider="google" data-font-family="Special Elite, cursive"><div></div><img src="').concat(e, 'special_elite.jpg"></div>\n <div data-provider="google" data-font-family="Spectral, serif" data-font-style="200,200i,600,600i,700,700i,800,800i"><div></div><img src="').concat(e, 'spectral.png"></div>\n <div data-provider="google" data-font-family="Spectral SC, serif" data-font-style="300,300i,600,600i,700,700i,800,800i"><div></div><img src="').concat(e, 'spectral_sc.png"></div>\n <div data-provider="google" data-font-family="Squada One, cursive"><div></div><img src="').concat(e, 'squada_one.jpg"></div>\n <div data-provider="google" data-font-family="Stalinist One, cursive"><div></div><img src="').concat(e, 'stalinist_one.png"></div>\n <div data-provider="google" data-font-family="Stint Ultra Expanded, cursive"><div></div><img src="').concat(e, 'stint_ultra_expanded.jpg"></div>\n <div data-provider="google" data-font-family="Syncopate, sans-serif"><div></div><img src="').concat(e, 'syncopate.png"></div>\n <div data-provider="google" data-font-family="Tangerine, cursive"><div></div><img src="').concat(e, 'tangerine.png"></div>\n <div data-provider="google" data-font-family="Tenor Sans, sans-serif"><div></div><img src="').concat(e, 'tenor_sans.png"></div>\n <div data-provider="google" data-font-family="Tinos, serif" data-font-style="400,400i,700,700i"><div></div><img src="').concat(e, 'tinos.png"></div>\n <div data-provider="google" data-font-family="Ubuntu, sans-serif" data-font-style="300,300i,500,500i,700,700i"><div></div><img src="').concat(e, 'ubuntu.png"></div>\n <div data-provider="google" data-font-family="Ubuntu Condensed, sans-serif"><div></div><img src="').concat(e, 'ubuntu_condensed.png"></div>\n <div data-provider="google" data-font-family="Ubuntu Mono, monospace" data-font-style="400,700"><div></div><img src="').concat(e, 'ubuntu_mono.png"></div>\n <div data-provider="google" data-font-family="Underdog, cursive"><div></div><img src="').concat(e, 'underdog.png"></div>\n <div data-provider="google" data-font-family="UnifrakturMaguntia, cursive"><div></div><img src="').concat(e, 'unifrakturmaguntia.png"></div>\n <div data-provider="google" data-font-family="Vast Shadow, cursive"><div></div><img src="').concat(e, 'vast_shadow.png"></div>\n <div data-provider="google" data-font-family="Viga, sans-serif"><div></div><img src="').concat(e, 'viga.jpg"></div>\n <div data-provider="google" data-font-family="Vollkorn, serif" data-font-style="400,400i,600,600i,700,700i,900,900i"><div></div><img src="').concat(e, 'vollkorn.png"></div>\n <div data-provider="google" data-font-family="Vollkorn SC, serif" data-font-style="400,600,700,900"><div></div><img src="').concat(e, 'vollkorn_sc.png"></div>\n <div data-provider="google" data-font-family="Voltaire, sans-serif"><div></div><img src="').concat(e, 'voltaire.jpg"></div>\n <div data-provider="google" data-font-family="Wire One, sans-serif"><div></div><img src="').concat(e, 'wire_one.png"></div>\n <div data-provider="google" data-font-family="Yanone Kaffeesatz, sans-serif" data-font-style="300,700"><div></div><img src="').concat(e, 'yanone_kaffeesatz.png"></div>\n <div data-provider="google" data-font-family="Yeseva One, cursive"><div></div><img src="').concat(e, "yeseva_one.png\"></div>\n </div>\n\n <script type=\"text/javascript\">\n var elms = document.querySelectorAll('#divFontList > div');\n for(var i=0;i<elms.length;i++) {\n elms[i].addEventListener('click', function(e){\n\n var elm = e.target.parentNode;\n var on = false;\n if(elm.className) {\n if(elm.className.indexOf('on')!==-1) {\n on = true;\n }\n }\n if(on) {\n parent._cb.clearFont();\n } else {\n var provider = elm.getAttribute('data-provider');\n var fontfamily = elm.getAttribute('data-font-family');\n var fontstyle = elm.getAttribute('data-font-style');\n var fontdisplay = elm.getAttribute('data-font-display');\n //parent._cb.applyFont(fontfamily, fontstyle, provider);\n parent._cb.setFont(fontfamily, fontstyle, fontdisplay, provider);\n }\n\n });\n }\n\n <\/script>\n \n </body>\n </html>\n \n \n ")
}
}, {
key: "getFontFamilyEmail",
value: function () {
var e = this.builder.fontAssetPath;
return '\n <!DOCTYPE HTML>\n <html>\n <head>\n <meta charset="utf-8">\n <title>Fonts</title>\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="description" content=""> \n <style>\n html, body {height:100%}\n body {overflow:hidden;margin:0;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size:100%; \n line-height:1.7;\n }\n #divFontList {margin:0;padding:9px 11px 9px 9px;height:100%;overflow-y:scroll !important;box-sizing:border-box;}\n #divFontList > div {width:100%;cursor:pointer;overflow:hidden;text-align:center;position:relative;}\n #divFontList > div img {margin:7px 5px 0px 5px;max-width: 230px;max-height: 27px;}\n #divFontList > div.on div {\n background:rgba(0,0,0,0.03);; \n }\n #divFontList > div div {position:absolute;top:0;left:0;width:100%;height:100%;}\n #divFontList > div:hover div {background:rgba(0,0,0,0.03);}\n </style>\n </head>\n <body>\n\n <div id="divFontList">\n <div data-provider="" data-font-family="" style="font-size:12px;padding:10px 7px;box-sizing:border-box;"><div></div>None</div>\n <div data-provider="" data-font-family="Arial, sans-serif"><div></div><img src="'.concat(e, 'arial.png"></div>\n <div data-provider="" data-font-family="courier"><div></div><img src="').concat(e, 'courier.png"></div>\n <div data-provider="" data-font-family="Georgia, serif"><div></div><img src="').concat(e, 'georgia.png"></div>\n \x3c!--<div data-provider="" data-font-family="Helvetica Neue, Helvetica, Arial, sans-serif"><div></div><img src="').concat(e, 'helvetica_neue.png"></div>--\x3e\n <div data-provider="" data-font-family="monospace"><div></div><img src="').concat(e, 'monospace.png"></div>\n <div data-provider="" data-font-family="sans-serif"><div></div><img src="').concat(e, 'sans_serif.png"></div>\n <div data-provider="" data-font-family="serif"><div></div><img src="').concat(e, "serif.png\"></div>\n </div>\n\n <script type=\"text/javascript\">\n var elms = document.querySelectorAll('#divFontList > div');\n for(var i=0;i<elms.length;i++) {\n elms[i].addEventListener('click', function(e){\n\n var elm = e.target.parentNode;\n var on = false;\n if(elm.className) {\n if(elm.className.indexOf('on')!==-1) {\n on = true;\n }\n }\n if(on) {\n parent._cb.clearFont();\n } else {\n var provider = elm.getAttribute('data-provider');\n var fontfamily = elm.getAttribute('data-font-family');\n var fontstyle = elm.getAttribute('data-font-style');\n var fontdisplay = elm.getAttribute('data-font-display');\n //parent._cb.applyFont(fontfamily, fontstyle, provider);\n parent._cb.setFont(fontfamily, fontstyle, fontdisplay, provider);\n }\n\n });\n }\n\n <\/script>\n \n </body>\n </html>\n \n \n ")
}
}]), e
}(),
v = function () {
function e() {
t(this, e)
}
return n(e, [{
key: "createElement",
value: function (e) {
return document.createElement(e)
}
}, {
key: "appendChild",
value: function (e, t) {
e.appendChild(t)
}
}, {
key: "appendHtml",
value: function (e, t) {
e.insertAdjacentHTML("beforeend", t)
}
}, {
key: "addEventListener",
value: function (e, t, i) {
e.addEventListener(t, i)
}
}, {
key: "addClass",
value: function (e, t) {
e && (this.hasClass(e, t) || (0 === e.classList.length ? e.className = t : e.className = e.className + " " + t, e.className = e.className.replace(/ +/g, " ")))
}
}, {
key: "removeClass",
value: function (e, t) {
if (e && e.classList.length > 0) {
var i, n, o, r, a = t.split(" ");
for (i = 0, o = a.length; i < o; ++i)
if (a[i]) {
var l = a[i],
s = "",
c = e.className.split(" ");
for (n = 0, r = c.length; n < r; ++n) c[n] && c[n] !== l && (s += c[n] + " ");
e.className = s.trim()
}
"" === e.className && e.removeAttribute("class")
}
}
}, {
key: "hasClass",
value: function (e, t) {
if (!e) return !1;
try {
var i = e.getAttribute("class");
return new RegExp("\\b" + t + "\\b").test(i)
} catch (e) {}
}
}, {
key: "moveAfter",
value: function (e, t) {
t.parentNode.insertBefore(e, t), t.parentNode.insertBefore(t, t.previousElementSibling)
}
}, {
key: "elementChildren",
value: function (e) {
for (var t = e.childNodes, i = [], n = t.length; n--;) 1 === t[n].nodeType && i.unshift(t[n]);
return i
}
}, {
key: "parentsHasClass",
value: function (e, t) {
for (; e;) {
if (!e.tagName) return !1;
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
if (this.hasClass(e, t)) return !0;
e = e.parentNode
}
}
}, {
key: "parentsHasId",
value: function (e, t) {
for (; e;) {
if (!e.tagName) return !1;
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
if (e.id === t) return !0;
e = e.parentNode
}
}
}, {
key: "parentsHasTag",
value: function (e, t) {
for (; e;) {
if (!e.tagName) return !1;
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
if (e.tagName.toLowerCase() === t.toLowerCase()) return !0;
e = e.parentNode
}
}
}, {
key: "parentsHasAttribute",
value: function (e, t) {
for (; e;) {
if (!e.tagName) return !1;
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
try {
if (e.hasAttribute(t)) return !0
} catch (e) {}
e = e.parentNode
}
}
}, {
key: "parentsHasElement",
value: function (e, t) {
for (; e;) {
if (!e.tagName) return !1;
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
if (!(e = e.parentNode)) return !1;
if (!e.tagName) return !1;
if (e.tagName.toLowerCase() === t) return !0
}
}
}, {
key: "removeClasses",
value: function (e, t) {
for (var i = 0; i < e.length; i++) e[i].classList.remove(t)
}
}, {
key: "removeAttributes",
value: function (e, t) {
for (var i = 0; i < e.length; i++) e[i].removeAttribute(t)
}
}, {
key: "removeElements",
value: function (e) {
Array.prototype.forEach.call(e, (function (e) {
e.parentNode.removeChild(e)
}))
}
}, {
key: "moveCursorToElement",
value: function (e) {
var t, i;
window.getSelection && document.createRange ? ((i = document.createRange()).selectNodeContents(e), i.collapse(!1), (t = window.getSelection()).removeAllRanges(), t.addRange(i)) : document.body.createTextRange && ((i = document.body.createTextRange()).moveToElementText(e), i.collapse(!1), i.select())
}
}, {
key: "selectElementContents",
value: function (e) {
var t = document.createRange();
t.selectNodeContents(e);
var i = window.getSelection();
i.removeAllRanges(), i.addRange(t)
}
}, {
key: "getSelected",
value: function () {
if (window.getSelection) return window.getSelection().toString();
if (document.getSelection) return document.getSelection().toString();
var e = document.selection && document.selection.createRange();
return !!e.text && e.text
}
}, {
key: "checkEditable",
value: function () {
try {
var e, t;
return window.getSelection ? e = 3 == (t = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? t.parentNode : t : document.selection && (t = document.selection.createRange(), e = document.selection.createRange().parentElement()), !!this.parentsHasAttribute(e, "contenteditable")
} catch (e) {
return !1
}
}
}, {
key: "textSelection",
value: function () {
try {
var e, t = window.getSelection().getRangeAt(0).commonAncestorContainer;
if (3 == t.nodeType) return e = t.parentNode, !!this.parentsHasClass(e, "is-builder") && e;
var i = (e = t).nodeName.toLowerCase();
return "i" === i && "" === e.innerHTML && this.parentsHasClass(e, "is-builder") ? e : ("p" === i || "h1" === i || "h2" === i || "h3" === i || "h4" === i || "h5" === i || "h6" === i || "li" === i || "pre" === i || "blockquote" === i) && e
} catch (e) {
return !1
}
}
}, {
key: "getStyle",
value: function (e, t) {
return window.getComputedStyle ? window.getComputedStyle(e, null).getPropertyValue(t) : e.style[t.replace(/-([a-z])/g, (function (e) {
return e[1].toUpperCase()
}))]
}
}]), e
}(),
h = new v,
f = {},
g = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i),
r = o.builderStuff(),
a = r.querySelector(".viewhtml");
if (!a) {
var l = '<div class="is-modal viewhtml">\n <div style="width:80%;max-width:1200px;height:80%;padding:0;box-sizing:border-box;position:relative;">\n <textarea class="tabSupport" style="width:100%;height:100%;border:none;border-bottom:60px solid transparent;margin:0;box-sizing:border-box;"></textarea>\n <button title="'.concat(o.out("Enlarge"), '" class="input-html-larger" style="width:35px;height:35px;position:absolute;right:20px;top:0;background:#fff;"><svg class="is-icon-flex" style="width:19px;height:19px;fill:rgb(170, 170, 170);"><use xlink:href="#ion-arrow-expand"></use></svg></button>\n <div class="is-modal-footer" style="width:100%;height:50px;position:absolute;left:0;bottom:0;border-top: #efefef 1px solid;overflow:hidden;text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), '</button>\n </div>\n </div>\n </div>\n \n <div class="is-modal viewhtmlformatted">\n <div style="width:80%;max-width:1200px;height:80%;padding:0;box-sizing:border-box;position:relative;overflow:hidden;">\n <iframe id="ifrHtmlFormatted" style="width:100%;height:100%;border:none;margin:0;box-sizing:border-box;" src="about:blank"></iframe>\n <textarea style="position:absolute;display:none;"></textarea>\n <button title=" out(\'Enlarge\') + \'" class="input-html-larger" style="width:35px;height:35px;position:absolute;right:20px;top:0;background:#fff;"><svg class="is-icon-flex" style="width:19px;height:19px;fill:rgb(170, 170, 170);"><use xlink:href="#ion-arrow-expand"></use></svg></button>\n <div class="is-modal-footer" style="display:none">\n <button class="input-cancel classic-secondary">Cancel</button>\n <button class="input-ok classic-primary">Ok</button>\n </div>\n </div>\n </div>\n\n <div class="is-modal viewhtmllarger" style="align-items:flex-end;z-index:10005;">\n <div style="width:100%;height:100%;border:none;padding:0;">\n <iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>\n </div>\n </div>\n\n <div class="is-modal viewhtmlnormal"">\n <div style="width:80%;max-width:1200px;height:80%;padding:0;box-sizing:border-box;position:relative;overflow:hidden;">\n <button title="').concat(o.out("Enlarge"), '" class="input-html-larger" style="width:35px;height:35px;position:absolute;right:20px;top:0;background:#fff;"><svg class="is-icon-flex" style="width:19px;height:19px;fill:rgb(170, 170, 170);"><use xlink:href="#ion-arrow-expand"></use></svg></button>\n <iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>\n </div>\n </div>\n \n ');
h.appendHtml(r, l), a = r.querySelector(".viewhtml");
var s = r.querySelector(".viewhtmlformatted"),
c = r.querySelector(".viewhtmlnormal"),
d = a.querySelector(".input-html-larger");
h.addEventListener(d, "click", (function () {
var e = a.querySelector("textarea");
e.setAttribute("data-source-active", "1"), e.setAttribute("data-source-ok", ".viewhtml .input-ok"), e.setAttribute("data-source-cancel", ".viewhtml .input-cancel"), n.viewHtmlLarger()
})), d = s.querySelector(".input-html-larger"), h.addEventListener(d, "click", (function () {
h.hasClass(s, "is-modal-full") ? h.removeClass(s, "is-modal-full") : h.addClass(s, "is-modal-full")
})), d = c.querySelector(".input-html-larger"), h.addEventListener(d, "click", (function () {
h.hasClass(c, "is-modal-full") ? h.removeClass(c, "is-modal-full") : h.addClass(c, "is-modal-full")
}))
}
}
return n(e, [{
key: "viewHtmlNormal",
value: function () {
var e = new p(this.builder),
t = e.builderStuff().querySelector(".viewhtmlnormal");
t.querySelector("iframe").outerHTML = '<iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>';
var i = t.querySelector("iframe").contentWindow.document;
i.open(), i.write(this.getIframeHtml()), i.close(), e.showModal(t, !0, null, !1)
}
}, {
key: "viewHtmlLarger",
value: function () {
var e = new p(this.builder),
t = e.builderStuff().querySelector(".viewhtmllarger");
t.querySelector("iframe").outerHTML = '<iframe id="ifrHtml" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>';
var i = t.querySelector("iframe").contentWindow.document;
i.open(), i.write(this.getIframeHtml()), i.close(), e.showModal(t, !0, null, !1)
}
}, {
key: "view",
value: function (e, t) {
var i, n = this,
o = new p(this.builder),
r = o.builderStuff();
if ((i = this.builder.opts.htmlSyntaxHighlighting ? r.querySelector(".viewhtmlformatted") : r.querySelector(".viewhtml")).querySelector(".is-modal-footer").innerHTML = '<button title="'.concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>"), o.showModal(i, !0), "cell" === e) {
var a = o.cellSelected();
if (!a) return;
i.querySelector("textarea").value = this.readHtml(a, !0)
}
if ("row" === e) {
var l = o.cellSelected();
if (!l) return;
var s = l.parentNode;
i.querySelector("textarea").value = this.readHtml(s, !0), h.removeClass(s, "row-outline");
var c = r.querySelector(".is-column-tool");
h.removeClass(c, "active")
}
if ("full" === e) {
if (t);
else {
var d = document.querySelectorAll(this.builder.opts.container);
if (d.length > 1) {
var u = o.cellSelected();
t = u ? u.parentNode.parentNode : d[0]
} else t = d[0];
if ("" !== this.builder.opts.page) {
var v = document.querySelector(this.builder.opts.page);
v && (t = v)
}
}
i.querySelector("textarea").value = this.readHtml(t, !0)
}
var f = i.querySelector(".input-ok");
if (h.addEventListener(f, "click", (function () {
n.builder.uo.saveForUndo();
var r = i.querySelector("textarea").value;
(r = n.fromViewToActual(r), "cell" === e) && (o.cellSelected().innerHTML = r, n.builder.applyBehavior(), n.builder.opts.onChange(), n.builder.opts.onRender());
"row" === e && (o.cellSelected().parentNode.innerHTML = r, n.builder.applyBehavior(), n.builder.opts.onChange(), n.builder.opts.onRender());
if ("full" === e) {
t.innerHTML = "";
var a = document.createRange();
a.setStart(t, 0), t.appendChild(a.createContextualFragment(r)), n.builder.applyBehavior(), n.builder.opts.onChange(), n.builder.opts.onRender(), o.clearActiveCell()
}
o.clearControls(), o.hideModal(i)
})), f = i.querySelector(".input-cancel"), h.addEventListener(f, "click", (function () {
o.hideModal(i)
})), this.builder.opts.htmlSyntaxHighlighting) {
var g = i.querySelector("textarea");
g.setAttribute("data-source-active", "1"), g.setAttribute("data-source-ok", ".viewhtmlformatted .input-ok"), g.setAttribute("data-source-cancel", ".viewhtmlformatted .input-cancel"), i.querySelector("iframe").outerHTML = '<iframe id="ifrHtmlFormatted" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>';
var m = i.querySelector("iframe").contentWindow.document;
m.open(), m.write(this.getIframeHtml()), m.close()
}
r.querySelector(".is-pop.columnmore").style.display = "", r.querySelector(".is-pop.rowmore").style.display = ""
}
}, {
key: "fromViewToActual",
value: function (e) {
for (var t in f) e = e.replace(t, f[t]);
return e
}
}, {
key: "readHtml",
value: function (e, t, i) {
var n = new p(this.builder),
o = n.builderStuff(),
r = o.querySelector("#tmp_content");
r && o.removeChild(r), (r = o.querySelector("#tmp_buildercontent")) && o.removeChild(r);
var a = '<div id="tmp_content" style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;visibility:hidden;"></div>\n <div id="tmp_buildercontent" style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;visibility:hidden;"></div>';
h.appendHtml(o, a);
var l = o.querySelector("#tmp_content");
l.innerHTML = e.innerHTML;
var s = l.querySelectorAll("[data-html]");
Array.prototype.forEach.call(s, (function (e) {
var t = 1,
i = e.querySelectorAll("[data-subblock]");
Array.prototype.forEach.call(i, (function (i) {
var n = i.innerHTML;
e.setAttribute("data-html-" + t, encodeURIComponent(n)), t++
}))
})), s = l.querySelectorAll("[data-html]"), Array.prototype.forEach.call(s, (function (e) {
var t = decodeURIComponent(e.getAttribute("data-html"));
t = t.replace(/{id}/g, n.makeId()), e.innerHTML = t;
var i = e.querySelectorAll("[data-subblock]"),
o = 1;
Array.prototype.forEach.call(i, (function (t) {
t.innerHTML = void 0 === e.getAttribute("data-html-" + o) ? "" : decodeURIComponent(e.getAttribute("data-html-" + o)), o++
}))
})), t && (f = {}, s = l.querySelectorAll("[data-html]"), Array.prototype.forEach.call(s, (function (e) {
var t = n.makeId();
f[t] = e.getAttribute("data-html"), e.setAttribute("data-html", t);
for (var i = 1; i <= 20; i++) void 0 !== e.getAttribute("data-html-" + i) && (t = n.makeId(), f[t] = e.getAttribute("data-html-" + i), e.getAttribute("data-html-" + i, t));
void 0 !== e.getAttribute("data-settings") && (t = n.makeId(), f[t] = e.getAttribute("data-settings"), e.getAttribute("data-settings", t))
})));
var c = l.querySelectorAll(".is-builder");
Array.prototype.forEach.call(c, (function (e) {
e.style.transform = "", e.style.WebkitTransform = "", e.style.MozTransform = "", e.removeAttribute("data-sort"), h.removeClass(e, "builder-active")
}));
var d = l.querySelectorAll(".sortable-chosen");
h.removeClasses(d, "sortable-chosen"), d = l.querySelectorAll(".sortable-ghost"), h.removeClasses(d, "sortable-ghost"), d = l.querySelectorAll(".elm-active"), h.removeClasses(d, "elm-active"), d = l.querySelectorAll(".elm-inspected"), h.removeClasses(d, "elm-inspected"), d = l.querySelectorAll(".cell-active"), h.removeClasses(d, "cell-active"), d = l.querySelectorAll(".row-active"), h.removeClasses(d, "row-active"), d = l.querySelectorAll(".row-outline"), h.removeClasses(d, "row-outline"), d = l.querySelectorAll(".is-builder"), h.removeClasses(d, "is-builder"), d = l.querySelectorAll(".row-outline"), h.removeClasses(d, "row-outline"), d = l.querySelectorAll("[data-click]"), h.removeAttributes(d, "data-click"), d = l.querySelectorAll("[contenteditable]"), h.removeAttributes(d, "contenteditable"), d = l.querySelectorAll("[draggridoutline]"), h.removeAttributes(d, "draggridoutline"), d = l.querySelectorAll("[between-blocks-left]"), h.removeAttributes(d, "between-blocks-left"), d = l.querySelectorAll("[between-blocks-center]"), h.removeAttributes(d, "between-blocks-center"), d = l.querySelectorAll("[hideelementhighlight]"), h.removeAttributes(d, "hideelementhighlight"), d = l.querySelectorAll("[data-module-active]"), h.removeAttributes(d, "data-module-active"), d = l.querySelectorAll("[hidesnippetaddtool]"), h.removeAttributes(d, "hidesnippetaddtool"), d = l.querySelectorAll("[gray]"), h.removeAttributes(d, "gray"), d = l.querySelectorAll("[rowoutline]"), h.removeAttributes(d, "rowoutline"), d = l.querySelectorAll("[grayoutline]"), h.removeAttributes(d, "grayoutline"), d = l.querySelectorAll("[hideoutline]"), h.removeAttributes(d, "hideoutline"), d = l.querySelectorAll("[leftrowtool]"), h.removeAttributes(d, "leftrowtool"), d = l.querySelectorAll("[minimal]"), h.removeAttributes(d, "minimal"), d = l.querySelectorAll("[clean]"), h.removeAttributes(d, "clean"), d = l.querySelectorAll("[grideditor]"), h.removeAttributes(d, "grideditor"), d = l.querySelectorAll("[gridoutline]"), h.removeAttributes(d, "gridoutline"), h.removeElements(l.querySelectorAll(".is-row-tool")), h.removeElements(l.querySelectorAll(".is-rowadd-tool")), h.removeElements(l.querySelectorAll(".ovl")), h.removeElements(l.querySelectorAll(".row-add-initial")), d = l.querySelectorAll(".aos-init"), h.removeClasses(d, "aos-init"), d = l.querySelectorAll(".aos-animate"), h.removeClasses(d, "aos-animate"), d = l.querySelectorAll(".skrollable"), h.removeClasses(d, "skrollable"), d = l.querySelectorAll(".skrollable-after"), h.removeClasses(d, "skrollable-after"), d = l.querySelectorAll(".skrollable-before"), h.removeClasses(d, "skrollable-before"), d = l.querySelectorAll(".skrollable-between"), h.removeClasses(d, "skrollable-between");
var u = l.querySelectorAll('[class=""]');
Array.prototype.forEach.call(u, (function (e) {
e.removeAttribute("class")
}));
var v = l.querySelectorAll('[style=""]');
Array.prototype.forEach.call(v, (function (e) {
e.removeAttribute("style")
})), d = l.querySelectorAll("[data-keep]"), h.removeAttributes(d, "data-keep");
var g = l.querySelectorAll("a");
if (Array.prototype.forEach.call(g, (function (e) {
"inline-block" === e.style.display && 1 === e.parentNode.childElementCount && "span" === e.parentNode.tagName.toLowerCase() && (e.parentNode.outerHTML = e.parentNode.innerHTML)
})), a = "", i) {
var m = l.querySelectorAll(".is-dummy");
h.removeElements(m), m = l.querySelectorAll(".is-animated"), Array.prototype.forEach.call(m, (function (e) {
h.removeClass(e, "animated"), h.removeClass(e, "pulse"), h.removeClass(e, "bounceIn"), h.removeClass(e, "fadeIn"), h.removeClass(e, "fadeOut"), h.removeClass(e, "fadeInDown"), h.removeClass(e, "fadeInLeft"), h.removeClass(e, "fadeInRight"), h.removeClass(e, "fadeInUp"), h.removeClass(e, "flipInX"), h.removeClass(e, "flipInY"), h.removeClass(e, "slideInUp"), h.removeClass(e, "slideInDown"), h.removeClass(e, "slideInLeft"), h.removeClass(e, "slideInRight"), h.removeClass(e, "zoomIn"), e.style.animationDelay = ""
})), m = l.querySelectorAll(".is-appeared"), Array.prototype.forEach.call(m, (function (e) {
h.removeClass(e, "is-appeared")
})), m = l.querySelectorAll(".box-active"), Array.prototype.forEach.call(m, (function (e) {
h.removeClass(e, "box-active")
})), m = l.querySelectorAll(".section-active"), Array.prototype.forEach.call(m, (function (e) {
h.removeClass(e, "section-active")
})), m = l.querySelectorAll(".is-section-tool"), h.removeElements(m);
var y = "",
b = "",
x = "";
h.elementChildren(l).forEach((function (e) {
var t = e;
if (h.hasClass(t, "is-section")) {
var i = "";
t.getAttribute("class") && (i = ' class="' + t.getAttribute("class") + '"');
var n = t.cloneNode(!0),
o = n.outerHTML;
a += o, -1 === i.indexOf("is-static") ? y += o + "\n\n" : b += o + "\n\n"
} else o = (n = t.cloneNode(!0)).outerHTML, a += o, x += o
})), "" !== b && (b = "\x3c!---FOOTER---\x3e\n" + b), "" !== x && (x = "\x3c!---OTHERS---\x3e\n" + x);
var w = document.querySelector("[data-contentbox"),
S = !1;
w && (S = w.settings.disableStaticSection), S || (a = y + b + x)
} else a = (a = l.innerHTML.trim()).replace(/<font/g, "<span").replace(/<\/font/g, "</span");
return (r = o.querySelector("#tmp_content")) && o.removeChild(r), (r = o.querySelector("#tmp_buildercontent")) && o.removeChild(r), a
}
}, {
key: "getIframeHtml",
value: function () {
return "\n <!DOCTYPE HTML>\n <html>\n <head>\n <meta charset=\"utf-8\">\n <title>Fonts</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <meta name=\"description\" content=\"\"> \n <link href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.css\" rel=\"stylesheet\" type=\"text/css\" />\n \n <style>\n html, body {height:100%}\n body {margin:0;overflow:hidden;}\n \n button {\n width: 51px;\n height: 45px;\n line-height:1;\n display: inline-block;\n box-sizing:border-box;\n margin: 0;\n padding: 0;\n cursor: pointer;\n background-color:#fff; \n color: #4a4a4a; \n border: 1px solid transparent;\n font-family: sans-serif;\n letter-spacing: 1px;\n font-size:12px;\n font-weight:normal;\n text-transform:uppercase;\n text-align:center; \n position:relative;\n border-radius: 0;\n transition: all ease 0.3s; \n user-select: none;\n -moz-user-select: none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n -o-user-select: none; \n }\n button.classic-primary {display:inline-block;width:auto;height:50px;padding-left:30px;padding-right:30px;min-width:135px;background: #f7f7f7;}\n button.classic-secondary {display:inline-block;width:auto;height:50px;padding-left:30px;padding-right:30px;background:transparent;}\n button.classic-primary:hover {background: #fafafa;}\n button:focus {outline:none;}\n textarea {font-family: courier;font-size: 17px;line-height: 2;letter-spacing: 1px;padding:8px 16px;box-sizing:border-box;border:1px solid rgb(199, 199, 199);}\n textarea:focus {outline:none} \n \n #code {display:none;}\n .CodeMirror {\n font-family: courier;\n font-size: 15px;\n line-height:1.9;\n width:100%;height:100%;\n }\n </style>\n </head>\n <body>\n <div style=\"position:absolute;top:0;left:0;width:100%;height:100%;border:none;border-bottom:50px solid transparent;box-sizing: border-box;\">\n <textarea id=\"code\"></textarea> \n </div>\n <div style=\"width:100%;height:50px;position:absolute;left:0;bottom:0;border-top: #efefef 1px solid;overflow:hidden;text-align:right\">\n <button title=\"Cancel\" class=\"input-cancel classic-secondary\">Cancel</button>\n <button title=\"Ok\" class=\"input-ok classic-primary\">Ok</button>\n </div>\n \n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.js\" type=\"text/javascript\"><\/script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/xml/xml.js\" type=\"text/javascript\"><\/script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/javascript/javascript.js\" type=\"text/javascript\"><\/script>\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/mode/css/css.js\" type=\"text/javascript\"><\/script>\n <script type=\"text/javascript\">\n \n var source = parent.document.querySelector('textarea[data-source-active]');\n var selectorOk = source.getAttribute('data-source-ok');\n var selectorCancel = source.getAttribute('data-source-cancel');\n \n var html = source.value;\n var myTextArea = document.querySelector('#code');\n myTextArea.value = html;\n \n var htmlEditor = CodeMirror.fromTextArea(myTextArea, {\n value: html,\n mode: \"text/html\",\n lineWrapping: true,\n lineNumbers: true,\n tabMode: \"indent\"\n });\n htmlEditor.on(\"change\", function (cm, change) {\n myTextArea.value = cm.getValue();\n });\n \n let elm = document.querySelector('.input-ok');\n elm.addEventListener('click', function(e){\n \n myTextArea.value = htmlEditor.getValue();\n \n var html = myTextArea.value;\n source.value = html;\n\n source.removeAttribute('data-source-active');\n source.removeAttribute('data-source-ok');\n source.removeAttribute('data-source-cancel');\n \n var modal = parent.document.querySelector('.viewhtmllarger');\n if(modal.className.indexOf('active')!==-1) {\n modal.className = modal.className.replace('active', '');\n } else {\n modal = parent.document.querySelector('.viewhtmlformatted');\n modal.className = modal.className.replace('active', '');\n }\n \n modal = parent.document.querySelector('.viewhtmlnormal');\n if(modal.className.indexOf('active')!==-1) {\n modal.className = modal.className.replace('active', '');\n }\n\n parent.document.querySelector(selectorOk).click();\n });\n \n elm = document.querySelector('.input-cancel');\n elm.addEventListener('click', function(e){\n source.removeAttribute('data-source-active');\n source.removeAttribute('data-source-ok');\n source.removeAttribute('data-source-cancel');\n \n var modal = parent.document.querySelector('.viewhtmllarger');\n if(modal.className.indexOf('active')!==-1) {\n modal.className = modal.className.replace('active', '');\n } else {\n modal = parent.document.querySelector('.viewhtmlformatted');\n modal.className = modal.className.replace('active', '');\n }\n \n modal = parent.document.querySelector('.viewhtmlnormal');\n if(modal.className.indexOf('active')!==-1) {\n modal.className = modal.className.replace('active', '');\n }\n\n parent.document.querySelector(selectorCancel).click();\n });\n \n <\/script>\n \n </body>\n </html>\n \n "
}
}]), e
}(),
m = new v,
y = function () {
function e(i) {
t(this, e), this.builder = i, this.undoList = []
}
return n(e, [{
key: "readStyles",
value: function () {
if (this.builder.opts.undoContainerOnly) return "";
var e, t, i = "",
n = document.getElementsByTagName("link");
for (e = 0; e < n.length; e++) - 1 != (t = n[e].href.toLowerCase()).indexOf("basetype-") && (i += n[e].outerHTML);
for (n = document.getElementsByTagName("link"), e = 0; e < n.length; e++) - 1 != (t = n[e].href.toLowerCase()).indexOf("basetype-") || -1 != t.indexOf("type-") && (i += n[e].outerHTML);
return i
}
}, {
key: "writeStyles",
value: function (e) {
if (!this.builder.opts.undoContainerOnly) {
var t, i, n = document.getElementsByTagName("link");
for (t = 0; t < n.length; t++) - 1 != (i = n[t].href.toLowerCase()).indexOf("basetype-") ? n[t].parentNode.removeChild(n[t]) : -1 != i.indexOf("type-") && n[t].parentNode.removeChild(n[t]);
var o = document.getElementsByTagName("head")[0];
m.appendHtml(o, e)
}
}
}, {
key: "readHtml",
value: function () {
var e = new g(this);
if ("" === this.builder.opts.page || this.builder.opts.undoContainerOnly) {
var t = document.querySelectorAll(this.builder.opts.container),
i = "";
return Array.prototype.forEach.call(t, (function (t) {
"" === i ? i = e.readHtml(t, !1) : i += "####|####" + e.readHtml(t, !1)
})), i
}
var n = document.querySelector(this.builder.opts.page);
return e.readHtml(n, !1)
}
}, {
key: "writeHtml",
value: function (e) {
if ("" === this.builder.opts.page || this.builder.opts.undoContainerOnly) {
var t = document.querySelectorAll(this.builder.opts.container),
i = 0;
Array.prototype.forEach.call(t, (function (t) {
var n = document.createRange();
t.innerHTML = "", t.appendChild(n.createContextualFragment(e.split("####|####")[i])), i++
}))
} else {
var n = document.querySelector(this.builder.opts.page),
o = document.createRange();
n.innerHTML = "", n.appendChild(o.createContextualFragment(e))
}
}
}, {
key: "saveForUndo",
value: function (e) {
if (this.builder.undoRedoStyles) {
if (this.undoList[120]) {
var t = this.undoList[120][0].split("###$###")[1];
if (this.builder.saveForUndoCheck && t === this.readHtml()) return void(this.builder.saveForUndoCheck = !0 === e)
}
} else if (this.undoList[120]) {
var i = this.undoList[120][0];
if (this.builder.saveForUndoCheck && i === this.readHtml()) return void(this.builder.saveForUndoCheck = !0 === e)
}
if (this.builder.saveForUndoCheck = !0 === e, this.undoList[140] = this.undoList[139], this.undoList[139] = this.undoList[138], this.undoList[138] = this.undoList[137], this.undoList[137] = this.undoList[136], this.undoList[136] = this.undoList[135], this.undoList[135] = this.undoList[134], this.undoList[134] = this.undoList[133], this.undoList[133] = this.undoList[132], this.undoList[132] = this.undoList[131], this.undoList[131] = this.undoList[130], this.undoList[130] = this.undoList[129], this.undoList[129] = this.undoList[128], this.undoList[128] = this.undoList[127], this.undoList[127] = this.undoList[126], this.undoList[126] = this.undoList[125], this.undoList[125] = this.undoList[124], this.undoList[124] = this.undoList[123], this.undoList[123] = this.undoList[122], this.undoList[122] = this.undoList[121], this.undoList[121] = this.undoList[120], this.builder.undoRedoStyles) {
var n = " " + this.readStyles() + "###$###" + this.readHtml();
this.undoList[120] = [n, null]
} else this.undoList[120] = [this.readHtml(), null]
}
}, {
key: "doUndo",
value: function () {
if (this.undoList[120] && !0 !== this.builder.undoRedoInProcess) {
if (this.builder.undoRedoInProcess = !0, this.undoList[99] = this.undoList[100], this.undoList[100] = this.undoList[101], this.undoList[101] = this.undoList[102], this.undoList[102] = this.undoList[103], this.undoList[103] = this.undoList[104], this.undoList[104] = this.undoList[105], this.undoList[105] = this.undoList[106], this.undoList[106] = this.undoList[107], this.undoList[107] = this.undoList[108], this.undoList[108] = this.undoList[109], this.undoList[109] = this.undoList[110], this.undoList[110] = this.undoList[111], this.undoList[111] = this.undoList[112], this.undoList[112] = this.undoList[113], this.undoList[113] = this.undoList[114], this.undoList[114] = this.undoList[115], this.undoList[115] = this.undoList[116], this.undoList[116] = this.undoList[117], this.undoList[117] = this.undoList[118], this.undoList[118] = this.undoList[119], this.builder.undoRedoStyles) {
var e = this.readStyles(),
t = this.readHtml(),
i = " " + e + "###$###" + t;
this.undoList[119] = [i, null], e = (i = this.undoList[120][0]).split("###$###")[0].trim(), t = i.split("###$###")[1], this.writeStyles(e), this.writeHtml(t)
} else {
this.undoList[119] = [this.readHtml(), null];
var n = this.undoList[120][0];
this.writeHtml(n)
}
this.builder.applyBehavior(), this.builder.opts.onChange(), this.undoList[120] = this.undoList[121], this.undoList[121] = this.undoList[122], this.undoList[122] = this.undoList[123], this.undoList[123] = this.undoList[124], this.undoList[124] = this.undoList[125], this.undoList[125] = this.undoList[126], this.undoList[126] = this.undoList[127], this.undoList[127] = this.undoList[128], this.undoList[128] = this.undoList[129], this.undoList[129] = this.undoList[130], this.undoList[130] = this.undoList[131], this.undoList[131] = this.undoList[132], this.undoList[132] = this.undoList[133], this.undoList[133] = this.undoList[134], this.undoList[134] = this.undoList[135], this.undoList[135] = this.undoList[136], this.undoList[136] = this.undoList[137], this.undoList[137] = this.undoList[138], this.undoList[138] = this.undoList[139], this.undoList[139] = this.undoList[140], this.undoList[140] = this.undoList[141];
var o = new p(this.builder);
o.clearActiveCell(), o.clearAfterUndoRedo();
var r = document.querySelector("[data-saveforundo]");
if (r) {
var a = document.querySelector(".is-side.elementstyles");
m.addClass(a, "active"), setTimeout((function () {
r.click()
}), 700)
} else {
var l = document.querySelector(".is-side.elementstyles");
m.removeClass(l, "active")
}
this.builder.opts.onUndo && this.builder.opts.onUndo(), this.builder.undoRedoInProcess = !1
}
}
}, {
key: "doRedo",
value: function () {
if (this.undoList[119] && !0 !== this.builder.undoRedoInProcess) {
if (this.builder.undoRedoInProcess = !0, this.undoList[141] = this.undoList[140], this.undoList[140] = this.undoList[139], this.undoList[139] = this.undoList[138], this.undoList[138] = this.undoList[137], this.undoList[137] = this.undoList[136], this.undoList[136] = this.undoList[135], this.undoList[135] = this.undoList[134], this.undoList[134] = this.undoList[133], this.undoList[133] = this.undoList[132], this.undoList[132] = this.undoList[131], this.undoList[131] = this.undoList[130], this.undoList[130] = this.undoList[129], this.undoList[129] = this.undoList[128], this.undoList[128] = this.undoList[127], this.undoList[127] = this.undoList[126], this.undoList[126] = this.undoList[125], this.undoList[125] = this.undoList[124], this.undoList[124] = this.undoList[123], this.undoList[123] = this.undoList[122], this.undoList[122] = this.undoList[121], this.undoList[121] = this.undoList[120], this.builder.undoRedoStyles) {
var e = this.readStyles(),
t = this.readHtml(),
i = " " + e + "###$###" + t;
this.undoList[120] = [i, null], e = (i = this.undoList[119][0]).split("###$###")[0].trim(), t = i.split("###$###")[1], this.writeStyles(e), this.writeHtml(t)
} else {
this.undoList[120] = [this.readHtml(), null];
var n = this.undoList[119][0];
this.writeHtml(n)
}
this.builder.applyBehavior(), this.builder.opts.onChange(), this.undoList[119] = this.undoList[118], this.undoList[118] = this.undoList[117], this.undoList[117] = this.undoList[116], this.undoList[116] = this.undoList[115], this.undoList[115] = this.undoList[114], this.undoList[114] = this.undoList[113], this.undoList[113] = this.undoList[112], this.undoList[112] = this.undoList[111], this.undoList[111] = this.undoList[110], this.undoList[110] = this.undoList[109], this.undoList[109] = this.undoList[108], this.undoList[108] = this.undoList[107], this.undoList[107] = this.undoList[106], this.undoList[106] = this.undoList[105], this.undoList[105] = this.undoList[104], this.undoList[104] = this.undoList[103], this.undoList[103] = this.undoList[102], this.undoList[102] = this.undoList[101], this.undoList[101] = this.undoList[100], this.undoList[100] = this.undoList[99], this.undoList[99] = null;
var o = new p(this.builder);
o.clearActiveCell(), o.clearAfterUndoRedo();
var r = document.querySelector("[data-saveforundo]");
if (r) {
var a = document.querySelector(".is-side.elementstyles");
m.addClass(a, "active"), setTimeout((function () {
r.click()
}), 700)
} else {
var l = document.querySelector(".is-side.elementstyles");
m.removeClass(l, "active")
}
this.builder.opts.onRedo && this.builder.opts.onRedo(), this.builder.undoRedoInProcess = !1
}
}
}]), e
}(),
b = new p,
x = new v,
w = function () {
var e = b.builderStuff();
x.appendHtml(e, '<svg width="0" height="0" style="position:absolute;display:none;">\n <defs>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-left"><path d="M352 115.4L331.3 96 160 256l171.3 160 20.7-19.3L201.5 256z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-right"><path d="M160 115.4L180.7 96 352 256 180.7 416 160 396.7 310.5 256z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-plus-outline"><path d="M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm0 398.7c-105.1 0-190.7-85.5-190.7-190.7S150.9 65.3 256 65.3 446.7 150.9 446.7 256 361.1 446.7 256 446.7z"></path><path d="M264.1 128h-16.8v119.9H128v16.8h119.3V384h16.8V264.7H384v-16.8H264.1z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-image"><path d="M368 224c26.5 0 48-21.5 48-48s-21.5-48-48-48-48 21.5-48 48 21.5 48 48 48z"></path><path d="M452 64H60c-15.6 0-28 12.7-28 28.3v327.4c0 15.6 12.4 28.3 28 28.3h392c15.6 0 28-12.7 28-28.3V92.3c0-15.6-12.4-28.3-28-28.3zM348.9 261.7c-3-3.5-7.6-6.2-12.8-6.2-5.1 0-8.7 2.4-12.8 5.7L304.6 277c-3.9 2.8-7 4.7-11.5 4.7-4.3 0-8.2-1.6-11-4.1-1-.9-2.8-2.6-4.3-4.1L224 215.3c-4-4.6-10-7.5-16.7-7.5-6.7 0-12.9 3.3-16.8 7.8L64 368.2V107.7c1-6.8 6.3-11.7 13.1-11.7h357.7c6.9 0 12.5 5.1 12.9 12l.3 260.4-99.1-106.7z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-photos-outline"><path d="M96 128v320h384V128H96zm368 304H112V144h352v288z"></path><path d="M32 64v320h48v-16H48V80h352v32h16V64z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-settings-strong"><path d="M32 376h283.35c6.186-14.112 20.281-24 36.65-24s30.465 9.888 36.65 24H480v32h-91.35c-6.186 14.112-20.281 24-36.65 24s-30.465-9.888-36.65-24H32M32 240h91.35c6.186-14.112 20.281-24 36.65-24s30.465 9.888 36.65 24H480v32H196.65c-6.186 14.112-20.281 24-36.65 24s-30.465-9.888-36.65-24H32M32 104h283.35c6.186-14.112 20.281-24 36.65-24s30.465 9.888 36.65 24H480v32h-91.35c-6.186 14.112-20.281 24-36.65 24s-30.465-9.888-36.65-24H32"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-settings"><path d="M352 104c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16m0-16c-17.645 0-32 14.355-32 32s14.355 32 32 32 32-14.355 32-32-14.355-32-32-32zM352 376c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16m0-16c-17.645 0-32 14.355-32 32s14.355 32 32 32 32-14.355 32-32-14.355-32-32-32zM160 240c8.837 0 16 7.163 16 16s-7.163 16-16 16-16-7.163-16-16 7.163-16 16-16m0-16c-17.645 0-32 14.355-32 32s14.355 32 32 32 32-14.355 32-32-14.355-32-32-32zM207.32 248H480v16H207.32c.439-2.604.68-5.273.68-8s-.24-5.396-.68-8zM112 256c0 2.727.24 5.396.68 8H32v-16h80.68a47.955 47.955 0 0 0-.68 8zM399.32 384H480v16h-80.68c.439-2.604.68-5.273.68-8s-.24-5.396-.68-8zM304 392c0 2.727.24 5.396.68 8H32v-16h272.68a47.955 47.955 0 0 0-.68 8zM399.32 112H480v16h-80.68c.439-2.604.68-5.273.68-8s-.24-5.396-.68-8zM304.68 112c-.439 2.604-.68 5.273-.68 8s.24 5.396.68 8H32v-16h272.68z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-options"><path d="M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"></path><g><path d="M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"></path></g><g><path d="M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"></path></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-list-number"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-1043.45,1024 C-1039.25,946.283 -1023.18,878.648 -995.249,821.096 C-967.313,763.544 -912.806,711.242 -831.728,664.192 L-710.742,594.247 C-656.55,562.74 -618.532,535.854 -596.687,513.589 C-562.24,478.722 -545.016,438.813 -545.016,393.863 C-545.016,341.352 -560.769,299.658 -592.276,268.781 C-623.783,237.904 -665.792,222.466 -718.304,222.466 C-796.02,222.466 -849.792,251.873 -879.619,310.685 C-895.582,342.192 -904.404,385.882 -906.084,441.754 L-1021.4,441.754 C-1020.14,363.197 -1005.65,299.133 -977.92,249.562 C-928.769,162.183 -842.02,118.494 -717.673,118.494 C-614.331,118.494 -538.82,146.43 -491.139,202.302 C-443.459,258.174 -419.619,320.347 -419.619,388.822 C-419.619,461.078 -445.034,522.831 -495.865,574.082 C-525.272,603.909 -577.993,640.037 -654.03,682.466 L-740.358,730.356 C-781.527,753.041 -813.874,774.676 -837.399,795.26 C-879.408,831.808 -905.874,872.347 -916.797,916.877 L-424.03,916.877 L-424.03,1024 L-1043.45,1024 Z " /><path d="M-922.391,-764.384 L-922.391,-851.343 C-840.474,-859.324 -783.341,-872.662 -750.994,-891.356 C-718.647,-910.05 -694.492,-954.265 -678.529,-1024 L-589.049,-1024 L-589.049,-125.425 L-710.035,-125.425 L-710.035,-764.384 L-922.391,-764.384 Z " /><path d="M-198.618,-510.942 L-198.618,-667.156 L1004.57,-667.156 L1004.57,-510.942 L-198.618,-510.942 Z " /><path d="M-198.618,78.1071 L-198.618,-78.1071 L1004.57,-78.1071 L1004.57,78.1071 L-198.618,78.1071 Z " /><path d="M-179.185,649.354 L-179.185,493.14 L1024,493.14 L1024,649.354 L-179.185,649.354 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-list-bullet"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-379.801,-514.33 L-379.801,-670.545 L914.662,-670.545 L914.662,-514.33 L-379.801,-514.33 Z " /><path d="M-379.801,78.1071 L-379.801,-78.1071 L914.662,-78.1071 L914.662,78.1071 L-379.801,78.1071 Z " /><path d="M-379.801,670.545 L-379.801,514.33 L914.662,514.33 L914.662,670.545 L-379.801,670.545 Z " /><path d="M-929.642,-469.441 L-929.642,-715.434 L-669.092,-715.434 L-669.092,-469.441 L-929.642,-469.441 Z " /><path d="M-929.642,127.109 L-929.642,-118.885 L-669.092,-118.885 L-669.092,127.109 L-929.642,127.109 Z " /><path d="M-929.642,715.434 L-929.642,469.441 L-669.092,469.441 L-669.092,715.434 L-929.642,715.434 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-clean"><g transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M75.0013,893.849 L-1030.73,900.993 L-32.1518,-880.838 L1009.54,-880.838 L75.0013,893.849 Z " /><path d="M-30.8571,780.685 L-845.2,787.828 L-508.893,193.749 L305.26,194.963 L-30.8571,780.685 Z " fill="#ffffff" fill-opacity="1.00" /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-align-full"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-770.727,738.299 L-770.727,582.085 L769.712,582.085 L769.712,738.299 L-770.727,738.299 Z " /><path d="M-770.727,-534.628 L-770.727,-690.842 L769.712,-690.842 L769.712,-534.628 L-770.727,-534.628 Z " /><path d="M-770.219,-115.563 L-770.219,-271.777 L770.219,-271.777 L770.219,-115.563 L-770.219,-115.563 Z " /><path d="M-770.219,303.503 L-770.219,147.288 L770.219,147.288 L770.219,303.503 L-770.219,303.503 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-align-center"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-770.727,738.299 L-770.727,582.085 L769.712,582.085 L769.712,738.299 L-770.727,738.299 Z " /><path d="M-552.286,-107.697 L-552.286,-263.911 L552.286,-263.911 L552.286,-107.697 L-552.286,-107.697 Z " /><path d="M-467.355,319.234 L-467.355,163.02 L466.34,163.02 L466.34,319.234 L-467.355,319.234 Z " /><path d="M-770.727,-534.628 L-770.727,-690.842 L769.712,-690.842 L769.712,-534.628 L-770.727,-534.628 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-align-left"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-770.727,738.299 L-770.727,582.085 L769.712,582.085 L769.712,738.299 L-770.727,738.299 Z " /><path d="M-770.727,-534.628 L-770.727,-690.842 L769.712,-690.842 L769.712,-534.628 L-770.727,-534.628 Z " /><path d="M-770.219,-115.563 L-770.219,-271.777 L482.839,-271.777 L482.839,-115.563 L-770.219,-115.563 Z " /><path d="M-770.219,303.503 L-770.219,147.288 L122.787,147.288 L122.787,303.503 L-770.219,303.503 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-align-right"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-770.727,738.299 L-770.727,582.085 L769.712,582.085 L769.712,738.299 L-770.727,738.299 Z " /><path d="M-770.727,-534.628 L-770.727,-690.842 L769.712,-690.842 L769.712,-534.628 L-770.727,-534.628 Z " /><path d="M-483.346,-118.081 L-483.346,-274.295 L769.712,-274.295 L769.712,-118.081 L-483.346,-118.081 Z " /><path d="M-123.871,303.503 L-123.871,147.288 L769.136,147.288 L769.136,303.503 L-123.871,303.503 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-indent"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-829.04,-514.33 L-829.04,-670.545 L808.959,-670.545 L808.959,-514.33 L-829.04,-514.33 Z " /><path d="M-829.04,670.545 L-829.04,514.33 L808.959,514.33 L808.959,670.545 L-829.04,670.545 Z " /><path d="M-254.279,-110.244 L-254.279,-266.458 L808.959,-266.458 L808.959,-110.244 L-254.279,-110.244 Z " /><path d="M-254.279,266.458 L-254.279,110.244 L808.959,110.244 L808.959,266.458 L-254.279,266.458 Z " /><path d="M-829.04,-195.117 L-490.958,-1.03508e-14 L-829.04,195.117 L-829.04,-195.117 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-outdent"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-829.04,-514.33 L-829.04,-670.545 L808.959,-670.545 L808.959,-514.33 L-829.04,-514.33 Z " /><path d="M-829.04,670.545 L-829.04,514.33 L808.959,514.33 L808.959,670.545 L-829.04,670.545 Z " /><path d="M-829.04,-110.244 L-829.04,-266.458 L234.198,-266.458 L234.198,-110.244 L-829.04,-110.244 Z " /><path d="M-829.04,266.458 L-829.04,110.244 L234.198,110.244 L234.198,266.458 L-829.04,266.458 Z " /><path d="M808.959,-195.117 L470.877,-1.03508e-14 L808.959,195.117 L808.959,-195.117 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-table"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M-660.783,660.783 L660.783,660.783 L660.783,-660.783 L-660.783,-660.783 L-660.783,660.783 Z " fill="none" stroke-width="75.82" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /><path d="M-37.9645,698.933 L37.9645,698.933 L37.9645,-698.569 L-37.9645,-698.569 L-37.9645,698.933 Z " fill="#000000" fill-opacity="1.00" stroke-width="0.25" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /><path d="M-698.933,-37.7825 L-698.933,38.1465 L698.569,38.1465 L698.569,-37.7825 L-698.933,-37.7825 Z " fill="#000000" fill-opacity="1.00" stroke-width="0.25" stroke="#000000" stroke-linecap="square" stroke-linejoin="miter" /></g></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-happy"><path d="M256 48C140.563 48 48 141.6 48 256s92.563 208 208 208 208-93.6 208-208S370.401 48 256 48zm0 374.4c-91.518 0-166.404-74.883-166.404-166.4 0-91.518 74.887-166.4 166.404-166.4S422.404 164.482 422.404 256 347.518 422.4 256 422.4zm72.8-187.2c17.683 0 31.201-13.518 31.201-31.2s-13.519-31.2-31.201-31.2c-17.682 0-31.2 13.518-31.2 31.2s13.518 31.2 31.2 31.2zm-145.6 0c17.682 0 31.2-13.518 31.2-31.2s-13.519-31.2-31.2-31.2c-17.683 0-31.201 13.518-31.201 31.2s13.519 31.2 31.201 31.2zM256 370.4c48.883 0 89.436-30.164 106.081-72.801H149.919C166.564 340.236 207.117 370.4 256 370.4z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-create"><path d="M64 368v80h80l235.727-235.729-79.999-79.998L64 368zm377.602-217.602c8.531-8.531 8.531-21.334 0-29.865l-50.135-50.135c-8.531-8.531-21.334-8.531-29.865 0l-39.468 39.469 79.999 79.998 39.469-39.467z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-minus-empty"><path d="M384 265H128v-17h256v17z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-eye"><path d="M256 128c-81.9 0-145.7 48.8-224 128 67.4 67.7 124 128 224 128 99.9 0 173.4-76.4 224-126.6C428.2 198.6 354.8 128 256 128zm0 219.3c-49.4 0-89.6-41-89.6-91.3 0-50.4 40.2-91.3 89.6-91.3s89.6 41 89.6 91.3c0 50.4-40.2 91.3-89.6 91.3z"></path><path d="M256 224c0-7.9 2.9-15.1 7.6-20.7-2.5-.4-5-.6-7.6-.6-28.8 0-52.3 23.9-52.3 53.3s23.5 53.3 52.3 53.3 52.3-23.9 52.3-53.3c0-2.3-.2-4.6-.4-6.9-5.5 4.3-12.3 6.9-19.8 6.9-17.8 0-32.1-14.3-32.1-32z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-reply"><path d="M448 400s-36.8-208-224-208v-80L64 256l160 134.4v-92.3c101.6 0 171 8.9 224 101.9z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-redo"><path d="M64 400h10.3l19.2-31.2c20.5-32.7 44.9-62.8 75.8-76.6 24.4-10.9 46.7-18.9 86.7-20V352l192-128L256 96v80.3c-63 2.8-108.1 20.7-143.3 56.2C60.4 285.2 64 351.5 64 368.2c.1 8.9 0 21.7 0 31.8z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-wrench"><path d="M461.9 114.9l-56.5 56.7-55.1-10-9.9-55.1 56.5-56.7c-12.7-12.7-30.8-18.5-44.2-17.8-13.5.7-42.3 8.3-64.6 32-21.6 22.8-44.3 65.3-24.2 112.5 2.4 5.7 5.1 13.2-2.9 21.2-8.1 8-215 202.8-215 202.8-19.4 16.7-18 47.6-.1 65.6 18.2 17.9 48.9 19 65.6-.3 0 0 193.2-205.8 202.7-215.1 8.5-8.3 16.1-5.5 21.2-2.9 35.6 18.4 86.3 2.4 112.6-23.9 26.3-26.3 31.1-51.7 31.9-64.7.8-12.9-3.7-30-18-44.3zM91.3 443.2c-6.3 6.2-16.5 6.2-22.7 0-6.2-6.3-6.2-16.5 0-22.7 6.3-6.2 16.5-6.2 22.7 0 6.2 6.3 6.2 16.5 0 22.7z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-more"><path d="M113.7 304C86.2 304 64 282.6 64 256c0-26.5 22.2-48 49.7-48 27.6 0 49.8 21.5 49.8 48 0 26.6-22.2 48-49.8 48zM256 304c-27.5 0-49.8-21.4-49.8-48 0-26.5 22.3-48 49.8-48 27.5 0 49.7 21.5 49.7 48 0 26.6-22.2 48-49.7 48zM398.2 304c-27.5 0-49.8-21.4-49.8-48 0-26.5 22.2-48 49.8-48 27.5 0 49.8 21.5 49.8 48 0 26.6-22.2 48-49.8 48z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-code-working"><circle cx="184.166" cy="256.166" r="24"></circle><circle cx="256.166" cy="256.166" r="24"></circle><circle cx="328.166" cy="256.166" r="24"></circle><g><path d="M168 392a23.929 23.929 0 0 1-16.971-7.029l-112-112c-9.373-9.373-9.373-24.569 0-33.941l112-112c9.373-9.372 24.568-9.372 33.941 0 9.371 9.372 9.371 24.568 0 33.941L89.941 256l95.029 95.029c9.371 9.372 9.371 24.568 0 33.941A23.925 23.925 0 0 1 168 392zM344 392a23.929 23.929 0 0 0 16.971-7.029l112-112c9.373-9.373 9.373-24.569 0-33.941l-112-112c-9.373-9.372-24.568-9.372-33.941 0-9.371 9.372-9.371 24.568 0 33.941L422.059 256l-95.029 95.029c-9.371 9.372-9.371 24.568 0 33.941A23.925 23.925 0 0 0 344 392z"></path></g></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-gear"><path d="M416.349 256.046c-.001-21.013 13.143-38.948 31.651-46.062a196.302 196.302 0 0 0-23.664-57.139 49.423 49.423 0 0 1-20.082 4.254c-12.621 0-25.238-4.811-34.871-14.442-14.863-14.863-18.248-36.846-10.18-54.97A196.274 196.274 0 0 0 302.074 64C294.971 82.529 277.027 95.69 256 95.69c-21.025 0-38.969-13.161-46.073-31.69a196.243 196.243 0 0 0-57.128 23.688c8.068 18.122 4.683 40.104-10.181 54.97-9.631 9.631-22.25 14.443-34.871 14.443a49.429 49.429 0 0 1-20.083-4.255A196.273 196.273 0 0 0 64 209.984c18.509 7.112 31.652 25.049 31.652 46.062 0 21.008-13.132 38.936-31.63 46.054a196.318 196.318 0 0 0 23.692 57.128 49.428 49.428 0 0 1 20.032-4.232c12.622 0 25.239 4.812 34.871 14.443 14.841 14.841 18.239 36.781 10.215 54.889a196.257 196.257 0 0 0 57.13 23.673c7.128-18.479 25.046-31.596 46.038-31.596 20.992 0 38.91 13.115 46.037 31.596a196.234 196.234 0 0 0 57.132-23.675c-8.023-18.106-4.626-40.046 10.216-54.887 9.629-9.632 22.248-14.444 34.868-14.444 6.836 0 13.67 1.411 20.033 4.233a196.318 196.318 0 0 0 23.692-57.128c-18.498-7.119-31.629-25.048-31.629-46.054zM256.9 335.9c-44.3 0-80-35.9-80-80 0-44.101 35.7-80 80-80 44.299 0 80 35.899 80 80 0 44.1-35.701 80-80 80z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-arrow-expand"><path d="M274 209.7l63.9-63.8L288 96h128v128l-49.9-49.9-63.8 63.9zM274 302.3l63.9 63.8L288 416h128V288l-49.9 49.9-63.8-63.9zM238 302.3l-63.9 63.8L224 416H96V288l49.9 49.9 63.8-63.9zM238 209.7l-63.9-63.8L224 96H96v128l49.9-49.9 63.8 63.9z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-expand"><path d="M396.795 396.8H320V448h128V320h-51.205zM396.8 115.205V192H448V64H320v51.205zM115.205 115.2H192V64H64v128h51.205zM115.2 396.795V320H64v128h128v-51.205z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-arrow-move"><path d="M480 256l-96-96v76H276V128h76l-96-96-96 96h76v108H128v-76l-96 96 96 96v-76h108v108h-76l96 96 96-96h-76.2l-.4-108.5 108.6.3V352z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-drag"><path d="M0 144h512v32H0zM0 240h512v32H0zM0 336h512v32H0z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-link"><path d="M74.6 256c0-38.3 31.1-69.4 69.4-69.4h88V144h-88c-61.8 0-112 50.2-112 112s50.2 112 112 112h88v-42.6h-88c-38.3 0-69.4-31.1-69.4-69.4zm85.4 22h192v-44H160v44zm208-134h-88v42.6h88c38.3 0 69.4 31.1 69.4 69.4s-31.1 69.4-69.4 69.4h-88V368h88c61.8 0 112-50.2 112-112s-50.2-112-112-112z"/></symbol>\n <symbol viewBox="0 0 512 512" id="ion-contrast"><path d="M256 32C132.3 32 32 132.3 32 256s100.3 224 224 224 224-100.3 224-224S379.7 32 256 32zm135.8 359.8C355.5 428 307 448 256 448V64c51 0 99.5 20 135.8 56.2C428 156.5 448 204.7 448 256c0 51.3-20 99.5-56.2 135.8z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-plus-empty"><path d="M384 265H264v119h-17V265H128v-17h119V128h17v120h120v17z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-thin-up"><path d="M349.7 189.8c-3.1 3.1-8 3-11.3 0L264 123.4V408c0 4.4-3.6 8-8 8s-8-3.6-8-8V123.4l-74.4 66.3c-3.4 2.9-8.1 3.2-11.2.1-3.1-3.1-3.3-8.5-.1-11.4 0 0 87-79.2 88-80s2.8-2.4 5.7-2.4 4.9 1.6 5.7 2.4 88 80 88 80c1.5 1.5 2.3 3.6 2.3 5.7s-.8 4.1-2.3 5.7z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-thin-down"><path d="M349.7 322.2c-3.1-3.1-8-3-11.3 0L264 388.6V104c0-4.4-3.6-8-8-8s-8 3.6-8 8v284.6l-74.4-66.3c-3.4-2.9-8.1-3.2-11.2-.1-3.1 3.1-3.3 8.5-.1 11.4 0 0 87 79.2 88 80s2.8 2.4 5.7 2.4 4.9-1.6 5.7-2.4 88-80 88-80c1.5-1.5 2.3-3.6 2.3-5.7s-.8-4.1-2.3-5.7z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-thin-left"><path d="M189.8 349.7c3.1-3.1 3-8 0-11.3L123.4 264H408c4.4 0 8-3.6 8-8s-3.6-8-8-8H123.4l66.3-74.4c2.9-3.4 3.2-8.1.1-11.2-3.1-3.1-8.5-3.3-11.4-.1 0 0-79.2 87-80 88S96 253.1 96 256s1.6 4.9 2.4 5.7 80 88 80 88c1.5 1.5 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-arrow-thin-right"><path d="M322.2 349.7c-3.1-3.1-3-8 0-11.3l66.4-74.4H104c-4.4 0-8-3.6-8-8s3.6-8 8-8h284.6l-66.3-74.4c-2.9-3.4-3.2-8.1-.1-11.2 3.1-3.1 8.5-3.3 11.4-.1 0 0 79.2 87 80 88s2.4 2.8 2.4 5.7-1.6 4.9-2.4 5.7-80 88-80 88c-1.5 1.5-3.6 2.3-5.7 2.3s-4.1-.8-5.7-2.3z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-close-empty"><path d="M340.2 160l-84.4 84.3-84-83.9-11.8 11.8 84 83.8-84 83.9 11.8 11.7 84-83.8 84.4 84.2 11.8-11.7-84.4-84.3 84.4-84.2z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-more-vertical"><path d="M296 136c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0 240c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0-120c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-quote"><path d="M192 64c-40.646 0-72.483 11.229-94.627 33.373C75.229 119.517 64 151.354 64 192v256h160V192h-96c0-23.056 4.922-39.666 14.627-49.373C152.334 132.922 168.944 128 192 128M416 64c-40.646 0-72.483 11.229-94.627 33.373C299.229 119.517 288 151.354 288 192v256h160V192h-96c0-23.056 4.922-39.666 14.627-49.373C376.334 132.922 392.944 128 416 128"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-code"><path d="M168 392a23.929 23.929 0 0 1-16.971-7.029l-112-112c-9.373-9.373-9.373-24.569 0-33.941l112-112c9.373-9.372 24.568-9.372 33.941 0 9.371 9.372 9.371 24.568 0 33.941L89.941 256l95.029 95.029c9.371 9.373 9.371 24.568 0 33.941A23.925 23.925 0 0 1 168 392zM344 392a23.929 23.929 0 0 0 16.971-7.029l112-112c9.373-9.373 9.373-24.569 0-33.941l-112-112c-9.373-9.372-24.568-9.372-33.941 0-9.371 9.372-9.371 24.568 0 33.941L422.059 256l-95.029 95.029c-9.371 9.373-9.371 24.568 0 33.941A23.925 23.925 0 0 0 344 392z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-camera"><path d="M430.4 147h-67.5l-40.4-40.8s-.2-.2-.3-.2l-.2-.2c-6-6-14.1-9.8-23.3-9.8h-84c-9.8 0-18.5 4.2-24.6 10.9v.1l-39.5 40h-69C63 147 48 161.6 48 180.2v202.1c0 18.6 15 33.7 33.6 33.7h348.8c18.5 0 33.6-15.1 33.6-33.7V180.2c0-18.6-15.1-33.2-33.6-33.2zM256 365.5c-50.9 0-92.4-41.6-92.4-92.6 0-51.1 41.5-92.6 92.4-92.6 51 0 92.4 41.5 92.4 92.6 0 51-41.4 92.6-92.4 92.6zm168.1-165c-7.7 0-14-6.3-14-14.1s6.3-14.1 14-14.1 14 6.3 14 14.1-6.3 14.1-14 14.1z"></path><path d="M256 202.9c-38.6 0-69.8 31.3-69.8 70 0 38.6 31.2 70 69.8 70 38.5 0 69.8-31.3 69.8-70s-31.3-70-69.8-70z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-move"><path d="M475.9 246.2l-79.4-79.4c-5.4-5.4-14.2-5.4-19.6 0l-.2.2c-5.4 5.4-5.4 14.2 0 19.6l54.9 54.9-161.8.5.5-161.8 54.9 54.9c5.4 5.4 14.2 5.4 19.6 0l.2-.2c5.4-5.4 5.4-14.2 0-19.6l-79.4-79.4c-5.4-5.4-14.2-5.4-19.6 0l-79.4 79.4c-5.4 5.4-5.4 14.2 0 19.6l.2.2c5.4 5.4 14.2 5.4 19.6 0l54.9-54.9.5 161.8-161.8-.5 54.9-54.9c5.4-5.4 5.4-14.2 0-19.6l-.2-.2c-5.4-5.4-14.2-5.4-19.6 0l-79.4 79.4c-5.4 5.4-5.4 14.2 0 19.6l79.4 79.4c5.4 5.4 14.2 5.4 19.6 0l.2-.2c5.4-5.4 5.4-14.2 0-19.6L80 270.5l161.8-.5-.5 161.8-54.9-54.9c-5.4-5.4-14.2-5.4-19.6 0l-.2.2c-5.4 5.4-5.4 14.2 0 19.6l79.4 79.4c5.4 5.4 14.2 5.4 19.6 0l79.4-79.4c5.4-5.4 5.4-14.2 0-19.6l-.2-.2c-5.4-5.4-14.2-5.4-19.6 0l-54.9 54.9-.5-161.8 161.8.5-54.9 54.9c-5.4 5.4-5.4 14.2 0 19.6l.2.2c5.4 5.4 14.2 5.4 19.6 0l79.4-79.4c5.5-5.4 5.5-14.2 0-19.6z"/></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-ok"><rect x="0" y="0" width="2048.00" height="2048.00" fill="#ffffff" /><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M330.323,493.628 L330.323,398.406 L-330.323,398.406 L-330.323,493.628 L330.323,493.628 Z " fill="#011534" fill-opacity="1.00" /><path d="M230.718,468.568 L328.59,468.568 L328.59,-599.718 L230.718,-599.718 L230.718,468.568 Z " fill="#011534" fill-opacity="1.00" /><path d="M-300.714,376.053 L-373.748,449.088 L-68.5805,754.255 L4.45387,681.221 L-300.714,376.053 Z " fill="#011534" fill-opacity="1.00" /><path d="M-9.9476e-14,216.241 L-73.0344,143.207 L-378.202,448.375 L-305.168,521.409 L-9.9476e-14,216.241 Z " fill="#011534" fill-opacity="1.00" /></g></symbol>\n <symbol viewBox="0 0 512 512" id="ion-grid"><path d="M160 153.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM288 153.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM416 153.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5z"></path><g><path d="M160 281.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM288 281.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM416 281.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5z"></path></g><g><path d="M160 409.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM288 409.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5zM416 409.3c0 3.7-3 6.7-6.7 6.7h-50.5c-3.7 0-6.7-3-6.7-6.7v-50.5c0-3.7 3-6.7 6.7-6.7h50.5c3.7 0 6.7 3 6.7 6.7v50.5z"></path></g></symbol>\n <symbol viewBox="0 0 512 512" id="ion-gear-b"><path d="M448 294.4v-76.8h-42.8c-3.4-14.4-8.9-28-16.1-40.5l29.8-29.7-54.3-54.3-29.1 29.1c-12.6-7.7-26.4-13.5-41.1-17.3V64h-76.8v40.9c-14.7 3.8-28.5 9.7-41.1 17.3l-29.1-29.1-54.3 54.3 29.8 29.7c-7.2 12.5-12.6 26.1-16.1 40.5H64v76.8h44.1c3.8 13.7 9.5 26.6 16.7 38.6l-31.7 31.7 54.3 54.3 32.3-32.3c11.7 6.8 24.5 11.9 37.9 15.4v46h76.8v-46c13.5-3.5 26.2-8.6 37.9-15.4l32.3 32.3 54.3-54.3-31.6-31.7c7.2-11.9 12.9-24.8 16.7-38.6h44zm-192 15.4c-29.7 0-53.7-24.1-53.7-53.8s24-53.8 53.7-53.8 53.8 24.1 53.8 53.8-24.1 53.8-53.8 53.8z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-grid-view-outline"><path d="M448 192v-16H336V64h-16v112H192V64h-16v112H64v16h112v128H64v16h112v112h16V336h128v112h16V336h112v-16H336V192h112zM320 320H192V192h128v128z"></path></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-increase"><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M852.574,595.004 L852.574,507.837 L-852.574,507.837 L-852.574,595.004 L852.574,595.004 Z " /><path d="M852.574,224.232 L852.574,137.066 L-852.574,137.066 L-852.574,224.232 L852.574,224.232 Z " /><path d="M852.574,-134.971 L852.574,-222.138 L-852.574,-222.138 L-852.574,-134.971 L852.574,-134.971 Z " /><path d="M852.574,-505.743 L852.574,-592.909 L-852.574,-592.909 L-852.574,-505.743 L852.574,-505.743 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-decrease"><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M509.832,595.004 L509.832,507.837 L-509.832,507.837 L-509.832,595.004 L509.832,595.004 Z " /><path d="M509.832,224.232 L509.832,137.066 L-509.832,137.066 L-509.832,224.232 L509.832,224.232 Z " /><path d="M509.832,-136.947 L509.832,-224.113 L-509.832,-224.113 L-509.832,-136.947 L509.832,-136.947 Z " /><path d="M509.832,-505.743 L509.832,-592.909 L-509.832,-592.909 L-509.832,-505.743 L509.832,-505.743 Z " /></g></symbol>\n <symbol viewBox="0 0 2048.0 2048.0" id="icon-strike"><g id="document" transform="matrix(1,0,0,1,1024.0,1024.0)"><path d="M298.298,-653.766 C292.151,-624.873 284.005,-605.663 273.862,-596.135 C263.719,-586.607 250.656,-581.842 234.673,-581.842 C220.535,-581.842 196.253,-589.526 161.828,-604.895 C87.4454,-637.475 17.0588,-653.766 -49.3321,-653.766 C-155.68,-653.766 -243.28,-621.339 -312.129,-556.485 C-380.979,-491.631 -415.404,-414.328 -415.404,-324.578 C-415.404,-272.94 -403.724,-225.606 -380.364,-182.575 C-357.005,-139.544 -322.733,-100.201 -277.551,-64.5467 C-232.368,-28.8923 -156.295,18.903 -49.3321,78.8392 C57.631,138.775 123.1,177.964 147.074,196.406 C182.729,223.455 209.008,252.654 225.913,284.005 C242.819,315.357 251.271,346.401 251.271,377.137 C251.271,432.463 228.987,480.412 184.419,520.984 C139.851,561.556 79.1465,581.842 2.30524,581.842 C-64.0856,581.842 -125.098,567.089 -180.731,537.582 C-236.364,508.075 -277.704,471.037 -304.753,426.469 C-331.801,381.901 -353.316,314.742 -369.299,224.991 L-403.417,224.991 L-403.417,653.766 L-369.299,653.766 C-364.996,624.873 -358.388,605.817 -349.474,596.596 C-340.561,587.375 -328.42,582.764 -313.051,582.764 C-297.068,582.764 -259.109,592.446 -199.173,611.81 C-139.236,631.174 -99.74,642.393 -80.6834,645.467 C-48.7174,651 -14.5998,653.766 21.6692,653.766 C137.239,653.766 231.753,619.495 305.214,550.952 C378.674,482.41 415.404,400.804 415.404,306.136 C415.404,256.343 403.878,208.701 380.826,163.211 C357.773,117.721 324.885,78.2244 282.161,44.7216 C239.438,11.2188 159.676,-36.8838 42.8774,-99.5863 C-100.355,-176.428 -191.027,-237.901 -229.141,-284.005 C-255.574,-315.357 -268.791,-350.089 -268.791,-388.202 C-268.791,-437.995 -247.89,-482.41 -206.088,-521.445 C-164.287,-560.48 -111.42,-579.998 -47.4879,-579.998 C9.06727,-579.998 63.7783,-565.552 116.645,-536.66 C169.512,-507.767 210.238,-468.732 238.823,-419.554 C267.408,-370.375 287.233,-304.292 298.298,-221.303 L332.415,-221.303 L332.415,-653.766 L298.298,-653.766 Z " fill="#000000" fill-opacity="1.00" /><path d="M-530.954,-41.4477 L-530.954,41.4477 L530.954,41.4477 L530.954,-41.4477 L-530.954,-41.4477 Z " fill="#000000" fill-opacity="1.00" /></g></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-undo"><path d="M447.9 368.2c0-16.8 3.6-83.1-48.7-135.7-35.2-35.4-80.3-53.4-143.3-56.2V96L64 224l192 128v-79.8c40 1.1 62.4 9.1 86.7 20 30.9 13.8 55.3 44 75.8 76.6l19.2 31.2H448c0-10.1-.1-22.9-.1-31.8z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-ios-redo"><path d="M64 400h10.3l19.2-31.2c20.5-32.7 44.9-62.8 75.8-76.6 24.4-10.9 46.7-18.9 86.7-20V352l192-128L256 96v80.3c-63 2.8-108.1 20.7-143.3 56.2C60.4 285.2 64 351.5 64 368.2c.1 8.9 0 21.7 0 31.8z"></path></symbol>\n <symbol viewBox="0 0 512 512" id="ion-android-arrow-dropdown"><path d="M128 192l128 128 128-128z"></path></symbol>\n </defs>\n </svg>')
},
S = new v,
C = function (e) {
var t = new p(e),
i = t.builderStuff(),
n = i.querySelector(".quickadd");
if (!n) {
var o = '<div class="is-pop quickadd arrow-right" style="z-index:10003;">\n <div class="is-pop-close" style="display:none;z-index:1;width:40px;height:40px;position:absolute;top:0px;right:0px;box-sizing:border-box;padding:0;line-height:40px;font-size: 12px;color:#777;text-align:center;cursor:pointer;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.47);width:40px;height:40px;"><use xlink:href="#ion-ios-close-empty"></use></svg></div>\n <div class="is-pop-tabs">\n <div class="is-pop-tab-item active" data-value="left">'.concat(t.out("Add to Left"), '</div>\n <div class="is-pop-tab-item" data-value="right">').concat(t.out("Add to Right"), '</div>\n </div>\n <div style="padding:8px;display:flex;flex-direction:row;flex-flow: wrap;justify-content: center;align-items: center;">\n <button title="').concat(t.out("Paragraph"), '" class="add-paragraph"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:12px;height:12px;"><use xlink:href="#icon-align-full"></use></svg></span>').concat(t.out("Paragraph"), '</button>\n <button title="').concat(t.out("Headline"), '" class="add-headline"><span style="font-family:serif;display:block;margin:0 0 8px;">H</span>').concat(t.out("Headline"), '</button>\n <button title="').concat(t.out("Image"), '" class="add-image"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex ion-image" style="width:14px;height:14px;"><use xlink:href="#ion-image"></use></svg></span>').concat(t.out("Image"), '</button>\n <button title="').concat(t.out("Heading 1"), '" class="add-heading1"><span style="font-family:serif;display:block;margin:0 0 8px;">H1</span>').concat(t.out("Heading 1"), '</button>\n <button title="').concat(t.out("Heading 2"), '" class="add-heading2"><span style="font-family:serif;display:block;margin:0 0 8px;">H2</span>').concat(t.out("Heading 2"), '</button>\n <button title="').concat(t.out("Heading 3"), '" class="add-heading3"><span style="font-family:serif;display:block;margin:0 0 8px;">H3</span>').concat(t.out("Heading 3"), '</button>\n <button title="').concat(t.out("List"), '" class="add-list"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:13px;height:13px;"><use xlink:href="#icon-list-bullet"></use></svg></span>').concat(t.out("List"), '</button>\n <button title="').concat(t.out("Quote"), '" class="add-quote"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:13px;height:13px;"><use xlink:href="#ion-quote"></use></svg></span>').concat(t.out("Quote"), '</button>\n <button title="').concat(t.out("Preformatted"), '" class="add-preformatted"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:13px;height:13px;"><use xlink:href="#ion-code"></use></svg></span>').concat(t.out("Preformatted"), '</button>\n <button title="').concat(t.out("Table"), '" class="add-table"><span style="display:block;margin:0 0 8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#icon-table"></use></svg></use></svg></svg></span>').concat(t.out("Table"), '</button>\n <button title="').concat(t.out("Spacer"), '" class="add-spacer"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;background:#eee;width:30px;height:5px;"></span></span>').concat(t.out("Spacer"), "</button>\n ").concat(e.opts.emailMode ? "" : '<button title="'.concat(t.out("Button"), '" class="add-button"><span style="display:block;margin:0 0 8px;"><span style="display:inline-block;border:#a1a1a1 1px solid;background:#f3f3f3;width:15px;height:6px;"></span></span>').concat(t.out("Button"), "</button>"), '\n <button title="').concat(t.out("More..."), '" class="add-more classic" style="width:100%;height:45px;margin-top:10px;">').concat(t.out("More..."), '</button>\n </div>\n </div>\n \n <div class="is-modal snippets">\n <div style="max-width:1250px;height:90%;padding:0;">\n <iframe style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>\n </div>\n </div>\n ');
S.appendHtml(i, o), n = i.querySelector(".quickadd"), document.addEventListener("click", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if ("flex" === n.style.display) {
var i = S.parentsHasClass(t, "quickadd"),
o = S.parentsHasClass(t, "row-add"),
r = S.parentsHasClass(t, "is-rowadd-tool"),
a = S.parentsHasClass(t, "cell-add"),
l = S.parentsHasClass(t, "elm-add"),
s = S.parentsHasClass(t, "row-add-initial");
if (i || o || r || a || l || s) return;
n.style.display = ""
}
}));
var r = n.querySelectorAll(".is-pop-tab-item");
Array.prototype.forEach.call(r, (function (e) {
S.addEventListener(e, "click", (function (e) {
var t = n.querySelectorAll(".is-pop-tab-item");
Array.prototype.forEach.call(t, (function (e) {
S.removeClass(e, "active")
})), S.addClass(e.target, "active"), "left" === n.querySelector(".active").getAttribute("data-value") ? n.setAttribute("data-mode", "cell-left") : n.setAttribute("data-mode", "cell-right")
}))
}));
var a = n.querySelector(".add-paragraph");
S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. \n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, \n when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>", e)
})), a = n.querySelector(".add-headline"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent('<div class="display">\n <h1>Headline Goes Here</h1>\n <p>Lorem Ipsum is simply dummy text</p>\n </div>', e)
})), a = n.querySelector(".add-image"), S.addEventListener(a, "click", (function () {
var i = n.getAttribute("data-mode"),
o = '<img onload="imageLoaded(this)" src="' + e.opts.snippetPath + 'example.jpg" alt="" />';
"" !== e.opts.snippetSampleImage && (o = e.opts.snippetSampleImage), t.addContent(o, i)
})), a = n.querySelector(".add-heading1"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<h1>Heading 1 here</h1>", e)
})), a = n.querySelector(".add-heading2"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<h2>Heading 2 here</h2>", e)
})), a = n.querySelector(".add-heading3"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<h3>Heading 3 here</h3>", e)
})), a = n.querySelector(".add-preformatted"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<pre>Lorem Ipsum is simply dummy text of the printing and typesetting industry. \n Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, \n when an unknown printer took a galley of type and scrambled it to make a type specimen book.</pre>", e)
})), a = n.querySelector(".add-list"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent('<ul style="list-style: initial;padding-left: 20px;">\n <li>Lorem Ipsum is simply dummy text</li>\n <li>Lorem Ipsum is simply dummy text</li>\n </ul>', e)
})), a = n.querySelector(".add-quote"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent("<blockquote>Lorem Ipsum is simply dummy text</blockquote>", e)
})), (a = n.querySelector(".add-button")) && S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent('<a href="#" style="display:inline-block;text-decoration:none;transition: all 0.16s ease;border-style:solid;cursor:pointer;background-color: rgb(220, 220, 220); color: rgb(0, 0, 0); border-color: rgb(220, 220, 220); border-width: 2px; border-radius: 0px; padding: 13px 28px; line-height: 1.5; text-transform: uppercase; font-weight: 400; font-size: 14px; letter-spacing: 3px;">Read More</a>', e)
})), a = n.querySelector(".add-spacer"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent('<div class="spacer height-80"></div>', e, "data-noedit")
})), a = n.querySelector(".add-table"), S.addEventListener(a, "click", (function () {
var e = n.getAttribute("data-mode");
t.addContent('<table class="default" style="border-collapse:collapse;width:100%;">\n <tr>\n <td><br></td>\n <td><br></td>\n </tr>\n <tr>\n <td><br></td>\n <td><br></td>\n </tr>\n </table>', e)
})), a = n.querySelector(".add-more"), S.addEventListener(a, "click", (function () {
var o = i.querySelector(".snippets");
t.showModal(o, !1, null, !1);
var r = o.querySelector("iframe");
"about:blank" === r.src && (r.src = e.opts.snippetData), n.style.display = ""
}))
}
return n
},
E = new v,
k = function () {
function e(i) {
t(this, e), this.builder = i, this.columnTool = new A(i), this.rowTool = new L(i), this.util = new p(this.builder)
}
return n(e, [{
key: "moveColumnPrevious",
value: function () {
var e = this.columnTool,
t = this.util.cellSelected();
t && t.previousElementSibling && (this.builder.uo.saveForUndo(), t.parentElement.insertBefore(t, t.previousElementSibling), e.position(t), this.builder.opts.onChange())
}
}, {
key: "moveColumnNext",
value: function () {
var e = this.columnTool,
t = this.util,
i = t.cellSelected();
if (i) {
var n = t.cellNext(i);
n && (this.builder.uo.saveForUndo(), i.parentElement.insertBefore(n, i), e.position(i), this.builder.opts.onChange())
}
}
}, {
key: "moveColumnUp",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o = n.parentNode;
if (o.childElementCount - 2 == 1) {
if (!o.previousElementSibling) return;
var r = 4;
if (this.builder.maxColumns && (r = this.builder.maxColumns), o.previousElementSibling.childElementCount >= r + 2 || o.previousElementSibling.hasAttribute("data-protected")) return this.builder.uo.saveForUndo(), o.parentNode.insertBefore(o, o.previousElementSibling), t.position(n), void this.builder.opts.onChange();
this.builder.uo.saveForUndo();
var a = o.previousElementSibling.querySelector(".is-row-tool");
o.previousElementSibling.removeChild(a), a = o.previousElementSibling.querySelector(".is-rowadd-tool"), o.previousElementSibling.removeChild(a), o.previousElementSibling.appendChild(n), o.parentNode.removeChild(o), e.applyBehavior(), t.position(n), n.click(), this.builder.opts.onChange()
} else {
this.builder.uo.saveForUndo();
var l = o.cloneNode(!0);
l.innerHTML = "", l.appendChild(n), o.parentNode.insertBefore(l, o), e.applyBehavior(), t.position(n), n.click(), this.builder.opts.onChange()
}
o = n.parentNode, i.fixLayout(o, e), o.nextElementSibling && i.fixLayout(o.nextElementSibling, e)
}
}
}, {
key: "moveColumnDown",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o = n.parentNode;
if (o.childElementCount - 2 == 1) {
if (!o.nextElementSibling) return;
var r = 4;
if (this.builder.maxColumns && (r = this.builder.maxColumns), o.nextElementSibling.childElementCount >= r + 2 || o.nextElementSibling.hasAttribute("data-protected")) return this.builder.uo.saveForUndo(), o.parentNode.insertBefore(o.nextElementSibling, o), t.position(n), void this.builder.opts.onChange();
this.builder.uo.saveForUndo();
var a = o.nextElementSibling.querySelector(".is-row-tool");
o.nextElementSibling.removeChild(a), a = o.nextElementSibling.querySelector(".is-rowadd-tool"), o.nextElementSibling.removeChild(a), o.nextElementSibling.appendChild(n), o.parentNode.removeChild(o), e.applyBehavior(), t.position(n), n.click(), this.builder.opts.onChange()
} else {
this.builder.uo.saveForUndo();
var l = o.cloneNode(!0);
l.innerHTML = "", l.appendChild(n), E.moveAfter(l, o), e.applyBehavior(), t.position(n), n.click(), this.builder.opts.onChange()
}
o = n.parentNode, i.fixLayout(o, e), o.previousElementSibling && i.fixLayout(o.previousElementSibling, e)
}
}
}, {
key: "duplicateColumn",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
this.builder.uo.saveForUndo();
var o = n.cloneNode(!0);
E.removeClass(o, "cell-active"), o.removeAttribute("data-click");
var r = n.parentNode,
a = 4;
if (this.builder.maxColumns && (a = this.builder.maxColumns), r.childElementCount >= a + 2) return alert(i.out("You have reached the maximum number of columns")), !1;
r.insertBefore(o, n), i.fixLayout(r, e), e.applyBehavior(), t.position(n), n.click(), this.builder.opts.onChange()
}
}
}, {
key: "removeColumn",
value: function () {
var e = this,
t = this.builder,
i = this.columnTool,
n = this.util,
o = n.cellSelected();
if (o) {
var r = o.parentNode;
i.hide(), n.confirm(n.out("Are you sure you want to delete this block?"), (function (a) {
a ? (e.builder.uo.saveForUndo(), r.childElementCount - 2 == 1 ? (r.parentNode.removeChild(r), n.checkEmpty()) : (r.removeChild(o), n.fixLayout(r, t)), n.clearActiveCell(), e.builder.opts.onChange()) : setTimeout((function () {
i.position(o), i.show()
}), 200)
}))
}
}
}, {
key: "increaseColumn",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o, r = i.cellNext(n);
if (r)(o = i.cellNext(r)) || (o = n.previousElementSibling);
else {
if (!(r = n.previousElementSibling)) return;
o = r.previousElementSibling
}
var a = e.opts.row,
l = e.opts.cols,
s = e.opts.colsizes;
if ("" !== a && l.length > 0 && s.length > 0) {
if (o)
for (var c = 0; c < s.length; c++)
for (var d = s[c], u = 0; u < d.length; u++)
if (3 === d[u].length && E.hasClass(n, d[u][0]) && E.hasClass(r, d[u][1]) && E.hasClass(o, d[u][2]) && u + 1 !== d.length) return this.builder.uo.saveForUndo(), E.removeClass(n, d[u][0]), E.removeClass(r, d[u][1]), E.removeClass(o, d[u][2]), E.addClass(n, d[u + 1][0]), E.addClass(r, d[u + 1][1]), E.addClass(o, d[u + 1][2]), t.position(n), void this.builder.opts.onChange();
for (var p = 0; p < s.length; p++)
for (var v = s[p], h = 0; h < v.length; h++)
if (2 === v[h].length && E.hasClass(n, v[h][0]) && E.hasClass(r, v[h][1]) && h + 1 !== v.length) return this.builder.uo.saveForUndo(), E.removeClass(n, v[h][0]), E.removeClass(r, v[h][1]), E.addClass(n, v[h + 1][0]), E.addClass(r, v[h + 1][1]), t.position(n), void this.builder.opts.onChange();
t.position(n)
} else if ("" !== a && l.length > 0 && !E.hasClass(n, l[11])) {
if (E.hasClass(n, l[11])) return;
if (E.hasClass(r, l[0])) return;
this.builder.uo.saveForUndo(), E.hasClass(n, l[10]) ? (E.removeClass(n, l[10]), E.addClass(n, l[11])) : E.hasClass(n, l[9]) ? (E.removeClass(n, l[9]), E.addClass(n, l[10])) : E.hasClass(n, l[8]) ? (E.removeClass(n, l[8]), E.addClass(n, l[9])) : E.hasClass(n, l[7]) ? (E.removeClass(n, l[7]), E.addClass(n, l[8])) : E.hasClass(n, l[6]) ? (E.removeClass(n, l[6]), E.addClass(n, l[7])) : E.hasClass(n, l[5]) ? (E.removeClass(n, l[5]), E.addClass(n, l[6])) : E.hasClass(n, l[4]) ? (E.removeClass(n, l[4]), E.addClass(n, l[5])) : E.hasClass(n, l[3]) ? (E.removeClass(n, l[3]), E.addClass(n, l[4])) : E.hasClass(n, l[2]) ? (E.removeClass(n, l[2]), E.addClass(n, l[3])) : E.hasClass(n, l[1]) ? (E.removeClass(n, l[1]), E.addClass(n, l[2])) : E.hasClass(n, l[0]) && (E.removeClass(n, l[0]), E.addClass(n, l[1])), E.hasClass(r, l[1]) ? (E.removeClass(r, l[1]), E.addClass(r, l[0])) : E.hasClass(r, l[2]) ? (E.removeClass(r, l[2]), E.addClass(r, l[1])) : E.hasClass(r, l[3]) ? (E.removeClass(r, l[3]), E.addClass(r, l[2])) : E.hasClass(r, l[4]) ? (E.removeClass(r, l[4]), E.addClass(r, l[3])) : E.hasClass(r, l[5]) ? (E.removeClass(r, l[5]), E.addClass(r, l[4])) : E.hasClass(r, l[6]) ? (E.removeClass(r, l[6]), E.addClass(r, l[5])) : E.hasClass(r, l[7]) ? (E.removeClass(r, l[7]), E.addClass(r, l[6])) : E.hasClass(r, l[8]) ? (E.removeClass(r, l[8]), E.addClass(r, l[7])) : E.hasClass(r, l[9]) ? (E.removeClass(r, l[9]), E.addClass(r, l[8])) : E.hasClass(r, l[10]) ? (E.removeClass(r, l[10]), E.addClass(r, l[9])) : E.hasClass(r, l[11]) && (E.removeClass(r, l[11]), E.addClass(r, l[10])), t.position(n), this.builder.opts.onChange()
}
}
}
}, {
key: "decreaseColumn",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o, r = i.cellNext(n);
if (r)(o = i.cellNext(r)) || (o = n.previousElementSibling);
else {
if (!(r = n.previousElementSibling)) return;
o = r.previousElementSibling
}
var a = e.opts.row,
l = e.opts.cols,
s = e.opts.colsizes;
if ("" !== a && l.length > 0 && s.length > 0) {
if (o)
for (var c = 0; c < s.length; c++)
for (var d = s[c], u = 0; u < d.length; u++)
if (3 === d[u].length && E.hasClass(n, d[u][0]) && E.hasClass(r, d[u][1]) && E.hasClass(o, d[u][2]) && 0 !== u) return this.builder.uo.saveForUndo(), E.removeClass(n, d[u][0]), E.removeClass(r, d[u][1]), E.removeClass(o, d[u][2]), E.addClass(n, d[u - 1][0]), E.addClass(r, d[u - 1][1]), E.addClass(o, d[u - 1][2]), t.position(n), void this.builder.opts.onChange();
for (var p = 0; p < s.length; p++)
for (var v = s[p], h = 0; h < v.length; h++)
if (2 === v[h].length && E.hasClass(n, v[h][0]) && E.hasClass(r, v[h][1]) && 0 !== h) return this.builder.uo.saveForUndo(), E.removeClass(n, v[h][0]), E.removeClass(r, v[h][1]), E.addClass(n, v[h - 1][0]), E.addClass(r, v[h - 1][1]), t.position(n), void this.builder.opts.onChange();
t.position(n)
} else if ("" !== a && l.length > 0 && !E.hasClass(n, l[11])) {
if (E.hasClass(n, l[0])) return;
if (E.hasClass(r, l[11])) return;
this.builder.uo.saveForUndo(), E.hasClass(n, l[11]) ? (E.removeClass(n, l[11]), E.addClass(n, l[10])) : E.hasClass(n, l[10]) ? (E.removeClass(n, l[10]), E.addClass(n, l[9])) : E.hasClass(n, l[9]) ? (E.removeClass(n, l[9]), E.addClass(n, l[8])) : E.hasClass(n, l[8]) ? (E.removeClass(n, l[8]), E.addClass(n, l[7])) : E.hasClass(n, l[7]) ? (E.removeClass(n, l[7]), E.addClass(n, l[6])) : E.hasClass(n, l[6]) ? (E.removeClass(n, l[6]), E.addClass(n, l[5])) : E.hasClass(n, l[5]) ? (E.removeClass(n, l[5]), E.addClass(n, l[4])) : E.hasClass(n, l[4]) ? (E.removeClass(n, l[4]), E.addClass(n, l[3])) : E.hasClass(n, l[3]) ? (E.removeClass(n, l[3]), E.addClass(n, l[2])) : E.hasClass(n, l[2]) ? (E.removeClass(n, l[2]), E.addClass(n, l[1])) : E.hasClass(n, l[1]) && (E.removeClass(n, l[1]), E.addClass(n, l[0])), E.hasClass(r, l[0]) ? (E.removeClass(r, l[0]), E.addClass(r, l[1])) : E.hasClass(r, l[1]) ? (E.removeClass(r, l[1]), E.addClass(r, l[2])) : E.hasClass(r, l[2]) ? (E.removeClass(r, l[2]), E.addClass(r, l[3])) : E.hasClass(r, l[3]) ? (E.removeClass(r, l[3]), E.addClass(r, l[4])) : E.hasClass(r, l[4]) ? (E.removeClass(r, l[4]), E.addClass(r, l[5])) : E.hasClass(r, l[5]) ? (E.removeClass(r, l[5]), E.addClass(r, l[6])) : E.hasClass(r, l[6]) ? (E.removeClass(r, l[6]), E.addClass(r, l[7])) : E.hasClass(r, l[7]) ? (E.removeClass(r, l[7]), E.addClass(r, l[8])) : E.hasClass(r, l[8]) ? (E.removeClass(r, l[8]), E.addClass(r, l[9])) : E.hasClass(r, l[9]) ? (E.removeClass(r, l[9]), E.addClass(r, l[10])) : E.hasClass(r, l[10]) && (E.removeClass(r, l[10]), E.addClass(r, l[11])), t.position(n), this.builder.opts.onChange()
}
}
}
}, {
key: "removeRow",
value: function () {
var e = this,
t = this.util,
i = t.cellSelected();
if (i) {
var n = i.parentNode;
E.removeClass(n, "row-outline"), this.columnTool.hide(), t.confirm(t.out("Are you sure you want to delete this block?"), (function (i) {
var n = t.cellSelected();
if (n) {
var o = n.parentNode;
i && (e.builder.uo.saveForUndo(), o.parentNode.removeChild(o), t.checkEmpty(), e.builder.opts.onChange())
}
}))
}
}
}, {
key: "moveRowUp",
value: function () {
var e = this,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o = n.parentNode;
if (E.removeClass(o, "row-outline"), t.hide(), o.previousElementSibling) this.builder.uo.saveForUndo(), o.parentNode.insertBefore(o, o.previousElementSibling), this.rowTool.position(o), this.builder.opts.onChange();
else {
var r = o.parentNode,
a = null,
l = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(l, (function (t) {
if (t.innerHTML === r.innerHTML && a) return E.moveAfter(o, a.lastChild), e.rowTool.position(o), i.checkEmpty(), e.builder.opts.onChange(), !1;
a = t
}))
}
}
}
}, {
key: "moveRowDown",
value: function () {
var e = this,
t = this.columnTool,
i = this.util,
n = i.cellSelected();
if (n) {
var o = n.parentNode;
if (E.removeClass(o, "row-outline"), t.hide(), o.nextElementSibling) this.builder.uo.saveForUndo(), o.parentNode.insertBefore(o.nextElementSibling, o), this.rowTool.position(o), this.builder.opts.onChange();
else {
var r = o.parentNode,
a = !1,
l = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(l, (function (t) {
if (a) return t.insertBefore(o, t.firstChild), e.rowTool.position(o), i.checkEmpty(), e.builder.opts.onChange(), !1;
t.innerHTML === r.innerHTML && (a = !0)
}))
}
}
}
}, {
key: "duplicateRow",
value: function () {
var e = this.builder,
t = this.columnTool,
i = this.util.cellSelected();
if (i) {
var n = i.parentNode;
E.removeClass(n, "row-outline"), t.hide(), this.builder.uo.saveForUndo();
var o = n.cloneNode(!0);
o.removeChild(o.querySelector(".is-row-tool"));
var r = E.elementChildren(o);
r.forEach((function (t) {
t.removeAttribute("data-click"), t.classList.contains("cell-active") && (e.activeCol = t)
})), E.moveAfter(o, n), E.removeClass(n, "row-active"), E.removeClass(n, "row-outline"), (r = E.elementChildren(n)).forEach((function (e) {
E.removeClass(e, "cell-active")
})), e.applyBehavior(), this.rowTool.position(o), this.builder.opts.onChange()
}
}
}, {
key: "refreshColumnTool",
value: function (e) {
this.columnTool.position(e)
}
}, {
key: "showColumnTool",
value: function () {
this.columnTool.show()
}
}, {
key: "hideColumnTool",
value: function () {
this.columnTool.hide()
}
}]), e
}(),
L = function () {
function e(i) {
t(this, e), this.builder = i
}
return n(e, [{
key: "position",
value: function (e) {
var t = new p(this.builder).builderStuff(),
i = e.querySelector(".is-row-tool"),
n = t.querySelector(".rowmore");
E.addClass(n, "transition1");
var o = i.querySelector(".row-more"),
r = o.getBoundingClientRect().top + window.pageYOffset,
a = o.getBoundingClientRect().left + window.pageXOffset;
n.style.top = r - 8 + "px", E.removeClass(n, "arrow-bottom"), E.removeClass(n, "arrow-left"), E.removeClass(n, "arrow-right"), E.removeClass(n, "center"), E.removeClass(n, "right"), E.removeClass(n, "left"), "right" === this.builder.opts.rowTool ? (n.style.left = a - n.offsetWidth - 10 + "px", E.addClass(n, "arrow-right"), E.addClass(n, "left")) : (n.style.left = a + 35 + "px", E.addClass(n, "arrow-left"), E.addClass(n, "left")), setTimeout((function () {
E.removeClass(n, "transition1")
}), 300)
}
}]), e
}(),
A = function () {
function e(i) {
t(this, e), this.builder = i
}
return n(e, [{
key: "position",
value: function (e) {
var t = this,
i = new p(this.builder).builderStuff();
this.columnTool = i.querySelector(".is-column-tool"), this.columnMore = i.querySelector(".columnmore"), E.addClass(this.columnMore, "transition1"), setTimeout((function () {
t.columnTool.style.top = e.getBoundingClientRect().top - 29 + window.pageYOffset + "px", t.columnTool.style.left = e.getBoundingClientRect().left - 1 + "px";
var i = parseInt(t.columnTool.style.top),
n = parseInt(t.columnTool.style.left);
t.columnMore.style.top = i + 35 + "px", t.columnMore.style.left = n + 19 + "px", setTimeout((function () {
E.removeClass(t.columnMore, "transition1")
}), 300)
}), 300)
}
}, {
key: "hide",
value: function () {
var e = new p(this.builder).builderStuff();
this.columnTool = e.querySelector(".is-column-tool"), E.removeClass(this.columnTool, "active")
}
}, {
key: "show",
value: function () {
var e = new p(this.builder).builderStuff();
this.columnTool = e.querySelector(".is-column-tool"), E.addClass(this.columnTool, "active")
}
}]), e
}(),
q = function () {
function e() {
var i = this,
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, e), this.opts = n;
var o = document.querySelectorAll(this.opts.selector);
Array.prototype.forEach.call(o, (function (e) {
e.setAttribute("draggable", ""), e.addEventListener("touchstart", i.dragStart, !1), e.addEventListener("touchend", i.dragEnd, !1), e.addEventListener("mousedown", i.dragStart, !1), e.addEventListener("mouseup", i.dragEnd, !1)
})), document.addEventListener("touchmove", this.drag, !1), document.addEventListener("mousemove", this.drag, !1)
}
return n(e, [{
key: "dragStart",
value: function (e) {
var t, i;
e.target.hasAttribute("draggable") && (d = !0, (u = e.target.parentElement).getAttribute("data-xOffset") ? t = u.getAttribute("data-xOffset") : (u.setAttribute("data-xOffset", 0), t = 0), u.getAttribute("data-yOffset") ? i = u.getAttribute("data-yOffset") : (u.setAttribute("data-yOffset", 0), i = 0), "touchstart" === e.type ? (o = e.touches[0].clientX - t, r = e.touches[0].clientY - i) : (o = e.clientX - t, r = e.clientY - i), u.setAttribute("data-initialX", o), u.setAttribute("data-initialY", r))
}
}, {
key: "dragEnd",
value: function (e) {
e.target.hasAttribute("draggable") && (a = u.getAttribute("data-currentX"), l = u.getAttribute("data-currentY"), o = a, r = l, u.setAttribute("data-initialX", o), u.setAttribute("data-initialY", r), d = !1)
}
}, {
key: "drag",
value: function (e) {
if (d) {
e.preventDefault();
var t = u.getAttribute("data-initialX"),
i = u.getAttribute("data-initialY");
"touchmove" === e.type ? (a = e.touches[0].clientX - t, l = e.touches[0].clientY - i) : (a = e.clientX - t, l = e.clientY - i), u.style.transform = "translate3d(" + a + "px, " + l + "px, 0)", u.setAttribute("data-currentX", a), u.setAttribute("data-currentY", l), s = a, c = l, u.setAttribute("data-xOffset", s), u.setAttribute("data-yOffset", c)
}
}
}, {
key: "isTouchSupport",
value: function () {
return "ontouchstart" in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0
}
}]), e
}(),
M = new v,
_ = function (e) {
var t = new p(e),
i = new k(e),
n = new g(e),
o = "";
e.opts.rowHtmlEditor && (o = '<button title="'.concat(t.out("HTML"), '" class="row-html">\n <svg class="is-icon-flex" style="margin-right:-3px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>\n </button>'));
var r = "";
e.opts.columnHtmlEditor && (r = '<button title="'.concat(t.out("HTML"), '" class="cell-html">\n <svg class="is-icon-flex" style="margin-right:-3px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg>\n </button>'));
var a = '<div class="is-modal grideditor" style="z-index:10002;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;line-height:1.5;height:20px;border:none;">\n <div class="is-modal-close" style="z-index:1;width:20px;height:20px;position:absolute;top:0px;right:0px;box-sizing:border-box;padding:0;line-height:20px;font-size:10px;color:#777;text-align:center;cursor:pointer;">&#10005;</div>\n </div>\n <div style="padding:30px 0 5px 18px;font-size:10px;color:#333;text-transform:uppercase;letter-spacing:1px;">'.concat(t.out("Row"), '</div>\n <div style="display:flex;flex-flow:wrap;">\n <button title="').concat(t.out("Add"), '" class="row-add"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:19px;height:19px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n <button title="').concat(t.out("Duplicate"), '" class="row-duplicate" style="display: block;"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></button>\n <button title="').concat(t.out("Move Up"), '" class="row-up" style="display: block;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></button>\n <button title="').concat(t.out("Move Down"), '" class="row-down" style="display: block;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></button>\n ').concat(o, '\n <button title="').concat(t.out("Delete"), '" class="row-remove"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:20px;height:20px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n <div style="padding:8px 0 5px 18px;font-size:11px;color:#333;text-transform:uppercase;letter-spacing:1px;">').concat(t.out("Column"), '</div>\n <div style="display:flex;flex-flow:wrap;">\n <button title="').concat(t.out("Add"), '" class="cell-add"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:19px;height:19px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n <button title="').concat(t.out("Duplicate"), '" class="cell-duplicate"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></button>\n <button title="').concat(t.out("Move Up"), '" class="cell-up"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></button>\n <button title="').concat(t.out("Move Down"), '" class="cell-down"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></button>\n <button title="').concat(t.out("Move Left"), '" class="cell-prev"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-left"></use></svg></button>\n <button title="').concat(t.out("Move Right"), '" class="cell-next"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-right"></use></svg></button>\n <button title="').concat(t.out("Increase"), '" class="cell-increase"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-increase"></use></svg></button>\n <button title="').concat(t.out("Decrease"), '" class="cell-decrease"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-decrease"></use></svg></button>\n ').concat(r, '\n <button title="').concat(t.out("Delete"), '" class="cell-remove"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:20px;height:20px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n <div style="width:100%;border-top:#ececec 1px solid;display:flex">\n <button title="').concat(t.out("Outline"), '" class="grid-outline"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:12px;height:12px;"><use xlink:href="#ion-ios-grid-view-outline"></use></svg></button>\n \x3c!--<button title="').concat(t.out("Element Tool"), '" class="cell-elmtool"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:12px;height:12px;"><use xlink:href="#ion-ios-gear"></use></svg></button>--\x3e\n </div>\n </div>\n </div>'),
l = t.builderStuff();
M.appendHtml(l, a), new q({
selector: ".is-draggable"
});
var s = document.querySelector(".grideditor");
document.addEventListener("click", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if (M.hasClass(s, "active")) {
var i = M.parentsHasClass(t, "is-builder"),
n = M.parentsHasClass(t, "grideditor"),
o = M.parentsHasClass(t, "is-modal"),
r = M.parentsHasClass(t, "is-pop"),
a = M.parentsHasClass(t, "rte-grideditor") || M.hasClass(t, "rte-grideditor");
if (i || n || o || r || a) return void(s.style.display = "");
s.style.display = "none"
}
}), !1);
var c = s.querySelector(".is-modal-close");
M.addEventListener(c, "click", (function () {
M.removeClass(s, "active");
var t = document.querySelectorAll(e.opts.container);
Array.prototype.forEach.call(t, (function (e) {
e.removeAttribute("grideditor")
}))
})), c = s.querySelector(".grid-outline"), M.addEventListener(c, "click", (function () {
var t = document.querySelectorAll(e.opts.container);
Array.prototype.forEach.call(t, (function (e) {
e.hasAttribute("gridoutline") ? e.removeAttribute("gridoutline") : e.setAttribute("gridoutline", "")
}))
}));
var d = C(e);
c = s.querySelector(".cell-add"), M.addEventListener(c, "click", (function () {
d.querySelector(".is-pop-tabs").style.display = "flex";
var e = s.querySelector(".cell-add"),
t = e.getBoundingClientRect().top + window.pageYOffset,
i = e.getBoundingClientRect().left + window.pageXOffset;
d.style.display = "flex";
var n = d.offsetWidth;
d.style.top = t + "px", d.style.left = i - n - 8 + "px", M.removeClass(d, "arrow-bottom"), M.removeClass(d, "arrow-left"), M.removeClass(d, "arrow-top"), M.removeClass(d, "center"), M.removeClass(d, "left"), M.addClass(d, "arrow-right"), M.addClass(d, "right"), "left" === d.querySelector(".active").getAttribute("data-value") ? d.setAttribute("data-mode", "cell-left") : d.setAttribute("data-mode", "cell-right")
})), c = s.querySelector(".cell-prev"), M.addEventListener(c, "click", (function () {
i.moveColumnPrevious(), t.clearControls()
})), c = s.querySelector(".cell-next"), M.addEventListener(c, "click", (function () {
i.moveColumnNext(), t.clearControls()
})), c = s.querySelector(".cell-increase"), M.addEventListener(c, "click", (function () {
i.increaseColumn(), t.clearControls()
})), c = s.querySelector(".cell-decrease"), M.addEventListener(c, "click", (function () {
i.decreaseColumn(), t.clearControls()
})), c = s.querySelector(".cell-up"), M.addEventListener(c, "click", (function () {
i.moveColumnUp(), t.clearControls()
})), c = s.querySelector(".cell-down"), M.addEventListener(c, "click", (function () {
i.moveColumnDown(), t.clearControls()
})), c = s.querySelector(".cell-duplicate"), M.addEventListener(c, "click", (function () {
i.duplicateColumn(), t.clearControls()
})), c = s.querySelector(".cell-remove"), M.addEventListener(c, "click", (function () {
i.removeColumn(), t.clearControls()
})), (c = s.querySelector(".cell-html")) && M.addEventListener(c, "click", (function () {
t.cellSelected() && n.view("cell")
})), c = s.querySelector(".row-add"), M.addEventListener(c, "click", (function () {
d.querySelector(".is-pop-tabs").style.display = "none";
var e = s.querySelector(".row-add"),
t = e.getBoundingClientRect().top + window.pageYOffset,
i = e.getBoundingClientRect().left + window.pageXOffset;
d.style.display = "flex";
var n = d.offsetWidth;
d.style.top = t + "px", d.style.left = i - n - 8 + "px", M.removeClass(d, "arrow-bottom"), M.removeClass(d, "arrow-left"), M.removeClass(d, "arrow-top"), M.removeClass(d, "center"), M.removeClass(d, "left"), M.addClass(d, "arrow-right"), M.addClass(d, "right"), d.setAttribute("data-mode", "row")
})), c = s.querySelector(".row-up"), M.addEventListener(c, "click", (function () {
i.moveRowUp(), t.clearControls()
})), c = s.querySelector(".row-down"), M.addEventListener(c, "click", (function () {
i.moveRowDown(), t.clearControls()
})), c = s.querySelector(".row-duplicate"), M.addEventListener(c, "click", (function () {
i.duplicateRow(), t.clearControls()
})), c = s.querySelector(".row-remove"), M.addEventListener(c, "click", (function () {
i.removeRow(), t.clearControls()
})), (c = s.querySelector(".row-html")) && M.addEventListener(c, "click", (function () {
t.cellSelected() && n.view("row")
}))
},
T = new v,
O = function e(i) {
var n = this,
o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
t(this, e);
var r = {
onChange: function () {}
};
this.opts = Object.assign(this, r, o);
var a = i,
l = a.getAttribute("data-group"),
s = document.querySelector('.is-selectbox-options[data-group="' + l + '"]');
this.opts.dropdown && (s = this.opts.dropdown), T.addEventListener(a, "click", (function () {
if ("none" === s.style.display) {
var e = document.querySelectorAll(".is-selectbox-options");
Array.prototype.forEach.call(e, (function (e) {
e.style.display = "none"
})), s.style.display = "block", T.elementChildren(s).forEach((function (e) {
T.removeClass(e, "selected")
}));
var t = a.getAttribute("data-value"),
i = s.querySelector('[data-value="' + t + '"]');
i && T.addClass(i, "selected")
} else s.style.display = "none"
}));
var c = T.elementChildren(s);
c.forEach((function (e) {
T.addEventListener(e, "click", (function () {
s.style.display = "none";
var t = e.getAttribute("data-value");
a.querySelector("span").innerHTML = e.innerHTML, a.setAttribute("data-value", t), n.opts.onChange(t)
}))
}))
};
/**!
* Sortable 1.10.1
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function N(e) {
return (N = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
return typeof e
} : function (e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
})(e)
}
function R(e, t, i) {
return t in e ? Object.defineProperty(e, t, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = i, e
}
function B() {
return (B = Object.assign || function (e) {
for (var t = 1; t < arguments.length; t++) {
var i = arguments[t];
for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n])
}
return e
}).apply(this, arguments)
}
function I(e) {
for (var t = 1; t < arguments.length; t++) {
var i = null != arguments[t] ? arguments[t] : {},
n = Object.keys(i);
"function" == typeof Object.getOwnPropertySymbols && (n = n.concat(Object.getOwnPropertySymbols(i).filter((function (e) {
return Object.getOwnPropertyDescriptor(i, e).enumerable
})))), n.forEach((function (t) {
R(e, t, i[t])
}))
}
return e
}
function H(e, t) {
if (null == e) return {};
var i, n, o = function (e, t) {
if (null == e) return {};
var i, n, o = {},
r = Object.keys(e);
for (n = 0; n < r.length; n++) i = r[n], t.indexOf(i) >= 0 || (o[i] = e[i]);
return o
}(e, t);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
for (n = 0; n < r.length; n++) i = r[n], t.indexOf(i) >= 0 || Object.prototype.propertyIsEnumerable.call(e, i) && (o[i] = e[i])
}
return o
}
function D(e) {
return function (e) {
if (Array.isArray(e)) {
for (var t = 0, i = new Array(e.length); t < e.length; t++) i[t] = e[t];
return i
}
}(e) || function (e) {
if (Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e)) return Array.from(e)
}(e) || function () {
throw new TypeError("Invalid attempt to spread non-iterable instance")
}()
}
function F(e) {
if ("undefined" != typeof window && window.navigator) return !!navigator.userAgent.match(e)
}
var P = F(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
U = F(/Edge/i),
z = F(/firefox/i),
W = F(/safari/i) && !F(/chrome/i) && !F(/android/i),
j = F(/iP(ad|od|hone)/i),
Y = F(/chrome/i) && F(/android/i),
X = {
capture: !1,
passive: !1
};
function G(e, t, i) {
e.addEventListener(t, i, !P && X)
}
function V(e, t, i) {
e.removeEventListener(t, i, !P && X)
}
function Z(e, t) {
if (t) {
if (">" === t[0] && (t = t.substring(1)), e) try {
if (e.matches) return e.matches(t);
if (e.msMatchesSelector) return e.msMatchesSelector(t);
if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t)
} catch (e) {
return !1
}
return !1
}
}
function K(e) {
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode
}
function J(e, t, i, n) {
if (e) {
i = i || document;
do {
if (null != t && (">" === t[0] ? e.parentNode === i && Z(e, t) : Z(e, t)) || n && e === i) return e;
if (e === i) break
} while (e = K(e))
}
return null
}
var $, Q = /\s+/g;
function ee(e, t, i) {
if (e && t)
if (e.classList) e.classList[i ? "add" : "remove"](t);
else {
var n = (" " + e.className + " ").replace(Q, " ").replace(" " + t + " ", " ");
e.className = (n + (i ? " " + t : "")).replace(Q, " ")
}
}
function te(e, t, i) {
var n = e && e.style;
if (n) {
if (void 0 === i) return document.defaultView && document.defaultView.getComputedStyle ? i = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (i = e.currentStyle), void 0 === t ? i : i[t];
t in n || -1 !== t.indexOf("webkit") || (t = "-webkit-" + t), n[t] = i + ("string" == typeof i ? "" : "px")
}
}
function ie(e, t) {
var i = "";
if ("string" == typeof e) i = e;
else
do {
var n = te(e, "transform");
n && "none" !== n && (i = n + " " + i)
} while (!t && (e = e.parentNode));
var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
return o && new o(i)
}
function ne(e, t, i) {
if (e) {
var n = e.getElementsByTagName(t),
o = 0,
r = n.length;
if (i)
for (; o < r; o++) i(n[o], o);
return n
}
return []
}
function oe() {
return P ? document.documentElement : document.scrollingElement
}
function re(e, t, i, n, o) {
if (e.getBoundingClientRect || e === window) {
var r, a, l, s, c, d, u;
if (e !== window && e !== oe() ? (a = (r = e.getBoundingClientRect()).top, l = r.left, s = r.bottom, c = r.right, d = r.height, u = r.width) : (a = 0, l = 0, s = window.innerHeight, c = window.innerWidth, d = window.innerHeight, u = window.innerWidth), (t || i) && e !== window && (o = o || e.parentNode, !P))
do {
if (o && o.getBoundingClientRect && ("none" !== te(o, "transform") || i && "static" !== te(o, "position"))) {
var p = o.getBoundingClientRect();
a -= p.top + parseInt(te(o, "border-top-width")), l -= p.left + parseInt(te(o, "border-left-width")), s = a + r.height, c = l + r.width;
break
}
} while (o = o.parentNode);
if (n && e !== window) {
var v = ie(o || e),
h = v && v.a,
f = v && v.d;
v && (s = (a /= f) + (d /= f), c = (l /= h) + (u /= h))
}
return {
top: a,
left: l,
bottom: s,
right: c,
width: u,
height: d
}
}
}
function ae(e, t, i) {
for (var n = ue(e, !0), o = re(e)[t]; n;) {
var r = re(n)[i];
if (!("top" === i || "left" === i ? o >= r : o <= r)) return n;
if (n === oe()) break;
n = ue(n, !1)
}
return !1
}
function le(e, t, i) {
for (var n = 0, o = 0, r = e.children; o < r.length;) {
if ("none" !== r[o].style.display && r[o] !== gt.ghost && r[o] !== gt.dragged && J(r[o], i.draggable, e, !1)) {
if (n === t) return r[o];
n++
}
o++
}
return null
}
function se(e, t) {
for (var i = e.lastElementChild; i && (i === gt.ghost || "none" === te(i, "display") || t && !Z(i, t));) i = i.previousElementSibling;
return i || null
}
function ce(e, t) {
var i = 0;
if (!e || !e.parentNode) return -1;
for (; e = e.previousElementSibling;) "TEMPLATE" === e.nodeName.toUpperCase() || e === gt.clone || t && !Z(e, t) || i++;
return i
}
function de(e) {
var t = 0,
i = 0,
n = oe();
if (e)
do {
var o = ie(e),
r = o.a,
a = o.d;
t += e.scrollLeft * r, i += e.scrollTop * a
} while (e !== n && (e = e.parentNode));
return [t, i]
}
function ue(e, t) {
if (!e || !e.getBoundingClientRect) return oe();
var i = e,
n = !1;
do {
if (i.clientWidth < i.scrollWidth || i.clientHeight < i.scrollHeight) {
var o = te(i);
if (i.clientWidth < i.scrollWidth && ("auto" == o.overflowX || "scroll" == o.overflowX) || i.clientHeight < i.scrollHeight && ("auto" == o.overflowY || "scroll" == o.overflowY)) {
if (!i.getBoundingClientRect || i === document.body) return oe();
if (n || t) return i;
n = !0
}
}
} while (i = i.parentNode);
return oe()
}
function pe(e, t) {
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width)
}
function ve(e, t) {
return function () {
if (!$) {
var i = arguments,
n = this;
1 === i.length ? e.call(n, i[0]) : e.apply(n, i), $ = setTimeout((function () {
$ = void 0
}), t)
}
}
}
function he(e, t, i) {
e.scrollLeft += t, e.scrollTop += i
}
function fe(e) {
var t = window.Polymer,
i = window.jQuery || window.Zepto;
return t && t.dom ? t.dom(e).cloneNode(!0) : i ? i(e).clone(!0)[0] : e.cloneNode(!0)
}
function ge(e, t) {
te(e, "position", "absolute"), te(e, "top", t.top), te(e, "left", t.left), te(e, "width", t.width), te(e, "height", t.height)
}
function me(e) {
te(e, "position", ""), te(e, "top", ""), te(e, "left", ""), te(e, "width", ""), te(e, "height", "")
}
var ye = "Sortable" + (new Date).getTime();
function be() {
var e, t = [];
return {
captureAnimationState: function () {
(t = [], this.options.animation) && [].slice.call(this.el.children).forEach((function (e) {
if ("none" !== te(e, "display") && e !== gt.ghost) {
t.push({
target: e,
rect: re(e)
});
var i = I({}, t[t.length - 1].rect);
if (e.thisAnimationDuration) {
var n = ie(e, !0);
n && (i.top -= n.f, i.left -= n.e)
}
e.fromRect = i
}
}))
},
addAnimationState: function (e) {
t.push(e)
},
removeAnimationState: function (e) {
t.splice(function (e, t) {
for (var i in e)
if (e.hasOwnProperty(i))
for (var n in t)
if (t.hasOwnProperty(n) && t[n] === e[i][n]) return Number(i);
return -1
}(t, {
target: e
}), 1)
},
animateAll: function (i) {
var n = this;
if (!this.options.animation) return clearTimeout(e), void("function" == typeof i && i());
var o = !1,
r = 0;
t.forEach((function (e) {
var t = 0,
i = e.target,
a = i.fromRect,
l = re(i),
s = i.prevFromRect,
c = i.prevToRect,
d = e.rect,
u = ie(i, !0);
u && (l.top -= u.f, l.left -= u.e), i.toRect = l, i.thisAnimationDuration && pe(s, l) && !pe(a, l) && (d.top - l.top) / (d.left - l.left) == (a.top - l.top) / (a.left - l.left) && (t = function (e, t, i, n) {
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) * n.animation
}(d, s, c, n.options)), pe(l, a) || (i.prevFromRect = a, i.prevToRect = l, t || (t = n.options.animation), n.animate(i, d, l, t)), t && (o = !0, r = Math.max(r, t), clearTimeout(i.animationResetTimer), i.animationResetTimer = setTimeout((function () {
i.animationTime = 0, i.prevFromRect = null, i.fromRect = null, i.prevToRect = null, i.thisAnimationDuration = null
}), t), i.thisAnimationDuration = t)
})), clearTimeout(e), o ? e = setTimeout((function () {
"function" == typeof i && i()
}), r) : "function" == typeof i && i(), t = []
},
animate: function (e, t, i, n) {
if (n) {
te(e, "transition", ""), te(e, "transform", "");
var o = ie(this.el),
r = o && o.a,
a = o && o.d,
l = (t.left - i.left) / (r || 1),
s = (t.top - i.top) / (a || 1);
e.animatingX = !!l, e.animatingY = !!s, te(e, "transform", "translate3d(" + l + "px," + s + "px,0)"),
function (e) {
e.offsetWidth
}(e), te(e, "transition", "transform " + n + "ms" + (this.options.easing ? " " + this.options.easing : "")), te(e, "transform", "translate3d(0,0,0)"), "number" == typeof e.animated && clearTimeout(e.animated), e.animated = setTimeout((function () {
te(e, "transition", ""), te(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1
}), n)
}
}
}
}
var xe = [],
we = {
initializeByDefault: !0
},
Se = {
mount: function (e) {
for (var t in we) !we.hasOwnProperty(t) || t in e || (e[t] = we[t]);
xe.push(e)
},
pluginEvent: function (e, t, i) {
var n = this;
this.eventCanceled = !1, i.cancel = function () {
n.eventCanceled = !0
};
var o = e + "Global";
xe.forEach((function (n) {
t[n.pluginName] && (t[n.pluginName][o] && t[n.pluginName][o](I({
sortable: t
}, i)), t.options[n.pluginName] && t[n.pluginName][e] && t[n.pluginName][e](I({
sortable: t
}, i)))
}))
},
initializePlugins: function (e, t, i, n) {
for (var o in xe.forEach((function (n) {
var o = n.pluginName;
if (e.options[o] || n.initializeByDefault) {
var r = new n(e, t, e.options);
r.sortable = e, r.options = e.options, e[o] = r, B(i, r.defaults)
}
})), e.options)
if (e.options.hasOwnProperty(o)) {
var r = this.modifyOption(e, o, e.options[o]);
void 0 !== r && (e.options[o] = r)
}
},
getEventProperties: function (e, t) {
var i = {};
return xe.forEach((function (n) {
"function" == typeof n.eventProperties && B(i, n.eventProperties.call(t[n.pluginName], e))
})), i
},
modifyOption: function (e, t, i) {
var n;
return xe.forEach((function (o) {
e[o.pluginName] && o.optionListeners && "function" == typeof o.optionListeners[t] && (n = o.optionListeners[t].call(e[o.pluginName], i))
})), n
}
};
function Ce(e) {
var t = e.sortable,
i = e.rootEl,
n = e.name,
o = e.targetEl,
r = e.cloneEl,
a = e.toEl,
l = e.fromEl,
s = e.oldIndex,
c = e.newIndex,
d = e.oldDraggableIndex,
u = e.newDraggableIndex,
p = e.originalEvent,
v = e.putSortable,
h = e.extraEventProperties;
if (t = t || i && i[ye]) {
var f, g = t.options,
m = "on" + n.charAt(0).toUpperCase() + n.substr(1);
!window.CustomEvent || P || U ? (f = document.createEvent("Event")).initEvent(n, !0, !0) : f = new CustomEvent(n, {
bubbles: !0,
cancelable: !0
}), f.to = a || i, f.from = l || i, f.item = o || i, f.clone = r, f.oldIndex = s, f.newIndex = c, f.oldDraggableIndex = d, f.newDraggableIndex = u, f.originalEvent = p, f.pullMode = v ? v.lastPutMode : void 0;
var y = I({}, h, Se.getEventProperties(n, t));
for (var b in y) f[b] = y[b];
i && i.dispatchEvent(f), g[m] && g[m].call(t, f)
}
}
var Ee = function (e, t) {
var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
n = i.evt,
o = H(i, ["evt"]);
Se.pluginEvent.bind(gt)(e, t, I({
dragEl: Le,
parentEl: Ae,
ghostEl: qe,
rootEl: Me,
nextEl: _e,
lastDownEl: Te,
cloneEl: Oe,
cloneHidden: Ne,
dragStarted: Xe,
putSortable: Fe,
activeSortable: gt.active,
originalEvent: n,
oldIndex: Re,
oldDraggableIndex: Ie,
newIndex: Be,
newDraggableIndex: He,
hideGhostForTarget: pt,
unhideGhostForTarget: vt,
cloneNowHidden: function () {
Ne = !0
},
cloneNowShown: function () {
Ne = !1
},
dispatchSortableEvent: function (e) {
ke({
sortable: t,
name: e,
originalEvent: n
})
}
}, o))
};
function ke(e) {
Ce(I({
putSortable: Fe,
cloneEl: Oe,
targetEl: Le,
rootEl: Me,
oldIndex: Re,
oldDraggableIndex: Ie,
newIndex: Be,
newDraggableIndex: He
}, e))
}
var Le, Ae, qe, Me, _e, Te, Oe, Ne, Re, Be, Ie, He, De, Fe, Pe, Ue, ze, We, je, Ye, Xe, Ge, Ve, Ze, Ke, Je = !1,
$e = !1,
Qe = [],
et = !1,
tt = !1,
it = [],
nt = !1,
ot = [],
rt = "undefined" != typeof document,
at = j,
lt = U || P ? "cssFloat" : "float",
st = rt && !Y && !j && "draggable" in document.createElement("div"),
ct = function () {
if (rt) {
if (P) return !1;
var e = document.createElement("x");
return e.style.cssText = "pointer-events:auto", "auto" === e.style.pointerEvents
}
}(),
dt = function (e, t) {
var i = te(e),
n = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth),
o = le(e, 0, t),
r = le(e, 1, t),
a = o && te(o),
l = r && te(r),
s = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + re(o).width,
c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + re(r).width;
if ("flex" === i.display) return "column" === i.flexDirection || "column-reverse" === i.flexDirection ? "vertical" : "horizontal";
if ("grid" === i.display) return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
if (o && a.float && "none" !== a.float) {
var d = "left" === a.float ? "left" : "right";
return !r || "both" !== l.clear && l.clear !== d ? "horizontal" : "vertical"
}
return o && ("block" === a.display || "flex" === a.display || "table" === a.display || "grid" === a.display || s >= n && "none" === i[lt] || r && "none" === i[lt] && s + c > n) ? "vertical" : "horizontal"
},
ut = function (e) {
function t(e, i) {
return function (n, o, r, a) {
var l = n.options.group.name && o.options.group.name && n.options.group.name === o.options.group.name;
if (null == e && (i || l)) return !0;
if (null == e || !1 === e) return !1;
if (i && "clone" === e) return e;
if ("function" == typeof e) return t(e(n, o, r, a), i)(n, o, r, a);
var s = (i ? n : o).options.group.name;
return !0 === e || "string" == typeof e && e === s || e.join && e.indexOf(s) > -1
}
}
var i = {},
n = e.group;
n && "object" == N(n) || (n = {
name: n
}), i.name = n.name, i.checkPull = t(n.pull, !0), i.checkPut = t(n.put), i.revertClone = n.revertClone, e.group = i
},
pt = function () {
!ct && qe && te(qe, "display", "none")
},
vt = function () {
!ct && qe && te(qe, "display", "")
};
rt && document.addEventListener("click", (function (e) {
if ($e) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), $e = !1, !1
}), !0);
var ht = function (e) {
if (Le) {
var t = function (e, t) {
var i;
return Qe.some((function (n) {
if (!se(n)) {
var o = re(n),
r = n[ye].options.emptyInsertThreshold,
a = e >= o.left - r && e <= o.right + r,
l = t >= o.top - r && t <= o.bottom + r;
return r && a && l ? i = n : void 0
}
})), i
}((e = e.touches ? e.touches[0] : e).clientX, e.clientY);
if (t) {
var i = {};
for (var n in e) e.hasOwnProperty(n) && (i[n] = e[n]);
i.target = i.rootEl = t, i.preventDefault = void 0, i.stopPropagation = void 0, t[ye]._onDragOver(i)
}
}
},
ft = function (e) {
Le && Le.parentNode[ye]._isOutsideThisEl(e.target)
};
function gt(e, t) {
if (!e || !e.nodeType || 1 !== e.nodeType) throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
this.el = e, this.options = t = B({}, t), e[ye] = this;
var i = {
group: null,
sort: !0,
disabled: !1,
store: null,
handle: null,
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
swapThreshold: 1,
invertSwap: !1,
invertedSwapThreshold: null,
removeCloneOnHide: !0,
direction: function () {
return dt(e, this.options)
},
ghostClass: "sortable-ghost",
chosenClass: "sortable-chosen",
dragClass: "sortable-drag",
ignore: "a, img",
filter: null,
preventOnFilter: !0,
animation: 0,
easing: null,
setData: function (e, t) {
e.setData("Text", t.textContent)
},
dropBubble: !1,
dragoverBubble: !1,
dataIdAttr: "data-id",
delay: 0,
delayOnTouchOnly: !1,
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
forceFallback: !1,
fallbackClass: "sortable-fallback",
fallbackOnBody: !1,
fallbackTolerance: 0,
fallbackOffset: {
x: 0,
y: 0
},
supportPointer: !1 !== gt.supportPointer && "PointerEvent" in window,
emptyInsertThreshold: 5
};
for (var n in Se.initializePlugins(this, e, i), i) !(n in t) && (t[n] = i[n]);
for (var o in ut(t), this) "_" === o.charAt(0) && "function" == typeof this[o] && (this[o] = this[o].bind(this));
this.nativeDraggable = !t.forceFallback && st, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? G(e, "pointerdown", this._onTapStart) : (G(e, "mousedown", this._onTapStart), G(e, "touchstart", this._onTapStart)), this.nativeDraggable && (G(e, "dragover", this), G(e, "dragenter", this)), Qe.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), B(this, be())
}
function mt(e, t, i, n, o, r, a, l) {
var s, c, d = e[ye],
u = d.options.onMove;
return !window.CustomEvent || P || U ? (s = document.createEvent("Event")).initEvent("move", !0, !0) : s = new CustomEvent("move", {
bubbles: !0,
cancelable: !0
}), s.to = t, s.from = e, s.dragged = i, s.draggedRect = n, s.related = o || t, s.relatedRect = r || re(t), s.willInsertAfter = l, s.originalEvent = a, e.dispatchEvent(s), u && (c = u.call(d, s, a)), c
}
function yt(e) {
e.draggable = !1
}
function bt() {
nt = !1
}
function xt(e) {
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, i = t.length, n = 0; i--;) n += t.charCodeAt(i);
return n.toString(36)
}
function wt(e) {
return setTimeout(e, 0)
}
function St(e) {
return clearTimeout(e)
}
gt.prototype = {
constructor: gt,
_isOutsideThisEl: function (e) {
this.el.contains(e) || e === this.el || (Ge = null)
},
_getDirection: function (e, t) {
return "function" == typeof this.options.direction ? this.options.direction.call(this, e, t, Le) : this.options.direction
},
_onTapStart: function (e) {
if (e.cancelable) {
var t = this,
i = this.el,
n = this.options,
o = n.preventOnFilter,
r = e.type,
a = e.touches && e.touches[0] || e.pointerType && "touch" === e.pointerType && e,
l = (a || e).target,
s = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l,
c = n.filter;
if (function (e) {
ot.length = 0;
var t = e.getElementsByTagName("input"),
i = t.length;
for (; i--;) {
var n = t[i];
n.checked && ot.push(n)
}
}(i), !Le && !(/mousedown|pointerdown/.test(r) && 0 !== e.button || n.disabled || s.isContentEditable || (l = J(l, n.draggable, i, !1)) && l.animated || Te === l)) {
if (Re = ce(l), Ie = ce(l, n.draggable), "function" == typeof c) {
if (c.call(this, e, l, this)) return ke({
sortable: t,
rootEl: s,
name: "filter",
targetEl: l,
toEl: i,
fromEl: i
}), Ee("filter", t, {
evt: e
}), void(o && e.cancelable && e.preventDefault())
} else if (c && (c = c.split(",").some((function (n) {
if (n = J(s, n.trim(), i, !1)) return ke({
sortable: t,
rootEl: n,
name: "filter",
targetEl: l,
fromEl: i,
toEl: i
}), Ee("filter", t, {
evt: e
}), !0
})))) return void(o && e.cancelable && e.preventDefault());
n.handle && !J(s, n.handle, i, !1) || this._prepareDragStart(e, a, l)
}
}
},
_prepareDragStart: function (e, t, i) {
var n, o = this,
r = o.el,
a = o.options,
l = r.ownerDocument;
if (i && !Le && i.parentNode === r) {
var s = re(i);
if (Me = r, Ae = (Le = i).parentNode, _e = Le.nextSibling, Te = i, De = a.group, gt.dragged = Le, Pe = {
target: Le,
clientX: (t || e).clientX,
clientY: (t || e).clientY
}, je = Pe.clientX - s.left, Ye = Pe.clientY - s.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, Le.style["will-change"] = "all", n = function () {
Ee("delayEnded", o, {
evt: e
}), gt.eventCanceled ? o._onDrop() : (o._disableDelayedDragEvents(), !z && o.nativeDraggable && (Le.draggable = !0), o._triggerDragStart(e, t), ke({
sortable: o,
name: "choose",
originalEvent: e
}), ee(Le, a.chosenClass, !0))
}, a.ignore.split(",").forEach((function (e) {
ne(Le, e.trim(), yt)
})), G(l, "dragover", ht), G(l, "mousemove", ht), G(l, "touchmove", ht), G(l, "mouseup", o._onDrop), G(l, "touchend", o._onDrop), G(l, "touchcancel", o._onDrop), z && this.nativeDraggable && (this.options.touchStartThreshold = 4, Le.draggable = !0), Ee("delayStart", this, {
evt: e
}), !a.delay || a.delayOnTouchOnly && !t || this.nativeDraggable && (U || P)) n();
else {
if (gt.eventCanceled) return void this._onDrop();
G(l, "mouseup", o._disableDelayedDrag), G(l, "touchend", o._disableDelayedDrag), G(l, "touchcancel", o._disableDelayedDrag), G(l, "mousemove", o._delayedDragTouchMoveHandler), G(l, "touchmove", o._delayedDragTouchMoveHandler), a.supportPointer && G(l, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(n, a.delay)
}
}
},
_delayedDragTouchMoveHandler: function (e) {
var t = e.touches ? e.touches[0] : e;
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag()
},
_disableDelayedDrag: function () {
Le && yt(Le), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents()
},
_disableDelayedDragEvents: function () {
var e = this.el.ownerDocument;
V(e, "mouseup", this._disableDelayedDrag), V(e, "touchend", this._disableDelayedDrag), V(e, "touchcancel", this._disableDelayedDrag), V(e, "mousemove", this._delayedDragTouchMoveHandler), V(e, "touchmove", this._delayedDragTouchMoveHandler), V(e, "pointermove", this._delayedDragTouchMoveHandler)
},
_triggerDragStart: function (e, t) {
t = t || "touch" == e.pointerType && e, !this.nativeDraggable || t ? this.options.supportPointer ? G(document, "pointermove", this._onTouchMove) : G(document, t ? "touchmove" : "mousemove", this._onTouchMove) : (G(Le, "dragend", this), G(Me, "dragstart", this._onDragStart));
try {
document.selection ? wt((function () {
document.selection.empty()
})) : window.getSelection().removeAllRanges()
} catch (e) {}
},
_dragStarted: function (e, t) {
if (Je = !1, Me && Le) {
Ee("dragStarted", this, {
evt: t
}), this.nativeDraggable && G(document, "dragover", ft);
var i = this.options;
!e && ee(Le, i.dragClass, !1), ee(Le, i.ghostClass, !0), gt.active = this, e && this._appendGhost(), ke({
sortable: this,
name: "start",
originalEvent: t
})
} else this._nulling()
},
_emulateDragOver: function () {
if (Ue) {
this._lastX = Ue.clientX, this._lastY = Ue.clientY, pt();
for (var e = document.elementFromPoint(Ue.clientX, Ue.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Ue.clientX, Ue.clientY)) !== t;) t = e;
if (Le.parentNode[ye]._isOutsideThisEl(e), t)
do {
if (t[ye]) {
if (t[ye]._onDragOver({
clientX: Ue.clientX,
clientY: Ue.clientY,
target: e,
rootEl: t
}) && !this.options.dragoverBubble) break
}
e = t
} while (t = t.parentNode);
vt()
}
},
_onTouchMove: function (e) {
if (Pe) {
var t = this.options,
i = t.fallbackTolerance,
n = t.fallbackOffset,
o = e.touches ? e.touches[0] : e,
r = qe && ie(qe),
a = qe && r && r.a,
l = qe && r && r.d,
s = at && Ke && de(Ke),
c = (o.clientX - Pe.clientX + n.x) / (a || 1) + (s ? s[0] - it[0] : 0) / (a || 1),
d = (o.clientY - Pe.clientY + n.y) / (l || 1) + (s ? s[1] - it[1] : 0) / (l || 1);
if (!gt.active && !Je) {
if (i && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < i) return;
this._onDragStart(e, !0)
}
if (qe) {
r ? (r.e += c - (ze || 0), r.f += d - (We || 0)) : r = {
a: 1,
b: 0,
c: 0,
d: 1,
e: c,
f: d
};
var u = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
te(qe, "webkitTransform", u), te(qe, "mozTransform", u), te(qe, "msTransform", u), te(qe, "transform", u), ze = c, We = d, Ue = o
}
e.cancelable && e.preventDefault()
}
},
_appendGhost: function () {
if (!qe) {
var e = this.options.fallbackOnBody ? document.body : Me,
t = re(Le, !0, at, !0, e),
i = this.options;
if (at) {
for (Ke = e;
"static" === te(Ke, "position") && "none" === te(Ke, "transform") && Ke !== document;) Ke = Ke.parentNode;
Ke !== document.body && Ke !== document.documentElement ? (Ke === document && (Ke = oe()), t.top += Ke.scrollTop, t.left += Ke.scrollLeft) : Ke = oe(), it = de(Ke)
}
ee(qe = Le.cloneNode(!0), i.ghostClass, !1), ee(qe, i.fallbackClass, !0), ee(qe, i.dragClass, !0), te(qe, "transition", ""), te(qe, "transform", ""), te(qe, "box-sizing", "border-box"), te(qe, "margin", 0), te(qe, "top", t.top), te(qe, "left", t.left), te(qe, "width", t.width), te(qe, "height", t.height), te(qe, "opacity", "0.8"), te(qe, "position", at ? "absolute" : "fixed"), te(qe, "zIndex", "100000"), te(qe, "pointerEvents", "none"), gt.ghost = qe, e.appendChild(qe), te(qe, "transform-origin", je / parseInt(qe.style.width) * 100 + "% " + Ye / parseInt(qe.style.height) * 100 + "%")
}
},
_onDragStart: function (e, t) {
var i = this,
n = e.dataTransfer,
o = i.options;
Ee("dragStart", this, {
evt: e
}), gt.eventCanceled ? this._onDrop() : (Ee("setupClone", this), gt.eventCanceled || ((Oe = fe(Le)).draggable = !1, Oe.style["will-change"] = "", this._hideClone(), ee(Oe, this.options.chosenClass, !1), gt.clone = Oe), i.cloneId = wt((function () {
Ee("clone", i), gt.eventCanceled || (i.options.removeCloneOnHide || Me.insertBefore(Oe, Le), i._hideClone(), ke({
sortable: i,
name: "clone"
}))
})), !t && ee(Le, o.dragClass, !0), t ? ($e = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (V(document, "mouseup", i._onDrop), V(document, "touchend", i._onDrop), V(document, "touchcancel", i._onDrop), n && (n.effectAllowed = "move", o.setData && o.setData.call(i, n, Le)), G(document, "drop", i), te(Le, "transform", "translateZ(0)")), Je = !0, i._dragStartId = wt(i._dragStarted.bind(i, t, e)), G(document, "selectstart", i), Xe = !0, W && te(document.body, "user-select", "none"))
},
_onDragOver: function (e) {
var t, i, n, o, r = this.el,
a = e.target,
l = this.options,
s = l.group,
c = gt.active,
d = De === s,
u = l.sort,
p = Fe || c,
v = this,
h = !1;
if (!nt) {
if (void 0 !== e.preventDefault && e.cancelable && e.preventDefault(), a = J(a, l.draggable, r, !0), q("dragOver"), gt.eventCanceled) return h;
if (Le.contains(e.target) || a.animated && a.animatingX && a.animatingY || v._ignoreWhileAnimating === a) return _(!1);
if ($e = !1, c && !l.disabled && (d ? u || (n = !Me.contains(Le)) : Fe === this || (this.lastPutMode = De.checkPull(this, c, Le, e)) && s.checkPut(this, c, Le, e))) {
if (o = "vertical" === this._getDirection(e, a), t = re(Le), q("dragOverValid"), gt.eventCanceled) return h;
if (n) return Ae = Me, M(), this._hideClone(), q("revert"), gt.eventCanceled || (_e ? Me.insertBefore(Le, _e) : Me.appendChild(Le)), _(!0);
var f = se(r, l.draggable);
if (!f || function (e, t, i) {
var n = re(se(i.el, i.options.draggable));
return t ? e.clientX > n.right + 10 || e.clientX <= n.right && e.clientY > n.bottom && e.clientX >= n.left : e.clientX > n.right && e.clientY > n.top || e.clientX <= n.right && e.clientY > n.bottom + 10
}(e, o, this) && !f.animated) {
if (f === Le) return _(!1);
if (f && r === e.target && (a = f), a && (i = re(a)), !1 !== mt(Me, r, Le, t, a, i, e, !!a)) return M(), r.appendChild(Le), Ae = r, T(), _(!0)
} else if (a.parentNode === r) {
i = re(a);
var g, m, y, b = Le.parentNode !== r,
x = ! function (e, t, i) {
var n = i ? e.left : e.top,
o = i ? e.right : e.bottom,
r = i ? e.width : e.height,
a = i ? t.left : t.top,
l = i ? t.right : t.bottom,
s = i ? t.width : t.height;
return n === a || o === l || n + r / 2 === a + s / 2
}(Le.animated && Le.toRect || t, a.animated && a.toRect || i, o),
w = o ? "top" : "left",
S = ae(a, "top", "top") || ae(Le, "top", "top"),
C = S ? S.scrollTop : void 0;
if (Ge !== a && (m = i[w], et = !1, tt = !x && l.invertSwap || b), 0 !== (g = function (e, t, i, n, o, r, a, l) {
var s = n ? e.clientY : e.clientX,
c = n ? i.height : i.width,
d = n ? i.top : i.left,
u = n ? i.bottom : i.right,
p = !1;
if (!a)
if (l && Ze < c * o) {
if (!et && (1 === Ve ? s > d + c * r / 2 : s < u - c * r / 2) && (et = !0), et) p = !0;
else if (1 === Ve ? s < d + Ze : s > u - Ze) return -Ve
} else if (s > d + c * (1 - o) / 2 && s < u - c * (1 - o) / 2) return function (e) {
return ce(Le) < ce(e) ? 1 : -1
}(t);
if ((p = p || a) && (s < d + c * r / 2 || s > u - c * r / 2)) return s > d + c / 2 ? 1 : -1;
return 0
}(e, a, i, o, x ? 1 : l.swapThreshold, null == l.invertedSwapThreshold ? l.swapThreshold : l.invertedSwapThreshold, tt, Ge === a))) {
var E = ce(Le);
do {
E -= g, y = Ae.children[E]
} while (y && ("none" === te(y, "display") || y === qe))
}
if (0 === g || y === a) return _(!1);
Ge = a, Ve = g;
var k = a.nextElementSibling,
L = !1,
A = mt(Me, r, Le, t, a, i, e, L = 1 === g);
if (!1 !== A) return 1 !== A && -1 !== A || (L = 1 === A), nt = !0, setTimeout(bt, 30), M(), L && !k ? r.appendChild(Le) : a.parentNode.insertBefore(Le, L ? k : a), S && he(S, 0, C - S.scrollTop), Ae = Le.parentNode, void 0 === m || tt || (Ze = Math.abs(m - re(a)[w])), T(), _(!0)
}
if (r.contains(Le)) return _(!1)
}
return !1
}
function q(l, s) {
Ee(l, v, I({
evt: e,
isOwner: d,
axis: o ? "vertical" : "horizontal",
revert: n,
dragRect: t,
targetRect: i,
canSort: u,
fromSortable: p,
target: a,
completed: _,
onMove: function (i, n) {
return mt(Me, r, Le, t, i, re(i), e, n)
},
changed: T
}, s))
}
function M() {
q("dragOverAnimationCapture"), v.captureAnimationState(), v !== p && p.captureAnimationState()
}
function _(t) {
return q("dragOverCompleted", {
insertion: t
}), t && (d ? c._hideClone() : c._showClone(v), v !== p && (ee(Le, Fe ? Fe.options.ghostClass : c.options.ghostClass, !1), ee(Le, l.ghostClass, !0)), Fe !== v && v !== gt.active ? Fe = v : v === gt.active && Fe && (Fe = null), p === v && (v._ignoreWhileAnimating = a), v.animateAll((function () {
q("dragOverAnimationComplete"), v._ignoreWhileAnimating = null
})), v !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (a === Le && !Le.animated || a === r && !a.animated) && (Ge = null), l.dragoverBubble || e.rootEl || a === document || (Le.parentNode[ye]._isOutsideThisEl(e.target), !t && ht(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), h = !0
}
function T() {
Be = ce(Le), He = ce(Le, l.draggable), ke({
sortable: v,
name: "change",
toEl: r,
newIndex: Be,
newDraggableIndex: He,
originalEvent: e
})
}
},
_ignoreWhileAnimating: null,
_offMoveEvents: function () {
V(document, "mousemove", this._onTouchMove), V(document, "touchmove", this._onTouchMove), V(document, "pointermove", this._onTouchMove), V(document, "dragover", ht), V(document, "mousemove", ht), V(document, "touchmove", ht)
},
_offUpEvents: function () {
var e = this.el.ownerDocument;
V(e, "mouseup", this._onDrop), V(e, "touchend", this._onDrop), V(e, "pointerup", this._onDrop), V(e, "touchcancel", this._onDrop), V(document, "selectstart", this)
},
_onDrop: function (e) {
var t = this.el,
i = this.options;
Be = ce(Le), He = ce(Le, i.draggable), Ee("drop", this, {
evt: e
}), Ae = Le && Le.parentNode, Be = ce(Le), He = ce(Le, i.draggable), gt.eventCanceled ? this._nulling() : (Je = !1, tt = !1, et = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), St(this.cloneId), St(this._dragStartId), this.nativeDraggable && (V(document, "drop", this), V(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), W && te(document.body, "user-select", ""), e && (Xe && (e.cancelable && e.preventDefault(), !i.dropBubble && e.stopPropagation()), qe && qe.parentNode && qe.parentNode.removeChild(qe), (Me === Ae || Fe && "clone" !== Fe.lastPutMode) && Oe && Oe.parentNode && Oe.parentNode.removeChild(Oe), Le && (this.nativeDraggable && V(Le, "dragend", this), yt(Le), Le.style["will-change"] = "", Xe && !Je && ee(Le, Fe ? Fe.options.ghostClass : this.options.ghostClass, !1), ee(Le, this.options.chosenClass, !1), ke({
sortable: this,
name: "unchoose",
toEl: Ae,
newIndex: null,
newDraggableIndex: null,
originalEvent: e
}), Me !== Ae ? (Be >= 0 && (ke({
rootEl: Ae,
name: "add",
toEl: Ae,
fromEl: Me,
originalEvent: e
}), ke({
sortable: this,
name: "remove",
toEl: Ae,
originalEvent: e
}), ke({
rootEl: Ae,
name: "sort",
toEl: Ae,
fromEl: Me,
originalEvent: e
}), ke({
sortable: this,
name: "sort",
toEl: Ae,
originalEvent: e
})), Fe && Fe.save()) : Be !== Re && Be >= 0 && (ke({
sortable: this,
name: "update",
toEl: Ae,
originalEvent: e
}), ke({
sortable: this,
name: "sort",
toEl: Ae,
originalEvent: e
})), gt.active && (null != Be && -1 !== Be || (Be = Re, He = Ie), ke({
sortable: this,
name: "end",
toEl: Ae,
originalEvent: e
}), this.save()))), this._nulling())
},
_nulling: function () {
Ee("nulling", this), Me = Le = Ae = qe = _e = Oe = Te = Ne = Pe = Ue = Xe = Be = He = Re = Ie = Ge = Ve = Fe = De = gt.dragged = gt.ghost = gt.clone = gt.active = null, ot.forEach((function (e) {
e.checked = !0
})), ot.length = ze = We = 0
},
handleEvent: function (e) {
switch (e.type) {
case "drop":
case "dragend":
this._onDrop(e);
break;
case "dragenter":
case "dragover":
Le && (this._onDragOver(e), function (e) {
e.dataTransfer && (e.dataTransfer.dropEffect = "move");
e.cancelable && e.preventDefault()
}(e));
break;
case "selectstart":
e.preventDefault()
}
},
toArray: function () {
for (var e, t = [], i = this.el.children, n = 0, o = i.length, r = this.options; n < o; n++) J(e = i[n], r.draggable, this.el, !1) && t.push(e.getAttribute(r.dataIdAttr) || xt(e));
return t
},
sort: function (e) {
var t = {},
i = this.el;
this.toArray().forEach((function (e, n) {
var o = i.children[n];
J(o, this.options.draggable, i, !1) && (t[e] = o)
}), this), e.forEach((function (e) {
t[e] && (i.removeChild(t[e]), i.appendChild(t[e]))
}))
},
save: function () {
var e = this.options.store;
e && e.set && e.set(this)
},
closest: function (e, t) {
return J(e, t || this.options.draggable, this.el, !1)
},
option: function (e, t) {
var i = this.options;
if (void 0 === t) return i[e];
var n = Se.modifyOption(this, e, t);
i[e] = void 0 !== n ? n : t, "group" === e && ut(i)
},
destroy: function () {
Ee("destroy", this);
var e = this.el;
e[ye] = null, V(e, "mousedown", this._onTapStart), V(e, "touchstart", this._onTapStart), V(e, "pointerdown", this._onTapStart), this.nativeDraggable && (V(e, "dragover", this), V(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), (function (e) {
e.removeAttribute("draggable")
})), this._onDrop(), Qe.splice(Qe.indexOf(this.el), 1), this.el = e = null
},
_hideClone: function () {
if (!Ne) {
if (Ee("hideClone", this), gt.eventCanceled) return;
te(Oe, "display", "none"), this.options.removeCloneOnHide && Oe.parentNode && Oe.parentNode.removeChild(Oe), Ne = !0
}
},
_showClone: function (e) {
if ("clone" === e.lastPutMode) {
if (Ne) {
if (Ee("showClone", this), gt.eventCanceled) return;
Me.contains(Le) && !this.options.group.revertClone ? Me.insertBefore(Oe, Le) : _e ? Me.insertBefore(Oe, _e) : Me.appendChild(Oe), this.options.group.revertClone && this.animate(Le, Oe), te(Oe, "display", ""), Ne = !1
}
} else this._hideClone()
}
}, rt && G(document, "touchmove", (function (e) {
(gt.active || Je) && e.cancelable && e.preventDefault()
})), gt.utils = {
on: G,
off: V,
css: te,
find: ne,
is: function (e, t) {
return !!J(e, t, e, !1)
},
extend: function (e, t) {
if (e && t)
for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i]);
return e
},
throttle: ve,
closest: J,
toggleClass: ee,
clone: fe,
index: ce,
nextTick: wt,
cancelNextTick: St,
detectDirection: dt,
getChild: le
}, gt.get = function (e) {
return e[ye]
}, gt.mount = function () {
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
t[0].constructor === Array && (t = t[0]), t.forEach((function (e) {
if (!e.prototype || !e.prototype.constructor) throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));
e.utils && (gt.utils = I({}, gt.utils, e.utils)), Se.mount(e)
}))
}, gt.create = function (e, t) {
return new gt(e, t)
}, gt.version = "1.10.1";
var Ct, Et, kt, Lt, At, qt, Mt = [],
_t = !1;
function Tt() {
Mt.forEach((function (e) {
clearInterval(e.pid)
})), Mt = []
}
function Ot() {
clearInterval(qt)
}
var Nt, Rt = ve((function (e, t, i, n) {
if (t.scroll) {
var o, r = (e.touches ? e.touches[0] : e).clientX,
a = (e.touches ? e.touches[0] : e).clientY,
l = t.scrollSensitivity,
s = t.scrollSpeed,
c = oe(),
d = !1;
Et !== i && (Et = i, Tt(), Ct = t.scroll, o = t.scrollFn, !0 === Ct && (Ct = ue(i, !0)));
var u = 0,
p = Ct;
do {
var v = p,
h = re(v),
f = h.top,
g = h.bottom,
m = h.left,
y = h.right,
b = h.width,
x = h.height,
w = void 0,
S = void 0,
C = v.scrollWidth,
E = v.scrollHeight,
k = te(v),
L = v.scrollLeft,
A = v.scrollTop;
v === c ? (w = b < C && ("auto" === k.overflowX || "scroll" === k.overflowX || "visible" === k.overflowX), S = x < E && ("auto" === k.overflowY || "scroll" === k.overflowY || "visible" === k.overflowY)) : (w = b < C && ("auto" === k.overflowX || "scroll" === k.overflowX), S = x < E && ("auto" === k.overflowY || "scroll" === k.overflowY));
var q = w && (Math.abs(y - r) <= l && L + b < C) - (Math.abs(m - r) <= l && !!L),
M = S && (Math.abs(g - a) <= l && A + x < E) - (Math.abs(f - a) <= l && !!A);
if (!Mt[u])
for (var _ = 0; _ <= u; _++) Mt[_] || (Mt[_] = {});
Mt[u].vx == q && Mt[u].vy == M && Mt[u].el === v || (Mt[u].el = v, Mt[u].vx = q, Mt[u].vy = M, clearInterval(Mt[u].pid), 0 == q && 0 == M || (d = !0, Mt[u].pid = setInterval(function () {
n && 0 === this.layer && gt.active._onTouchMove(At);
var t = Mt[this.layer].vy ? Mt[this.layer].vy * s : 0,
i = Mt[this.layer].vx ? Mt[this.layer].vx * s : 0;
"function" == typeof o && "continue" !== o.call(gt.dragged.parentNode[ye], i, t, e, At, Mt[this.layer].el) || he(Mt[this.layer].el, i, t)
}.bind({
layer: u
}), 24))), u++
} while (t.bubbleScroll && p !== c && (p = ue(p, !1)));
_t = d
}
}), 30),
Bt = function (e) {
var t = e.originalEvent,
i = e.putSortable,
n = e.dragEl,
o = e.activeSortable,
r = e.dispatchSortableEvent,
a = e.hideGhostForTarget,
l = e.unhideGhostForTarget;
if (t) {
var s = i || o;
a();
var c = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t,
d = document.elementFromPoint(c.clientX, c.clientY);
l(), s && !s.el.contains(d) && (r("spill"), this.onSpill({
dragEl: n,
putSortable: i
}))
}
};
function It() {}
function Ht() {}
It.prototype = {
startIndex: null,
dragStart: function (e) {
var t = e.oldDraggableIndex;
this.startIndex = t
},
onSpill: function (e) {
var t = e.dragEl,
i = e.putSortable;
this.sortable.captureAnimationState(), i && i.captureAnimationState();
var n = le(this.sortable.el, this.startIndex, this.options);
n ? this.sortable.el.insertBefore(t, n) : this.sortable.el.appendChild(t), this.sortable.animateAll(), i && i.animateAll()
},
drop: Bt
}, B(It, {
pluginName: "revertOnSpill"
}), Ht.prototype = {
onSpill: function (e) {
var t = e.dragEl,
i = e.putSortable || this.sortable;
i.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), i.animateAll()
},
drop: Bt
}, B(Ht, {
pluginName: "removeOnSpill"
});
var Dt, Ft, Pt, Ut, zt, Wt = [],
jt = [],
Yt = !1,
Xt = !1,
Gt = !1;
function Vt(e, t) {
jt.forEach((function (i, n) {
var o = t.children[i.sortableIndex + (e ? Number(n) : 0)];
o ? t.insertBefore(i, o) : t.appendChild(i)
}))
}
function Zt() {
Wt.forEach((function (e) {
e !== Pt && e.parentNode && e.parentNode.removeChild(e)
}))
}
gt.mount(new function () {
function e() {
for (var e in this.defaults = {
scroll: !0,
scrollSensitivity: 30,
scrollSpeed: 10,
bubbleScroll: !0
}, this) "_" === e.charAt(0) && "function" == typeof this[e] && (this[e] = this[e].bind(this))
}
return e.prototype = {
dragStarted: function (e) {
var t = e.originalEvent;
this.sortable.nativeDraggable ? G(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? G(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? G(document, "touchmove", this._handleFallbackAutoScroll) : G(document, "mousemove", this._handleFallbackAutoScroll)
},
dragOverCompleted: function (e) {
var t = e.originalEvent;
this.options.dragOverBubble || t.rootEl || this._handleAutoScroll(t)
},
drop: function () {
this.sortable.nativeDraggable ? V(document, "dragover", this._handleAutoScroll) : (V(document, "pointermove", this._handleFallbackAutoScroll), V(document, "touchmove", this._handleFallbackAutoScroll), V(document, "mousemove", this._handleFallbackAutoScroll)), Ot(), Tt(), clearTimeout($), $ = void 0
},
nulling: function () {
At = Et = Ct = _t = qt = kt = Lt = null, Mt.length = 0
},
_handleFallbackAutoScroll: function (e) {
this._handleAutoScroll(e, !0)
},
_handleAutoScroll: function (e, t) {
var i = this,
n = (e.touches ? e.touches[0] : e).clientX,
o = (e.touches ? e.touches[0] : e).clientY,
r = document.elementFromPoint(n, o);
if (At = e, t || U || P || W) {
Rt(e, this.options, r, t);
var a = ue(r, !0);
!_t || qt && n === kt && o === Lt || (qt && Ot(), qt = setInterval((function () {
var r = ue(document.elementFromPoint(n, o), !0);
r !== a && (a = r, Tt()), Rt(e, i.options, r, t)
}), 10), kt = n, Lt = o)
} else {
if (!this.options.bubbleScroll || ue(r, !0) === oe()) return void Tt();
Rt(e, this.options, ue(r, !1), !1)
}
}
}, B(e, {
pluginName: "scroll",
initializeByDefault: !0
})
}), gt.mount(Ht, It), gt.mount(new function () {
function e() {
this.defaults = {
swapClass: "sortable-swap-highlight"
}
}
return e.prototype = {
dragStart: function (e) {
var t = e.dragEl;
Nt = t
},
dragOverValid: function (e) {
var t = e.completed,
i = e.target,
n = e.onMove,
o = e.activeSortable,
r = e.changed,
a = e.cancel;
if (o.options.swap) {
var l = this.sortable.el,
s = this.options;
if (i && i !== l) {
var c = Nt;
!1 !== n(i) ? (ee(i, s.swapClass, !0), Nt = i) : Nt = null, c && c !== Nt && ee(c, s.swapClass, !1)
}
r(), t(!0), a()
}
},
drop: function (e) {
var t = e.activeSortable,
i = e.putSortable,
n = e.dragEl,
o = i || this.sortable,
r = this.options;
Nt && ee(Nt, r.swapClass, !1), Nt && (r.swap || i && i.options.swap) && n !== Nt && (o.captureAnimationState(), o !== t && t.captureAnimationState(), function (e, t) {
var i, n, o = e.parentNode,
r = t.parentNode;
if (!o || !r || o.isEqualNode(t) || r.isEqualNode(e)) return;
i = ce(e), n = ce(t), o.isEqualNode(r) && i < n && n++;
o.insertBefore(t, o.children[i]), r.insertBefore(e, r.children[n])
}(n, Nt), o.animateAll(), o !== t && t.animateAll())
},
nulling: function () {
Nt = null
}
}, B(e, {
pluginName: "swap",
eventProperties: function () {
return {
swapItem: Nt
}
}
})
}), gt.mount(new function () {
function e(e) {
for (var t in this) "_" === t.charAt(0) && "function" == typeof this[t] && (this[t] = this[t].bind(this));
e.options.supportPointer ? G(document, "pointerup", this._deselectMultiDrag) : (G(document, "mouseup", this._deselectMultiDrag), G(document, "touchend", this._deselectMultiDrag)), G(document, "keydown", this._checkKeyDown), G(document, "keyup", this._checkKeyUp), this.defaults = {
selectedClass: "sortable-selected",
multiDragKey: null,
setData: function (t, i) {
var n = "";
Wt.length && Ft === e ? Wt.forEach((function (e, t) {
n += (t ? ", " : "") + e.textContent
})) : n = i.textContent, t.setData("Text", n)
}
}
}
return e.prototype = {
multiDragKeyDown: !1,
isMultiDrag: !1,
delayStartGlobal: function (e) {
var t = e.dragEl;
Pt = t
},
delayEnded: function () {
this.isMultiDrag = ~Wt.indexOf(Pt)
},
setupClone: function (e) {
var t = e.sortable,
i = e.cancel;
if (this.isMultiDrag) {
for (var n = 0; n < Wt.length; n++) jt.push(fe(Wt[n])), jt[n].sortableIndex = Wt[n].sortableIndex, jt[n].draggable = !1, jt[n].style["will-change"] = "", ee(jt[n], this.options.selectedClass, !1), Wt[n] === Pt && ee(jt[n], this.options.chosenClass, !1);
t._hideClone(), i()
}
},
clone: function (e) {
var t = e.sortable,
i = e.rootEl,
n = e.dispatchSortableEvent,
o = e.cancel;
this.isMultiDrag && (this.options.removeCloneOnHide || Wt.length && Ft === t && (Vt(!0, i), n("clone"), o()))
},
showClone: function (e) {
var t = e.cloneNowShown,
i = e.rootEl,
n = e.cancel;
this.isMultiDrag && (Vt(!1, i), jt.forEach((function (e) {
te(e, "display", "")
})), t(), zt = !1, n())
},
hideClone: function (e) {
var t = this,
i = (e.sortable, e.cloneNowHidden),
n = e.cancel;
this.isMultiDrag && (jt.forEach((function (e) {
te(e, "display", "none"), t.options.removeCloneOnHide && e.parentNode && e.parentNode.removeChild(e)
})), i(), zt = !0, n())
},
dragStartGlobal: function (e) {
e.sortable;
!this.isMultiDrag && Ft && Ft.multiDrag._deselectMultiDrag(), Wt.forEach((function (e) {
e.sortableIndex = ce(e)
})), Wt = Wt.sort((function (e, t) {
return e.sortableIndex - t.sortableIndex
})), Gt = !0
},
dragStarted: function (e) {
var t = this,
i = e.sortable;
if (this.isMultiDrag) {
if (this.options.sort && (i.captureAnimationState(), this.options.animation)) {
Wt.forEach((function (e) {
e !== Pt && te(e, "position", "absolute")
}));
var n = re(Pt, !1, !0, !0);
Wt.forEach((function (e) {
e !== Pt && ge(e, n)
})), Xt = !0, Yt = !0
}
i.animateAll((function () {
Xt = !1, Yt = !1, t.options.animation && Wt.forEach((function (e) {
me(e)
})), t.options.sort && Zt()
}))
}
},
dragOver: function (e) {
var t = e.target,
i = e.completed,
n = e.cancel;
Xt && ~Wt.indexOf(t) && (i(!1), n())
},
revert: function (e) {
var t = e.fromSortable,
i = e.rootEl,
n = e.sortable,
o = e.dragRect;
Wt.length > 1 && (Wt.forEach((function (e) {
n.addAnimationState({
target: e,
rect: Xt ? re(e) : o
}), me(e), e.fromRect = o, t.removeAnimationState(e)
})), Xt = !1, function (e, t) {
Wt.forEach((function (i, n) {
var o = t.children[i.sortableIndex + (e ? Number(n) : 0)];
o ? t.insertBefore(i, o) : t.appendChild(i)
}))
}(!this.options.removeCloneOnHide, i))
},
dragOverCompleted: function (e) {
var t = e.sortable,
i = e.isOwner,
n = e.insertion,
o = e.activeSortable,
r = e.parentEl,
a = e.putSortable,
l = this.options;
if (n) {
if (i && o._hideClone(), Yt = !1, l.animation && Wt.length > 1 && (Xt || !i && !o.options.sort && !a)) {
var s = re(Pt, !1, !0, !0);
Wt.forEach((function (e) {
e !== Pt && (ge(e, s), r.appendChild(e))
})), Xt = !0
}
if (!i)
if (Xt || Zt(), Wt.length > 1) {
var c = zt;
o._showClone(t), o.options.animation && !zt && c && jt.forEach((function (e) {
o.addAnimationState({
target: e,
rect: Ut
}), e.fromRect = Ut, e.thisAnimationDuration = null
}))
} else o._showClone(t)
}
},
dragOverAnimationCapture: function (e) {
var t = e.dragRect,
i = e.isOwner,
n = e.activeSortable;
if (Wt.forEach((function (e) {
e.thisAnimationDuration = null
})), n.options.animation && !i && n.multiDrag.isMultiDrag) {
Ut = B({}, t);
var o = ie(Pt, !0);
Ut.top -= o.f, Ut.left -= o.e
}
},
dragOverAnimationComplete: function () {
Xt && (Xt = !1, Zt())
},
drop: function (e) {
var t = e.originalEvent,
i = e.rootEl,
n = e.parentEl,
o = e.sortable,
r = e.dispatchSortableEvent,
a = e.oldIndex,
l = e.putSortable,
s = l || this.sortable;
if (t) {
var c = this.options,
d = n.children;
if (!Gt)
if (c.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), ee(Pt, c.selectedClass, !~Wt.indexOf(Pt)), ~Wt.indexOf(Pt)) Wt.splice(Wt.indexOf(Pt), 1), Dt = null, Ce({
sortable: o,
rootEl: i,
name: "deselect",
targetEl: Pt,
originalEvt: t
});
else {
if (Wt.push(Pt), Ce({
sortable: o,
rootEl: i,
name: "select",
targetEl: Pt,
originalEvt: t
}), t.shiftKey && Dt && o.el.contains(Dt)) {
var u, p, v = ce(Dt),
h = ce(Pt);
if (~v && ~h && v !== h)
for (h > v ? (p = v, u = h) : (p = h, u = v + 1); p < u; p++) ~Wt.indexOf(d[p]) || (ee(d[p], c.selectedClass, !0), Wt.push(d[p]), Ce({
sortable: o,
rootEl: i,
name: "select",
targetEl: d[p],
originalEvt: t
}))
} else Dt = Pt;
Ft = s
} if (Gt && this.isMultiDrag) {
if ((n[ye].options.sort || n !== i) && Wt.length > 1) {
var f = re(Pt),
g = ce(Pt, ":not(." + this.options.selectedClass + ")");
if (!Yt && c.animation && (Pt.thisAnimationDuration = null), s.captureAnimationState(), !Yt && (c.animation && (Pt.fromRect = f, Wt.forEach((function (e) {
if (e.thisAnimationDuration = null, e !== Pt) {
var t = Xt ? re(e) : f;
e.fromRect = t, s.addAnimationState({
target: e,
rect: t
})
}
}))), Zt(), Wt.forEach((function (e) {
d[g] ? n.insertBefore(e, d[g]) : n.appendChild(e), g++
})), a === ce(Pt))) {
var m = !1;
Wt.forEach((function (e) {
e.sortableIndex === ce(e) || (m = !0)
})), m && r("update")
}
Wt.forEach((function (e) {
me(e)
})), s.animateAll()
}
Ft = s
}(i === n || l && "clone" !== l.lastPutMode) && jt.forEach((function (e) {
e.parentNode && e.parentNode.removeChild(e)
}))
}
},
nullingGlobal: function () {
this.isMultiDrag = Gt = !1, jt.length = 0
},
destroyGlobal: function () {
this._deselectMultiDrag(), V(document, "pointerup", this._deselectMultiDrag), V(document, "mouseup", this._deselectMultiDrag), V(document, "touchend", this._deselectMultiDrag), V(document, "keydown", this._checkKeyDown), V(document, "keyup", this._checkKeyUp)
},
_deselectMultiDrag: function (e) {
if (!Gt && Ft === this.sortable && !(e && J(e.target, this.options.draggable, this.sortable.el, !1) || e && 0 !== e.button))
for (; Wt.length;) {
var t = Wt[0];
ee(t, this.options.selectedClass, !1), Wt.shift(), Ce({
sortable: this.sortable,
rootEl: this.sortable.el,
name: "deselect",
targetEl: t,
originalEvt: e
})
}
},
_checkKeyDown: function (e) {
e.key === this.options.multiDragKey && (this.multiDragKeyDown = !0)
},
_checkKeyUp: function (e) {
e.key === this.options.multiDragKey && (this.multiDragKeyDown = !1)
}
}, B(e, {
pluginName: "multiDrag",
utils: {
select: function (e) {
var t = e.parentNode[ye];
t && t.options.multiDrag && !~Wt.indexOf(e) && (Ft && Ft !== t && (Ft.multiDrag._deselectMultiDrag(), Ft = t), ee(e, t.options.selectedClass, !0), Wt.push(e))
},
deselect: function (e) {
var t = e.parentNode[ye],
i = Wt.indexOf(e);
t && t.options.multiDrag && ~i && (ee(e, t.options.selectedClass, !1), Wt.splice(i, 1))
}
},
eventProperties: function () {
var e = this,
t = [],
i = [];
return Wt.forEach((function (n) {
var o;
t.push({
multiDragElement: n,
index: n.sortableIndex
}), o = Xt && n !== Pt ? -1 : Xt ? ce(n, ":not(." + e.options.selectedClass + ")") : ce(n), i.push({
multiDragElement: n,
index: o
})
})), {
items: D(Wt),
clones: [].concat(jt),
oldIndicies: t,
newIndicies: i
}
},
optionListeners: {
multiDragKey: function (e) {
return "ctrl" === (e = e.toLowerCase()) ? e = "Control" : e.length > 1 && (e = e.charAt(0).toUpperCase() + e.substr(1)), e
}
}
})
});
var Kt = new v,
Jt = function (e) {
var t = new p(e),
i = t.builderStuff(),
n = "",
o = e.opts.sidePanel;
if ("#divSnippetList" === e.opts.snippetList) {
var r = '<div id="divSnippetList" class="is-side '.concat("right" === o ? "" : " fromleft", ' snippetlist">\n </div>');
Kt.appendHtml(i, r), e.opts.snippetHandle || (n = "display:none;")
} else n = "display:none;", o = "left";
var a = "",
l = "",
s = "";
if (e.opts.emailMode) {
l = e.opts.defaultEmailSnippetCategory;
for (var c = 0; c < e.opts.emailSnippetCategories.length; c++) s += '<div data-value="' + e.opts.emailSnippetCategories[c][0] + '">' + e.opts.emailSnippetCategories[c][1] + "</div>", e.opts.emailSnippetCategories[c][0] === e.opts.defaultEmailSnippetCategory && (a = e.opts.emailSnippetCategories[c][1])
} else {
l = e.opts.defaultSnippetCategory;
for (var d = 0; d < e.opts.snippetCategories.length; d++) s += '<div data-value="' + e.opts.snippetCategories[d][0] + '">' + e.opts.snippetCategories[d][1] + "</div>", e.opts.snippetCategories[d][0] === e.opts.defaultSnippetCategory && (a = e.opts.snippetCategories[d][1])
}
var u = '<div style="position:absolute;top:0;right:0;padding: 0;width:100%;z-index:2;"><div class="is-selectbox snippet-cat" data-group="snippet-cat" data-value="'
+ l + '"><span>'
+ a + '</span><svg class="is-icon-flex" style="position:absolute;top:13px;right:10px;"><use xlink:href="#ion-android-arrow-dropdown"></use></svg></div><div class="is-selectbox-options" data-group="snippet-cat">'
+ s + "</div></div>"
+ ("right" === o ? '<div id="divSnippetScrollUp" style="top:calc(50% - 27px);right:25px;">&#9650;</div><div id="divSnippetScrollDown" style="top:calc(50% + 27px);right:25px;">&#9660;</div><div id="divSnippetHandle" title="'
+ t.out("Snippets") + '" data-title="' + t.out("Snippets") + '" style="'
+ n + '"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-left"></use></svg></div>'
: '<div id="divSnippetScrollUp" style="top:calc(50% - 27px);left:10px;">&#9650;</div><div id="divSnippetScrollDown" style="top:calc(50% + 27px);left:10px;">&#9660;</div><div id="divSnippetHandle" title="'
+ t.out("Snippets") + '" data-title="' + t.out("Snippets") + '" style="'
+ n + '"><svg class="is-icon-flex"><use xlink:href="#ion-ios-arrow-right"></use></svg></div>')
+ '<div class="is-design-list"></div>',
v = document.querySelector(e.opts.snippetList);
Kt.appendHtml(v, u), "#divSnippetList" === e.opts.snippetList && document.addEventListener("click", (function (t) {
var i = (t = t || window.event).target || t.srcElement;
"auto" === e.opts.snippetsSidebarDisplay && (Kt.hasClass(v, "active") && Kt.parentsHasClass(i, "is-builder") && function (e) {
var t = document.querySelector("#divSnippetList"),
i = t.querySelector("#divSnippetHandle");
Kt.removeClass(t, "active"), "right" === e.opts.sidePanel ? i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-left"></use></svg>' : i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-right"></use></svg>'
}
/*!
* Cropper.js v1.5.5
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:31.160Z
*/
(e))
}), !1);
var h = document.querySelector(".is-design-list"),
f = e.opts.snippetPath,
g = !0;
if (window.jQuery && window.jQuery.fn.slick && (g = !1), g)
for (var m = 0; m < e.opts.snippetJSON.snippets.length; m++)
if (-1 !== e.opts.snippetJSON.snippets[m].thumbnail.indexOf("element-slider.png")) {
e.opts.snippetJSON.snippets.splice(m, 1);
break
} var y = 1;
e.opts.emailMode ? e.opts.snippetJSON.snippets.forEach((function (t) {
t.id = y, t.category === e.opts.defaultEmailSnippetCategory + "" && Kt.appendHtml(h, '<div class="snippet-item" data-id="' + t.id + '" data-cat="' + t.category + '"><img src="' + f + t.thumbnail + '"></div>'), y++
})) : e.opts.snippetJSON.snippets.forEach((function (t) {
t.id = y, t.category === e.opts.defaultSnippetCategory + "" && Kt.appendHtml(h, '<div class="snippet-item" data-id="' + t.id + '" data-cat="' + t.category + '"><img src="' + f + t.thumbnail + '"></div>'), y++
}));
var b = navigator.userAgent,
x = b.indexOf("Safari") > -1;
if (b.indexOf("Chrome") > -1 && x && (x = !1), new gt(h, {
forceFallback: x,
group: {
name: "shared",
pull: "clone",
put: !1
},
sort: !1,
animation: 150,
onMove: function () {
var e = document.querySelector(".row-add-initial");
e && e.parentNode.removeChild(e)
},
onStart: function () {
e.uo.saveForUndo();
var t = document.querySelector(".is-sidebar-overlay");
t && (t.style.display = "none")
},
onEnd: function () {
var e = document.querySelector(".is-sidebar-overlay");
e && (e.style.display = "block"), t.checkEmpty()
}
}), new O(document.querySelector(".snippet-cat"), {
onChange: function (t) {
var i = t,
n = h.querySelectorAll(".snippet-item"),
o = !1;
Array.prototype.forEach.call(n, (function (e) {
e.getAttribute("data-cat") === i && (o = !0)
})), o || e.opts.snippetJSON.snippets.forEach((function (e) {
e.category === i && Kt.appendHtml(h, '<div class="snippet-item" data-id="' + e.id + '" data-cat="' + e.category + '"><img src="' + f + e.thumbnail + '"></div>')
})), i && (Array.prototype.forEach.call(n, (function (e) {
Kt.addClass(e, "hide")
})), Array.prototype.forEach.call(n, (function (e) {
e.getAttribute("data-cat") === i && (e.className = e.className.replace(/hide/g, ""))
})))
}
}), "#divSnippetList" === e.opts.snippetList) {
var w = v.querySelector("#divSnippetHandle");
Kt.addEventListener(w, "click", (function () {
$t(e), t.clearActiveCell(), t.clearControls()
}));
var S = window.innerWidth;
e.opts.snippetOpen && S >= 960 && (v.style.cssText = "transition: all ease 0.8s;", setTimeout((function () {
$t(e)
}), 100), setTimeout((function () {
v.style.cssText = ""
}), 1300))
}
var C = v.querySelector("#divSnippetScrollUp"),
E = v.querySelector("#divSnippetScrollDown");
C.style.display = "none", E.style.display = "none"
};
function $t(e) {
var t = document.querySelector("#divSnippetList"),
i = t.querySelector("#divSnippetHandle");
Kt.hasClass(t, "active") ? (Kt.removeClass(t, "active"), "right" === e.opts.sidePanel ? i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-left"></use></svg>' : i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-right"></use></svg>') : (Kt.addClass(t, "active"), "right" === e.opts.sidePanel ? i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-right"></use></svg>' : i.innerHTML = '<svg class="is-icon-flex" style="width:17px;height:17px;fill:rgba(0, 0, 0, 0.75);"><use xlink:href="#ion-ios-arrow-left"></use></svg>')
}
function Qt(e, t) {
for (var i = 0; i < t.length; i++) {
var n = t[i];
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
}
}
function ei(e) {
return function (e) {
if (Array.isArray(e)) {
for (var t = 0, i = new Array(e.length); t < e.length; t++) i[t] = e[t];
return i
}
}(e) || function (e) {
if (Symbol.iterator in Object(e) || "[object Arguments]" === Object.prototype.toString.call(e)) return Array.from(e)
}(e) || function () {
throw new TypeError("Invalid attempt to spread non-iterable instance")
}()
}
var ti = "undefined" != typeof window && void 0 !== window.document,
ii = ti ? window : {},
ni = !!ti && "ontouchstart" in ii.document.documentElement,
oi = !!ti && "PointerEvent" in ii,
ri = "".concat("cropper", "-crop"),
ai = "".concat("cropper", "-disabled"),
li = "".concat("cropper", "-hidden"),
si = "".concat("cropper", "-hide"),
ci = "".concat("cropper", "-invisible"),
di = "".concat("cropper", "-modal"),
ui = "".concat("cropper", "-move"),
pi = "".concat("cropper", "Action"),
vi = "".concat("cropper", "Preview"),
hi = oi ? "pointerdown" : ni ? "touchstart" : "mousedown",
fi = oi ? "pointermove" : ni ? "touchmove" : "mousemove",
gi = oi ? "pointerup pointercancel" : ni ? "touchend touchcancel" : "mouseup",
mi = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,
yi = /^data:/,
bi = /^data:image\/jpeg;base64,/,
xi = /^img|canvas$/i,
wi = {
viewMode: 0,
dragMode: "crop",
initialAspectRatio: NaN,
aspectRatio: NaN,
data: null,
preview: "",
responsive: !0,
restore: !0,
checkCrossOrigin: !0,
checkOrientation: !0,
modal: !0,
guides: !0,
center: !0,
highlight: !0,
background: !0,
autoCrop: !0,
autoCropArea: .8,
movable: !0,
rotatable: !0,
scalable: !0,
zoomable: !0,
zoomOnTouch: !0,
zoomOnWheel: !0,
wheelZoomRatio: .1,
cropBoxMovable: !0,
cropBoxResizable: !0,
toggleDragModeOnDblclick: !0,
minCanvasWidth: 0,
minCanvasHeight: 0,
minCropBoxWidth: 0,
minCropBoxHeight: 0,
minContainerWidth: 200,
minContainerHeight: 100,
ready: null,
cropstart: null,
cropmove: null,
cropend: null,
crop: null,
zoom: null
},
Si = Number.isNaN || ii.isNaN;
function Ci(e) {
return "number" == typeof e && !Si(e)
}
var Ei = function (e) {
return e > 0 && e < 1 / 0
};
function ki(e) {
return void 0 === e
}
function Li(t) {
return "object" === (i = t, "function" == typeof Symbol && "symbol" === e(Symbol.iterator) ? e(i) : i && "function" == typeof Symbol && i.constructor === Symbol && i !== Symbol.prototype ? "symbol" : e(i)) && null !== t;
var i
}
var Ai = Object.prototype.hasOwnProperty;
function qi(e) {
if (!Li(e)) return !1;
try {
var t = e.constructor,
i = t.prototype;
return t && i && Ai.call(i, "isPrototypeOf")
} catch (e) {
return !1
}
}
function Mi(e) {
return "function" == typeof e
}
var _i = Array.prototype.slice;
function Ti(e) {
return Array.from ? Array.from(e) : _i.call(e)
}
function Oi(e, t) {
return e && Mi(t) && (Array.isArray(e) || Ci(e.length) ? Ti(e).forEach((function (i, n) {
t.call(e, i, n, e)
})) : Li(e) && Object.keys(e).forEach((function (i) {
t.call(e, e[i], i, e)
}))), e
}
var Ni = Object.assign || function (e) {
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) i[n - 1] = arguments[n];
return Li(e) && i.length > 0 && i.forEach((function (t) {
Li(t) && Object.keys(t).forEach((function (i) {
e[i] = t[i]
}))
})), e
},
Ri = /\.\d*(?:0|9){12}\d*$/;
function Bi(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1e11;
return Ri.test(e) ? Math.round(e * t) / t : e
}
var Ii = /^width|height|left|top|marginLeft|marginTop$/;
function Hi(e, t) {
var i = e.style;
Oi(t, (function (e, t) {
Ii.test(t) && Ci(e) && (e = "".concat(e, "px")), i[t] = e
}))
}
function Di(e, t) {
if (t)
if (Ci(e.length)) Oi(e, (function (e) {
Di(e, t)
}));
else if (e.classList) e.classList.add(t);
else {
var i = e.className.trim();
i ? i.indexOf(t) < 0 && (e.className = "".concat(i, " ").concat(t)) : e.className = t
}
}
function Fi(e, t) {
t && (Ci(e.length) ? Oi(e, (function (e) {
Fi(e, t)
})) : e.classList ? e.classList.remove(t) : e.className.indexOf(t) >= 0 && (e.className = e.className.replace(t, "")))
}
function Pi(e, t, i) {
t && (Ci(e.length) ? Oi(e, (function (e) {
Pi(e, t, i)
})) : i ? Di(e, t) : Fi(e, t))
}
var Ui = /([a-z\d])([A-Z])/g;
function zi(e) {
return e.replace(Ui, "$1-$2").toLowerCase()
}
function Wi(e, t) {
return Li(e[t]) ? e[t] : e.dataset ? e.dataset[t] : e.getAttribute("data-".concat(zi(t)))
}
function ji(e, t, i) {
Li(i) ? e[t] = i : e.dataset ? e.dataset[t] = i : e.setAttribute("data-".concat(zi(t)), i)
}
var Yi = /\s\s*/,
Xi = function () {
var e = !1;
if (ti) {
var t = !1,
i = function () {},
n = Object.defineProperty({}, "once", {
get: function () {
return e = !0, t
},
set: function (e) {
t = e
}
});
ii.addEventListener("test", i, n), ii.removeEventListener("test", i, n)
}
return e
}();
function Gi(e, t, i) {
var n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
o = i;
t.trim().split(Yi).forEach((function (t) {
if (!Xi) {
var r = e.listeners;
r && r[t] && r[t][i] && (o = r[t][i], delete r[t][i], 0 === Object.keys(r[t]).length && delete r[t], 0 === Object.keys(r).length && delete e.listeners)
}
e.removeEventListener(t, o, n)
}))
}
function Vi(e, t, i) {
var n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
o = i;
t.trim().split(Yi).forEach((function (t) {
if (n.once && !Xi) {
var r = e.listeners,
a = void 0 === r ? {} : r;
o = function () {
delete a[t][i], e.removeEventListener(t, o, n);
for (var r = arguments.length, l = new Array(r), s = 0; s < r; s++) l[s] = arguments[s];
i.apply(e, l)
}, a[t] || (a[t] = {}), a[t][i] && e.removeEventListener(t, a[t][i], n), a[t][i] = o, e.listeners = a
}
e.addEventListener(t, o, n)
}))
}
function Zi(e, t, i) {
var n;
return Mi(Event) && Mi(CustomEvent) ? n = new CustomEvent(t, {
detail: i,
bubbles: !0,
cancelable: !0
}) : (n = document.createEvent("CustomEvent")).initCustomEvent(t, !0, !0, i), e.dispatchEvent(n)
}
function Ki(e) {
var t = e.getBoundingClientRect();
return {
left: t.left + (window.pageXOffset - document.documentElement.clientLeft),
top: t.top + (window.pageYOffset - document.documentElement.clientTop)
}
}
var Ji = ii.location,
$i = /^(\w+:)\/\/([^:/?#]*):?(\d*)/i;
function Qi(e) {
var t = e.match($i);
return null !== t && (t[1] !== Ji.protocol || t[2] !== Ji.hostname || t[3] !== Ji.port)
}
function en(e) {
var t = "timestamp=".concat((new Date).getTime());
return e + (-1 === e.indexOf("?") ? "?" : "&") + t
}
function tn(e) {
var t = e.rotate,
i = e.scaleX,
n = e.scaleY,
o = e.translateX,
r = e.translateY,
a = [];
Ci(o) && 0 !== o && a.push("translateX(".concat(o, "px)")), Ci(r) && 0 !== r && a.push("translateY(".concat(r, "px)")), Ci(t) && 0 !== t && a.push("rotate(".concat(t, "deg)")), Ci(i) && 1 !== i && a.push("scaleX(".concat(i, ")")), Ci(n) && 1 !== n && a.push("scaleY(".concat(n, ")"));
var l = a.length ? a.join(" ") : "none";
return {
WebkitTransform: l,
msTransform: l,
transform: l
}
}
function nn(e, t) {
var i = e.pageX,
n = e.pageY,
o = {
endX: i,
endY: n
};
return t ? o : Ni({
startX: i,
startY: n
}, o)
}
function on(e) {
var t = e.aspectRatio,
i = e.height,
n = e.width,
o = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "contain",
r = Ei(n),
a = Ei(i);
if (r && a) {
var l = i * t;
"contain" === o && l > n || "cover" === o && l < n ? i = n / t : n = i * t
} else r ? i = n / t : a && (n = i * t);
return {
width: n,
height: i
}
}
function rn(e, t, i, n) {
var o = t.aspectRatio,
r = t.naturalWidth,
a = t.naturalHeight,
l = t.rotate,
s = void 0 === l ? 0 : l,
c = t.scaleX,
d = void 0 === c ? 1 : c,
u = t.scaleY,
p = void 0 === u ? 1 : u,
v = i.aspectRatio,
h = i.naturalWidth,
f = i.naturalHeight,
g = n.fillColor,
m = void 0 === g ? "transparent" : g,
y = n.imageSmoothingEnabled,
b = void 0 === y || y,
x = n.imageSmoothingQuality,
w = void 0 === x ? "low" : x,
S = n.maxWidth,
C = void 0 === S ? 1 / 0 : S,
E = n.maxHeight,
k = void 0 === E ? 1 / 0 : E,
L = n.minWidth,
A = void 0 === L ? 0 : L,
q = n.minHeight,
M = void 0 === q ? 0 : q,
_ = document.createElement("canvas"),
T = _.getContext("2d"),
O = on({
aspectRatio: v,
width: C,
height: k
}),
N = on({
aspectRatio: v,
width: A,
height: M
}, "cover"),
R = Math.min(O.width, Math.max(N.width, h)),
B = Math.min(O.height, Math.max(N.height, f)),
I = on({
aspectRatio: o,
width: C,
height: k
}),
H = on({
aspectRatio: o,
width: A,
height: M
}, "cover"),
D = Math.min(I.width, Math.max(H.width, r)),
F = Math.min(I.height, Math.max(H.height, a)),
P = [-D / 2, -F / 2, D, F];
return _.width = Bi(R), _.height = Bi(B), T.fillStyle = m, T.fillRect(0, 0, R, B), T.save(), T.translate(R / 2, B / 2), T.rotate(s * Math.PI / 180), T.scale(d, p), T.imageSmoothingEnabled = b, T.imageSmoothingQuality = w, T.drawImage.apply(T, [e].concat(ei(P.map((function (e) {
return Math.floor(Bi(e))
}))))), T.restore(), _
}
var an = String.fromCharCode;
var ln = /^data:.*,/;
function sn(e) {
var t, i = new DataView(e);
try {
var n, o, r;
if (255 === i.getUint8(0) && 216 === i.getUint8(1))
for (var a = i.byteLength, l = 2; l + 1 < a;) {
if (255 === i.getUint8(l) && 225 === i.getUint8(l + 1)) {
o = l;
break
}
l += 1
}
if (o) {
var s = o + 10;
if ("Exif" === function (e, t, i) {
var n = "";
i += t;
for (var o = t; o < i; o += 1) n += an(e.getUint8(o));
return n
}(i, o + 4, 4)) {
var c = i.getUint16(s);
if (((n = 18761 === c) || 19789 === c) && 42 === i.getUint16(s + 2, n)) {
var d = i.getUint32(s + 4, n);
d >= 8 && (r = s + d)
}
}
}
if (r) {
var u, p, v = i.getUint16(r, n);
for (p = 0; p < v; p += 1)
if (u = r + 12 * p + 2, 274 === i.getUint16(u, n)) {
u += 8, t = i.getUint16(u, n), i.setUint16(u, 1, n);
break
}
}
} catch (e) {
t = 1
}
return t
}
var cn = {
render: function () {
this.initContainer(), this.initCanvas(), this.initCropBox(), this.renderCanvas(), this.cropped && this.renderCropBox()
},
initContainer: function () {
var e = this.element,
t = this.options,
i = this.container,
n = this.cropper;
Di(n, li), Fi(e, li);
var o = {
width: Math.max(i.offsetWidth, Number(t.minContainerWidth) || 200),
height: Math.max(i.offsetHeight, Number(t.minContainerHeight) || 100)
};
this.containerData = o, Hi(n, {
width: o.width,
height: o.height
}), Di(e, li), Fi(n, li)
},
initCanvas: function () {
var e = this.containerData,
t = this.imageData,
i = this.options.viewMode,
n = Math.abs(t.rotate) % 180 == 90,
o = n ? t.naturalHeight : t.naturalWidth,
r = n ? t.naturalWidth : t.naturalHeight,
a = o / r,
l = e.width,
s = e.height;
e.height * a > e.width ? 3 === i ? l = e.height * a : s = e.width / a : 3 === i ? s = e.width / a : l = e.height * a;
var c = {
aspectRatio: a,
naturalWidth: o,
naturalHeight: r,
width: l,
height: s
};
c.left = (e.width - l) / 2, c.top = (e.height - s) / 2, c.oldLeft = c.left, c.oldTop = c.top, this.canvasData = c, this.limited = 1 === i || 2 === i, this.limitCanvas(!0, !0), this.initialImageData = Ni({}, t), this.initialCanvasData = Ni({}, c)
},
limitCanvas: function (e, t) {
var i = this.options,
n = this.containerData,
o = this.canvasData,
r = this.cropBoxData,
a = i.viewMode,
l = o.aspectRatio,
s = this.cropped && r;
if (e) {
var c = Number(i.minCanvasWidth) || 0,
d = Number(i.minCanvasHeight) || 0;
a > 1 ? (c = Math.max(c, n.width), d = Math.max(d, n.height), 3 === a && (d * l > c ? c = d * l : d = c / l)) : a > 0 && (c ? c = Math.max(c, s ? r.width : 0) : d ? d = Math.max(d, s ? r.height : 0) : s && (c = r.width, (d = r.height) * l > c ? c = d * l : d = c / l));
var u = on({
aspectRatio: l,
width: c,
height: d
});
c = u.width, d = u.height, o.minWidth = c, o.minHeight = d, o.maxWidth = 1 / 0, o.maxHeight = 1 / 0
}
if (t)
if (a > (s ? 0 : 1)) {
var p = n.width - o.width,
v = n.height - o.height;
o.minLeft = Math.min(0, p), o.minTop = Math.min(0, v), o.maxLeft = Math.max(0, p), o.maxTop = Math.max(0, v), s && this.limited && (o.minLeft = Math.min(r.left, r.left + (r.width - o.width)), o.minTop = Math.min(r.top, r.top + (r.height - o.height)), o.maxLeft = r.left, o.maxTop = r.top, 2 === a && (o.width >= n.width && (o.minLeft = Math.min(0, p), o.maxLeft = Math.max(0, p)), o.height >= n.height && (o.minTop = Math.min(0, v), o.maxTop = Math.max(0, v))))
} else o.minLeft = -o.width, o.minTop = -o.height, o.maxLeft = n.width, o.maxTop = n.height
},
renderCanvas: function (e, t) {
var i = this.canvasData,
n = this.imageData;
if (t) {
var o = function (e) {
var t = e.width,
i = e.height,
n = e.degree;
if (90 === (n = Math.abs(n) % 180)) return {
width: i,
height: t
};
var o = n % 90 * Math.PI / 180,
r = Math.sin(o),
a = Math.cos(o),
l = t * a + i * r,
s = t * r + i * a;
return n > 90 ? {
width: s,
height: l
} : {
width: l,
height: s
}
}({
width: n.naturalWidth * Math.abs(n.scaleX || 1),
height: n.naturalHeight * Math.abs(n.scaleY || 1),
degree: n.rotate || 0
}),
r = o.width,
a = o.height,
l = i.width * (r / i.naturalWidth),
s = i.height * (a / i.naturalHeight);
i.left -= (l - i.width) / 2, i.top -= (s - i.height) / 2, i.width = l, i.height = s, i.aspectRatio = r / a, i.naturalWidth = r, i.naturalHeight = a, this.limitCanvas(!0, !1)
}(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCanvas(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, Hi(this.canvas, Ni({
width: i.width,
height: i.height
}, tn({
translateX: i.left,
translateY: i.top
}))), this.renderImage(e), this.cropped && this.limited && this.limitCropBox(!0, !0)
},
renderImage: function (e) {
var t = this.canvasData,
i = this.imageData,
n = i.naturalWidth * (t.width / t.naturalWidth),
o = i.naturalHeight * (t.height / t.naturalHeight);
Ni(i, {
width: n,
height: o,
left: (t.width - n) / 2,
top: (t.height - o) / 2
}), Hi(this.image, Ni({
width: i.width,
height: i.height
}, tn(Ni({
translateX: i.left,
translateY: i.top
}, i)))), e && this.output()
},
initCropBox: function () {
var e = this.options,
t = this.canvasData,
i = e.aspectRatio || e.initialAspectRatio,
n = Number(e.autoCropArea) || .8,
o = {
width: t.width,
height: t.height
};
i && (t.height * i > t.width ? o.height = o.width / i : o.width = o.height * i), this.cropBoxData = o, this.limitCropBox(!0, !0), o.width = Math.min(Math.max(o.width, o.minWidth), o.maxWidth), o.height = Math.min(Math.max(o.height, o.minHeight), o.maxHeight), o.width = Math.max(o.minWidth, o.width * n), o.height = Math.max(o.minHeight, o.height * n), o.left = t.left + (t.width - o.width) / 2, o.top = t.top + (t.height - o.height) / 2, o.oldLeft = o.left, o.oldTop = o.top, this.initialCropBoxData = Ni({}, o)
},
limitCropBox: function (e, t) {
var i = this.options,
n = this.containerData,
o = this.canvasData,
r = this.cropBoxData,
a = this.limited,
l = i.aspectRatio;
if (e) {
var s = Number(i.minCropBoxWidth) || 0,
c = Number(i.minCropBoxHeight) || 0,
d = a ? Math.min(n.width, o.width, o.width + o.left, n.width - o.left) : n.width,
u = a ? Math.min(n.height, o.height, o.height + o.top, n.height - o.top) : n.height;
s = Math.min(s, n.width), c = Math.min(c, n.height), l && (s && c ? c * l > s ? c = s / l : s = c * l : s ? c = s / l : c && (s = c * l), u * l > d ? u = d / l : d = u * l), r.minWidth = Math.min(s, d), r.minHeight = Math.min(c, u), r.maxWidth = d, r.maxHeight = u
}
t && (a ? (r.minLeft = Math.max(0, o.left), r.minTop = Math.max(0, o.top), r.maxLeft = Math.min(n.width, o.left + o.width) - r.width, r.maxTop = Math.min(n.height, o.top + o.height) - r.height) : (r.minLeft = 0, r.minTop = 0, r.maxLeft = n.width - r.width, r.maxTop = n.height - r.height))
},
renderCropBox: function () {
var e = this.options,
t = this.containerData,
i = this.cropBoxData;
(i.width > i.maxWidth || i.width < i.minWidth) && (i.left = i.oldLeft), (i.height > i.maxHeight || i.height < i.minHeight) && (i.top = i.oldTop), i.width = Math.min(Math.max(i.width, i.minWidth), i.maxWidth), i.height = Math.min(Math.max(i.height, i.minHeight), i.maxHeight), this.limitCropBox(!1, !0), i.left = Math.min(Math.max(i.left, i.minLeft), i.maxLeft), i.top = Math.min(Math.max(i.top, i.minTop), i.maxTop), i.oldLeft = i.left, i.oldTop = i.top, e.movable && e.cropBoxMovable && ji(this.face, pi, i.width >= t.width && i.height >= t.height ? "move" : "all"), Hi(this.cropBox, Ni({
width: i.width,
height: i.height
}, tn({
translateX: i.left,
translateY: i.top
}))), this.cropped && this.limited && this.limitCanvas(!0, !0), this.disabled || this.output()
},
output: function () {
this.preview(), Zi(this.element, "crop", this.getData())
}
},
dn = {
initPreview: function () {
var e = this.element,
t = this.crossOrigin,
i = this.options.preview,
n = t ? this.crossOriginUrl : this.url,
o = e.alt || "The image to preview",
r = document.createElement("img");
if (t && (r.crossOrigin = t), r.src = n, r.alt = o, this.viewBox.appendChild(r), this.viewBoxImage = r, i) {
var a = i;
"string" == typeof i ? a = e.ownerDocument.querySelectorAll(i) : i.querySelector && (a = [i]), this.previews = a, Oi(a, (function (e) {
var i = document.createElement("img");
ji(e, vi, {
width: e.offsetWidth,
height: e.offsetHeight,
html: e.innerHTML
}), t && (i.crossOrigin = t), i.src = n, i.alt = o, i.style.cssText = 'display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"', e.innerHTML = "", e.appendChild(i)
}))
}
},
resetPreview: function () {
Oi(this.previews, (function (e) {
var t = Wi(e, vi);
Hi(e, {
width: t.width,
height: t.height
}), e.innerHTML = t.html,
function (e, t) {
if (Li(e[t])) try {
delete e[t]
} catch (i) {
e[t] = void 0
} else if (e.dataset) try {
delete e.dataset[t]
} catch (i) {
e.dataset[t] = void 0
} else e.removeAttribute("data-".concat(zi(t)))
}(e, vi)
}))
},
preview: function () {
var e = this.imageData,
t = this.canvasData,
i = this.cropBoxData,
n = i.width,
o = i.height,
r = e.width,
a = e.height,
l = i.left - t.left - e.left,
s = i.top - t.top - e.top;
this.cropped && !this.disabled && (Hi(this.viewBoxImage, Ni({
width: r,
height: a
}, tn(Ni({
translateX: -l,
translateY: -s
}, e)))), Oi(this.previews, (function (t) {
var i = Wi(t, vi),
c = i.width,
d = i.height,
u = c,
p = d,
v = 1;
n && (p = o * (v = c / n)), o && p > d && (u = n * (v = d / o), p = d), Hi(t, {
width: u,
height: p
}), Hi(t.getElementsByTagName("img")[0], Ni({
width: r * v,
height: a * v
}, tn(Ni({
translateX: -l * v,
translateY: -s * v
}, e))))
})))
}
},
un = {
bind: function () {
var e = this.element,
t = this.options,
i = this.cropper;
Mi(t.cropstart) && Vi(e, "cropstart", t.cropstart), Mi(t.cropmove) && Vi(e, "cropmove", t.cropmove), Mi(t.cropend) && Vi(e, "cropend", t.cropend), Mi(t.crop) && Vi(e, "crop", t.crop), Mi(t.zoom) && Vi(e, "zoom", t.zoom), Vi(i, hi, this.onCropStart = this.cropStart.bind(this)), t.zoomable && t.zoomOnWheel && Vi(i, "wheel", this.onWheel = this.wheel.bind(this), {
passive: !1,
capture: !0
}), t.toggleDragModeOnDblclick && Vi(i, "dblclick", this.onDblclick = this.dblclick.bind(this)), Vi(e.ownerDocument, fi, this.onCropMove = this.cropMove.bind(this)), Vi(e.ownerDocument, gi, this.onCropEnd = this.cropEnd.bind(this)), t.responsive && Vi(window, "resize", this.onResize = this.resize.bind(this))
},
unbind: function () {
var e = this.element,
t = this.options,
i = this.cropper;
Mi(t.cropstart) && Gi(e, "cropstart", t.cropstart), Mi(t.cropmove) && Gi(e, "cropmove", t.cropmove), Mi(t.cropend) && Gi(e, "cropend", t.cropend), Mi(t.crop) && Gi(e, "crop", t.crop), Mi(t.zoom) && Gi(e, "zoom", t.zoom), Gi(i, hi, this.onCropStart), t.zoomable && t.zoomOnWheel && Gi(i, "wheel", this.onWheel, {
passive: !1,
capture: !0
}), t.toggleDragModeOnDblclick && Gi(i, "dblclick", this.onDblclick), Gi(e.ownerDocument, fi, this.onCropMove), Gi(e.ownerDocument, gi, this.onCropEnd), t.responsive && Gi(window, "resize", this.onResize)
}
},
pn = {
resize: function () {
var e = this.options,
t = this.container,
i = this.containerData,
n = Number(e.minContainerWidth) || 200,
o = Number(e.minContainerHeight) || 100;
if (!(this.disabled || i.width <= n || i.height <= o)) {
var r, a, l = t.offsetWidth / i.width;
if (1 !== l || t.offsetHeight !== i.height) e.restore && (r = this.getCanvasData(), a = this.getCropBoxData()), this.render(), e.restore && (this.setCanvasData(Oi(r, (function (e, t) {
r[t] = e * l
}))), this.setCropBoxData(Oi(a, (function (e, t) {
a[t] = e * l
}))))
}
},
dblclick: function () {
var e, t;
this.disabled || "none" === this.options.dragMode || this.setDragMode((e = this.dragBox, t = ri, (e.classList ? e.classList.contains(t) : e.className.indexOf(t) > -1) ? "move" : "crop"))
},
wheel: function (e) {
var t = this,
i = Number(this.options.wheelZoomRatio) || .1,
n = 1;
this.disabled || (e.preventDefault(), this.wheeling || (this.wheeling = !0, setTimeout((function () {
t.wheeling = !1
}), 50), e.deltaY ? n = e.deltaY > 0 ? 1 : -1 : e.wheelDelta ? n = -e.wheelDelta / 120 : e.detail && (n = e.detail > 0 ? 1 : -1), this.zoom(-n * i, e)))
},
cropStart: function (e) {
var t = e.buttons,
i = e.button;
if (!(this.disabled || Ci(t) && 1 !== t || Ci(i) && 0 !== i || e.ctrlKey)) {
var n, o = this.options,
r = this.pointers;
e.changedTouches ? Oi(e.changedTouches, (function (e) {
r[e.identifier] = nn(e)
})) : r[e.pointerId || 0] = nn(e), n = Object.keys(r).length > 1 && o.zoomable && o.zoomOnTouch ? "zoom" : Wi(e.target, pi), mi.test(n) && !1 !== Zi(this.element, "cropstart", {
originalEvent: e,
action: n
}) && (e.preventDefault(), this.action = n, this.cropping = !1, "crop" === n && (this.cropping = !0, Di(this.dragBox, di)))
}
},
cropMove: function (e) {
var t = this.action;
if (!this.disabled && t) {
var i = this.pointers;
e.preventDefault(), !1 !== Zi(this.element, "cropmove", {
originalEvent: e,
action: t
}) && (e.changedTouches ? Oi(e.changedTouches, (function (e) {
Ni(i[e.identifier] || {}, nn(e, !0))
})) : Ni(i[e.pointerId || 0] || {}, nn(e, !0)), this.change(e))
}
},
cropEnd: function (e) {
if (!this.disabled) {
var t = this.action,
i = this.pointers;
e.changedTouches ? Oi(e.changedTouches, (function (e) {
delete i[e.identifier]
})) : delete i[e.pointerId || 0], t && (e.preventDefault(), Object.keys(i).length || (this.action = ""), this.cropping && (this.cropping = !1, Pi(this.dragBox, di, this.cropped && this.options.modal)), Zi(this.element, "cropend", {
originalEvent: e,
action: t
}))
}
}
},
vn = {
change: function (e) {
var t, i = this.options,
n = this.canvasData,
o = this.containerData,
r = this.cropBoxData,
a = this.pointers,
l = this.action,
s = i.aspectRatio,
c = r.left,
d = r.top,
u = r.width,
p = r.height,
v = c + u,
h = d + p,
f = 0,
g = 0,
m = o.width,
y = o.height,
b = !0;
!s && e.shiftKey && (s = u && p ? u / p : 1), this.limited && (f = r.minLeft, g = r.minTop, m = f + Math.min(o.width, n.width, n.left + n.width), y = g + Math.min(o.height, n.height, n.top + n.height));
var x = a[Object.keys(a)[0]],
w = {
x: x.endX - x.startX,
y: x.endY - x.startY
},
S = function (e) {
switch (e) {
case "e":
v + w.x > m && (w.x = m - v);
break;
case "w":
c + w.x < f && (w.x = f - c);
break;
case "n":
d + w.y < g && (w.y = g - d);
break;
case "s":
h + w.y > y && (w.y = y - h)
}
};
switch (l) {
case "all":
c += w.x, d += w.y;
break;
case "e":
if (w.x >= 0 && (v >= m || s && (d <= g || h >= y))) {
b = !1;
break
}
S("e"), (u += w.x) < 0 && (l = "w", c -= u = -u), s && (p = u / s, d += (r.height - p) / 2);
break;
case "n":
if (w.y <= 0 && (d <= g || s && (c <= f || v >= m))) {
b = !1;
break
}
S("n"), p -= w.y, d += w.y, p < 0 && (l = "s", d -= p = -p), s && (u = p * s, c += (r.width - u) / 2);
break;
case "w":
if (w.x <= 0 && (c <= f || s && (d <= g || h >= y))) {
b = !1;
break
}
S("w"), u -= w.x, c += w.x, u < 0 && (l = "e", c -= u = -u), s && (p = u / s, d += (r.height - p) / 2);
break;
case "s":
if (w.y >= 0 && (h >= y || s && (c <= f || v >= m))) {
b = !1;
break
}
S("s"), (p += w.y) < 0 && (l = "n", d -= p = -p), s && (u = p * s, c += (r.width - u) / 2);
break;
case "ne":
if (s) {
if (w.y <= 0 && (d <= g || v >= m)) {
b = !1;
break
}
S("n"), p -= w.y, d += w.y, u = p * s
} else S("n"), S("e"), w.x >= 0 ? v < m ? u += w.x : w.y <= 0 && d <= g && (b = !1) : u += w.x, w.y <= 0 ? d > g && (p -= w.y, d += w.y) : (p -= w.y, d += w.y);
u < 0 && p < 0 ? (l = "sw", d -= p = -p, c -= u = -u) : u < 0 ? (l = "nw", c -= u = -u) : p < 0 && (l = "se", d -= p = -p);
break;
case "nw":
if (s) {
if (w.y <= 0 && (d <= g || c <= f)) {
b = !1;
break
}
S("n"), p -= w.y, d += w.y, u = p * s, c += r.width - u
} else S("n"), S("w"), w.x <= 0 ? c > f ? (u -= w.x, c += w.x) : w.y <= 0 && d <= g && (b = !1) : (u -= w.x, c += w.x), w.y <= 0 ? d > g && (p -= w.y, d += w.y) : (p -= w.y, d += w.y);
u < 0 && p < 0 ? (l = "se", d -= p = -p, c -= u = -u) : u < 0 ? (l = "ne", c -= u = -u) : p < 0 && (l = "sw", d -= p = -p);
break;
case "sw":
if (s) {
if (w.x <= 0 && (c <= f || h >= y)) {
b = !1;
break
}
S("w"), u -= w.x, c += w.x, p = u / s
} else S("s"), S("w"), w.x <= 0 ? c > f ? (u -= w.x, c += w.x) : w.y >= 0 && h >= y && (b = !1) : (u -= w.x, c += w.x), w.y >= 0 ? h < y && (p += w.y) : p += w.y;
u < 0 && p < 0 ? (l = "ne", d -= p = -p, c -= u = -u) : u < 0 ? (l = "se", c -= u = -u) : p < 0 && (l = "nw", d -= p = -p);
break;
case "se":
if (s) {
if (w.x >= 0 && (v >= m || h >= y)) {
b = !1;
break
}
S("e"), p = (u += w.x) / s
} else S("s"), S("e"), w.x >= 0 ? v < m ? u += w.x : w.y >= 0 && h >= y && (b = !1) : u += w.x, w.y >= 0 ? h < y && (p += w.y) : p += w.y;
u < 0 && p < 0 ? (l = "nw", d -= p = -p, c -= u = -u) : u < 0 ? (l = "sw", c -= u = -u) : p < 0 && (l = "ne", d -= p = -p);
break;
case "move":
this.move(w.x, w.y), b = !1;
break;
case "zoom":
this.zoom(function (e) {
var t = Ni({}, e),
i = [];
return Oi(e, (function (e, n) {
delete t[n], Oi(t, (function (t) {
var n = Math.abs(e.startX - t.startX),
o = Math.abs(e.startY - t.startY),
r = Math.abs(e.endX - t.endX),
a = Math.abs(e.endY - t.endY),
l = Math.sqrt(n * n + o * o),
s = (Math.sqrt(r * r + a * a) - l) / l;
i.push(s)
}))
})), i.sort((function (e, t) {
return Math.abs(e) < Math.abs(t)
})), i[0]
}(a), e), b = !1;
break;
case "crop":
if (!w.x || !w.y) {
b = !1;
break
}
t = Ki(this.cropper), c = x.startX - t.left, d = x.startY - t.top, u = r.minWidth, p = r.minHeight, w.x > 0 ? l = w.y > 0 ? "se" : "ne" : w.x < 0 && (c -= u, l = w.y > 0 ? "sw" : "nw"), w.y < 0 && (d -= p), this.cropped || (Fi(this.cropBox, li), this.cropped = !0, this.limited && this.limitCropBox(!0, !0))
}
b && (r.width = u, r.height = p, r.left = c, r.top = d, this.action = l, this.renderCropBox()), Oi(a, (function (e) {
e.startX = e.endX, e.startY = e.endY
}))
}
},
hn = {
crop: function () {
return !this.ready || this.cropped || this.disabled || (this.cropped = !0, this.limitCropBox(!0, !0), this.options.modal && Di(this.dragBox, di), Fi(this.cropBox, li), this.setCropBoxData(this.initialCropBoxData)), this
},
reset: function () {
return this.ready && !this.disabled && (this.imageData = Ni({}, this.initialImageData), this.canvasData = Ni({}, this.initialCanvasData), this.cropBoxData = Ni({}, this.initialCropBoxData), this.renderCanvas(), this.cropped && this.renderCropBox()), this
},
clear: function () {
return this.cropped && !this.disabled && (Ni(this.cropBoxData, {
left: 0,
top: 0,
width: 0,
height: 0
}), this.cropped = !1, this.renderCropBox(), this.limitCanvas(!0, !0), this.renderCanvas(), Fi(this.dragBox, di), Di(this.cropBox, li)), this
},
replace: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
return !this.disabled && e && (this.isImg && (this.element.src = e), t ? (this.url = e, this.image.src = e, this.ready && (this.viewBoxImage.src = e, Oi(this.previews, (function (t) {
t.getElementsByTagName("img")[0].src = e
})))) : (this.isImg && (this.replaced = !0), this.options.data = null, this.uncreate(), this.load(e))), this
},
enable: function () {
return this.ready && this.disabled && (this.disabled = !1, Fi(this.cropper, ai)), this
},
disable: function () {
return this.ready && !this.disabled && (this.disabled = !0, Di(this.cropper, ai)), this
},
destroy: function () {
var e = this.element;
return e.cropper ? (e.cropper = void 0, this.isImg && this.replaced && (e.src = this.originalUrl), this.uncreate(), this) : this
},
move: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e,
i = this.canvasData,
n = i.left,
o = i.top;
return this.moveTo(ki(e) ? e : n + Number(e), ki(t) ? t : o + Number(t))
},
moveTo: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e,
i = this.canvasData,
n = !1;
return e = Number(e), t = Number(t), this.ready && !this.disabled && this.options.movable && (Ci(e) && (i.left = e, n = !0), Ci(t) && (i.top = t, n = !0), n && this.renderCanvas(!0)), this
},
zoom: function (e, t) {
var i = this.canvasData;
return e = (e = Number(e)) < 0 ? 1 / (1 - e) : 1 + e, this.zoomTo(i.width * e / i.naturalWidth, null, t)
},
zoomTo: function (e, t, i) {
var n = this.options,
o = this.canvasData,
r = o.width,
a = o.height,
l = o.naturalWidth,
s = o.naturalHeight;
if ((e = Number(e)) >= 0 && this.ready && !this.disabled && n.zoomable) {
var c = l * e,
d = s * e;
if (!1 === Zi(this.element, "zoom", {
ratio: e,
oldRatio: r / l,
originalEvent: i
})) return this;
if (i) {
var u = this.pointers,
p = Ki(this.cropper),
v = u && Object.keys(u).length ? function (e) {
var t = 0,
i = 0,
n = 0;
return Oi(e, (function (e) {
var o = e.startX,
r = e.startY;
t += o, i += r, n += 1
})), {
pageX: t /= n,
pageY: i /= n
}
}(u) : {
pageX: i.pageX,
pageY: i.pageY
};
o.left -= (c - r) * ((v.pageX - p.left - o.left) / r), o.top -= (d - a) * ((v.pageY - p.top - o.top) / a)
} else qi(t) && Ci(t.x) && Ci(t.y) ? (o.left -= (c - r) * ((t.x - o.left) / r), o.top -= (d - a) * ((t.y - o.top) / a)) : (o.left -= (c - r) / 2, o.top -= (d - a) / 2);
o.width = c, o.height = d, this.renderCanvas(!0)
}
return this
},
rotate: function (e) {
return this.rotateTo((this.imageData.rotate || 0) + Number(e))
},
rotateTo: function (e) {
return Ci(e = Number(e)) && this.ready && !this.disabled && this.options.rotatable && (this.imageData.rotate = e % 360, this.renderCanvas(!0, !0)), this
},
scaleX: function (e) {
var t = this.imageData.scaleY;
return this.scale(e, Ci(t) ? t : 1)
},
scaleY: function (e) {
var t = this.imageData.scaleX;
return this.scale(Ci(t) ? t : 1, e)
},
scale: function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e,
i = this.imageData,
n = !1;
return e = Number(e), t = Number(t), this.ready && !this.disabled && this.options.scalable && (Ci(e) && (i.scaleX = e, n = !0), Ci(t) && (i.scaleY = t, n = !0), n && this.renderCanvas(!0, !0)), this
},
getData: function () {
var e, t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0],
i = this.options,
n = this.imageData,
o = this.canvasData,
r = this.cropBoxData;
if (this.ready && this.cropped) {
e = {
x: r.left - o.left,
y: r.top - o.top,
width: r.width,
height: r.height
};
var a = n.width / n.naturalWidth;
if (Oi(e, (function (t, i) {
e[i] = t / a
})), t) {
var l = Math.round(e.y + e.height),
s = Math.round(e.x + e.width);
e.x = Math.round(e.x), e.y = Math.round(e.y), e.width = s - e.x, e.height = l - e.y
}
} else e = {
x: 0,
y: 0,
width: 0,
height: 0
};
return i.rotatable && (e.rotate = n.rotate || 0), i.scalable && (e.scaleX = n.scaleX || 1, e.scaleY = n.scaleY || 1), e
},
setData: function (e) {
var t = this.options,
i = this.imageData,
n = this.canvasData,
o = {};
if (this.ready && !this.disabled && qi(e)) {
var r = !1;
t.rotatable && Ci(e.rotate) && e.rotate !== i.rotate && (i.rotate = e.rotate, r = !0), t.scalable && (Ci(e.scaleX) && e.scaleX !== i.scaleX && (i.scaleX = e.scaleX, r = !0), Ci(e.scaleY) && e.scaleY !== i.scaleY && (i.scaleY = e.scaleY, r = !0)), r && this.renderCanvas(!0, !0);
var a = i.width / i.naturalWidth;
Ci(e.x) && (o.left = e.x * a + n.left), Ci(e.y) && (o.top = e.y * a + n.top), Ci(e.width) && (o.width = e.width * a), Ci(e.height) && (o.height = e.height * a), this.setCropBoxData(o)
}
return this
},
getContainerData: function () {
return this.ready ? Ni({}, this.containerData) : {}
},
getImageData: function () {
return this.sized ? Ni({}, this.imageData) : {}
},
getCanvasData: function () {
var e = this.canvasData,
t = {};
return this.ready && Oi(["left", "top", "width", "height", "naturalWidth", "naturalHeight"], (function (i) {
t[i] = e[i]
})), t
},
setCanvasData: function (e) {
var t = this.canvasData,
i = t.aspectRatio;
return this.ready && !this.disabled && qi(e) && (Ci(e.left) && (t.left = e.left), Ci(e.top) && (t.top = e.top), Ci(e.width) ? (t.width = e.width, t.height = e.width / i) : Ci(e.height) && (t.height = e.height, t.width = e.height * i), this.renderCanvas(!0)), this
},
getCropBoxData: function () {
var e, t = this.cropBoxData;
return this.ready && this.cropped && (e = {
left: t.left,
top: t.top,
width: t.width,
height: t.height
}), e || {}
},
setCropBoxData: function (e) {
var t, i, n = this.cropBoxData,
o = this.options.aspectRatio;
return this.ready && this.cropped && !this.disabled && qi(e) && (Ci(e.left) && (n.left = e.left), Ci(e.top) && (n.top = e.top), Ci(e.width) && e.width !== n.width && (t = !0, n.width = e.width), Ci(e.height) && e.height !== n.height && (i = !0, n.height = e.height), o && (t ? n.height = n.width / o : i && (n.width = n.height * o)), this.renderCropBox()), this
},
getCroppedCanvas: function () {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
if (!this.ready || !window.HTMLCanvasElement) return null;
var t = this.canvasData,
i = rn(this.image, this.imageData, t, e);
if (!this.cropped) return i;
var n = this.getData(),
o = n.x,
r = n.y,
a = n.width,
l = n.height,
s = i.width / Math.floor(t.naturalWidth);
1 !== s && (o *= s, r *= s, a *= s, l *= s);
var c = a / l,
d = on({
aspectRatio: c,
width: e.maxWidth || 1 / 0,
height: e.maxHeight || 1 / 0
}),
u = on({
aspectRatio: c,
width: e.minWidth || 0,
height: e.minHeight || 0
}, "cover"),
p = on({
aspectRatio: c,
width: e.width || (1 !== s ? i.width : a),
height: e.height || (1 !== s ? i.height : l)
}),
v = p.width,
h = p.height;
v = Math.min(d.width, Math.max(u.width, v)), h = Math.min(d.height, Math.max(u.height, h));
var f = document.createElement("canvas"),
g = f.getContext("2d");
f.width = Bi(v), f.height = Bi(h), g.fillStyle = e.fillColor || "transparent", g.fillRect(0, 0, v, h);
var m = e.imageSmoothingEnabled,
y = void 0 === m || m,
b = e.imageSmoothingQuality;
g.imageSmoothingEnabled = y, b && (g.imageSmoothingQuality = b);
var x, w, S, C, E, k, L = i.width,
A = i.height,
q = o,
M = r;
q <= -a || q > L ? (q = 0, x = 0, S = 0, E = 0) : q <= 0 ? (S = -q, q = 0, E = x = Math.min(L, a + q)) : q <= L && (S = 0, E = x = Math.min(a, L - q)), x <= 0 || M <= -l || M > A ? (M = 0, w = 0, C = 0, k = 0) : M <= 0 ? (C = -M, M = 0, k = w = Math.min(A, l + M)) : M <= A && (C = 0, k = w = Math.min(l, A - M));
var _ = [q, M, x, w];
if (E > 0 && k > 0) {
var T = v / a;
_.push(S * T, C * T, E * T, k * T)
}
return g.drawImage.apply(g, [i].concat(ei(_.map((function (e) {
return Math.floor(Bi(e))
}))))), f
},
setAspectRatio: function (e) {
var t = this.options;
return this.disabled || ki(e) || (t.aspectRatio = Math.max(0, e) || NaN, this.ready && (this.initCropBox(), this.cropped && this.renderCropBox())), this
},
setDragMode: function (e) {
var t = this.options,
i = this.dragBox,
n = this.face;
if (this.ready && !this.disabled) {
var o = "crop" === e,
r = t.movable && "move" === e;
e = o || r ? e : "none", t.dragMode = e, ji(i, pi, e), Pi(i, ri, o), Pi(i, ui, r), t.cropBoxMovable || (ji(n, pi, e), Pi(n, ri, o), Pi(n, ui, r))
}
return this
}
},
fn = ii.Cropper,
gn = function () {
function e(t) {
var i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
if (function (e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}(this, e), !t || !xi.test(t.tagName)) throw new Error("The first argument is required and must be an <img> or <canvas> element.");
this.element = t, this.options = Ni({}, wi, qi(i) && i), this.cropped = !1, this.disabled = !1, this.pointers = {}, this.ready = !1, this.reloading = !1, this.replaced = !1, this.sized = !1, this.sizing = !1, this.init()
}
var t, i, n;
return t = e, n = [{
key: "noConflict",
value: function () {
return window.Cropper = fn, e
}
}, {
key: "setDefaults",
value: function (e) {
Ni(wi, qi(e) && e)
}
}], (i = [{
key: "init",
value: function () {
var e, t = this.element,
i = t.tagName.toLowerCase();
if (!t.cropper) {
if (t.cropper = this, "img" === i) {
if (this.isImg = !0, e = t.getAttribute("src") || "", this.originalUrl = e, !e) return;
e = t.src
} else "canvas" === i && window.HTMLCanvasElement && (e = t.toDataURL());
this.load(e)
}
}
}, {
key: "load",
value: function (e) {
var t = this;
if (e) {
this.url = e, this.imageData = {};
var i = this.element,
n = this.options;
if (n.rotatable || n.scalable || (n.checkOrientation = !1), n.checkOrientation && window.ArrayBuffer)
if (yi.test(e)) bi.test(e) ? this.read((o = e.replace(ln, ""), r = atob(o), a = new ArrayBuffer(r.length), Oi(l = new Uint8Array(a), (function (e, t) {
l[t] = r.charCodeAt(t)
})), a)) : this.clone();
else {
var o, r, a, l, s = new XMLHttpRequest,
c = this.clone.bind(this);
this.reloading = !0, this.xhr = s, s.onabort = c, s.onerror = c, s.ontimeout = c, s.onprogress = function () {
"image/jpeg" !== s.getResponseHeader("content-type") && s.abort()
}, s.onload = function () {
t.read(s.response)
}, s.onloadend = function () {
t.reloading = !1, t.xhr = null
}, n.checkCrossOrigin && Qi(e) && i.crossOrigin && (e = en(e)), s.open("GET", e), s.responseType = "arraybuffer", s.withCredentials = "use-credentials" === i.crossOrigin, s.send()
}
else this.clone()
}
}
}, {
key: "read",
value: function (e) {
var t = this.options,
i = this.imageData,
n = sn(e),
o = 0,
r = 1,
a = 1;
if (n > 1) {
this.url = function (e, t) {
for (var i = [], n = new Uint8Array(e); n.length > 0;) i.push(an.apply(null, Ti(n.subarray(0, 8192)))), n = n.subarray(8192);
return "data:".concat(t, ";base64,").concat(btoa(i.join("")))
}(e, "image/jpeg");
var l = function (e) {
var t = 0,
i = 1,
n = 1;
switch (e) {
case 2:
i = -1;
break;
case 3:
t = -180;
break;
case 4:
n = -1;
break;
case 5:
t = 90, n = -1;
break;
case 6:
t = 90;
break;
case 7:
t = 90, i = -1;
break;
case 8:
t = -90
}
return {
rotate: t,
scaleX: i,
scaleY: n
}
}(n);
o = l.rotate, r = l.scaleX, a = l.scaleY
}
t.rotatable && (i.rotate = o), t.scalable && (i.scaleX = r, i.scaleY = a), this.clone()
}
}, {
key: "clone",
value: function () {
var e = this.element,
t = this.url,
i = e.crossOrigin,
n = t;
this.options.checkCrossOrigin && Qi(t) && (i || (i = "anonymous"), n = en(t)), this.crossOrigin = i, this.crossOriginUrl = n;
var o = document.createElement("img");
i && (o.crossOrigin = i), o.src = n || t, o.alt = e.alt || "The image to crop", this.image = o, o.onload = this.start.bind(this), o.onerror = this.stop.bind(this), Di(o, si), e.parentNode.insertBefore(o, e.nextSibling)
}
}, {
key: "start",
value: function () {
var e = this,
t = this.image;
t.onload = null, t.onerror = null, this.sizing = !0;
var i = ii.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(ii.navigator.userAgent),
n = function (t, i) {
Ni(e.imageData, {
naturalWidth: t,
naturalHeight: i,
aspectRatio: t / i
}), e.sizing = !1, e.sized = !0, e.build()
};
if (!t.naturalWidth || i) {
var o = document.createElement("img"),
r = document.body || document.documentElement;
this.sizingImage = o, o.onload = function () {
n(o.width, o.height), i || r.removeChild(o)
}, o.src = t.src, i || (o.style.cssText = "left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;", r.appendChild(o))
} else n(t.naturalWidth, t.naturalHeight)
}
}, {
key: "stop",
value: function () {
var e = this.image;
e.onload = null, e.onerror = null, e.parentNode.removeChild(e), this.image = null
}
}, {
key: "build",
value: function () {
if (this.sized && !this.ready) {
var e = this.element,
t = this.options,
i = this.image,
n = e.parentNode,
o = document.createElement("div");
o.innerHTML = '<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';
var r = o.querySelector(".".concat("cropper", "-container")),
a = r.querySelector(".".concat("cropper", "-canvas")),
l = r.querySelector(".".concat("cropper", "-drag-box")),
s = r.querySelector(".".concat("cropper", "-crop-box")),
c = s.querySelector(".".concat("cropper", "-face"));
this.container = n, this.cropper = r, this.canvas = a, this.dragBox = l, this.cropBox = s, this.viewBox = r.querySelector(".".concat("cropper", "-view-box")), this.face = c, a.appendChild(i), Di(e, li), n.insertBefore(r, e.nextSibling), this.isImg || Fi(i, si), this.initPreview(), this.bind(), t.initialAspectRatio = Math.max(0, t.initialAspectRatio) || NaN, t.aspectRatio = Math.max(0, t.aspectRatio) || NaN, t.viewMode = Math.max(0, Math.min(3, Math.round(t.viewMode))) || 0, Di(s, li), t.guides || Di(s.getElementsByClassName("".concat("cropper", "-dashed")), li), t.center || Di(s.getElementsByClassName("".concat("cropper", "-center")), li), t.background && Di(r, "".concat("cropper", "-bg")), t.highlight || Di(c, ci), t.cropBoxMovable && (Di(c, ui), ji(c, pi, "all")), t.cropBoxResizable || (Di(s.getElementsByClassName("".concat("cropper", "-line")), li), Di(s.getElementsByClassName("".concat("cropper", "-point")), li)), this.render(), this.ready = !0, this.setDragMode(t.dragMode), t.autoCrop && this.crop(), this.setData(t.data), Mi(t.ready) && Vi(e, "ready", t.ready, {
once: !0
}), Zi(e, "ready")
}
}
}, {
key: "unbuild",
value: function () {
this.ready && (this.ready = !1, this.unbind(), this.resetPreview(), this.cropper.parentNode.removeChild(this.cropper), Fi(this.element, li))
}
}, {
key: "uncreate",
value: function () {
this.ready ? (this.unbuild(), this.ready = !1, this.cropped = !1) : this.sizing ? (this.sizingImage.onload = null, this.sizing = !1, this.sized = !1) : this.reloading ? (this.xhr.onabort = null, this.xhr.abort()) : this.image && this.stop()
}
}]) && Qt(t.prototype, i), n && Qt(t, n), e
}();
function mn(e) {
return void 0 === e
}
Ni(gn.prototype, cn, dn, un, pn, vn, hn);
var yn = function () {
var e = function () {
function e() {
this._eventHandler = {}, this.options = {}
}
var t = e.prototype;
return t.trigger = function (e, t) {
void 0 === t && (t = {});
var i = this._eventHandler[e] || [],
n = i.length > 0;
if (!n) return !0;
i = i.concat(), t.eventType = e;
var o = !1,
r = [t],
a = 0;
t.stop = function () {
o = !0
}, t.currentTarget = this;
for (var l = arguments.length, s = new Array(l > 2 ? l - 2 : 0), c = 2; c < l; c++) s[c - 2] = arguments[c];
for (s.length >= 1 && (r = r.concat(s)), a = 0; i[a]; a++) i[a].apply(this, r);
return !o
}, t.once = function (e, t) {
if ("object" == typeof e && mn(t)) {
var i, n = e;
for (i in n) this.once(i, n[i]);
return this
}
if ("string" == typeof e && "function" == typeof t) {
var o = this;
this.on(e, (function i() {
for (var n = arguments.length, r = new Array(n), a = 0; a < n; a++) r[a] = arguments[a];
t.apply(o, r), o.off(e, i)
}))
}
return this
}, t.hasOn = function (e) {
return !!this._eventHandler[e]
}, t.on = function (e, t) {
if ("object" == typeof e && mn(t)) {
var i, n = e;
for (i in n) this.on(i, n[i]);
return this
}
if ("string" == typeof e && "function" == typeof t) {
var o = this._eventHandler[e];
mn(o) && (this._eventHandler[e] = [], o = this._eventHandler[e]), o.push(t)
}
return this
}, t.off = function (e, t) {
if (mn(e)) return this._eventHandler = {}, this;
if (mn(t)) {
if ("string" == typeof e) return this._eventHandler[e] = void 0, this;
var i, n = e;
for (i in n) this.off(i, n[i]);
return this
}
var o, r, a = this._eventHandler[e];
if (a)
for (o = 0; void 0 !== (r = a[o]); o++)
if (r === t) {
a = a.splice(o, 1);
break
} return this
}, e
}();
return e.VERSION = "2.1.2", e
}();
function bn(e) {
for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
return t.map((function (t) {
return t.split(" ").map((function (t) {
return t ? "" + e + t : ""
})).join(" ")
})).join(" ")
}
function xn(e, t) {
return function (i) {
i && (e[t] = i)
}
}
function wn(e, t, i) {
return function (n) {
n && (e[t][i] = n)
}
}
var Sn, Cn, En, kn, Ln, An, qn = {},
Mn = [],
_n = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;
function Tn(e, t) {
for (var i in t) e[i] = t[i];
return e
}
function On(e) {
var t = e.parentNode;
t && t.removeChild(e)
}
function Nn(e, t, i) {
var n, o = arguments,
r = {};
for (n in t) "key" !== n && "ref" !== n && (r[n] = t[n]);
if (arguments.length > 3)
for (i = [i], n = 3; n < arguments.length; n++) i.push(o[n]);
if (null != i && (r.children = i), "function" == typeof e && null != e.defaultProps)
for (n in e.defaultProps) void 0 === r[n] && (r[n] = e.defaultProps[n]);
return Rn(e, r, t && t.key, t && t.ref)
}
function Rn(e, t, i, n) {
var o = {
type: e,
props: t,
key: i,
ref: n,
__k: null,
__: null,
__b: 0,
__e: null,
__d: null,
__c: null,
constructor: void 0
};
return Sn.vnode && Sn.vnode(o), o
}
function Bn() {
return {}
}
function In(e) {
return e.children
}
function Hn(e, t) {
this.props = e, this.context = t
}
function Dn(e, t) {
if (null == t) return e.__ ? Dn(e.__, e.__.__k.indexOf(e) + 1) : null;
for (var i; t < e.__k.length; t++)
if (null != (i = e.__k[t]) && null != i.__e) return i.__e;
return "function" == typeof e.type ? Dn(e) : null
}
function Fn(e) {
var t, i;
if (null != (e = e.__) && null != e.__c) {
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
if (null != (i = e.__k[t]) && null != i.__e) {
e.__e = e.__c.base = i.__e;
break
} return Fn(e)
}
}
function Pn(e) {
(!e.__d && (e.__d = !0) && 1 === Cn.push(e) || kn !== Sn.debounceRendering) && ((kn = Sn.debounceRendering) || En)(Un)
}
function Un() {
var e, t, i, n, o, r, a;
for (Cn.sort((function (e, t) {
return t.__v.__b - e.__v.__b
})); e = Cn.pop();) e.__d && (i = void 0, n = void 0, r = (o = (t = e).__v).__e, (a = t.__P) && (i = [], n = Gn(a, o, Tn({}, o), t.__n, void 0 !== a.ownerSVGElement, null, i, null == r ? Dn(o) : r), Vn(i, o), n != r && Fn(o)))
}
function zn(e, t, i, n, o, r, a, l, s) {
var c, d, u, p, v, h, f, g = i && i.__k || Mn,
m = g.length;
if (l == qn && (l = null != r ? r[0] : m ? Dn(i, 0) : null), c = 0, t.__k = Wn(t.__k, (function (i) {
if (null != i) {
if (i.__ = t, i.__b = t.__b + 1, null === (u = g[c]) || u && i.key == u.key && i.type === u.type) g[c] = void 0;
else
for (d = 0; d < m; d++) {
if ((u = g[d]) && i.key == u.key && i.type === u.type) {
g[d] = void 0;
break
}
u = null
}
if (p = Gn(e, i, u = u || qn, n, o, r, a, l, s), (d = i.ref) && u.ref != d && (f || (f = []), u.ref && f.push(u.ref, null, i), f.push(d, i.__c || p, i)), null != p) {
if (null == h && (h = p), null != i.__d) p = i.__d, i.__d = null;
else if (r == u || p != l || null == p.parentNode) {
e: if (null == l || l.parentNode !== e) e.appendChild(p);
else {
for (v = l, d = 0;
(v = v.nextSibling) && d < m; d += 2)
if (v == p) break e;
e.insertBefore(p, l)
}
"option" == t.type && (e.value = "")
}
l = p.nextSibling, "function" == typeof t.type && (t.__d = p)
}
}
return c++, i
})), t.__e = h, null != r && "function" != typeof t.type)
for (c = r.length; c--;) null != r[c] && On(r[c]);
for (c = m; c--;) null != g[c] && Jn(g[c], g[c]);
if (f)
for (c = 0; c < f.length; c++) Kn(f[c], f[++c], f[++c])
}
function Wn(e, t, i) {
if (null == i && (i = []), null == e || "boolean" == typeof e) t && i.push(t(null));
else if (Array.isArray(e))
for (var n = 0; n < e.length; n++) Wn(e[n], t, i);
else i.push(t ? t("string" == typeof e || "number" == typeof e ? Rn(null, e, null, null) : null != e.__e || null != e.__c ? Rn(e.type, e.props, e.key, null) : e) : e);
return i
}
function jn(e, t, i) {
"-" === t[0] ? e.setProperty(t, i) : e[t] = "number" == typeof i && !1 === _n.test(t) ? i + "px" : null == i ? "" : i
}
function Yn(e, t, i, n, o) {
var r, a, l, s, c;
if (o ? "className" === t && (t = "class") : "class" === t && (t = "className"), "key" === t || "children" === t);
else if ("style" === t)
if (r = e.style, "string" == typeof i) r.cssText = i;
else {
if ("string" == typeof n && (r.cssText = "", n = null), n)
for (a in n) i && a in i || jn(r, a, "");
if (i)
for (l in i) n && i[l] === n[l] || jn(r, l, i[l])
}
else "o" === t[0] && "n" === t[1] ? (s = t !== (t = t.replace(/Capture$/, "")), c = t.toLowerCase(), t = (c in e ? c : t).slice(2), i ? (n || e.addEventListener(t, Xn, s), (e.l || (e.l = {}))[t] = i) : e.removeEventListener(t, Xn, s)) : "list" !== t && "tagName" !== t && "form" !== t && "type" !== t && !o && t in e ? e[t] = null == i ? "" : i : "function" != typeof i && "dangerouslySetInnerHTML" !== t && (t !== (t = t.replace(/^xlink:?/, "")) ? null == i || !1 === i ? e.removeAttributeNS("http://www.w3.org/1999/xlink", t.toLowerCase()) : e.setAttributeNS("http://www.w3.org/1999/xlink", t.toLowerCase(), i) : null == i || !1 === i ? e.removeAttribute(t) : e.setAttribute(t, i))
}
function Xn(e) {
this.l[e.type](Sn.event ? Sn.event(e) : e)
}
function Gn(e, t, i, n, o, r, a, l, s) {
var c, d, u, p, v, h, f, g, m, y, b = t.type;
if (void 0 !== t.constructor) return null;
(c = Sn.__b) && c(t);
try {
e: if ("function" == typeof b) {
if (g = t.props, m = (c = b.contextType) && n[c.__c], y = c ? m ? m.props.value : c.__ : n, i.__c ? f = (d = t.__c = i.__c).__ = d.__E : ("prototype" in b && b.prototype.render ? t.__c = d = new b(g, y) : (t.__c = d = new Hn(g, y), d.constructor = b, d.render = $n), m && m.sub(d), d.props = g, d.state || (d.state = {}), d.context = y, d.__n = n, u = d.__d = !0, d.__h = []), null == d.__s && (d.__s = d.state), null != b.getDerivedStateFromProps && (d.__s == d.state && (d.__s = Tn({}, d.__s)), Tn(d.__s, b.getDerivedStateFromProps(g, d.__s))), p = d.props, v = d.state, u) null == b.getDerivedStateFromProps && null != d.componentWillMount && d.componentWillMount(), null != d.componentDidMount && d.__h.push(d.componentDidMount);
else {
if (null == b.getDerivedStateFromProps && g !== p && null != d.componentWillReceiveProps && d.componentWillReceiveProps(g, y), !d.__e && null != d.shouldComponentUpdate && !1 === d.shouldComponentUpdate(g, d.__s, y)) {
for (d.props = g, d.state = d.__s, d.__d = !1, d.__v = t, t.__e = i.__e, t.__k = i.__k, d.__h.length && a.push(d), c = 0; c < t.__k.length; c++) t.__k[c] && (t.__k[c].__ = t);
break e
}
null != d.componentWillUpdate && d.componentWillUpdate(g, d.__s, y), null != d.componentDidUpdate && d.__h.push((function () {
d.componentDidUpdate(p, v, h)
}))
}
d.context = y, d.props = g, d.state = d.__s, (c = Sn.__r) && c(t), d.__d = !1, d.__v = t, d.__P = e, c = d.render(d.props, d.state, d.context), t.__k = Wn(null != c && c.type == In && null == c.key ? c.props.children : c), null != d.getChildContext && (n = Tn(Tn({}, n), d.getChildContext())), u || null == d.getSnapshotBeforeUpdate || (h = d.getSnapshotBeforeUpdate(p, v)), zn(e, t, i, n, o, r, a, l, s), d.base = t.__e, d.__h.length && a.push(d), f && (d.__E = d.__ = null), d.__e = null
} else t.__e = Zn(i.__e, t, i, n, o, r, a, s);
(c = Sn.diffed) && c(t)
}
catch (e) {
Sn.__e(e, t, i)
}
return t.__e
}
function Vn(e, t) {
Sn.__c && Sn.__c(t, e), e.some((function (t) {
try {
e = t.__h, t.__h = [], e.some((function (e) {
e.call(t)
}))
} catch (e) {
Sn.__e(e, t.__v)
}
}))
}
function Zn(e, t, i, n, o, r, a, l) {
var s, c, d, u, p, v = i.props,
h = t.props;
if (o = "svg" === t.type || o, null == e && null != r)
for (s = 0; s < r.length; s++)
if (null != (c = r[s]) && (null === t.type ? 3 === c.nodeType : c.localName === t.type)) {
e = c, r[s] = null;
break
} if (null == e) {
if (null === t.type) return document.createTextNode(h);
e = o ? document.createElementNS("http://www.w3.org/2000/svg", t.type) : document.createElement(t.type), r = null
}
if (null === t.type) null != r && (r[r.indexOf(e)] = null), v !== h && e.data != h && (e.data = h);
else if (t !== i) {
if (null != r && (r = Mn.slice.call(e.childNodes)), d = (v = i.props || qn).dangerouslySetInnerHTML, u = h.dangerouslySetInnerHTML, !l) {
if (v === qn)
for (v = {}, p = 0; p < e.attributes.length; p++) v[e.attributes[p].name] = e.attributes[p].value;
(u || d) && (u && d && u.__html == d.__html || (e.innerHTML = u && u.__html || ""))
}(function (e, t, i, n, o) {
var r;
for (r in i) r in t || Yn(e, r, null, i[r], n);
for (r in t) o && "function" != typeof t[r] || "value" === r || "checked" === r || i[r] === t[r] || Yn(e, r, t[r], i[r], n)
})(e, h, v, o, l), t.__k = t.props.children, u || zn(e, t, i, n, "foreignObject" !== t.type && o, r, a, qn, l), l || ("value" in h && void 0 !== h.value && h.value !== e.value && (e.value = null == h.value ? "" : h.value), "checked" in h && void 0 !== h.checked && h.checked !== e.checked && (e.checked = h.checked))
}
return e
}
function Kn(e, t, i) {
try {
"function" == typeof e ? e(t) : e.current = t
} catch (e) {
Sn.__e(e, i)
}
}
function Jn(e, t, i) {
var n, o, r;
if (Sn.unmount && Sn.unmount(e), (n = e.ref) && (n.current && n.current !== e.__e || Kn(n, null, t)), i || "function" == typeof e.type || (i = null != (o = e.__e)), e.__e = e.__d = null, null != (n = e.__c)) {
if (n.componentWillUnmount) try {
n.componentWillUnmount()
} catch (e) {
Sn.__e(e, t)
}
n.base = n.__P = null
}
if (n = e.__k)
for (r = 0; r < n.length; r++) n[r] && Jn(n[r], t, i);
null != o && On(o)
}
function $n(e, t, i) {
return this.constructor(e, i)
}
function Qn(e, t, i) {
var n, o, r;
Sn.__ && Sn.__(e, t), o = (n = i === Ln) ? null : i && i.__k || t.__k, e = Nn(In, null, [e]), r = [], Gn(t, (n ? t : i || t).__k = e, o || qn, qn, void 0 !== t.ownerSVGElement, i && !n ? [i] : o ? null : Mn.slice.call(t.childNodes), r, i || qn, n), Vn(r, e)
}
function eo(e, t) {
return t = Tn(Tn({}, e.props), t), arguments.length > 2 && (t.children = Mn.slice.call(arguments, 2)), Rn(e.type, t, t.key || e.key, t.ref || e.ref)
}
function to(e) {
var t = {},
i = {
__c: "__cC" + An++,
__: e,
Consumer: function (e, t) {
return e.children(t)
},
Provider: function (e) {
var n, o = this;
return this.getChildContext || (n = [], this.getChildContext = function () {
return t[i.__c] = o, t
}, this.shouldComponentUpdate = function (t) {
e.value !== t.value && n.some((function (e) {
e.context = t.value, Pn(e)
}))
}, this.sub = function (e) {
n.push(e);
var t = e.componentWillUnmount;
e.componentWillUnmount = function () {
n.splice(n.indexOf(e), 1), t && t.call(e)
}
}), e.children
}
};
return i.Consumer.contextType = i, i
}
Sn = {
__e: function (e, t) {
for (var i, n; t = t.__;)
if ((i = t.__c) && !i.__) try {
if (i.constructor && null != i.constructor.getDerivedStateFromError && (n = !0, i.setState(i.constructor.getDerivedStateFromError(e))), null != i.componentDidCatch && (n = !0, i.componentDidCatch(e)), n) return Pn(i.__E = i)
} catch (t) {
e = t
}
throw e
}
}, Hn.prototype.setState = function (e, t) {
var i;
i = this.__s !== this.state ? this.__s : this.__s = Tn({}, this.state), "function" == typeof e && (e = e(i, this.props)), e && Tn(i, e), null != e && this.__v && (this.__e = !1, t && this.__h.push(t), Pn(this))
}, Hn.prototype.forceUpdate = function (e) {
this.__v && (this.__e = !0, e && this.__h.push(e), Pn(this))
}, Hn.prototype.render = In, Cn = [], En = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ln = qn, An = 0;
var io, no, oo, ro = [],
ao = Sn.__r,
lo = Sn.diffed,
so = Sn.__c,
co = Sn.unmount;
function uo(e) {
Sn.__h && Sn.__h(no);
var t = no.__H || (no.__H = {
t: [],
u: []
});
return e >= t.t.length && t.t.push({}), t.t[e]
}
function po(e) {
return vo(Lo, e)
}
function vo(e, t, i) {
var n = uo(io++);
return n.__c || (n.__c = no, n.i = [i ? i(t) : Lo(void 0, t), function (t) {
var i = e(n.i[0], t);
n.i[0] !== i && (n.i[0] = i, n.__c.setState({}))
}]), n.i
}
function ho(e, t) {
var i = uo(io++);
ko(i.o, t) && (i.i = e, i.o = t, no.__H.u.push(i))
}
function fo(e, t) {
var i = uo(io++);
ko(i.o, t) && (i.i = e, i.o = t, no.__h.push(i))
}
function go(e) {
return yo((function () {
return {
current: e
}
}), [])
}
function mo(e, t, i) {
fo((function () {
"function" == typeof e ? e(t()) : e && (e.current = t())
}), null == i ? i : i.concat(e))
}
function yo(e, t) {
var i = uo(io++);
return ko(i.o, t) ? (i.o = t, i.v = e, i.i = e()) : i.i
}
function bo(e, t) {
return yo((function () {
return e
}), t)
}
function xo(e) {
var t = no.context[e.__c];
if (!t) return e.__;
var i = uo(io++);
return null == i.i && (i.i = !0, t.sub(no)), t.props.value
}
function wo(e, t) {
Sn.useDebugValue && Sn.useDebugValue(t ? t(e) : e)
}
function So() {
ro.some((function (e) {
e.__P && (e.__H.u.forEach(Co), e.__H.u.forEach(Eo), e.__H.u = [])
})), ro = []
}
function Co(e) {
e.m && e.m()
}
function Eo(e) {
var t = e.i();
"function" == typeof t && (e.m = t)
}
function ko(e, t) {
return !e || t.some((function (t, i) {
return t !== e[i]
}))
}
function Lo(e, t) {
return "function" == typeof t ? t(e) : t
}
function Ao(e, t) {
for (var i in t) e[i] = t[i];
return e
}
function qo(e, t) {
for (var i in e)
if ("__source" !== i && !(i in t)) return !0;
for (var n in t)
if ("__source" !== n && e[n] !== t[n]) return !0;
return !1
}
Sn.__r = function (e) {
ao && ao(e), io = 0, (no = e.__c).__H && (no.__H.u.forEach(Co), no.__H.u.forEach(Eo), no.__H.u = [])
}, Sn.diffed = function (e) {
lo && lo(e);
var t = e.__c;
if (t) {
var i = t.__H;
i && i.u.length && (1 !== ro.push(t) && oo === Sn.requestAnimationFrame || ((oo = Sn.requestAnimationFrame) || function (e) {
var t, i = function () {
clearTimeout(n), cancelAnimationFrame(t), setTimeout(e)
},
n = setTimeout(i, 100);
"undefined" != typeof window && (t = requestAnimationFrame(i))
})(So))
}
}, Sn.__c = function (e, t) {
t.some((function (e) {
e.__h.forEach(Co), e.__h = e.__h.filter((function (e) {
return !e.i || Eo(e)
}))
})), so && so(e, t)
}, Sn.unmount = function (e) {
co && co(e);
var t = e.__c;
if (t) {
var i = t.__H;
i && i.t.forEach((function (e) {
return e.m && e.m()
}))
}
};
var Mo = function (e) {
var t, i;
function n(t) {
var i;
return (i = e.call(this, t) || this).isPureReactComponent = !0, i
}
return i = e, (t = n).prototype = Object.create(i.prototype), t.prototype.constructor = t, t.__proto__ = i, n.prototype.shouldComponentUpdate = function (e, t) {
return qo(this.props, e) || qo(this.state, t)
}, n
}(Hn);
function _o(e, t) {
function i(e) {
var i = this.props.ref,
n = i == e.ref;
return !n && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, e) || !n : qo(this.props, e)
}
function n(t) {
return this.shouldComponentUpdate = i, Nn(e, Ao({}, t))
}
return n.prototype.isReactComponent = !0, n.displayName = "Memo(" + (e.displayName || e.name) + ")", n.t = !0, n
}
var To = Sn.vnode;
function Oo(e) {
function t(t) {
var i = Ao({}, t);
return delete i.ref, e(i, t.ref)
}
return t.prototype.isReactComponent = !0, t.t = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t
}
Sn.vnode = function (e) {
e.type && e.type.t && e.ref && (e.props.ref = e.ref, e.ref = null), To && To(e)
};
var No = function (e, t) {
return e ? Wn(e).map(t) : null
},
Ro = {
map: No,
forEach: No,
count: function (e) {
return e ? Wn(e).length : 0
},
only: function (e) {
if (1 !== (e = Wn(e)).length) throw new Error("Children.only() expects only one child.");
return e[0]
},
toArray: Wn
},
Bo = Sn.__e;
function Io(e) {
return e && ((e = Ao({}, e)).__c = null, e.__k = e.__k && e.__k.map(Io)), e
}
function Ho(e) {
this.__u = 0, this.__b = null
}
function Do(e) {
var t = e.__.__c;
return t && t.o && t.o(e)
}
function Fo(e) {
var t, i, n;
function o(o) {
if (t || (t = e()).then((function (e) {
i = e.default || e
}), (function (e) {
n = e
})), n) throw n;
if (!i) throw t;
return Nn(i, o)
}
return o.displayName = "Lazy", o.t = !0, o
}
function Po() {
this.u = null, this.i = null
}
Sn.__e = function (e, t, i) {
if (e.then)
for (var n, o = t; o = o.__;)
if ((n = o.__c) && n.l) return n.l(e, t.__c);
Bo(e, t, i)
}, (Ho.prototype = new Hn).l = function (e, t) {
var i = this,
n = Do(i.__v),
o = !1,
r = function () {
o || (o = !0, n ? n(a) : a())
};
t.__c = t.componentWillUnmount, t.componentWillUnmount = function () {
r(), t.__c && t.__c()
};
var a = function () {
--i.__u || (i.__v.__k[0] = i.state.o, i.setState({
o: i.__b = null
}))
};
i.__u++ || i.setState({
o: i.__b = i.__v.__k[0]
}), e.then(r, r)
}, Ho.prototype.render = function (e, t) {
return this.__b && (this.__v.__k[0] = Io(this.__b), this.__b = null), [Nn(Hn, null, t.o ? null : e.children), t.o && e.fallback]
};
var Uo = function (e, t, i) {
if (++i[1] === i[0] && e.i.delete(t), e.props.revealOrder && ("t" !== e.props.revealOrder[0] || !e.i.size))
for (i = e.u; i;) {
for (; i.length > 3;) i.pop()();
if (i[1] < i[0]) break;
e.u = i = i[2]
}
};
(Po.prototype = new Hn).o = function (e) {
var t = this,
i = Do(t.__v),
n = t.i.get(e);
return n[0]++,
function (o) {
var r = function () {
t.props.revealOrder ? (n.push(o), Uo(t, e, n)) : o()
};
i ? i(r) : r()
}
}, Po.prototype.render = function (e) {
this.u = null, this.i = new Map;
var t = Wn(e.children);
e.revealOrder && "b" === e.revealOrder[0] && t.reverse();
for (var i = t.length; i--;) this.i.set(t[i], this.u = [1, 0, this.u]);
return e.children
}, Po.prototype.componentDidUpdate = Po.prototype.componentDidMount = function () {
var e = this;
e.i.forEach((function (t, i) {
Uo(e, i, t)
}))
};
var zo = function () {
function e() {}
var t = e.prototype;
return t.getChildContext = function () {
return this.props.context
}, t.render = function (e) {
return e.children
}, e
}();
function Wo(e) {
var t = this,
i = e.container,
n = Nn(zo, {
context: t.context
}, e.vnode);
return t.s && t.s !== i && (t.h.parentNode && t.s.removeChild(t.h), Jn(t.v), t.p = !1), e.vnode ? t.p ? (i.__k = t.__k, Qn(n, i), t.__k = i.__k) : (t.h = document.createTextNode(""), function (e, t) {
Qn(e, t, Ln)
}("", i), i.appendChild(t.h), t.p = !0, t.s = i, Qn(n, i, t.h), t.__k = this.h.__k) : t.p && (t.h.parentNode && t.s.removeChild(t.h), Jn(t.v)), t.v = n, t.componentWillUnmount = function () {
t.h.parentNode && t.s.removeChild(t.h), Jn(t.v)
}, null
}
function jo(e, t) {
return Nn(Wo, {
vnode: e,
container: t
})
}
var Yo = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;
Hn.prototype.isReactComponent = {};
var Xo = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103;
function Go(e, t, i) {
if (null == t.__k)
for (; t.firstChild;) t.removeChild(t.firstChild);
return Vo(e, t, i)
}
function Vo(e, t, i) {
return Qn(e, t), "function" == typeof i && i(), e ? e.__c : null
}
var Zo = Sn.event;
function Ko(e, t) {
e["UNSAFE_" + t] && !e[t] && Object.defineProperty(e, t, {
configurable: !1,
get: function () {
return this["UNSAFE_" + t]
},
set: function (e) {
this["UNSAFE_" + t] = e
}
})
}
Sn.event = function (e) {
return Zo && (e = Zo(e)), e.persist = function () {}, e.nativeEvent = e
};
var Jo = {
configurable: !0,
get: function () {
return this.class
}
},
$o = Sn.vnode;
Sn.vnode = function (e) {
e.$$typeof = Xo;
var t = e.type,
i = e.props;
if ("function" != typeof t) {
var n, o, r;
for (r in i.defaultValue && (i.value || 0 === i.value || (i.value = i.defaultValue), delete i.defaultValue), Array.isArray(i.value) && i.multiple && "select" === t && (Wn(i.children).forEach((function (e) {
-1 != i.value.indexOf(e.props.value) && (e.props.selected = !0)
})), delete i.value), i)
if (n = Yo.test(r)) break;
if (n)
for (r in o = e.props = {}, i) o[Yo.test(r) ? r.replace(/([A-Z0-9])/, "-$1").toLowerCase() : r] = i[r]
}(i.class || i.className) && (Jo.enumerable = "className" in i, i.className && (i.class = i.className), Object.defineProperty(i, "className", Jo)),
function (t) {
var i = e.type,
n = e.props;
if (n && "string" == typeof i) {
var o = {};
for (var r in n) /^on(Ani|Tra|Tou)/.test(r) && (n[r.toLowerCase()] = n[r], delete n[r]), o[r.toLowerCase()] = r;
if (o.ondoubleclick && (n.ondblclick = n[o.ondoubleclick], delete n[o.ondoubleclick]), o.onbeforeinput && (n.onbeforeinput = n[o.onbeforeinput], delete n[o.onbeforeinput]), o.onchange && ("textarea" === i || "input" === i.toLowerCase() && !/^fil|che|ra/i.test(n.type))) {
var a = o.oninput || "oninput";
n[a] || (n[a] = n[o.onchange], delete n[o.onchange])
}
}
}(), "function" == typeof t && !t.m && t.prototype && (Ko(t.prototype, "componentWillMount"), Ko(t.prototype, "componentWillReceiveProps"), Ko(t.prototype, "componentWillUpdate"), t.m = !0), $o && $o(e)
};
function Qo(e) {
return Nn.bind(null, e)
}
function er(e) {
return !!e && e.$$typeof === Xo
}
function tr(e) {
return er(e) ? eo.apply(null, arguments) : e
}
function ir(e) {
return !!e.__k && (Qn(null, e), !0)
}
function nr(e) {
return e && (e.base || 1 === e.nodeType && e) || null
}
var or = function (e, t) {
return e(t)
},
rr = {
useState: po,
useReducer: vo,
useEffect: ho,
useLayoutEffect: fo,
useRef: go,
useImperativeHandle: mo,
useMemo: yo,
useCallback: bo,
useContext: xo,
useDebugValue: wo,
version: "16.8.0",
Children: Ro,
render: Go,
hydrate: Go,
unmountComponentAtNode: ir,
createPortal: jo,
createElement: Nn,
createContext: to,
createFactory: Qo,
cloneElement: tr,
createRef: Bn,
Fragment: In,
isValidElement: er,
findDOMNode: nr,
Component: Hn,
PureComponent: Mo,
memo: _o,
forwardRef: Oo,
unstable_batchedUpdates: or,
Suspense: Ho,
SuspenseList: Po,
lazy: Fo
},
ar = Object.freeze({
__proto__: null,
default: rr,
version: "16.8.0",
Children: Ro,
render: Go,
hydrate: Vo,
unmountComponentAtNode: ir,
createPortal: jo,
createFactory: Qo,
cloneElement: tr,
isValidElement: er,
findDOMNode: nr,
PureComponent: Mo,
memo: _o,
forwardRef: Oo,
unstable_batchedUpdates: or,
Suspense: Ho,
SuspenseList: Po,
lazy: Fo,
createElement: Nn,
createContext: to,
createRef: Bn,
Fragment: In,
Component: Hn,
useState: po,
useReducer: vo,
useEffect: ho,
useLayoutEffect: fo,
useRef: go,
useImperativeHandle: mo,
useMemo: yo,
useCallback: bo,
useContext: xo,
useDebugValue: wo,
useErrorBoundary: function (e) {
var t = uo(io++),
i = po();
return t.i = e, no.componentDidCatch || (no.componentDidCatch = function (e) {
t.i && t.i(e), i[1](e)
}), [i[0], function () {
i[1](void 0)
}]
}
}),
lr = ("undefined" != typeof window && window || {}).navigator,
sr = {
browser: [{
criteria: "PhantomJS",
identity: "PhantomJS"
}, {
criteria: /Whale/,
identity: "Whale",
versionSearch: "Whale"
}, {
criteria: /Edge/,
identity: "Edge",
versionSearch: "Edge"
}, {
criteria: /MSIE|Trident|Windows Phone/,
identity: "IE",
versionSearch: "IEMobile|MSIE|rv"
}, {
criteria: /MiuiBrowser/,
identity: "MIUI Browser",
versionSearch: "MiuiBrowser"
}, {
criteria: /SamsungBrowser/,
identity: "Samsung Internet",
versionSearch: "SamsungBrowser"
}, {
criteria: /SAMSUNG /,
identity: "Samsung Internet",
versionSearch: "Version"
}, {
criteria: /Chrome|CriOS/,
identity: "Chrome"
}, {
criteria: /Android/,
identity: "Android Browser",
versionSearch: "Version"
}, {
criteria: /iPhone|iPad/,
identity: "Safari",
versionSearch: "Version"
}, {
criteria: "Apple",
identity: "Safari",
versionSearch: "Version"
}, {
criteria: "Firefox",
identity: "Firefox"
}],
os: [{
criteria: /Windows Phone/,
identity: "Windows Phone",
versionSearch: "Windows Phone"
}, {
criteria: "Windows 2000",
identity: "Window",
versionAlias: "5.0"
}, {
criteria: /Windows NT/,
identity: "Window",
versionSearch: "Windows NT"
}, {
criteria: /iPhone|iPad/,
identity: "iOS",
versionSearch: "iPhone OS|CPU OS"
}, {
criteria: "Mac",
versionSearch: "OS X",
identity: "MAC"
}, {
criteria: /Android/,
identity: "Android"
}, {
criteria: /Tizen/,
identity: "Tizen"
}, {
criteria: /Web0S/,
identity: "WebOS"
}],
webview: [{
criteria: /iPhone|iPad/,
browserVersionSearch: "Version",
webviewBrowserVersion: /-1/
}, {
criteria: /iPhone|iPad|Android/,
webviewToken: /NAVER|DAUM|; wv/
}],
defaultString: {
browser: {
version: "-1",
name: "unknown"
},
os: {
version: "-1",
name: "unknown"
}
}
};
function cr(e, t) {
for (var i = [], n = 0; n < e.length; n++) t(e[n]) && i.push(e[n]);
return i
}
var dr = void 0;
function ur(e, t) {
return t && t.test ? !!t.test(e) : e.indexOf(t) > -1
}
function pr(e, t) {
var i = cr(e, (function (e) {
return ur(dr, e.criteria)
}))[0];
return i && i.identity || t.name
}
function vr(e, t) {
return cr(e, (function (e) {
var i = e.criteria,
n = new RegExp(e.identity, "i").test(t);
return !!(i ? n && ur(dr, i) : n)
}))[0]
}
function hr(e, t) {
var i = sr.defaultString.browser.version,
n = new RegExp("(" + e + ")", "i").exec(t);
if (!n) return i;
var o = n.index,
r = n[0];
if (o > -1) {
var a = o + r.length + 1;
i = t.substring(a).split(" ")[0].replace(/_/g, ".").replace(/;|\)/g, "")
}
return i
}
function fr(e) {
if (e) return hr(function (e) {
var t = vr(sr.browser, e);
return t || (t = {
criteria: e,
versionSearch: e,
identity: e
}), t
}(e).versionSearch || e, dr)
}
function gr(e) {
var t = function (e) {
return vr(sr.os, e)
}(e) || {},
i = sr.defaultString.os.version,
n = void 0;
if (e) {
if (t.versionAlias) return t.versionAlias;
var o = t.versionSearch || e,
r = new RegExp("(" + o + ")\\s([\\d_\\.]+|\\d_0)", "i");
return r.exec(dr) && (n = r.exec(dr)[2].replace(/_/g, ".").replace(/;|\)/g, "")), n || i
}
}
function mr() {
var e = pr(sr.os, sr.defaultString.os);
return {
name: e,
version: gr(e)
}
}
function yr() {
var e, t, i = pr(sr.browser, sr.defaultString.browser);
return {
name: i,
version: fr(i),
webview: (e = sr.webview, t = void 0, function (e, t) {
for (var i = 0; i < e.length; i++)
if (t(e[i])) return !0;
return !1
}(cr(e, (function (e) {
return ur(dr, e.criteria)
})), (function (e) {
return t = hr(e.browserVersionSearch, dr), !(!ur(dr, e.webviewToken) && !ur(t, e.webviewBrowserVersion))
})))
}
}
function br() {
! function (e) {
dr = e
}(arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : lr.userAgent);
var e = {
os: mr(),
browser: yr(),
isMobile: -1 !== dr.indexOf("Mobi")
};
return e.browser.name = e.browser.name.toLowerCase(), e.os.name = e.os.name.toLowerCase(), e.os.version = e.os.version.toLowerCase(), "ios" === e.os.name && e.browser.webview && (e.browser.version = "-1"), e
}
br.VERSION = "2.1.5";
var xr = "function",
wr = "object",
Sr = "undefined";
function Cr(e) {
return typeof e === Sr
}
function Er(e) {
return e && typeof e === wr
}
function kr(e) {
return Array.isArray(e)
}
function Lr(e) {
var t = /^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);
if (!t) return {
prefix: "",
unit: "",
value: NaN
};
var i = t[1],
n = t[2];
return {
prefix: i,
unit: t[3],
value: parseFloat(n)
}
}
function Ar(e, t) {
return e.classList ? e.classList.contains(t) : !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)"))
}
function qr(e, t, i, n) {
e.addEventListener(t, i, n)
}
function Mr(e, t, i) {
e.removeEventListener(t, i)
}
function _r(e, t, i, n, o, r) {
for (var a = i; a < n; ++a) e[a] += e[o + a - i] * r, t[a] += t[o + a - i] * r
}
function Tr(e, t, i, n, o) {
for (var r = i; r < n; ++r) {
var a = e[r],
l = t[r];
e[r] = e[o + r - i], e[o + r - i] = a, t[r] = t[o + r - i], t[o + r - i] = l
}
}
function Or(e, t, i, n, o) {
for (var r = i; r < n; ++r) e[r] /= o, t[r] /= o
}
function Nr(e, t) {
void 0 === t && (t = Math.sqrt(e.length));
for (var i = e.slice(), n = Zr(t), o = 0; o < t; ++o) {
var r = t * o,
a = t * (o + 1),
l = r + o;
if (0 === i[l])
for (var s = o + 1; s < t; ++s)
if (i[t * s + o]) {
Tr(i, n, r, a, t * s);
break
} if (!i[l]) return [];
Or(i, n, r, a, i[l]);
for (s = 0; s < t; ++s) {
var c = t * s,
d = c + t,
u = i[c + o];
0 !== u && o !== s && _r(i, n, c, d, r, -u)
}
}
return n
}
function Rr(e, t) {
void 0 === t && (t = Math.sqrt(e.length));
for (var i = [], n = 0; n < t; ++n)
for (var o = 0; o < t; ++o) i[o * t + n] = e[t * n + o];
return i
}
function Br(e, t) {
var i = t[0] - e[0],
n = t[1] - e[1],
o = Math.atan2(n, i);
return o >= 0 ? o : o + 2 * Math.PI
}
function Ir(e, t) {
for (var i = e.slice(), n = e.length; n < t - 1; ++n) i[n] = 0;
return i[t - 1] = 1, i
}
function Hr(e, t, i) {
if (void 0 === t && (t = Math.sqrt(e.length)), t === i) return e;
for (var n = Zr(i), o = Math.min(t, i), r = 0; r < o - 1; ++r) {
for (var a = 0; a < o - 1; ++a) n[r * i + a] = e[r * t + a];
n[(r + 1) * i - 1] = e[(r + 1) * t - 1], n[(i - 1) * i + r] = e[(t - 1) * t + r]
}
return n[i * i - 1] = e[t * t - 1], n
}
function Dr(e) {
for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
var n = Zr(e);
return t.forEach((function (t) {
n = Fr(n, t, e)
})), n
}
function Fr(e, t, i) {
var n = [],
o = e.length / i,
r = t.length / o;
if (!o) return t;
if (!r) return e;
for (var a = 0; a < i; ++a)
for (var l = 0; l < r; ++l) {
n[a * r + l] = 0;
for (var s = 0; s < o; ++s) n[a * r + l] += e[a * o + s] * t[s * r + l]
}
return n
}
function Pr(e, t, i) {
void 0 === i && (i = Math.sqrt(e.length));
for (var n = [], o = e.length / i, r = t.length / o, a = 0; a < i; ++a)
for (var l = 0; l < r; ++l) {
n[a + l * r] = 0;
for (var s = 0; s < o; ++s) n[a + l * r] += e[a + s * o] * t[s + l * r]
}
return n
}
function Ur() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
for (var i = e.length, n = 0, o = i - 1; o >= 0; --o) n += e[o];
return i ? n / i : 0
}
function zr(e, t) {
for (var i = Math.min(e.length, t.length), n = e.slice(), o = 0; o < i; ++o) n[o] = n[o] + t[o];
return n
}
function Wr(e, t) {
for (var i = Math.min(e.length, t.length), n = e.slice(), o = 0; o < i; ++o) n[o] = n[o] - t[o];
return n
}
function jr(e, t, i) {
void 0 === i && (i = t.length);
var n = Fr(e, t, i),
o = n[i - 1];
return n.map((function (e) {
return e / o
}))
}
function Yr(e, t) {
return jr(Vr(t, 3), Ir(e, 3))
}
function Xr(e) {
return 6 === e.length ? [e[0], e[2], e[4], e[1], e[3], e[5], 0, 0, 1] : Rr(e)
}
function Gr(e) {
return 9 === e.length ? [e[0], e[3], e[1], e[4], e[2], e[5]] : Rr(e)
}
function Vr(e, t) {
var i = Math.cos(e),
n = Math.sin(e),
o = Zr(t);
return o[0] = i, o[1] = -n, o[t] = n, o[t + 1] = i, o
}
function Zr(e) {
for (var t = e * e, i = [], n = 0; n < t; ++n) i[n] = n % (e + 1) ? 0 : 1;
return i
}
function Kr(e, t) {
for (var i = Zr(t), n = Math.min(e.length, t - 1), o = 0; o < n; ++o) i[(t + 1) * o] = e[o];
return i
}
function Jr(e, t) {
for (var i = Zr(t), n = Math.min(e.length, t - 1), o = 0; o < n; ++o) i[t * (o + 1) - 1] = e[o];
return i
}
function $r(e, t, i, n, o, r, a, l) {
var s = e[0],
c = e[1],
d = t[0],
u = t[1],
p = i[0],
v = i[1],
h = n[0],
f = n[1],
g = o[0],
m = o[1],
y = r[0],
b = r[1],
x = a[0],
w = a[1],
S = l[0],
C = l[1],
E = Nr([s, c, 1, 0, 0, 0, -g * s, -g * c, 0, 0, 0, s, c, 1, -m * s, -m * c, d, u, 1, 0, 0, 0, -y * d, -y * u, 0, 0, 0, d, u, 1, -b * d, -b * u, p, v, 1, 0, 0, 0, -x * p, -x * v, 0, 0, 0, p, v, 1, -w * p, -w * v, h, f, 1, 0, 0, 0, -S * h, -S * f, 0, 0, 0, h, f, 1, -C * h, -C * f], 8);
if (!E.length) return [];
var k = Fr(E, [g, m, y, b, x, w, S, C], 8);
return k[8] = 1, Hr(k, 3, 4)
}
var Qr = function (e) {
for (var t = 5381, i = e.length; i;) t = 33 * t ^ e.charCodeAt(--i);
return t >>> 0
};
function ea(e) {
var t, i = "rCS" + Qr(e).toString(36),
n = 0;
return {
className: i,
inject: function (o) {
var r, a = function (e) {
if (e.getRootNode) {
var t = e.getRootNode();
if (11 === t.nodeType) return t
}
}(o),
l = 0 === n;
return (a || l) && (r = function (e, t, i) {
var n = document.createElement("style");
return n.setAttribute("type", "text/css"), n.innerHTML = t.replace(/([^}{]*){/gm, (function (t, i) {
return function (e) {
var t = e.match(/("[^"]*"|'[^']*'|[^,\s()]*\((?:[^()]*|\([^()]*\))*\)[^,\s()]*|[^,])+/g);
return t ? t.map((function (e) {
return e.trim()
})) : []
}(i).map((function (t) {
return t.indexOf(":global") > -1 ? t.replace(/\:global/g, "") : t.indexOf(":host") > -1 ? "" + t.replace(/\:host/g, "." + e) : "." + e + " " + t
})).join(", ") + "{"
})), (i || document.head || document.body).appendChild(n), n
}(i, e, a)), l && (t = r), a || ++n, {
destroy: function () {
a ? (o.removeChild(r), r = null) : (n > 0 && --n, 0 === n && t && (t.parentNode.removeChild(t), t = null))
}
}
}
}
}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var ta = function (e, t) {
return (ta = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function (e, t) {
e.__proto__ = t
} || function (e, t) {
for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i])
})(e, t)
};
var ia = function () {
return (ia = Object.assign || function (e) {
for (var t, i = 1, n = arguments.length; i < n; i++)
for (var o in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
}).apply(this, arguments)
};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var na = function () {
return (na = Object.assign || function (e) {
for (var t, i = 1, n = arguments.length; i < n; i++)
for (var o in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
}).apply(this, arguments)
};
function oa(e, t, i, n) {
var o = ua(e),
r = ua(t),
a = ua(n);
return aa(pa(n[0], va(o, a)), pa(n[0], va(r, a)), i[0])
}
function ra(e) {
return e.touches ? ca(e.touches) : [da(e)]
}
function aa(e, t, i) {
var n = e.clientX,
o = e.clientY;
return {
clientX: n,
clientY: o,
deltaX: n - t.clientX,
deltaY: o - t.clientY,
distX: n - i.clientX,
distY: o - i.clientY
}
}
function la(e) {
return Math.sqrt(Math.pow(e[0].clientX - e[1].clientX, 2) + Math.pow(e[0].clientY - e[1].clientY, 2))
}
function sa(e, t, i) {
return e.map((function (e, n) {
return aa(e, t[n], i[n])
}))
}
function ca(e) {
for (var t = Math.min(e.length, 2), i = [], n = 0; n < t; ++n) i.push(da(e[n]));
return i
}
function da(e) {
return {
clientX: e.clientX,
clientY: e.clientY
}
}
function ua(e) {
return {
clientX: (e[0].clientX + e[1].clientX) / 2,
clientY: (e[0].clientY + e[1].clientY) / 2
}
}
function pa(e, t) {
return {
clientX: e.clientX + t.clientX,
clientY: e.clientY + t.clientY
}
}
function va(e, t) {
return {
clientX: e.clientX - t.clientX,
clientY: e.clientY - t.clientY
}
}
var ha = function () {
function e(e, t) {
var i = this;
void 0 === t && (t = {}), this.el = e, this.options = {}, this.flag = !1, this.pinchFlag = !1, this.datas = {}, this.isDrag = !1, this.isPinch = !1, this.isMouse = !1, this.isTouch = !1, this.prevClients = [], this.startClients = [], this.movement = 0, this.startPinchClients = [], this.startDistance = 0, this.customDist = [0, 0], this.onDragStart = function (e) {
if (i.flag || !1 !== e.cancelable) {
if (function (e) {
return e.touches && e.touches.length >= 2
}(e)) {
if (!i.flag && e.touches.length !== e.changedTouches.length) return;
i.pinchFlag || i.onPinchStart(e)
}
if (!i.flag) {
var t = i.startClients[0] ? i.startClients : ra(e);
i.customDist = [0, 0], i.flag = !0, i.isDrag = !1, i.startClients = t, i.prevClients = t, i.datas = {}, i.movement = 0;
var n = aa(t[0], i.prevClients[0], i.startClients[0]),
o = i.options,
r = o.dragstart,
a = o.preventRightClick,
l = o.preventDefault;
(a && 3 === e.which || !1 === (r && r(na({
datas: i.datas,
inputEvent: e
}, n)))) && (i.startClients = [], i.prevClients = [], i.flag = !1), i.flag && l && e.preventDefault()
}
}
}, this.onDrag = function (e, t) {
if (i.flag) {
var n = ra(e);
i.pinchFlag && i.onPinch(e, n);
var o = i.move([0, 0], e, n);
if (o && (o.deltaX || o.deltaY)) {
var r = i.options.drag;
r && r(na({}, o, {
isScroll: !!t,
inputEvent: e
}))
}
}
}, this.onDragEnd = function (e) {
if (i.flag) {
i.pinchFlag && i.onPinchEnd(e), i.flag = !1;
var t = i.options.dragend,
n = i.prevClients,
o = i.startClients,
r = i.pinchFlag ? oa(n, n, o, i.startPinchClients) : aa(n[0], n[0], o[0]);
i.startClients = [], i.prevClients = [], t && t(na({
datas: i.datas,
isDrag: i.isDrag,
inputEvent: e
}, r))
}
}, this.options = na({
container: e,
preventRightClick: !0,
preventDefault: !0,
pinchThreshold: 0,
events: ["touch", "mouse"]
}, t);
var n = this.options,
o = n.container,
r = n.events;
if (this.isTouch = r.indexOf("touch") > -1, this.isMouse = r.indexOf("mouse") > -1, this.customDist = [0, 0], this.isMouse && (qr(e, "mousedown", this.onDragStart), qr(o, "mousemove", this.onDrag), qr(o, "mouseup", this.onDragEnd)), this.isTouch) {
var a = {
passive: !1
};
qr(e, "touchstart", this.onDragStart, a), qr(o, "touchmove", this.onDrag, a), qr(o, "touchend", this.onDragEnd, a)
}
}
var t = e.prototype;
return t.isDragging = function () {
return this.isDrag
}, t.isFlag = function () {
return this.flag
}, t.isPinching = function () {
return this.isPinch
}, t.scrollBy = function (e, t, i, n) {
void 0 === n && (n = !0), this.flag && (this.startClients.forEach((function (i) {
i.clientX -= e, i.clientY -= t
})), this.prevClients.forEach((function (i) {
i.clientX -= e, i.clientY -= t
})), n && this.onDrag(i, !0))
}, t.move = function (e, t, i) {
var n = e[0],
o = e[1];
void 0 === i && (i = this.prevClients);
var r = this.customDist,
a = this.prevClients,
l = this.startClients,
s = this.pinchFlag ? oa(i, a, l, this.startPinchClients) : aa(i[0], a[0], l[0]);
r[0] += n, r[1] += o, s.deltaX += n, s.deltaY += o;
var c = s.deltaX,
d = s.deltaY;
return s.distX += r[0], s.distY += r[1], this.movement += Math.sqrt(c * c + d * d), this.prevClients = i, this.isDrag = !0, na({
datas: this.datas
}, s, {
isScroll: !1,
inputEvent: t
})
}, t.onPinchStart = function (e) {
var t, i, n = this.options,
o = n.pinchstart,
r = n.pinchThreshold;
if (!(this.isDrag && this.movement > r)) {
var a = ca(e.changedTouches);
if (this.pinchFlag = !0, (t = this.startClients).push.apply(t, a), (i = this.prevClients).push.apply(i, a), this.startDistance = la(this.prevClients), this.startPinchClients = this.prevClients.slice(), o) {
var l = this.prevClients,
s = ua(l),
c = aa(s, s, s);
o(na({
datas: this.datas,
touches: sa(l, l, l)
}, c, {
inputEvent: e
}))
}
}
}, t.onPinch = function (e, t) {
if (this.flag && this.pinchFlag) {
this.isPinch = !0;
var i = this.options.pinch;
if (i) {
var n = this.prevClients,
o = this.startClients,
r = aa(ua(t), ua(n), ua(o)),
a = la(t);
i(na({
datas: this.datas,
touches: sa(t, n, o),
scale: a / this.startDistance,
distance: a
}, r, {
inputEvent: e
}))
}
}
}, t.onPinchEnd = function (e) {
if (this.flag && this.pinchFlag) {
var t = this.isPinch;
this.isPinch = !1, this.pinchFlag = !1;
var i = this.options.pinchend;
if (i) {
var n = this.prevClients,
o = this.startClients,
r = aa(ua(n), ua(n), ua(o));
i(na({
datas: this.datas,
isPinch: t,
touches: sa(n, n, o)
}, r, {
inputEvent: e
})), this.isPinch = !1, this.pinchFlag = !1
}
}
}, t.unset = function () {
var e = this.el,
t = this.options.container;
this.isMouse && (Mr(e, "mousedown", this.onDragStart), Mr(t, "mousemove", this.onDrag), Mr(t, "mouseup", this.onDragEnd)), this.isTouch && (Mr(e, "touchstart", this.onDragStart), Mr(t, "touchmove", this.onDrag), Mr(t, "touchend", this.onDragEnd))
}, e
}(),
fa = function () {
function e() {
this.keys = [], this.values = []
}
var t = e.prototype;
return t.get = function (e) {
return this.values[this.keys.indexOf(e)]
}, t.set = function (e, t) {
var i = this.keys,
n = this.values,
o = i.indexOf(e),
r = -1 === o ? i.length : o;
i[r] = e, n[r] = t
}, e
}(),
ga = function () {
function e() {
this.object = {}
}
var t = e.prototype;
return t.get = function (e) {
return this.object[e]
}, t.set = function (e, t) {
this.object[e] = t
}, e
}(),
ma = "function" == typeof Map,
ya = function () {
function e() {}
var t = e.prototype;
return t.connect = function (e, t) {
this.prev = e, this.next = t, e && (e.next = this), t && (t.prev = this)
}, t.disconnect = function () {
var e = this.prev,
t = this.next;
e && (e.next = t), t && (t.prev = e)
}, t.getIndex = function () {
for (var e = this, t = -1; e;) e = e.prev, ++t;
return t
}, e
}();
var ba = function () {
function e(e, t, i, n, o, r, a, l) {
this.prevList = e, this.list = t, this.added = i, this.removed = n, this.changed = o, this.maintained = r, this.changedBeforeAdded = a, this.fixed = l
}
var t = e.prototype;
return Object.defineProperty(t, "ordered", {
get: function () {
return this.cacheOrdered || this.caculateOrdered(), this.cacheOrdered
},
enumerable: !0,
configurable: !0
}), Object.defineProperty(t, "pureChanged", {
get: function () {
return this.cachePureChanged || this.caculateOrdered(), this.cachePureChanged
},
enumerable: !0,
configurable: !0
}), t.caculateOrdered = function () {
var e = function (e, t) {
var i = [],
n = [];
return e.forEach((function (e) {
var t = e[0],
o = e[1],
r = new ya;
i[t] = r, n[o] = r
})), i.forEach((function (e, t) {
e.connect(i[t - 1])
})), e.filter((function (e, i) {
return !t[i]
})).map((function (e, t) {
var o = e[0],
r = e[1];
if (o === r) return [0, 0];
var a = i[o],
l = n[r - 1],
s = a.getIndex();
return a.disconnect(), l ? a.connect(l, l.next) : a.connect(void 0, i[0]), [s, a.getIndex()]
}))
}(this.changedBeforeAdded, this.fixed),
t = this.changed,
i = [];
this.cacheOrdered = e.filter((function (e, n) {
var o = e[0],
r = e[1],
a = t[n],
l = a[0],
s = a[1];
if (o !== r) return i.push([l, s]), !0
})), this.cachePureChanged = i
}, e
}();
var xa = function () {
function e(e, t) {
void 0 === e && (e = []), this.findKeyCallback = t, this.list = [].slice.call(e)
}
return e.prototype.update = function (e) {
var t = [].slice.call(e),
i = function (e, t, i) {
var n = ma ? Map : i ? ga : fa,
o = i || function (e) {
return e
},
r = [],
a = [],
l = [],
s = e.map(o),
c = t.map(o),
d = new n,
u = new n,
p = [],
v = [],
h = {},
f = [],
g = 0,
m = 0;
return s.forEach((function (e, t) {
d.set(e, t)
})), c.forEach((function (e, t) {
u.set(e, t)
})), s.forEach((function (e, t) {
var i = u.get(e);
void 0 === i ? (++m, a.push(t)) : h[i] = m
})), c.forEach((function (e, t) {
var i = d.get(e);
void 0 === i ? (r.push(t), ++g) : (l.push([i, t]), m = h[t] || 0, p.push([i - m, t - g]), v.push(t === i), i !== t && f.push([i, t]))
})), a.reverse(), new ba(e, t, r, a, f, l, p, v)
}(this.list, t, this.findKeyCallback);
return this.list = t, i
}, e
}(),
wa = function (e, t) {
return (wa = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function (e, t) {
e.__proto__ = t
} || function (e, t) {
for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i])
})(e, t)
};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var Sa, Ca = "function" == typeof Map ? void 0 : (Sa = 0, function (e) {
return e.__DIFF_KEY__ || (e.__DIFF_KEY__ = ++Sa)
}),
Ea = function (e) {
function t(t) {
return void 0 === t && (t = []), e.call(this, t, Ca) || this
}
return function (e, t) {
function i() {
this.constructor = e
}
wa(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
}(t, e), t
}(xa),
ka = function (e, t) {
return (ka = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function (e, t) {
e.__proto__ = t
} || function (e, t) {
for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i])
})(e, t)
};
function La(e, t) {
function i() {
this.constructor = e
}
ka(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
}
var Aa = function () {
return (Aa = Object.assign || function (e) {
for (var t, i = 1, n = arguments.length; i < n; i++)
for (var o in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
}).apply(this, arguments)
};
function qa(e, t) {
return 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="' + 32 * e + 'px" height="' + 32 * e + 'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(' + t + 'deg);transform-origin: 16px 16px"></path></svg>'
}
var Ma = br(),
_a = Ma.os.name.indexOf("ios") > -1 || Ma.browser.name.indexOf("safari") > -1,
Ta = "moveable-",
Oa = function (e, t) {
return t.replace(/([^}{]*){/gm, (function (t, i) {
return i.replace(/\.([^{,\s\d.]+)/g, "." + e + "$1") + "{"
}))
}(Ta, "\n{\n\tposition: fixed;\n\twidth: 0;\n\theight: 0;\n\tleft: 0;\n\ttop: 0;\n\tz-index: 3000;\n}\n.control-box {\n z-index: 0;\n}\n.line, .control {\n\tleft: 0;\n\ttop: 0;\n}\n.control {\n\tposition: absolute;\n\twidth: 14px;\n\theight: 14px;\n\tborder-radius: 50%;\n\tborder: 2px solid #fff;\n\tbox-sizing: border-box;\n\tbackground: #4af;\n\tmargin-top: -7px;\n margin-left: -7px;\n z-index: 10;\n will-change: transform;\n}\n.line {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tbackground: #4af;\n\ttransform-origin: 0px 0.5px;\n}\n.line.dashed {\n box-sizing: border-box;\n background: transparent;\n}\n.line.dashed.horizontal {\n border-top: 1px dashed #4af;\n}\n.line.dashed.vertical {\n border-left: 1px dashed #4af;\n}\n.line.rotation-line {\n\theight: 40px;\n\twidth: 1px;\n\ttransform-origin: 0.5px 39.5px;\n}\n.line.rotation-line .control {\n\tborder-color: #4af;\n\tbackground:#fff;\n\tcursor: alias;\n}\n.line.vertical {\n transform: translateX(-50%);\n}\n.line.horizontal {\n transform: translateY(-50%);\n}\n.line.vertical.bold {\n width: 2px;\n}\n.line.horizontal.bold {\n height: 2px;\n}\n.control.origin {\n\tborder-color: #f55;\n\tbackground: #fff;\n\twidth: 12px;\n\theight: 12px;\n\tmargin-top: -6px;\n\tmargin-left: -6px;\n\tpointer-events: none;\n}\n" + [0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165].map((function (e) {
return '\n.direction[data-rotation="' + e + '"] {\n\t' + function (e) {
var t = qa(1, e),
i = qa(2, e),
n = 45 * Math.round(e / 45) % 180,
o = 135 === n ? "nwse-resize" : 45 === n ? "nesw-resize" : 90 === n ? "ew-resize" : "ns-resize";
return "cursor:" + o + ";cursor: url('" + t + "') 16 16, " + o + ";cursor: -webkit-image-set(url('" + t + "') 1x, url('" + i + "') 2x) 16 16, " + o + ";"
}(e) + "\n}\n"
})).join("\n") + "\n.group {\n z-index: -1;\n}\n.area {\n position: absolute;\n}\n.area-pieces {\n position: absolute;\n top: 0;\n left: 0;\n display: none;\n}\n.area.avoid {\n pointer-events: none;\n}\n.area.avoid+.area-pieces {\n display: block;\n}\n.area-piece {\n position: absolute;\n}\n" + (_a ? ':global svg *:before {\n\tcontent:"";\n\ttransform-origin: inherit;\n}' : "") + "\n"),
Na = [
[0, 1, 2],
[1, 0, 3],
[2, 0, 3],
[3, 1, 2]
],
Ra = 1e-7,
Ba = Math.pow(10, 10),
Ia = -Ba,
Ha = {
n: [0, 1],
s: [2, 3],
w: [2, 0],
e: [1, 3],
nw: [0],
ne: [1],
sw: [2],
se: [3]
},
Da = {
n: 0,
s: 180,
w: 270,
e: 90,
nw: 315,
ne: 45,
sw: 225,
se: 135
};
function Fa(e, t) {
return [e[0] * t[0], e[1] * t[1]]
}
function Pa() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
return bn.apply(void 0, [Ta].concat(e))
}
function Ua() {
return Zr(3)
}
function za(e) {
return e && "none" !== e ? Er(e) ? e : function (e) {
var t = /([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(e);
return !t || t.length < 4 ? {} : {
prefix: t[1],
value: t[2],
suffix: t[3]
}
}(e).value.split(/s*,\s*/g).map((function (e) {
return parseFloat(e)
})) : [1, 0, 0, 1, 0, 0]
}
function Wa(e, t, i) {
return Dr(t, Jr(i, t), e, Jr(i.map((function (e) {
return -e
})), t))
}
function ja(e) {
return Ya(ml(e, ":before")).map((function (t, i) {
var n = Lr(t),
o = n.value,
r = n.unit;
return o * function (e, t, i) {
return "%" === t ? e.ownerSVGElement.viewBox.baseVal[i ? "width" : "height"] / 100 : 1
}(e, r, 0 === i)
}))
}
function Ya(e) {
var t = e.transformOrigin;
return t ? t.split(" ") : ["0", "0"]
}
function Xa(e, t, i) {
for (var n = document.body, o = !e || i ? e : e.parentElement, r = !1, a = "relative"; o && o !== n;) {
t === o && (r = !0);
var l = ml(o),
s = l.transform;
if ("static" !== (a = l.position) || s && "none" !== s) break;
o = o.parentElement, a = "relative"
}
return {
isStatic: "static" === a,
isEnd: r || !o || o === n,
offsetParent: o || n
}
}
function Ga(e, t, i, n) {
var o, r, a, l = e,
s = [],
c = "svg" !== l.tagName.toLowerCase() && "ownerSVGElement" in l,
d = t || document.body,
u = !1,
p = !1,
v = 3,
h = Xa(t, t, !0).offsetParent;
for (i && (t = e.parentElement); l && !u;) {
var f = ml(l),
g = l.tagName.toLowerCase(),
m = f.position,
y = "fixed" === m,
b = Xr(za(f.transform));
if (!p && 16 === b.length) {
p = !0, v = 4;
for (var x = s.length, w = 0; w < x; ++w) s[w] = Hr(s[w], 3, 4)
}
p && 9 === b.length && (b = Hr(b, 3, 4));
var S = l.offsetLeft,
C = l.offsetTop;
if (y) {
var E = (t || document.documentElement).getBoundingClientRect();
S -= E.left, C -= E.top
}
var k = Cr(S),
L = k,
A = void 0;
L && "svg" !== g ? (A = _a ? ja(l) : Ya(f).map((function (e) {
return parseFloat(e)
})), L = !1, "g" === g ? (S = 0, C = 0) : (S = (o = Za(l, A))[0], C = o[1], A[0] = o[2], A[1] = o[3])) : A = Ya(f).map((function (e) {
return parseFloat(e)
})), "svg" === g && a && s.push(Va(l, v), Zr(v));
var q = Xa(l, t),
M = q.offsetParent,
_ = q.isEnd,
T = q.isStatic;
_a && !L && !k && T && "relative" === m && (S -= M.offsetLeft, C -= M.offsetTop, u = u || _);
var O = 0,
N = 0;
if (L || h === M || (O = M.clientLeft, N = M.clientTop), s.push(Wa(b, v, A), Jr([L ? l : S - l.scrollLeft + O, L ? A : C - l.scrollTop + N], v)), a || (a = b), r || (r = A), u || y) break;
l = M, u = _
}
var R = i ? Hr(i, n, v) : Zr(v),
B = i ? Hr(i, n, v) : Zr(v),
I = Zr(v),
H = s.length,
D = Xa(d, d, !0).offsetParent;
s.reverse(), s.forEach((function (e, t) {
var i;
H - 2 === t && (B = R.slice()), H - 1 === t && (I = R.slice()), Er(e[v - 1]) && (i = function (e, t, i, n, o, r) {
var a, l = nl(e),
s = l[0],
c = l[1],
d = t.getBoundingClientRect(),
u = e.getBoundingClientRect(),
p = u.left - d.left + t.scrollLeft,
v = u.top - d.top + t.scrollTop,
h = u.width,
f = u.height,
g = Dr(i, o, r),
m = Qa(g, s, c, i),
y = m.left,
b = m.top,
x = m.width,
w = m.height,
S = Ka(g, n, i),
C = Wr(S, [y, b]),
E = [p + C[0] * h / x, v + C[1] * f / w],
k = [0, 0],
L = 0;
for (; ++L < 10;) {
var A = Nr(o, i);
a = Wr(Ka(A, E, i), Ka(A, S, i)), k[0] = a[0], k[1] = a[1];
var q = Qa(Dr(i, o, Jr(k, i), r), s, c, i),
M = q.left,
_ = q.top,
T = M - p,
O = _ - v;
if (Math.abs(T) < 2 && Math.abs(O) < 2) break;
E[0] -= T, E[1] -= O
}
return k.map((function (e) {
return Math.round(e)
}))
}(e[v - 1], D, v, e[2 * v - 1], R, s[t + 1]), e[v - 1] = i[0], e[2 * v - 1] = i[1]), R = Fr(R, e, v)
}));
var F = (!c && p ? "matrix3d" : "matrix") + "(" + Gr(c && 16 === a.length ? Hr(a, 4, 3) : a) + ")";
return [B, I, R, a, F, r, p]
}
function Va(e, t) {
var i = e.clientWidth,
n = e.clientHeight,
o = e.viewBox.baseVal,
r = o.width || i,
a = o.height || n,
l = i / r,
s = n / a,
c = e.preserveAspectRatio.baseVal,
d = c.align,
u = c.meetOrSlice,
p = [0, 0],
v = [l, s],
h = [0, 0];
if (1 !== d) {
var f = (d - 2) % 3,
g = Math.floor((d - 2) / 3);
p[0] = r * f / 2, p[1] = a * g / 2;
var m = 2 === u ? Math.max(s, l) : Math.min(l, s);
v[0] = m, v[1] = m, h[0] = (i - r) / 2 * f, h[1] = (n - a) / 2 * g
}
var y = Kr(v, t);
return y[t - 1] = h[0], y[2 * t - 1] = h[1], Wa(y, t, p)
}
function Za(e, t) {
if (!e.getBBox) return [0, 0];
var i = e.getBBox(),
n = e.ownerSVGElement.viewBox.baseVal,
o = i.x - n.x,
r = i.y - n.y;
return [o, r, t[0] - o, t[1] - r]
}
function Ka(e, t, i) {
return jr(e, Ir(t, i), i)
}
function Ja(e, t, i, n) {
return [Ka(e, [0, 0], n), Ka(e, [t, 0], n), Ka(e, [0, i], n), Ka(e, [t, i], n)]
}
function $a(e) {
var t = e.map((function (e) {
return e[0]
})),
i = e.map((function (e) {
return e[1]
})),
n = Math.min.apply(Math, t),
o = Math.min.apply(Math, i),
r = Math.max.apply(Math, t),
a = Math.max.apply(Math, i);
return {
left: n,
top: o,
right: r,
bottom: a,
width: r - n,
height: a - o
}
}
function Qa(e, t, i, n) {
return $a(Ja(e, t, i, n))
}
function el(e, t, i, n) {
var o = 16 === e.length ? 4 : 3,
r = Ja(e, i, n, o),
a = r[0],
l = a[0],
s = a[1],
c = r[1],
d = c[0],
u = c[1],
p = r[2],
v = p[0],
h = p[1],
f = r[3],
g = f[0],
m = f[1],
y = Ka(e, t, o),
b = y[0],
x = y[1],
w = Math.min(l, d, v, g),
S = Math.min(s, u, h, m),
C = Math.max(l, d, v, g),
E = Math.max(s, u, h, m);
b = b - w || 0, x = x - S || 0;
var k = [((l = l - w || 0) + (d = d - w || 0) + (v = v - w || 0) + (g = g - w || 0)) / 4, ((s = s - S || 0) + (u = u - S || 0) + (h = h - S || 0) + (m = m - S || 0)) / 4],
L = Br(k, [l, s]),
A = Br(k, [d, u]);
return [
[w, S, C, E],
[b, x],
[l, s],
[d, u],
[v, h],
[g, m], L < A && A - L < Math.PI || L > A && A - L < -Math.PI ? 1 : -1
]
}
function tl(e, t, i) {
void 0 === i && (i = Br(e, t));
var n = t[0] - e[0],
o = t[1] - e[1],
r = Math.sqrt(n * n + o * o);
return {
transform: "translate(" + e[0] + "px, " + e[1] + "px) rotate(" + i + "rad)",
width: r + "px"
}
}
function il(e) {
for (var t = [], i = 1; i < arguments.length; i++) t[i - 1] = arguments[i];
var n = t.length;
return {
transform: "translate(" + t.reduce((function (e, t) {
return e + t[0]
}), 0) / n + "px, " + t.reduce((function (e, t) {
return e + t[1]
}), 0) / n + "px) rotate(" + e + "rad)"
}
}
function nl(e, t, i, n) {
void 0 === t && (t = window.getComputedStyle(e)), void 0 === n && (n = i || "border-box" === t.boxSizing);
var o = e.offsetWidth,
r = e.offsetHeight,
a = !Cr(o);
if ((i || n) && a) return [o, r];
if (o = e.clientWidth, r = e.clientHeight, !a && !o && !r) {
var l = e.getBBox();
return [l.width, l.height]
}
return i || n ? [o + (parseFloat(t.borderLeftWidth) || 0) + (parseFloat(t.borderRightWidth) || 0), r + (parseFloat(t.borderTopWidth) || 0) + (parseFloat(t.borderBottomWidth) || 0)] : [o - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0), r - (parseFloat(t.paddingTop) || 0) - (parseFloat(t.paddingBottom) || 0)]
}
function ol(e, t) {
return Br(t > 0 ? e[0] : e[1], t > 0 ? e[1] : e[0])
}
function rl(e, t, i, n) {
var o, r, a, l, s, c = 0,
d = 0,
u = 0,
p = 0,
v = [0, 0],
h = [0, 0],
f = [0, 0],
g = [0, 0],
m = [0, 0],
y = Ua(),
b = Ua(),
x = Ua(),
w = Ua(),
S = 0,
C = 0,
E = [0, 0],
k = 1,
L = 1,
A = !1,
q = "",
M = [0, 0],
_ = {
left: 0,
right: 0,
top: 0,
width: 0,
height: 0,
bottom: 0
},
T = {
left: 0,
right: 0,
top: 0,
width: 0,
height: 0,
bottom: 0
},
O = 0,
N = n ? n.beforeMatrix : void 0,
R = n ? n.is3d ? 4 : 3 : void 0;
if (e) {
if (n) S = n.width, C = n.height;
else {
var B = ml(e);
S = e.offsetWidth, C = e.offsetHeight, Cr(S) && (S = (o = nl(e, B, !0))[0], C = o[1])
}
b = (r = Ga(e, t, N, R))[0], y = r[1], x = r[2], w = r[3], q = r[4], E = r[5], A = r[6], c = (l = (a = el(x, E, S, C))[0])[0], d = l[1], u = l[2], p = l[3], v = a[1], h = a[2], f = a[3], g = a[4], m = a[5], k = a[6];
var I;
I = (s = el(y, zr(E, function (e, t) {
void 0 === t && (t = Math.sqrt(e.length));
for (var i = [], n = 0; n < t - 1; ++n) i[n] = e[(n + 1) * t - 1];
return i[t - 1] = 0, i
}(w, A ? 4 : 3)), S, C))[0], M = s[1], L = s[6], M = [M[0] + I[0] - c, M[1] + I[1] - d], _ = al(e), T = al(Xa(i, i, !0).offsetParent || document.body), O = ol([h, f], k)
}
return {
rotation: O,
containerRect: T,
beforeDirection: L,
direction: k,
target: e,
left: c,
top: d,
right: u,
bottom: p,
pos1: h,
pos2: f,
pos3: g,
pos4: m,
width: S,
height: C,
beforeMatrix: b,
matrix: x,
targetTransform: q,
offsetMatrix: y,
targetMatrix: w,
is3d: A,
beforeOrigin: M,
origin: v,
transformOrigin: E,
clientRect: _
}
}
function al(e) {
var t = e.getBoundingClientRect(),
i = t.left,
n = t.width,
o = t.top,
r = t.bottom;
return {
left: i,
right: t.right,
top: o,
bottom: r,
width: n,
height: t.height
}
}
function ll(e) {
if (e) {
var t = e.getAttribute("data-direction");
if (t) {
var i = [0, 0];
return t.indexOf("w") > -1 && (i[0] = -1), t.indexOf("e") > -1 && (i[0] = 1), t.indexOf("n") > -1 && (i[1] = -1), t.indexOf("s") > -1 && (i[1] = 1), i
}
}
}
function sl(e, t) {
return [zr(t, e[0]), zr(t, e[1]), zr(t, e[2]), zr(t, e[3])]
}
function cl(e) {
var t = e.left,
i = e.top;
return sl([e.pos1, e.pos2, e.pos3, e.pos4], [t, i])
}
function dl(e) {
return Math.round(e % 1 == -.5 ? e - 1 : e)
}
function ul(e, t) {
return t ? Math.round(e / t) * t : e
}
function pl(e, t) {
return e.forEach((function (i, n) {
e[n] = ul(e[n], t)
})), e
}
function vl(e, t) {
e[t] && (e[t].unset(), e[t] = null)
}
function hl(e, t, i) {
return (e[0] - t[0]) * (i[1] - t[1]) - (e[1] - t[1]) * (i[0] - t[0])
}
function fl(e, t, i) {
var n = t.datas;
return n.datas || (n.datas = {}), Aa({}, i, {
target: e.state.target,
clientX: t.clientX,
clientY: t.clientY,
inputEvent: t.inputEvent,
currentTarget: e,
datas: n.datas
})
}
function gl(e, t, i) {
return e.triggerEvent(t, i)
}
function ml(e, t) {
return window.getComputedStyle(e, t)
}
function yl(e, t) {
var i = {},
n = {};
return e.filter((function (e) {
var o = e.name;
if (i[o] || !t.some((function (t) {
return e[t]
}))) return !1;
if (e.ableGroup) {
if (n[e.ableGroup]) return !1;
n[e.ableGroup] = !0
}
return i[o] = !0, !0
}))
}
function bl(e, t, i) {
return e * (t ? i : 1 / i)
}
function xl(e, t, i) {
return e * (t ? 1 / i : i)
}
function wl(e, t) {
return e === t || null == e && null == t
}
function Sl(e, t, i, n, o, r) {
var a = "Start" === o;
if (a && n.indexOf("Control") > -1 && e.areaElement === r.inputEvent.target) return !1;
var l = "" + i + n + o,
s = "" + i + n + "Condition",
c = "End" === o,
d = o.indexOf("After") > -1;
a && e.updateRect(o, !0, !1);
var u = n.indexOf("Group") > -1,
p = e[t].filter((function (e) {
return e[l]
})),
v = p.filter((function (t) {
var i = a && t[s];
return !(i && !i(r.inputEvent.target, e)) && t[l](e, r)
})),
h = v.length;
if (a) {
if (p.length && !h) return e.state.dragger = null, e.moveables && e.moveables.forEach((function (e) {
e.state.dragger = null
})), !1;
! function (e, t, i) {
var n = fl(e, i, {
isPinch: !!i.isPinch
}),
o = t ? "Group" : "";
t && (n.targets = e.props.targets), gl(e, "onRender" + o + "Start", n)
}(e, u, r)
} else c ? function (e, t, i) {
var n = fl(e, i, {
isPinch: !!i.sPinch,
isDrag: i.isDrag
}),
o = t ? "Group" : "";
t && (n.targets = e.props.targets), gl(e, "onRender" + o + "End", n)
}(e, u, r) : h && function (e, t, i) {
var n = fl(e, i, {
isPinch: !!i.isPinch
}),
o = t ? "Group" : "";
t && (n.targets = e.props.targets), gl(e, "onRender" + o, n)
}(e, u, r);
c && (e.state.dragger = null), !a && h && (v.some((function (e) {
return e.updateRect
})) && !u ? e.updateRect(o, !1, !1) : e.updateRect(o, !0, !1)), (!a && h || c && !h) && e.forceUpdate(), a || c || d || !h || Sl(e, t, i, n, o + "After", r)
}
function Cl(e, t, i, n) {
var o = {
container: window,
pinchThreshold: e.props.pinchThreshold
};
return ["drag", "pinch"].forEach((function (t) {
["Start", "", "End"].forEach((function (r) {
o["" + t + r.toLowerCase()] = function (o) {
return Sl(e, i, t, n, r, o)
}
}))
})), new ha(t, o)
}
var El = function (e, t) {
var i = ea(t);
return (function (t) {
function n() {
return null !== t && t.apply(this, arguments) || this
}
return function (e, t) {
function i() {
this.constructor = e
}
ta(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
}(n, t), n.prototype.render = function () {
var t = this.props,
n = t.className,
o = void 0 === n ? "" : n,
r = function (e, t) {
var i = {};
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
var o = 0;
for (n = Object.getOwnPropertySymbols(e); o < n.length; o++) t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (i[n[o]] = e[n[o]])
}
return i
}(t, ["className"]);
return Nn(e, ia({
ref: xn(this, "element"),
className: o + " " + i.className
}, r))
}, n.prototype.componentDidMount = function () {
this.injectResult = i.inject(this.element)
}, n.prototype.componentWillUnmount = function () {
this.injectResult.destroy(), this.injectResult = null
}, n.prototype.getElement = function () {
return this.element
}, n
}(Hn))
}("div", Oa);
function kl(e, t, i, n) {
var o = Br(t, i),
r = e ? ul(o / Math.PI * 180, 15) % 180 : -1;
return Nn("div", {
key: "line" + n,
className: Pa("line", "direction", e),
"data-rotation": r,
"data-direction": e,
style: tl(t, i, o)
})
}
var Ll = function (e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.state = {
conatainer: null,
target: null,
beforeMatrix: Ua(),
matrix: Ua(),
targetMatrix: Ua(),
targetTransform: "",
is3d: !1,
left: 0,
top: 0,
width: 0,
height: 0,
transformOrigin: [0, 0],
direction: 1,
beforeDirection: 1,
beforeOrigin: [0, 0],
origin: [0, 0],
pos1: [0, 0],
pos2: [0, 0],
pos3: [0, 0],
pos4: [0, 0],
clientRect: {
left: 0,
right: 0,
top: 0,
width: 0,
height: 0,
bottom: 0
},
containerRect: {
left: 0,
right: 0,
top: 0,
width: 0,
height: 0,
bottom: 0
},
rotation: 0
}, t.targetAbles = [], t.controlAbles = [], t
}
La(t, e);
var i = t.prototype;
return i.render = function () {
var e = this.props,
t = e.edge,
i = e.parentPosition,
n = e.className,
o = e.target;
this.checkUpdate();
var r = i || {
left: 0,
top: 0
},
a = r.left,
l = r.top,
s = this.state,
c = s.left,
d = s.top,
u = s.pos1,
p = s.pos2,
v = s.pos3,
h = s.pos4,
f = s.target,
g = s.direction;
return Nn(El, {
ref: xn(this, "controlBox"),
className: Pa("control-box", -1 === g ? "reverse" : "") + " " + n,
style: {
position: "absolute",
display: o && f ? "block" : "none",
transform: "translate(" + (c - a) + "px, " + (d - l) + "px) translateZ(50px)"
}
}, this.renderAbles(), kl(t ? "n" : "", u, p, 0), kl(t ? "e" : "", p, h, 1), kl(t ? "w" : "", u, v, 2), kl(t ? "s" : "", v, h, 3))
}, i.componentDidMount = function () {
this.controlBox.getElement();
var e = this.props,
t = e.parentMoveable,
i = e.container;
this.updateEvent(e), i || t || this.updateRect("End", !1, !0)
}, i.componentDidUpdate = function (e) {
this.updateEvent(e)
}, i.componentWillUnmount = function () {
vl(this, "targetDragger"), vl(this, "controlDragger")
}, i.getContainer = function () {
var e = this.props,
t = e.parentMoveable;
return e.container || t && t.getContainer() || this.controlBox.getElement().parentElement
}, i.isMoveableElement = function (e) {
return e && (e.getAttribute("class") || "").indexOf(Ta) > -1
}, i.dragStart = function (e) {
this.targetDragger && this.targetDragger.onDragStart(e)
}, i.isInside = function (e, t) {
var i = this.state,
n = i.pos1,
o = i.pos2,
r = i.pos3,
a = i.pos4,
l = i.target;
if (!l) return !1;
var s = l.getBoundingClientRect();
return function (e, t, i, n, o) {
var r = [hl(e, t, i), hl(e, i, o), hl(e, o, t)],
a = [hl(e, i, o), hl(e, o, n), hl(e, n, i)];
return !!(r.every((function (e) {
return e >= 0
})) || r.every((function (e) {
return e <= 0
})) || a.every((function (e) {
return e >= 0
})) || a.every((function (e) {
return e <= 0
})))
}([e - s.left, t - s.top], n, o, a, r)
}, i.updateRect = function (e, t, i) {
void 0 === i && (i = !0);
var n = this.props.parentMoveable,
o = this.state,
r = o.target || this.props.target,
a = this.getContainer();
this.updateState(rl(r, a, a, t ? o : void 0), !n && i)
}, i.updateEvent = function (e) {
var t = this.controlBox.getElement(),
i = this.targetAbles.length,
n = this.controlAbles.length,
o = this.props.target,
r = e.target,
a = this.props.dragArea,
l = e.dragArea,
s = !a && r !== o,
c = !i && this.targetDragger || s || l !== a;
c && (vl(this, "targetDragger"), this.updateState({
dragger: null
})), n || vl(this, "controlDragger"), o && i && !this.targetDragger && (this.targetDragger = Cl(this, a ? this.areaElement : o, "targetAbles", "")), !this.controlDragger && n && (this.controlDragger = Cl(this, t, "controlAbles", "Control")), c && this.unsetAbles()
}, i.updateTarget = function (e) {
this.updateRect(e, !0)
}, i.getRect = function () {
var e = this.state,
t = cl(this.state),
i = t[0],
n = t[1],
o = t[2],
r = t[3],
a = $a(t),
l = e.width,
s = e.height;
return {
width: a.width,
height: a.height,
left: a.left,
top: a.top,
pos1: i,
pos2: n,
pos3: o,
pos4: r,
offsetWidth: l,
offsetHeight: s
}
}, i.checkUpdate = function () {
var e = this.props,
t = e.target,
i = e.container,
n = e.parentMoveable,
o = this.state,
r = o.target,
a = o.container;
(r || t) && (this.updateAbles(), (!wl(r, t) || !wl(a, i)) && (this.updateState({
target: t,
container: i
}), n || !i && !this.controlBox || this.updateRect("End", !1, !1)))
}, i.triggerEvent = function (e, t) {
var i = this.props[e];
return i && i(t)
}, i.unsetAbles = function () {
var e = this;
this.targetAbles.filter((function (t) {
return !!t.unset && (t.unset(e), !0)
})).length && this.forceUpdate()
}, i.updateAbles = function (e, t) {
void 0 === e && (e = this.props.ables), void 0 === t && (t = "");
var i = this.props,
n = e.filter((function (e) {
return e && i[e.name]
})),
o = "drag" + t + "ControlStart",
r = yl(n, ["drag" + t + "Start", "pinch" + t + "Start"]),
a = yl(n, [o]);
this.targetAbles = r, this.controlAbles = a
}, i.updateState = function (e, t) {
if (t) this.setState(e);
else {
var i = this.state;
for (var n in e) i[n] = e[n]
}
}, i.renderAbles = function () {
var e = this,
t = this.props;
return yl(t.ables.filter((function (e) {
return e && t[e.name]
})), ["render"]).map((function (t) {
return (0, t.render)(e, ar)
}))
}, t.defaultProps = {
target: null,
container: null,
origin: !0,
edge: !1,
parentMoveable: null,
parentPosition: null,
ables: [],
pinchThreshold: 20,
dragArea: !1,
transformOrigin: "",
className: ""
}, t
}(Mo);
function Al(e) {
return Br([e[0].clientX, e[0].clientY], [e[1].clientX, e[1].clientY]) / Math.PI * 180
}
var ql = {
name: "pinchable",
updateRect: !0,
props: {
pinchable: Boolean,
pinchThreshold: Number
},
pinchStart: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.touches,
a = t.inputEvent,
l = t.targets,
s = e.props,
c = s.pinchable,
d = s.ables;
if (!c) return !1;
var u = "onPinch" + (l ? "Group" : "") + "Start",
p = "drag" + (l ? "Group" : "") + "ControlStart",
v = (!0 === c ? e.controlAbles : d.filter((function (e) {
return c.indexOf(e.name) > -1
}))).filter((function (e) {
return e.canPinch && e[p]
})),
h = fl(e, t, {});
l && (h.targets = l);
var f = gl(e, u, h);
i.isPinch = !1 !== f, i.ables = v;
var g = i.isPinch;
if (!g) return !1;
var m = Al(r);
return v.forEach((function (t) {
i[t.name + "Datas"] = {};
var r = {
datas: i[t.name + "Datas"],
clientX: n,
clientY: o,
inputEvent: a,
parentRotate: m,
pinchFlag: !0
};
t[p](e, r)
})), e.state.snapDirection = [0, 0], g
},
pinch: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.scale,
a = t.distance,
l = t.touches,
s = t.inputEvent,
c = t.targets;
if (i.isPinch) {
var d = Al(l),
u = a * (1 - 1 / r),
p = fl(e, t, {});
c && (p.targets = c), gl(e, "onPinch" + (c ? "Group" : ""), p);
var v = i.ables,
h = "drag" + (c ? "Group" : "") + "Control";
return v.forEach((function (t) {
t[h](e, {
clientX: n,
clientY: o,
datas: i[t.name + "Datas"],
inputEvent: s,
parentDistance: u,
parentRotate: d,
pinchFlag: !0
})
})), p
}
},
pinchEnd: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.isPinch,
a = t.inputEvent,
l = t.targets;
if (i.isPinch) {
var s = "onPinch" + (l ? "Group" : "") + "End",
c = fl(e, t, {
isDrag: r
});
l && (c.targets = l), gl(e, s, c);
var d = i.ables,
u = "drag" + (l ? "Group" : "") + "ControlEnd";
return d.forEach((function (t) {
t[u](e, {
clientX: n,
clientY: o,
isDrag: r,
datas: i[t.name + "Datas"],
inputEvent: a,
pinchFlag: !0
})
})), r
}
},
pinchGroupStart: function (e, t) {
return this.pinchStart(e, Aa({}, t, {
targets: e.props.targets
}))
},
pinchGroup: function (e, t) {
return this.pinch(e, Aa({}, t, {
targets: e.props.targets
}))
},
pinchGroupEnd: function (e, t) {
return this.pinchEnd(e, Aa({}, t, {
targets: e.props.targets
}))
}
};
function Ml(e, t, i, n, o, r) {
var a = t.name,
l = n[a] || (n[a] = []),
s = !!i.match(/End$/g);
return e.moveables.map((function (e, n) {
var a = l[n] || (l[n] = {}),
c = typeof o === xr ? o(e, a) : o,
d = t[i](e, Aa({}, c, {
datas: a,
parentFlag: !0
}));
return d && r && r(e, a, d, n), s && (e.state.dragger = null), d
}))
}
function _l(e) {
return Ar(e, Pa("direction"))
}
function Tl(e, t) {
var i = t.datas,
n = e.state,
o = n.matrix,
r = n.beforeMatrix,
a = n.is3d,
l = n.left,
s = n.top,
c = n.origin,
d = n.offsetMatrix,
u = n.targetMatrix,
p = n.transformOrigin,
v = a ? 4 : 3;
i.is3d = a, i.matrix = o, i.targetMatrix = u, i.beforeMatrix = r, i.offsetMatrix = d, i.transformOrigin = p, i.inverseMatrix = Nr(o, v), i.inverseBeforeMatrix = Nr(r, v), i.absoluteOrigin = Ir(zr([l, s], c), v), i.startDragBeforeDist = jr(i.inverseBeforeMatrix, i.absoluteOrigin, v), i.startDragDist = jr(i.inverseMatrix, i.absoluteOrigin, v)
}
function Ol(e, t) {
var i = e.datas,
n = e.distX,
o = e.distY,
r = i.inverseBeforeMatrix,
a = i.inverseMatrix,
l = i.is3d,
s = i.startDragBeforeDist,
c = i.startDragDist,
d = l ? 4 : 3;
return Wr(jr(t ? r : a, zr(i.absoluteOrigin, [n, o]), d), t ? s : c)
}
function Nl(e) {
var t = [];
return e[1] >= 0 && (e[0] >= 0 && t.push(3), e[0] <= 0 && t.push(2)), e[1] <= 0 && (e[0] >= 0 && t.push(1), e[0] <= 0 && t.push(0)), t
}
function Rl(e, t) {
return Nl(t).map((function (t) {
return e[t]
}))
}
function Bl(e, t) {
var i = Rl(e, t);
return [Ur.apply(void 0, i.map((function (e) {
return e[0]
}))), Ur.apply(void 0, i.map((function (e) {
return e[1]
})))]
}
function Il(e, t) {
var i = e[0],
n = e[1],
o = e[2];
return Bl([e[3], o, n, i], t)
}
function Hl(e, t) {
return Il([e[0], e[1], e[2], e[3]], t)
}
function Dl(e, t, i, n, o, r) {
var a = Il(Ja(t, i, n, o), r);
return [e[0] - a[0], e[1] - a[1]]
}
function Fl(e, t, i, n) {
return Fr(e, Wa(t, n, i), n)
}
function Pl(e, t) {
var i = e.transformOrigin,
n = e.offsetMatrix,
o = e.is3d ? 4 : 3;
return Fl(n, Fr(e.targetMatrix, Kr(t, o), o), i, o)
}
function Ul(e, t, i, n, o, r) {
var a = e.props.groupable,
l = e.state,
s = l.transformOrigin,
c = l.targetMatrix,
d = l.offsetMatrix,
u = l.is3d,
p = l.width,
v = l.height,
h = l.left,
f = l.top,
g = u ? 4 : 3,
m = a ? h : 0,
y = a ? f : 0;
return Wr(Dl(o, Fl(d, c, function (e, t, i, n, o, r) {
return void 0 === n && (n = t), void 0 === o && (o = i), void 0 === r && (r = [0, 0]), e ? e.map((function (e, a) {
var l = Lr(e),
s = l.value,
c = l.unit,
d = a ? o : n,
u = a ? i : t;
return "%" === e || isNaN(s) ? u * (d ? r[a] / d : 0) : "%" !== c ? s : u * s / 100
})) : r
}(r, t, i, p, v, s), g), t, i, g, n), [m, y])
}
function zl(e, t) {
return Hl(cl(e.state), t)
}
function Wl(e) {
var t = e.state;
if (!t.guidelines || !t.guidelines.length) {
var i = e.props,
n = i.horizontalGuidelines,
o = void 0 === n ? [] : n,
r = i.verticalGuidelines,
a = void 0 === r ? [] : r,
l = i.elementGuidelines,
s = void 0 === l ? [] : l,
c = i.bounds,
d = i.snapCenter;
if (c || o.length || a.length || s.length) {
var u = t.containerRect,
p = u.top,
v = u.left,
h = t.clientRect,
f = h.top,
g = h.left,
m = cl(t),
y = Math.min.apply(Math, m.map((function (e) {
return e[0]
}))),
b = Math.min.apply(Math, m.map((function (e) {
return e[1]
}))),
x = dl(y - (g - v)),
w = dl(b - (f - p)),
S = [];
s.forEach((function (e) {
var t = e.getBoundingClientRect(),
i = t.top,
n = t.left,
o = t.width,
r = t.height,
a = i - p,
l = a + r,
s = n - v,
c = s + o;
S.push({
type: "vertical",
element: e,
pos: [ul(s + x, .1), a],
size: r
}), S.push({
type: "vertical",
element: e,
pos: [ul(c + x, .1), a],
size: r
}), S.push({
type: "horizontal",
element: e,
pos: [s, ul(a + w, .1)],
size: o
}), S.push({
type: "horizontal",
element: e,
pos: [s, ul(l + w, .1)],
size: o
}), d && (S.push({
type: "vertical",
element: e,
pos: [ul((s + c) / 2 + x, .1), a],
size: r,
center: !0
}), S.push({
type: "horizontal",
element: e,
pos: [s, ul((a + l) / 2 + w, .1)],
size: o,
center: !0
}))
})), t.guidelines = S, t.enableSnap = !0
}
}
}
function jl(e, t, i, n) {
return {
vertical: Yl(e, t, !0, n),
horizontal: Yl(e, i, !1, n)
}
}
function Yl(e, t, i, n) {
void 0 === n && (n = 0);
var o = e.props.bounds;
if (o) {
var r = o[i ? "left" : "top"],
a = o[i ? "right" : "bottom"],
l = Math.min.apply(Math, t),
s = Math.max.apply(Math, t);
if (!Cr(r) && r + n > l) return {
isBound: !0,
offset: l - r,
pos: r
};
if (!Cr(a) && a - n < s) return {
isBound: !0,
offset: s - a,
pos: a
}
}
return {
isBound: !1,
offset: 0,
pos: 0
}
}
function Xl(e, t, i, n, o, r) {
if (!e || !e.length) return {
isSnap: !1,
posInfos: []
};
var a = "vertical" === t ? 0 : 1,
l = i.map((function (i) {
var l = e.map((function (e) {
var t = e.pos,
n = i - t[a];
return {
offset: n,
dist: Math.abs(n),
guideline: e
}
})).filter((function (e) {
var i = e.guideline,
a = e.dist,
l = i.type,
s = i.center,
c = i.element;
return !(!r && c || !o && s || l !== t || a > n)
})).sort((function (e, t) {
return e.dist - t.dist
}));
return {
pos: i,
guidelineInfos: l
}
})).filter((function (e) {
return e.guidelineInfos.length > 0
})).sort((function (e, t) {
return e.guidelineInfos[0].dist - t.guidelineInfos[0].dist
}));
return {
isSnap: l.length > 0,
posInfos: l
}
}
function Gl(e, t) {
var i = e.props,
n = i.snappable,
o = i.bounds,
r = i.verticalGuidelines,
a = i.horizontalGuidelines,
l = e.state,
s = l.guidelines,
c = l.enableSnap;
return !(!n || !c || t && !0 !== n && n.indexOf(t)) && !!(o || s && s.length || r && r.length || a && a.length)
}
function Vl(e, t, i, n, o) {
var r = e.state,
a = r.guidelines,
l = r.containerRect,
s = l.height,
c = l.width,
d = e.props,
u = function () {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
for (var i = e.length - 1, n = 0; n < i; ++n) {
var o = e[n];
if (!Cr(o)) return o
}
return e[i]
}(o, d.snapThreshold, 5),
p = d.snapElement,
v = void 0 === p || p,
h = d.snapHorizontal,
f = void 0 === h || h,
g = d.snapVertical,
m = void 0 === g || g,
y = d.verticalGuidelines,
b = d.horizontalGuidelines,
x = a.slice();
return f && b && b.forEach((function (e) {
x.push({
type: "horizontal",
pos: [0, ul(e, .1)],
size: c
})
})), m && y && y.forEach((function (e) {
x.push({
type: "vertical",
pos: [ul(e, .1), 0],
size: s
})
})), {
vertical: Xl(x, "vertical", t, u, n, v),
horizontal: Xl(x, "horizontal", i, u, n, v)
}
}
function Zl(e, t, i, n) {
var o = e.props.snapCenter && i,
r = ["left", "right"],
a = ["top", "bottom"];
return o && (r.push("center"), a.push("middle")), r = r.filter((function (e) {
return e in t
})), a = a.filter((function (e) {
return e in t
})), Vl(e, r.map((function (e) {
return t[e]
})), a.map((function (e) {
return t[e]
})), o, n)
}
function Kl(e, t) {
var i = jl(e, [t[0]], [t[1]]),
n = i.horizontal,
o = n.isBound,
r = n.offset,
a = i.vertical,
l = a.isBound,
s = a.offset;
if (o || l) {
var c = void 0,
d = (c = o && l ? Math.abs(r) < Math.abs(s) : l) ? s : r;
return {
isVertical: c,
offset: d,
dist: Math.abs(d)
}
}
}
function Jl(e, t, i, n, o, r) {
var a = function (e, t, i, n) {
var o = t[0] - e[0],
r = t[1] - e[1];
Math.abs(o) < Ra && (o = 0);
Math.abs(r) < Ra && (r = 0);
if (!o) return n ? void 0 : [0, i];
if (!r) return n ? [i, 0] : void 0;
var a = r / o,
l = e[1] - a * e[0];
if (n) {
var s = a * (t[0] + i) + l;
return [i, s - t[1]]
}
return [(t[1] + i - l) / a - t[0], i]
}(e, t, -i, n);
if (!a) return NaN;
var l = Ol({
datas: r,
distX: a[0],
distY: a[1]
}),
s = l[0],
c = l[1];
return o ? c : s
}
function $l(e, t, i, n, o, r) {
var a = Ja(e, t, i, r ? 4 : 3);
return sl(a, Wr(n, Il(a, o)))
}
function Ql(e) {
var t = e.isSnap;
if (!t) return {
isSnap: !1,
offset: 0,
dist: -1,
pos: 0,
guideline: null
};
var i = e.posInfos[0],
n = i.guidelineInfos[0],
o = n.offset,
r = n.dist,
a = n.guideline;
return {
isSnap: t,
offset: o,
dist: r,
pos: i.pos,
guideline: a
}
}
function es(e, t, i, n, o) {
var r, a = 0,
l = -1;
if (t.map((function (t) {
return Kl(e, t)
})).forEach((function (e, t) {
e && (!r || r.dist < e.dist) && (r = e, l = t)
})), r) {
var s = Jl(i[l], t[l], r.offset, r.isVertical, n, o);
isNaN(s) || (a = s)
} else t.some((function (t, r) {
var l = function (e, t, i, n, o) {
var r, a = Vl(e, [t[0]], [t[1]]),
l = a.horizontal,
s = a.vertical,
c = Math.abs(i[1] - t[1]) < Ra,
d = Math.abs(i[0] - t[0]) < Ra,
u = Ql(l),
p = u.isSnap,
v = u.dist,
h = u.offset,
f = Ql(s),
g = f.isSnap,
m = f.dist,
y = f.offset;
return p || g ? Jl(i, t, (r = p && g ? !(0 !== v || !c) || (0 !== y || !d) && v > m : g) ? y : h, r, n, o) : NaN
}(e, t, i[r], n, o);
return !isNaN(l) && (a = l, !0)
}));
return a
}
function ts(e, t, i, n, o, r, a, l) {
var s = Il(cl(e.state), r),
c = $l(t, i, n, s, o, l);
return o[0] && o[1] ? function (e, t, i, n, o, r, a, l, s) {
var c, d = Rl(t, i),
u = [i[0], -1 * i[1]],
p = [-1 * i[0], i[1]],
v = Bl(t, u),
h = Bl(t, p),
f = jl(e, [d[0][0]], [d[0][1]]),
g = f.horizontal,
m = g.isBound,
y = g.offset,
b = f.vertical,
x = b.isBound,
w = b.offset,
S = 0,
C = 0,
E = Kl(e, v),
k = Kl(e, h),
L = E && E.dist > Math.abs(w),
A = k && k.dist > Math.abs(y);
if (L || A)
if (L) {
var q = Jl(Bl(t, [-1 * u[0], u[1]]), v, E.offset, E.isVertical, !1, n);
isNaN(q) || (S = q), C = es(e, [Bl(M = $l(o, r + i[0] * S, a + i[1] * C, l, i, s), i)], [Bl(M, u)], !0, n)
} else {
var M;
q = Jl(Bl(t, [-1 * p[0], p[1]]), v, k.offset, k.isVertical, !0, n);
isNaN(q) || (C = q), S = es(e, [Bl(M = $l(o, r + i[0] * S, a + i[1] * C, l, i, s), i)], [Bl(M, p)], !1, n)
}
else {
var _ = Vl(e, [d[0][0]], [d[0][1]]),
T = _.horizontal,
O = _.vertical,
N = Ql(T).offset,
R = Ql(O).offset;
S = (c = Ol({
datas: n,
distX: -(x ? w : R),
distY: -(m ? y : N)
}))[0], C = c[1]
}
return [i[0] * S, i[1] * C]
}(e, c, o, a, t, i, n, s, l) : function (e, t, i, n) {
var o, r, a = 0 !== i[0] ? 0 : 1,
l = a > 0,
s = t.slice().reverse();
e.props.keepRatio ? (o = [Bl(t, i)], r = [Bl(s, i)]) : (o = Rl(t, i), r = Rl(s, i), o.push([(o[0][0] + o[1][0]) / 2, (o[0][1] + o[1][1]) / 2]), r.reverse(), r.push([(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2]));
var c = es(e, o, r, l, n),
d = [0, 0];
return d[a] = i[a] * c, d
}(e, c, o, a)
}
function is(e) {
var t = [];
return e.forEach((function (e) {
e.guidelineInfos.forEach((function (e) {
var i = e.guideline;
t.indexOf(i) > -1 || t.push(i)
}))
})), t
}
var ns = {
name: "snappable",
props: {
snappable: [Boolean, Array],
snapCenter: Boolean,
snapHorizontal: Boolean,
snapVertical: Boolean,
snapElement: Boolean,
snapThreshold: Number,
horizontalGuidelines: Array,
verticalGuidelines: Array,
elementGuidelines: Array,
bounds: Object
},
render: function (e, t) {
var i = e.state,
n = i.top,
o = i.left,
r = i.pos1,
a = i.pos2,
l = i.pos3,
s = i.pos4,
c = i.snapDirection,
d = i.clientRect,
u = i.containerRect,
p = d.left - u.left,
v = d.top - u.top,
h = Math.min(r[0], a[0], l[0], s[0]),
f = Math.min(r[1], a[1], l[1], s[1]);
if (!c || !Gl(e, "")) return [];
var g = cl(e.state),
m = $a(g),
y = m.width,
b = m.height,
x = m.top,
w = m.left,
S = m.bottom,
C = m.right,
E = function (e, t, i) {
if (!0 === i) {
var n = $a(t);
return n.middle = (n.top + n.bottom) / 2, n.center = (n.left + n.right) / 2, Zl(e, n, !0, 1)
}
if (i[0] || i[1]) {
r = void 0;
return e.props.keepRatio ? r = [Bl(t, i)] : (r = Rl(t, i)).length > 1 && r.push([(r[0][0] + r[1][0]) / 2, (r[0][1] + r[1][1]) / 2]), Vl(e, r.map((function (e) {
return e[0]
})), r.map((function (e) {
return e[1]
})), !0, 1)
}
for (var o = [t[0], t[1], t[3], t[2], t[0]], r = [], a = 0; a < 4; ++a) r.push(o[a]), t.push([(o[a][0] + o[a + 1][0]) / 2, (o[a][1] + o[a + 1][1]) / 2]);
return Vl(e, r.map((function (e) {
return e[0]
})), r.map((function (e) {
return e[1]
})), !0, 1)
}(e, g, c),
k = E.vertical.posInfos,
L = E.horizontal.posInfos,
A = jl(e, [w, C], [x, S], 1),
q = A.vertical,
M = q.isBound,
_ = q.pos,
T = A.horizontal,
O = T.isBound,
N = T.pos,
R = k.map((function (e) {
return e.pos
})),
B = L.map((function (e) {
return e.pos
})),
I = is(k),
H = is(L);
M && R.indexOf(_) < 0 && R.push(_), O && B.indexOf(N) < 0 && B.push(N);
var D = I.filter((function (e) {
return e.element
}));
return H.filter((function (e) {
return e.element
})).map((function (e, i) {
var o = e.pos,
r = e.size,
a = Math.min(0, o[0] - p),
l = Math.max(y, o[0] - p + r);
return t.createElement("div", {
className: Pa("line", "horizontal", "guideline", "dashed"),
key: "horizontalLinkGuidline" + i,
style: {
left: h + a + "px",
top: -n + o[1] + "px",
width: l - a + "px"
}
})
})).concat(D.map((function (e, i) {
var n = e.pos,
r = e.size,
a = Math.min(0, n[1] - v),
l = Math.max(b, n[1] - v + r);
return t.createElement("div", {
className: Pa("line", "vertical", "guideline", "dashed"),
key: "verticalDashedGuidline" + i,
style: {
top: f + a + "px",
left: -o + n[0] + "px",
height: l - a + "px"
}
})
})), R.map((function (e, i) {
return t.createElement("div", {
className: Pa("line", "vertical", "guideline", "target", "bold"),
key: "verticalTargetGuidline" + i,
style: {
top: f + "px",
left: -o + e + "px",
height: b + "px"
}
})
})), B.map((function (e, i) {
return t.createElement("div", {
className: Pa("line", "horizontal", "guideline", "target", "bold"),
key: "horizontalTargetGuidline" + i,
style: {
top: -n + e + "px",
left: h + "px",
width: y + "px"
}
})
})), I.map((function (e, i) {
var n = e.pos,
r = e.size,
a = e.element;
return t.createElement("div", {
className: Pa("line", "vertical", "guideline", a ? "bold" : ""),
key: "verticalGuidline" + i,
style: {
top: f - v + n[1] + "px",
left: -o + n[0] + "px",
height: r + "px"
}
})
})), H.map((function (e, i) {
var o = e.pos,
r = e.size,
a = e.element;
return t.createElement("div", {
className: Pa("line", "horizontal", "guideline", a ? "bold" : ""),
key: "horizontalGuidline" + i,
style: {
top: -n + o[1] + "px",
left: h - p + o[0] + "px",
width: r + "px"
}
})
})))
},
dragStart: function (e, t) {
e.state.snapDirection = !0, Wl(e)
},
pinchStart: function (e) {
this.unset(e)
},
dragEnd: function (e) {
this.unset(e)
},
dragControlCondition: _l,
dragControlStart: function (e, t) {
e.state.snapDirection = null, Wl(e)
},
dragControlEnd: function (e) {
this.unset(e)
},
dragGroupStart: function (e, t) {
e.state.snapDirection = !0, Wl(e)
},
dragGroupEnd: function (e) {
this.unset(e)
},
dragGroupControlStart: function (e, t) {
e.state.snapDirection = null, Wl(e)
},
dragGroupControlEnd: function (e) {
this.unset(e)
},
unset: function (e) {
var t = e.state;
t.enableSnap = !1, t.guidelines = [], t.snapDirection = null
}
},
os = {
name: "draggable",
props: {
draggable: Boolean,
throttleDrag: Number
},
dragStart: function (e, t) {
var i = t.datas,
n = t.parentEvent,
o = t.parentDragger,
r = e.state,
a = r.targetTransform,
l = r.target;
if (r.dragger) return !1;
r.dragger = o || e.targetDragger;
var s = window.getComputedStyle(l);
i.datas = {}, i.left = parseFloat(s.left || "") || 0, i.top = parseFloat(s.top || "") || 0, i.bottom = parseFloat(s.bottom || "") || 0, i.right = parseFloat(s.right || "") || 0, i.transform = a, i.startTranslate = [0, 0], Tl(e, {
datas: i
}), i.prevDist = [0, 0], i.prevBeforeDist = [0, 0], i.isDrag = !1,
function (e, t) {
t.absolutePoses = cl(e.state)
}(e, i);
var c = fl(e, t, {
set: function (e) {
i.startTranslate = e
}
});
return !1 !== (n || gl(e, "onDragStart", c)) ? i.isDrag = !0 : (r.dragger = null, i.isPinch = !1), !!i.isDrag && c
},
drag: function (e, t) {
var i = t.datas,
n = t.parentEvent,
o = t.parentFlag,
r = t.distX,
a = t.distY,
l = i.isPinch,
s = i.isDrag,
c = i.prevDist,
d = i.prevBeforeDist,
u = i.transform,
p = i.startTranslate;
if (s) {
var v = e.props,
h = v.parentMoveable,
f = n ? 0 : v.throttleDrag || 0,
g = !1;
if (!l && !n && !o) {
var m = function (e, t, i, n) {
var o = {
isSnap: !1,
offset: 0
},
r = {
isSnap: !1,
offset: 0
};
if (!Gl(e, "draggable")) return [o, r];
var a = $a(sl(n.absolutePoses, [t, i])),
l = a.left,
s = a.right,
c = a.top,
d = a.bottom,
u = Zl(e, {
left: l,
right: s,
top: c,
bottom: d,
center: (l + s) / 2,
middle: (c + d) / 2
}, !0),
p = jl(e, [l, s], [c, d]);
return p.vertical.isBound ? (o.offset = p.vertical.offset, o.isSnap = !0) : u.vertical.isSnap && (o.offset = u.vertical.posInfos[0].guidelineInfos[0].offset, o.isSnap = !0), p.horizontal.isBound ? (r.offset = p.horizontal.offset, r.isSnap = !0) : u.horizontal.isSnap && (r.offset = u.horizontal.posInfos[0].guidelineInfos[0].offset, r.isSnap = !0), [o, r]
}(e, r, a, i),
y = m[0],
b = m[1];
g = y.isSnap || b.isSnap, r -= y.offset, a -= b.offset
}
i.passDistX = r, i.passDistY = a;
var x = zr(Ol({
datas: i,
distX: r,
distY: a
}, !0), p),
w = zr(Ol({
datas: i,
distX: r,
distY: a
}, !1), p);
g || (pl(w, f), pl(x, f));
var S = Wr(x, p),
C = Wr(w, p),
E = Wr(C, c),
k = Wr(S, d);
i.prevDist = C, i.prevBeforeDist = S;
var L = i.left + S[0],
A = i.top + S[1],
q = i.right - S[0],
M = i.bottom - S[1],
_ = u + " translate(" + C[0] + "px, " + C[1] + "px)";
if (n || h || !E.every((function (e) {
return !e
})) || !k.some((function (e) {
return !e
}))) {
var T = fl(e, t, {
transform: _,
dist: C,
delta: E,
translate: w,
beforeDist: S,
beforeDelta: k,
beforeTranslate: x,
left: L,
top: A,
right: q,
bottom: M,
isPinch: l
});
return !n && gl(e, "onDrag", T), T
}
}
},
dragEnd: function (e, t) {
var i = t.parentEvent,
n = t.datas,
o = t.isDrag;
if (e.state.dragger = null, n.isDrag) return n.isDrag = !1, !i && gl(e, "onDragEnd", fl(e, t, {
isDrag: o
})), o
},
dragGroupStart: function (e, t) {
var i = t.datas,
n = this.dragStart(e, t);
if (!n) return !1;
var o = Ml(e, this, "dragStart", i, t),
r = gl(e, "onDragGroupStart", Aa({}, n, {
targets: e.props.targets,
events: o
}));
return i.isDrag = !1 !== r, !!i.isDrag && n
},
dragGroup: function (e, t) {
var i = t.datas;
if (i.isDrag) {
var n = this.drag(e, t),
o = t.datas,
r = o.passDistX,
a = o.passDistY,
l = Ml(e, this, "drag", i, Aa({}, t, {
distX: r,
distY: a
}));
if (n) {
var s = Aa({
targets: e.props.targets,
events: l
}, n);
return gl(e, "onDragGroup", s), s
}
}
},
dragGroupEnd: function (e, t) {
var i = t.isDrag,
n = t.datas;
if (n.isDrag) return this.dragEnd(e, t), Ml(e, this, "dragEnd", n, t), gl(e, "onDragGroupEnd", fl(e, t, {
targets: e.props.targets,
isDrag: i
})), i
}
};
function rs(e, t, i) {
return Aa({}, e.dragger.move(t, i), {
parentEvent: !0
})
}
var as = function () {
function e() {
this.prevX = 0, this.prevY = 0, this.startX = 0, this.startY = 0, this.isDrag = !1, this.isFlag = !1, this.datas = {}
}
var t = e.prototype;
return t.dragStart = function (e, t) {
return this.isDrag = !1, this.isFlag = !1, this.datas = {}, this.move(e, t)
}, t.drag = function (e, t) {
return this.move([e[0] - this.prevX, e[1] - this.prevY], t)
}, t.move = function (e, t) {
var i, n;
return this.isFlag ? (i = this.prevX + e[0], n = this.prevY + e[1], this.isDrag = !0) : (this.prevX = e[0], this.prevY = e[1], this.startX = e[0], this.startY = e[1], i = e[0], n = e[1], this.isFlag = !0), this.prevX = i, this.prevY = n, {
clientX: i,
clientY: n,
inputEvent: t,
isDrag: this.isDrag,
distX: i - this.startX,
distY: n - this.startY,
deltaX: e[0],
deltaY: e[1],
datas: this.datas,
parentEvent: !0,
parentDragger: this
}
}, e
}();
function ls(e, t, i, n, o) {
e.startAbsoluteOrigin = [t - o[0] + n[0], i - o[1] + n[1]], e.prevDeg = Br(e.startAbsoluteOrigin, [t, i]) / Math.PI * 180, e.startDeg = e.prevDeg, e.loop = 0
}
function ss(e, t, i, n, o) {
var r = e.prevDeg,
a = e.startDeg,
l = e.loop;
r > t && r > 270 && t < 90 ? ++e.loop : r < t && r < 90 && t > 270 && --e.loop;
var s = e.loop,
c = 360 * l + r - a + n,
d = 360 * s + t - a + n,
u = i * ((d = ul(d, o)) - c),
p = i * (d - n);
return e.prevDeg = d - 360 * s + a - n, [u, p, d]
}
function cs(e, t, i, n, o, r) {
return ss(e, Br(e.startAbsoluteOrigin, [i, n]) / Math.PI * 180, t, o, r)
}
function ds(e, t, i, n, o) {
return "left" === e ? [n, t] : "right" === e ? [i, o] : "bottom" === e ? [o, n] : [t, i]
}
function us(e) {
return Ar(e, Pa("rotation"))
}
var ps = {
name: "rotatable",
canPinch: !0,
props: {
rotatable: Boolean,
rotationPosition: String,
throttleRotate: Number
},
render: function (e, t) {
var i = e.props,
n = i.rotatable,
o = i.rotationPosition;
if (!n) return null;
var r = e.state,
a = r.pos1,
l = r.pos2,
s = r.pos3,
c = r.pos4,
d = r.direction,
u = ds(o, a, l, s, c),
p = ol(u, d);
return t.createElement("div", {
key: "rotation",
className: Pa("line rotation-line"),
style: {
transform: "translate(" + (u[0][0] + u[1][0]) / 2 + "px, " + (u[0][1] + u[1][1]) / 2 + "px) translateY(-40px) rotate(" + p + "rad)"
}
}, t.createElement("div", {
className: Pa("control", "rotation")
}))
},
dragControlCondition: us,
dragControlStart: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.parentRotate,
a = t.parentFlag,
l = t.pinchFlag,
s = e.state,
c = s.target,
d = s.left,
u = s.top,
p = s.origin,
v = s.beforeOrigin,
h = s.direction,
f = s.beforeDirection,
g = s.targetTransform,
m = s.pos1,
y = s.pos2,
b = s.pos3,
x = s.pos4;
if (!c) return !1;
i.transform = g, i.left = d, i.top = u;
var w = ds(e.props.rotationPosition, m, y, b, x),
S = function (e, t) {
var i = e[0],
n = e[1],
o = Yr([0, -40, 1], t);
return [(i[0] + n[0]) / 2 + o[0], (i[1] + n[1]) / 2 + o[1]]
}(w, ol(w, h));
l || a ? (i.beforeInfo = {
prevDeg: r,
startDeg: r,
loop: 0
}, i.afterInfo = {
prevDeg: r,
startDeg: r,
loop: 0
}) : (i.afterInfo = {}, i.beforeInfo = {}, ls(i.afterInfo, n, o, p, S), ls(i.beforeInfo, n, o, v, S)), i.direction = h, i.beforeDirection = f, i.startRotate = 0, i.datas = {};
var C = fl(e, t, {
set: function (e) {
i.startRotate = e
}
}),
E = gl(e, "onRotateStart", C);
return i.isRotate = !1 !== E, !!i.isRotate && C
},
dragControl: function (e, t) {
var i, n, o, r, a = t.datas,
l = t.clientX,
s = t.clientY,
c = t.parentRotate,
d = t.parentFlag,
u = t.pinchFlag,
p = a.direction,
v = a.beforeDirection,
h = a.beforeInfo,
f = a.afterInfo,
g = a.isRotate,
m = a.startRotate;
if (g) {
var y, b, x, w, S, C, E = e.props,
k = E.throttleRotate,
L = void 0 === k ? 0 : k,
A = E.parentMoveable;
if (u || d ? (y = (i = ss(f, c, p, m, L))[0], b = i[1], x = i[2], w = (n = ss(h, c, p, m, L))[0], S = n[1], C = n[2]) : (y = (o = cs(f, p, l, s, m, L))[0], b = o[1], x = o[2], w = (r = cs(h, v, l, s, m, L))[0], S = r[1], C = r[2]), y || w || A) {
var q = fl(e, t, {
delta: y,
dist: b,
rotate: x,
beforeDist: S,
beforeDelta: w,
beforeRotate: C,
transform: a.transform + " rotate(" + b + "deg)",
isPinch: !!u
});
return gl(e, "onRotate", q), q
}
}
},
dragControlEnd: function (e, t) {
var i = t.datas,
n = t.isDrag;
return !!i.isRotate && (i.isRotate = !1, gl(e, "onRotateEnd", fl(e, t, {
isDrag: n
})), n)
},
dragGroupControlCondition: us,
dragGroupControlStart: function (e, t) {
var i = t.datas,
n = t.inputEvent,
o = e.state,
r = o.left,
a = o.top,
l = o.beforeOrigin,
s = this.dragControlStart(e, t);
if (!s) return !1;
s.set(e.rotation);
var c = Ml(e, this, "dragControlStart", i, Aa({}, t, {
parentRotate: 0
}), (function (e, t, i) {
var o = e.state,
s = o.left,
c = o.top,
d = o.beforeOrigin,
u = zr(Wr([s, c], [r, a]), Wr(d, l));
t.prevClient = u, i.dragStart = os.dragStart(e, (new as).dragStart(u, n))
})),
d = gl(e, "onRotateGroupStart", Aa({}, s, {
targets: e.props.targets,
events: c
}));
return i.isRotate = !1 !== d, !!i.isRotate && s
},
dragGroupControl: function (e, t) {
var i = t.inputEvent,
n = t.datas;
if (n.isRotate) {
var o = this.dragControl(e, t);
if (o) {
var r = o.beforeDist,
a = o.beforeDelta / 180 * Math.PI,
l = Ml(e, this, "dragControl", n, Aa({}, t, {
parentRotate: r
}), (function (e, t, n, o) {
var r = t.prevClient,
l = r[0],
s = r[1],
c = Yr([l, s], a),
d = c[0],
u = c[1],
p = [d - l, u - s];
t.prevClient = [d, u];
var v = os.drag(e, rs(e.state, p, i));
n.drag = v
}));
e.rotation = o.beforeRotate;
var s = Aa({
targets: e.props.targets,
events: l,
set: function (t) {
e.rotation = t
}
}, o);
return gl(e, "onRotateGroup", s), s
}
}
},
dragGroupControlEnd: function (e, t) {
var i = t.isDrag,
n = t.datas;
if (n.isRotate) return this.dragControlEnd(e, t), Ml(e, this, "dragControlEnd", n, t), gl(e, "onRotateGroupEnd", fl(e, t, {
targets: e.props.targets,
isDrag: i
})), i
}
};
function vs(e, t, i) {
var n = e.state,
o = n.pos1,
r = n.pos2,
a = n.pos3,
l = n.pos4,
s = n.rotation,
c = e.props.renderDirections,
d = void 0 === c ? t : c,
u = [o, r, a, l],
p = {};
return d.forEach((function (e) {
p[e] = !0
})), d.map((function (e) {
var t = Ha[e];
if (!t || !p[e]) return null;
var n = (ul(s / Math.PI * 180, 15) + Da[e]) % 180;
return i.createElement("div", {
className: Pa("control", "direction", e),
"data-rotation": n,
"data-direction": e,
key: e,
style: il.apply(void 0, [s].concat(t.map((function (e) {
return u[e]
}))))
})
}))
}
function hs(e, t) {
return vs(e, ["nw", "ne", "sw", "se", "n", "w", "s", "e"], t)
}
function fs(e, t) {
return vs(e, ["nw", "ne", "sw", "se"], t)
}
var gs = {
name: "resizable",
ableGroup: "size",
updateRect: !0,
canPinch: !0,
props: {
resizable: Boolean,
throttleResize: Number,
renderDirections: Array,
baseDirection: Array,
keepRatio: Boolean
},
render: function (e, t) {
var i = e.props,
n = i.resizable,
o = i.edge;
if (n) return o ? fs(e, t) : hs(e, t)
},
dragControlCondition: _l,
dragControlStart: function (e, t) {
var i, n = t.inputEvent,
o = t.pinchFlag,
r = t.datas,
a = n.target,
l = o ? [1, 1] : ll(a),
s = e.state,
c = s.target,
d = s.width,
u = s.height;
if (!l || !c) return !1;
!o && Tl(e, {
datas: r
}), r.datas = {}, r.direction = l, r.startOffsetWidth = d, r.startOffsetHeight = u, r.prevWidth = 0, r.prevHeight = 0, i = function (e) {
var t = window.getComputedStyle(e);
return [parseFloat(t.width), parseFloat(t.height)]
}(c), r.startWidth = i[0], r.startHeight = i[1], r.transformOrigin = e.props.transformOrigin, r.startDirection = function (e, t) {
var i = e.props.baseDirection,
n = void 0 === i ? [-1, -1] : i;
return [t[0] ? t[0] : -1 * n[0], t[1] ? t[1] : -1 * n[1]]
}(e, l), r.fixedPosition = zl(e, r.startDirection), r.fixedOriginalPosition = zl(e, l);
var p = fl(e, t, {
direction: l,
set: function (e) {
var t = e[0],
i = e[1];
r.startWidth = t, r.startHeight = i
},
setOrigin: function (e) {
r.transformOrigin = e
},
dragStart: os.dragStart(e, (new as).dragStart([0, 0], n))
});
return !1 !== gl(e, "onResizeStart", p) && (r.isResize = !0, e.state.snapDirection = l), !!r.isResize && p
},
dragControl: function (e, t) {
var i = t.datas,
n = t.distX,
o = t.distY,
r = t.parentFlag,
a = t.pinchFlag,
l = t.parentDistance,
s = t.parentScale,
c = t.inputEvent,
d = t.parentKeepRatio,
u = t.dragClient,
p = i.direction,
v = i.isResize,
h = i.transformOrigin;
if (v) {
var f = i.startWidth,
g = i.startHeight,
m = i.startOffsetWidth,
y = i.startOffsetHeight,
b = i.prevWidth,
x = i.prevHeight,
w = e.props,
S = w.throttleResize,
C = void 0 === S ? 0 : S,
E = w.parentMoveable,
k = e.props.keepRatio || d,
L = p[0] || !p[1],
A = L ? y / m : m / y,
q = 0,
M = 0;
if (s) q = (s[0] - 1) * m, M = (s[1] - 1) * y;
else if (a) l && (q = l, M = l * y / m);
else {
var _ = Ol({
datas: i,
distX: n,
distY: o
});
if (q = p[0] * _[0], M = p[1] * _[1], k && m && y) {
var T = Br([0, 0], _),
O = Br([0, 0], p),
N = Br([0, 0], [m, y]),
R = Math.sqrt(q * q + M * M),
B = Math.cos(T - O) * R;
p[0] ? p[1] ? (q = Math.cos(N) * B, M = Math.sin(N) * B) : M = bl(q = B, L, A) : q = xl(M = B, L, A)
}
}
var I = p[0] || k ? Math.max(m + q, 0) : m,
H = p[1] || k ? Math.max(y + M, 0) : y,
D = [0, 0];
if (a || (D = function (e, t, i, n, o) {
if (!Gl(e, "resizable")) return [0, 0];
var r = e.state;
return ts(e, r.matrix, t, i, n, n, o, r.is3d)
}(e, I, H, p, i)), k) {
p[0] && p[1] && D[0] && D[1] && (Math.abs(D[0]) > Math.abs(D[1]) ? D[1] = 0 : D[0] = 0);
var F = !D[0] && !D[1];
F && (L ? I = ul(I, C) : H = ul(H, C)), p[0] && !p[1] || D[0] && !D[1] || F && L ? H = bl(I += D[0], L, A) : (!p[0] && p[1] || !D[0] && D[1] || F && !L) && (I = xl(H += D[1], L, A))
} else I += D[0], H += D[1], D[0] || (I = ul(I, C)), D[1] || (H = ul(H, C));
var P = [(q = (I = Math.round(I)) - m) - b, (M = (H = Math.round(H)) - y) - x];
if (i.prevWidth = q, i.prevHeight = M, E || !P.every((function (e) {
return !e
}))) {
var U = k || r ? p : i.startDirection,
z = u || (k ? i.fixedOriginalPosition : i.fixedPosition),
W = !r && a ? [0, 0] : Ul(e, I, H, U, z, h),
j = fl(e, t, {
width: f + q,
height: g + M,
offsetWidth: I,
offsetHeight: H,
direction: p,
dist: [q, M],
delta: P,
isPinch: !!a,
drag: os.drag(e, rs(e.state, W, c))
});
return gl(e, "onResize", j), j
}
}
},
dragControlAfter: function (e, t) {
var i = t.datas,
n = i.isResize,
o = i.startOffsetWidth,
r = i.startOffsetHeight,
a = i.prevWidth,
l = i.prevHeight;
if (n) {
var s = e.state,
c = s.width - (o + a),
d = s.height - (r + l),
u = Math.abs(c) > 3,
p = Math.abs(d) > 3;
return u && (i.startWidth += c, i.startOffsetWidth += c, i.prevWidth += c), p && (i.startHeight += d, i.startOffsetHeight += d, i.prevHeight += d), u || p ? (this.dragControl(e, t), !0) : void 0
}
},
dragControlEnd: function (e, t) {
var i = t.datas,
n = t.isDrag;
return !!i.isResize && (i.isResize = !1, gl(e, "onResizeEnd", fl(e, t, {
isDrag: n
})), n)
},
dragGroupControlCondition: _l,
dragGroupControlStart: function (e, t) {
var i = t.datas,
n = this.dragControlStart(e, t);
if (!n) return !1;
var o = n.direction,
r = Il(cl(e.state), o),
a = Ml(e, this, "dragControlStart", i, (function (i, n) {
var a = Il(cl(i.state), o),
l = jr(Vr(-e.rotation / 180 * Math.PI, 3), [a[0] - r[0], a[1] - r[1], 1], 3),
s = l[0],
c = l[1];
return n.originalX = s, n.originalY = c, t
})),
l = Aa({}, n, {
targets: e.props.targets,
events: a
}),
s = gl(e, "onResizeGroupStart", l);
return i.isResize = !1 !== s, !!i.isResize && n
},
dragGroupControl: function (e, t) {
var i = t.datas;
if (i.isResize) {
var n = this.dragControl(e, t);
if (n) {
var o = n.offsetWidth,
r = n.offsetHeight,
a = n.dist,
l = e.props.keepRatio,
s = [o / (o - a[0]), r / (r - a[1])],
c = i.fixedOriginalPosition,
d = Ml(e, this, "dragControl", i, (function (i, n) {
var o = jr(Vr(e.rotation / 180 * Math.PI, 3), [n.originalX * s[0], n.originalY * s[1], 1], 3),
r = o[0],
a = o[1];
return Aa({}, t, {
parentScale: s,
dragClient: zr(c, [r, a]),
parentKeepRatio: l
})
})),
u = Aa({
targets: e.props.targets,
events: d
}, n);
return gl(e, "onResizeGroup", u), u
}
}
},
dragGroupControlEnd: function (e, t) {
var i = t.isDrag,
n = t.datas;
if (n.isResize) return this.dragControlEnd(e, t), Ml(e, this, "dragControlEnd", n, t), gl(e, "onResizeGroupEnd", fl(e, t, {
targets: e.props.targets,
isDrag: i
})), i
}
},
ms = {
name: "scalable",
ableGroup: "size",
canPinch: !0,
props: {
scalable: Boolean,
throttleScale: Number,
renderDirections: String,
keepRatio: Boolean
},
render: function (e, t) {
var i = e.props,
n = i.resizable,
o = i.scalable,
r = i.edge;
if (!n && o) return r ? fs(e, t) : hs(e, t)
},
dragControlCondition: _l,
dragControlStart: function (e, t) {
var i = t.datas,
n = t.pinchFlag,
o = t.inputEvent,
r = o.target,
a = n ? [1, 1] : ll(r),
l = e.state,
s = l.width,
c = l.height,
d = l.targetTransform,
u = l.target;
if (!a || !u) return !1;
n || Tl(e, {
datas: i
}), i.datas = {}, i.transform = d, i.prevDist = [1, 1], i.direction = a, i.width = s, i.height = c, i.startScale = [1, 1];
var p = fl(e, t, {
direction: a,
set: function (e) {
i.startScale = e
},
dragStart: os.dragStart(e, (new as).dragStart([0, 0], o))
});
return !1 !== gl(e, "onScaleStart", p) && (i.isScale = !0, e.state.snapDirection = a), !!i.isScale && p
},
dragControl: function (e, t) {
var i = t.datas,
n = t.distX,
o = t.distY,
r = t.parentScale,
a = t.parentDistance,
l = t.parentKeepRatio,
s = t.parentFlag,
c = t.pinchFlag,
d = t.inputEvent,
u = t.dragClient,
p = i.prevDist,
v = i.direction,
h = i.width,
f = i.height,
g = i.transform,
m = i.isScale,
y = i.startScale;
if (!m) return !1;
var b = e.props,
x = b.throttleScale,
w = b.parentMoveable,
S = e.props.keepRatio || l,
C = e.state,
E = v[0] || !v[1],
k = 1,
L = 1,
A = h * y[0],
q = f * y[1],
M = E ? q / A : A / q;
if (r) k = r[0], L = r[1];
else if (c) a && (k = (h + a) / h, L = (f + a * f / h) / f);
else {
var _ = Ol({
datas: i,
distX: n,
distY: o
}),
T = v[0] * _[0],
O = v[1] * _[1];
if (S && h && f) {
var N = Br([0, 0], _),
R = Br([0, 0], v),
B = Br([0, 0], [A, q]),
I = Math.sqrt(T * T + O * O),
H = Math.cos(N - R) * I;
v[0] ? v[1] ? (T = Math.cos(B) * H, O = Math.sin(B) * H) : O = bl(T = H, E, M) : T = xl(O = H, E, M)
}
k = (h + T) / h, L = (f + O) / f
}
k = v[0] ? k * y[0] : y[0], L = v[1] ? L * y[1] : y[1], 0 === k && (k = 1e-9 * (p[0] > 0 ? 1 : -1)), 0 === L && (L = 1e-9 * (p[1] > 0 ? 1 : -1));
var D, F = [k / y[0], L / y[1]],
P = v;
if (e.props.groupable) {
P = [(F[0] >= 0 ? 1 : -1) * v[0], (F[1] >= 0 ? 1 : -1) * v[1]];
var U = C.snapDirection;
kr(U) && (U[0] || U[1]) && (C.snapDirection = P)
}
var z = [0, 0];
if (c || (z = function (e, t, i, n, o) {
var r = o.width,
a = o.height;
if (!Gl(e, "scalable")) return [0, 0];
var l = ts(e, Pl(o, t), r, a, i, n, o, o.is3d);
return [l[0] / r, l[1] / a]
}(e, F, v, P, i)), S) {
v[0] && v[1] && z[0] && z[1] && (Math.abs(z[0]) > Math.abs(z[1]) ? z[1] = 0 : z[0] = 0);
var W = !z[0] && !z[1];
if (W && (E ? F[0] = ul(F[0] * y[0], x) / y[0] : F[1] = ul(F[1] * y[1], x) / y[1]), v[0] && !v[1] || z[0] && !z[1] || W && E) {
F[0] += z[0];
var j = bl(h * F[0] * y[0], E, M);
F[1] = j / f / y[1]
} else if (!v[0] && v[1] || !z[0] && z[1] || W && !E) {
F[1] += z[1];
var Y = xl(f * F[1] * y[1], E, M);
F[0] = Y / h / y[0]
}
} else F[0] += z[0], F[1] += z[1], z[0] || (F[0] = ul(F[0] * y[0], x) / y[0]), z[1] || (F[1] = ul(F[1] * y[1], x) / y[1]);
0 === F[0] && (F[0] = 1e-9 * (p[0] > 0 ? 1 : -1)), 0 === F[1] && (F[1] = 1e-9 * (p[1] > 0 ? 1 : -1));
var X = [F[0] / p[0], F[1] / p[1]];
if (D = Fa(F, y), i.prevDist = F, k === p[0] && L === p[1] && !w) return !1;
var G = !s && c ? [0, 0] : function (e, t, i, n) {
var o = e.state,
r = o.is3d,
a = o.left,
l = o.top,
s = o.width,
c = o.height,
d = r ? 4 : 3,
u = e.props.groupable,
p = Pl(e.state, t),
v = u ? a : 0,
h = u ? l : 0;
return Wr(Dl(n || Hl(cl(e.state), i), p, s, c, d, i), [v, h])
}(e, X, v, u),
V = fl(e, t, {
scale: D,
direction: v,
dist: F,
delta: X,
transform: g + " scale(" + k + ", " + L + ")",
isPinch: !!c,
drag: os.drag(e, rs(e.state, G, d))
});
return gl(e, "onScale", V), V
},
dragControlEnd: function (e, t) {
var i = t.datas,
n = t.isDrag;
return !!i.isScale && (i.isScale = !1, gl(e, "onScaleEnd", fl(e, t, {
isDrag: n
})), n)
},
dragGroupControlCondition: _l,
dragGroupControlStart: function (e, t) {
var i = t.datas,
n = this.dragControlStart(e, t);
if (!n) return !1;
var o = n.direction,
r = Il(cl(e.state), o),
a = Ml(e, this, "dragControlStart", i, (function (i, n) {
var a = Il(cl(i.state), o),
l = jr(Vr(-e.rotation / 180 * Math.PI, 3), [a[0] - r[0], a[1] - r[1], 1], 3),
s = l[0],
c = l[1];
return n.originalX = s, n.originalY = c, t
})),
l = Aa({}, n, {
targets: e.props.targets,
events: a
}),
s = gl(e, "onScaleGroupStart", l);
return i.isScale = !1 !== s, !!i.isScale && l
},
dragGroupControl: function (e, t) {
var i = t.datas;
if (i.isScale) {
var n = this.dragControl(e, t);
if (n) {
var o = e.props.keepRatio,
r = n.scale,
a = n.direction,
l = n.dist,
s = Il(cl(e.state), Fa(a, l)),
c = Ml(e, this, "dragControl", i, (function (i, n) {
var a = jr(Vr(e.rotation / 180 * Math.PI, 3), [n.originalX * r[0], n.originalY * r[1], 1], 3),
l = a[0],
c = a[1];
return Aa({}, t, {
parentScale: r,
parentKeepRatio: o,
dragClient: zr(s, [l, c])
})
})),
d = Aa({
targets: e.props.targets,
events: c
}, n);
return gl(e, "onScaleGroup", d), d
}
}
},
dragGroupControlEnd: function (e, t) {
var i = t.isDrag,
n = t.datas;
if (n.isScale) return this.dragControlEnd(e, t), Ml(e, this, "dragControlEnd", n, t), gl(e, "onScaleGroupEnd", fl(e, t, {
targets: e.props.targets,
isDrag: i
})), i
}
};
function ys(e, t) {
return e.map((function (e, i) {
return n = e, o = t[i], (n * (a = 2) + o * (r = 1)) / (r + a);
var n, o, r, a
}))
}
function bs(e, t, i) {
var n = Br(e, t),
o = Br(e, i) - n;
return o >= 0 ? o : o + 2 * Math.PI
}
var xs = {
name: "warpable",
ableGroup: "size",
props: {
warpable: Boolean,
renderDirections: Array
},
render: function (e, t) {
var i = e.props,
n = i.resizable,
o = i.scalable,
r = i.warpable;
if (!n && !o && r) {
var a = e.state,
l = a.pos1,
s = a.pos2,
c = a.pos3,
d = a.pos4,
u = ys(l, s),
p = ys(s, l),
v = ys(l, c),
h = ys(c, l),
f = ys(c, d),
g = ys(d, c),
m = ys(s, d),
y = ys(d, s);
return [t.createElement("div", {
className: Pa("line"),
key: "middeLine1",
style: tl(u, f)
}), t.createElement("div", {
className: Pa("line"),
key: "middeLine2",
style: tl(p, g)
}), t.createElement("div", {
className: Pa("line"),
key: "middeLine3",
style: tl(v, m)
}), t.createElement("div", {
className: Pa("line"),
key: "middeLine4",
style: tl(h, y)
})].concat(hs(e, t))
}
},
dragControlCondition: function (e) {
return Ar(e, Pa("direction"))
},
dragControlStart: function (e, t) {
var i = t.datas,
n = t.inputEvent,
o = e.props.target,
r = ll(n.target);
if (!r || !o) return !1;
var a = e.state,
l = a.transformOrigin,
s = a.is3d,
c = a.targetTransform,
d = a.targetMatrix,
u = a.width,
p = a.height,
v = a.left,
h = a.top;
return i.datas = {}, i.targetTransform = c, i.warpTargetMatrix = s ? d : Hr(d, 3, 4), i.targetInverseMatrix = function (e, t, i) {
void 0 === i && (i = Math.sqrt(e.length));
for (var n = e.slice(), o = 0; o < i; ++o) n[o * i + t - 1] = 0, n[(t - 1) * i + o] = 0;
return n[(t - 1) * (i + 1)] = 1, n
}(Nr(i.warpTargetMatrix, 4), 3, 4), i.direction = r, i.left = v, i.top = h, Tl(e, {
datas: i
}), i.poses = [
[0, 0],
[u, 0],
[0, p],
[u, p]
].map((function (e, t) {
return Wr(e, l)
})), i.nextPoses = i.poses.map((function (e) {
var t = e[0],
n = e[1];
return jr(i.warpTargetMatrix, [t, n, 0, 1], 4)
})), i.startMatrix = Zr(4), i.prevMatrix = Zr(4), i.absolutePoses = cl(a), i.posIndexes = Nl(r), a.snapDirection = r, !1 !== gl(e, "onWarpStart", fl(e, t, {
set: function (e) {
i.startMatrix = e
}
})) && (i.isWarp = !0), i.isWarp
},
dragControl: function (e, t) {
var i = t.datas,
n = t.distX,
o = t.distY,
r = i.targetInverseMatrix,
a = i.prevMatrix,
l = i.isWarp,
s = i.startMatrix,
c = i.poses,
d = i.posIndexes,
u = i.absolutePoses;
if (!l) return !1;
if (Gl(e, "warpable")) {
var p = d.map((function (e) {
return u[e]
}));
p.length > 1 && p.push([(p[0][0] + p[1][0]) / 2, (p[0][1] + p[1][1]) / 2]);
var v = Vl(e, p.map((function (e) {
return e[0] + n
})), p.map((function (e) {
return e[1] + o
}))),
h = v.horizontal,
f = v.vertical;
o -= Ql(h).offset, n -= Ql(f).offset
}
var g = Ol({
datas: i,
distX: n,
distY: o
}, !0),
m = i.nextPoses.slice();
if (d.forEach((function (e) {
m[e] = zr(m[e], g)
})), !Na.every((function (e) {
return t = e.map((function (e) {
return c[e]
})), i = e.map((function (e) {
return m[e]
})), n = bs(t[0], t[1], t[2]), o = bs(i[0], i[1], i[2]), r = Math.PI, !(n >= r && o <= r || n <= r && o >= r);
var t, i, n, o, r
}))) return !1;
var y = $r(c[0], c[1], c[2], c[3], m[0], m[1], m[2], m[3]);
if (!y.length) return !1;
var b = Gr(Fr(r, y, 4)),
x = i.targetTransform + " matrix3d(" + b.join(",") + ")",
w = Pr(Nr(a, 4), b, 4);
return i.prevMatrix = b, gl(e, "onWarp", fl(e, t, {
delta: w,
matrix: Pr(s, b, 4),
multiply: Pr,
dist: b,
transform: x
})), !0
},
dragControlEnd: function (e, t) {
var i = t.datas,
n = t.isDrag;
return !!i.isWarp && (i.isWarp = !1, gl(e, "onWarpEnd", fl(e, t, {
isDrag: n
})), n)
}
},
ws = Pa("area"),
Ss = Pa("area-pieces"),
Cs = Pa("area-piece"),
Es = Pa("avoid");
function ks(e) {
var t = e.areaElement,
i = e.state,
n = i.width,
o = i.height;
! function (e, t) {
if (e.classList) e.classList.remove(t);
else {
var i = new RegExp("(\\s|^)" + t + "(\\s|$)");
e.className = e.className.replace(i, " ")
}
}(t, Es), t.style.cssText += "left: 0px; top: 0px; width: " + n + "px; height: " + o + "px"
}
function Ls(e) {
return e.createElement("div", {
key: "area_pieces",
className: Ss
}, e.createElement("div", {
className: Cs
}), e.createElement("div", {
className: Cs
}), e.createElement("div", {
className: Cs
}), e.createElement("div", {
className: Cs
}))
}
var As = {
name: "dragArea",
props: {
dragArea: Boolean
},
render: function (e, t) {
var i = e.props,
n = i.target,
o = i.dragArea,
r = i.groupable,
a = e.state,
l = a.width,
s = a.height,
c = a.pos1,
d = a.pos2,
u = a.pos3,
p = a.pos4;
if (r) return [t.createElement("div", {
key: "area",
ref: xn(e, "areaElement"),
className: ws
}), Ls(t)];
if (!n || !o) return [];
var v = $r([0, 0], [l, 0], [0, s], [l, s], c, d, u, p),
h = v.length ? "matrix3d(" + Gr(v).join(",") + ")" : "none";
return [t.createElement("div", {
key: "area",
ref: xn(e, "areaElement"),
className: ws,
style: {
top: "0px",
left: "0px",
width: l + "px",
height: s + "px",
transformOrigin: "0 0",
transform: h
}
}), Ls(t)]
},
dragStart: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.inputEvent;
i.isDragArea = !1, i.inputTarget = r.target;
var a, l, s = e.areaElement,
c = e.state,
d = c.clientRect,
u = c.pos1,
p = c.pos2,
v = c.pos3,
h = c.pos4,
f = d.left,
g = d.top,
m = d.width,
y = d.height,
b = $a([u, p, v, h]),
x = b.left,
w = b.top,
S = n - f,
C = o - g,
E = [{
left: x,
top: w,
width: m,
height: C - 10
}, {
left: x,
top: w,
width: S - 10,
height: y
}, {
left: x,
top: w + C + 10,
width: m,
height: y - C - 10
}, {
left: x + S + 10,
top: w,
width: m - S - 10,
height: y
}],
k = [].slice.call(s.nextElementSibling.children);
E.forEach((function (e, t) {
k[t].style.cssText = "left: " + e.left + "px;top: " + e.top + "px; width: " + e.width + "px; height: " + e.height + "px;"
})), l = Es, (a = s).classList ? a.classList.add(l) : a.className += " " + l
},
drag: function (e, t) {
var i = t.datas;
i.isDragArea || (i.isDragArea = !0, ks(e))
},
dragEnd: function (e, t) {
var i = t.inputEvent,
n = t.isDragArea;
t.datas.isDragArea || ks(e);
var o = e.state.target,
r = i.target;
if (!n && !e.isMoveableElement(r)) {
var a = o.contains(r);
gl(e, "onClick", fl(e, t, {
inputTarget: r,
isTarget: o === r,
containsTarget: a
}))
}
},
dragGroupStart: function (e, t) {
this.dragStart(e, t)
},
dragGroup: function (e, t) {
this.drag(e, t)
},
dragGroupEnd: function (e, t) {
var i = t.inputEvent,
n = t.isDragArea,
o = t.datas;
n || ks(e);
var r = o.inputTarget,
a = i.target;
if (!n && !e.isMoveableElement(a) && r !== a) {
var l = e.props.targets,
s = l.indexOf(a),
c = s > -1,
d = !1; - 1 === s && (d = (s = function (e, t, i) {
void 0 === i && (i = -1);
for (var n = e.length, o = 0; o < n; ++o)
if (t(e[o], o, e)) return o;
return i
}(l, (function (e) {
return e.contains(a)
}))) > -1), gl(e, "onClickGroup", fl(e, t, {
targets: l,
inputTarget: a,
targetIndex: s,
isTarget: c,
containsTarget: d
}))
}
}
},
qs = {
name: "origin",
props: {
origin: Boolean
},
render: function (e, t) {
if (!e.props.origin) return null;
var i = e.state,
n = i.beforeOrigin,
o = i.rotation;
return [t.createElement("div", {
className: Pa("control", "origin"),
style: il(o, n),
key: "beforeOrigin"
})]
}
};
function Ms(e) {
var t = e.scrollContainer;
return [t.scrollLeft, t.scrollTop]
}
var _s = {
name: "scrollable",
canPinch: !0,
props: {
scrollable: Boolean,
scrollContainer: Object,
scrollThreshold: Number
},
dragStart: function (e, t) {
var i = e.props.scrollContainer,
n = void 0 === i ? e.getContainer() : i,
o = n.getBoundingClientRect(),
r = t.datas;
r.scrollContainer = n, r.scrollRect = {
left: o.left,
top: o.top,
width: o.width,
height: o.height
}, r.isScroll = !0
},
drag: function (e, t) {
return this.checkScroll(e, t)
},
dragAfter: function (e, t) {
this.checkScrollAfter(e, t)
},
dragEnd: function (e, t) {
t.datas.isScroll = !1
},
dragGroupStart: function (e, t) {
this.dragStart(e, t)
},
dragGroup: function (e, t) {
return this.drag(e, Aa({}, t, {
targets: e.props.targets
}))
},
dragGroupAfter: function (e, t) {
this.checkScrollAfter(e, t)
},
dragGroupEnd: function (e, t) {
this.dragEnd(e, t)
},
checkScroll: function (e, t) {
var i = t.datas,
n = t.clientX,
o = t.clientY,
r = t.isScroll,
a = t.targets;
if (i.direction = null, i.isScroll) {
r || (i.prevClientX = n, i.prevClientY = o);
var l = e.props,
s = l.scrollThreshold,
c = void 0 === s ? 0 : s,
d = l.getScrollPosition,
u = void 0 === d ? Ms : d,
p = i.scrollContainer,
v = i.scrollRect,
h = [0, 0];
if (v.top > o - c ? h[1] = -1 : v.top + v.height < o + c && (h[1] = 1), v.left > n - c ? h[0] = -1 : v.left + v.width < n + c && (h[0] = 1), h[0] || h[1]) {
i.direction = h, i.prevPos = u({
scrollContainer: p,
direction: h
});
var f = fl(e, t, {
scrollContainer: p,
direction: h
}),
g = a ? "onScrollGroup" : "onScroll";
return a && (f.targets = a), gl(e, g, f), !0
}
}
},
checkScrollAfter: function (e, t) {
var i = t.datas,
n = t.inputEvent,
o = i.direction,
r = i.prevPos;
if (i.isScroll && i.direction) {
var a = e.props.getScrollPosition,
l = (void 0 === a ? Ms : a)({
scrollContainer: i.scrollContainer,
direction: o
}),
s = l[0] - r[0],
c = l[1] - r[1];
(s || c) && e.targetDragger.scrollBy(o[0] ? s : 0, o[1] ? c : 0, n, !1)
}
}
},
Ts = [{
name: "",
props: {
target: Object,
container: Object,
dragArea: Boolean,
origin: Boolean,
transformOrigin: Array,
edge: Boolean,
ables: Array,
className: String,
pinchThreshold: Number
}
}, ns, ql, os, ps, gs, ms, xs, _s, As, qs],
Os = {
name: "groupable",
props: {
defaultGroupRotate: Number,
groupable: Boolean
},
render: function (e, t) {
var i = e.props.targets || [];
e.moveables = [];
var n = e.state,
o = {
left: n.left,
top: n.top
};
return i.map((function (i, n) {
return t.createElement(Ll, {
key: n,
ref: wn(e, "moveables", n),
target: i,
origin: !1,
parentMoveable: e,
parentPosition: o
})
})).slice()
}
};
function Ns(e, t) {
return Math.max.apply(Math, e.map((function (e) {
var i = e[0],
n = e[1],
o = e[2],
r = e[3];
return Math.max(i[t], n[t], o[t], r[t])
})))
}
function Rs(e, t) {
return Math.min.apply(Math, e.map((function (e) {
var i = e[0],
n = e[1],
o = e[2],
r = e[3];
return Math.min(i[t], n[t], o[t], r[t])
})))
}
var Bs = function (e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.differ = new Ea, t.moveables = [], t.rotation = 0, t
}
La(t, e);
var i = t.prototype;
return i.updateEvent = function (e) {
var t = this.state,
i = this.props;
t.target || (t.target = this.areaElement, this.controlBox.getElement().style.display = "block", this.targetDragger = Cl(this, t.target, "targetAbles", "Group"), this.controlDragger = Cl(this, this.controlBox.getElement(), "controlAbles", "GroupControl"));
var n = !wl(e.container, i.container);
n && (t.container = i.container);
var o = this.differ.update(i.targets),
r = o.added,
a = o.changed,
l = o.removed;
(n || r.length || a.length || l.length) && this.updateRect()
}, i.checkUpdate = function () {
this.updateAbles()
}, i.updateRect = function (e, t, i) {
var n;
if (void 0 === i && (i = !0), this.controlBox) {
this.moveables.forEach((function (t) {
t.updateRect(e, !1, !1)
}));
var o = this.state,
r = this.props,
a = o.target || r.target;
(!t || "" !== e && r.updateGroup) && (this.rotation = r.defaultGroupRotate);
var l = this.rotation,
s = function (e, t) {
if (!e.length) return [0, 0, 0, 0];
var i = e.map((function (e) {
return cl(e.state)
})),
n = Ba,
o = Ba,
r = 0,
a = 0,
l = ul(t, Ra);
if (l % 90) {
var s = t / 180 * Math.PI,
c = Math.tan(s),
d = -1 / c,
u = [Ia, Ba],
p = [Ia, Ba];
i.forEach((function (e) {
e.forEach((function (e) {
var t = e[1] - c * e[0],
i = e[1] - d * e[0];
u[0] = Math.max(u[0], t), u[1] = Math.min(u[1], t), p[0] = Math.max(p[0], i), p[1] = Math.min(p[1], i)
}))
})), u.forEach((function (e) {
p.forEach((function (t) {
var i = (t - e) / (c - d),
r = c * i + e;
n = Math.min(n, i), o = Math.min(o, r)
}))
}));
var v = i.map((function (e) {
var t = e[0],
i = e[1],
n = e[2],
o = e[3];
return [Yr(t, -s), Yr(i, -s), Yr(n, -s), Yr(o, -s)]
}));
r = Ns(v, 0) - Rs(v, 0), a = Ns(v, 1) - Rs(v, 1)
} else if (n = Rs(i, 0), o = Rs(i, 1), r = Ns(i, 0) - n, a = Ns(i, 1) - o, l % 180) {
var h = r;
r = a, a = h
}
return [n, o, r, a]
}(this.moveables, l),
c = s[0],
d = s[1],
u = s[2],
p = s[3];
a.style.cssText += "left:0px;top:0px;width:" + u + "px; height:" + p + "px;transform:rotate(" + l + "deg)", o.width = u, o.height = p;
var v = rl(a, this.controlBox.getElement(), this.getContainer(), o),
h = [v.left, v.top];
n = cl(v), v.pos1 = n[0], v.pos2 = n[1], v.pos3 = n[2], v.pos4 = n[3], v.origin = zr(h, v.origin), v.beforeOrigin = zr(h, v.beforeOrigin);
var f = v.clientRect;
f.top += d - v.top - o.top, f.left += c - v.left - o.left, this.updateState(Aa({}, v, {
left: c - v.left,
top: d - v.top
}), i)
}
}, i.triggerEvent = function (t, i) {
if (t.indexOf("Group") > -1) return e.prototype.triggerEvent.call(this, t, i)
}, i.updateAbles = function () {
e.prototype.updateAbles.call(this, this.props.ables.concat([Os]), "Group")
}, t.defaultProps = Aa({}, Ll.defaultProps, {
transformOrigin: ["50%", "50%"],
groupable: !0,
dragArea: !0,
keepRatio: !0,
targets: [],
defaultGroupRotate: 0
}), t
}(Ll),
Is = function (e) {
function t() {
return null !== e && e.apply(this, arguments) || this
}
La(t, e);
var i = t.prototype;
return i.render = function () {
var e = this.props.ables || [],
t = this.props.target || this.props.targets,
i = kr(t);
if (i && t.length > 1) {
var n = Aa({}, this.props, {
target: null,
targets: t,
ables: Ts.concat([Os], e)
});
return Nn(Bs, Aa({
key: "group",
ref: xn(this, "moveable")
}, n))
}
var o = i ? t[0] : t;
return Nn(Ll, Aa({
key: "single",
ref: xn(this, "moveable")
}, Aa({}, this.props, {
target: o,
ables: Ts.concat(e)
})))
}, i.isMoveableElement = function (e) {
return this.moveable.isMoveableElement(e)
}, i.dragStart = function (e) {
this.moveable.dragStart(e)
}, i.isInside = function (e, t) {
return this.moveable.isInside(e, t)
}, i.updateRect = function () {
this.moveable.updateRect()
}, i.updateTarget = function () {
this.moveable.updateTarget()
}, i.getRect = function () {
return this.moveable.getRect()
}, i.destroy = function () {
this.moveable.componentWillUnmount()
}, t
}(Mo),
Hs = function (e, t) {
return (Hs = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function (e, t) {
e.__proto__ = t
} || function (e, t) {
for (var i in t) t.hasOwnProperty(i) && (e[i] = t[i])
})(e, t)
};
function Ds(e, t) {
function i() {
this.constructor = e
}
Hs(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, new i)
}
var Fs = function () {
return (Fs = Object.assign || function (e) {
for (var t, i = 1, n = arguments.length; i < n; i++)
for (var o in t = arguments[i]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
return e
}).apply(this, arguments)
};
var Ps = function (e) {
function t(t) {
var i = e.call(this, t) || this;
return i.state = {}, i.state = i.props, i
}
return Ds(t, e), t.prototype.render = function () {
return jo(Nn(Is, Fs({
ref: xn(this, "preactMoveable")
}, this.state)), this.state.parentElement)
}, t
}(Hn),
Us = ["draggable", "resizable", "scalable", "rotatable", "warpable", "pinchable", "snappable", "origin", "target", "edge", "throttleDrag", "throttleResize", "throttleScale", "throttleRotate", "keepRatio", "dragArea", "pinchThreshold", "snapCenter", "snapThreshold", "horizontalGuidelines", "verticalGuidelines", "elementGuidelines", "bounds", "className", "renderDirections", "scrollable", "getScrollPosition", "scrollContainer", "scrollThreshold", "baseDirection", "snapElement", "snapVertical", "snapHorizontal"],
zs = ["dragStart", "drag", "dragEnd", "resizeStart", "resize", "resizeEnd", "scaleStart", "scale", "scaleEnd", "rotateStart", "rotate", "rotateEnd", "warpStart", "warp", "warpEnd", "pinchStart", "pinch", "pinchEnd", "dragGroupStart", "dragGroup", "dragGroupEnd", "resizeGroupStart", "resizeGroup", "resizeGroupEnd", "scaleGroupStart", "scaleGroup", "scaleGroupEnd", "rotateGroupStart", "rotateGroup", "rotateGroupEnd", "pinchGroupStart", "pinchGroup", "pinchGroupEnd", "clickGroup", "scroll", "scrollGroup", "renderStart", "render", "renderEnd", "renderGroupStart", "renderGroup", "renderGroupEnd"],
Ws = function (e) {
function t(t, i) {
void 0 === i && (i = {});
var n = e.call(this) || this;
n.tempElement = document.createElement("div");
var o = Fs({
container: t
}, i),
r = {};
zs.forEach((function (e) {
var t;
r[(t = "on " + e, t.replace(/[\s-_]([a-z])/g, (function (e, t) {
return t.toUpperCase()
})))] = function (t) {
return n.trigger(e, t)
}
})), Qn(Nn(Ps, Fs({
ref: xn(n, "innerMoveable"),
parentElement: t
}, o, r)), n.tempElement);
var a = o.target;
return kr(a) && a.length > 1 && n.updateRect(), n
}
Ds(t, e);
var i, n, o = t.prototype;
return o.isMoveableElement = function (e) {
return this.getMoveable().isMoveableElement(e)
}, o.updateRect = function () {
this.getMoveable().updateRect()
}, o.dragStart = function (e) {
this.getMoveable().dragStart(e)
}, o.isInside = function (e, t) {
return this.getMoveable().isInside(e, t)
}, o.getRect = function () {
return this.getMoveable().getRect()
}, o.setState = function (e, t) {
this.innerMoveable.setState(e, t)
}, o.updateTarget = function () {
this.getMoveable().updateTarget()
}, o.destroy = function () {
Qn("", this.tempElement), this.off(), this.tempElement = null, this.innerMoveable = null
}, o.getMoveable = function () {
return this.innerMoveable.preactMoveable
}, t = function (e, t, i, n) {
var o, r = arguments.length,
a = r < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, i) : n;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(e, t, i, n);
else
for (var l = e.length - 1; l >= 0; l--)(o = e[l]) && (a = (r < 3 ? o(a) : r > 3 ? o(t, i, a) : o(t, i)) || a);
return r > 3 && a && Object.defineProperty(t, i, a), a
}([(i = Us, n = function (e, t) {
Object.defineProperty(e, t, {
get: function () {
return this.getMoveable().props[t]
},
set: function (e) {
var i;
this.setState(((i = {})[t] = e, i))
},
enumerable: !0,
configurable: !0
})
}, function (e) {
var t = e.prototype;
i.forEach((function (e) {
n(t, e)
}))
})], t)
}(yn),
js = new v,
Ys = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r, a = o.builderStuff(),
l = a.querySelector("#divImageTool");
if (!l) {
var s = '\n <div id="divImageTool" class="is-tool" style="background:rgba(0, 0, 0, 0.15);border:transparent 1px solid;">\n <div class="image-embed" style="'.concat(this.builder.opts.imageEmbed ? "" : "display:none;", 'width:40px;height:40px;overflow:hidden;">\n <div style="position:absolute;width:100%;height:100%;"><svg class="is-icon-flex" style="position: absolute;top: 13px;left: 15px;width: 14px;height: 14px;fill:rgb(255,255,255);"><use xlink:href="#ion-image"></use></svg></div>\n <input title="').concat(o.out("Change Image"), '" data-title="').concat(o.out("Change Image"), '" id="fileEmbedImage" type="file" accept="image/*" style="position:absolute;top:-20px;left:0;width:100%;height:60px;opacity: 0;cursor: pointer;"/>\n </div>\n <button title="').concat(o.out("Link"), '" data-title="').concat(o.out("Link"), '" class="image-link" style="width:40px;height:40px;background:none;color:#fff;"><svg class="is-icon-flex" style="fill:rgba(255, 255, 255, 0.95);width:17px;height:17px;"><use xlink:href="#ion-link"></use></svg></button> \n <button title="').concat(o.out("Edit"), '" data-title="').concat(o.out("Edit"), '" class="image-edit" style="width:40px;height:40px;background:none;color:#fff;"><svg class="is-icon-flex" style="fill:rgb(255,255,255);width:14px;height:14px;"><use xlink:href="#ion-android-create"></use></svg></button>\n </div>\n <div id="divImageProgress">\n <div>\n <div class="dot"></div>\n <div class="dot"></div>\n <div class="dot"></div>\n </div>\n </div>\n \n <div class="is-modal imageedit">\n <div style="width:auto;max-width:826px;padding-top:7px;display:flex;flex-direction:column;align-items:center;">\n <div class="imageedit-crop" style="display:flex;height:80px;align-items:center;align-self:flex-start;">\n <button title="5x5" data-crop-size="1" style="width: 60px;height: 60px;">5x5</button>\n <button title="4x3" data-crop-size="1.33333" style="width: 60px;height: 45px;">4x3</button>\n <button title="3x4" data-crop-size="0.75" style="width: 45px;height: 60px;">3x4</button>\n <button title="6x4" data-crop-size="1.5" style="width: 60px;height: 40px;">6x4</button>\n <button title="4x6" data-crop-size="0.6666" style="width: 40px;height: 60px;">4x6</button>\n <button title="').concat(o.out("Free"), '" data-crop-size="" style="width: 60px;height: 45px;">').concat(o.out("Free"), '</button>\n </div>\n <div class="imageedit-preview" style="min-width:200px;">\n </div>\n <div style="margin-top:7px;text-align:right;align-self:flex-end;">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Apply"), '" class="input-ok classic-primary">').concat(o.out("Apply"), '</button>\n </div>\n </div>\n </div>\n \n <div class="is-modal imagelink">\n <div style="max-width:526px;">\n\n <div class="image-src">\n <input class="input-src" type="text" placeholder="').concat(o.out("Source"), '"/>\n <button title="').concat(o.out("Select"), '" class="input-select" style="flex:none;width:50px;height:50px;"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n <div class="image-larger1" style="position:relative;flex:none;width:50px;height:50px;">\n <form class="form-upload-larger" target="frameTargetImageUpload" method="post" action="').concat(this.builder.opts.largerImageHandler, '" enctype="multipart/form-data" style="position:absolute;top:0;left:0;width:100%;height:100%;">\n\t\t\t\t <input id="hidRefId1" name="hidRefId" type="hidden" value="" />\n <svg class="is-icon-flex" style="position: absolute;top: 16px;left: 15px;width: 18px;height: 18px;fill:rgb(53, 53, 53);"><use xlink:href="#ion-image"></use></svg>\n <input title="').concat(o.out("Select"), '" id="fileImage1" name="fileImage" type="file" accept="image/*" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">\n </form>\n\n <iframe id="frameTargetImageUpload" name="frameTargetImageUpload" src="about:blank" style="width:1px;height:1px;position:absolute;top:0;right:-100000px"></iframe>\n </div>\n </div>\n\n <input class="input-title" type="text" placeholder="Title" style="width:100%;border-top: none;"/>\n\n <div class="image-link">\n <input class="input-link" type="text" placeholder="').concat(o.out("Link"), '" style="width:100%;border-top: none;"/>\n <div class="image-larger2" style="position:relative;flex:none;width:50px;height:50px;">\n <form class="form-upload-larger" target="frameTargetImageUpload" method="post" action="').concat(this.builder.opts.largerImageHandler, '" enctype="multipart/form-data" style="position:absolute;top:0;left:0;width:100%;height:100%;">\n\t\t\t\t <input id="hidRefId2" name="hidRefId" type="hidden" value="" />\n <svg class="is-icon-flex" style="position: absolute;top: 16px;left: 15px;width: 18px;height: 18px;fill:rgb(53, 53, 53);"><use xlink:href="#ion-image"></use></svg>\n <input title="').concat(o.out("Select"), '" id="fileImage2" name="fileImage" type="file" accept="image/*" style="position:absolute;top:-30px;left:0;width:100%;height:80px;opacity: 0;cursor: pointer;">\n </form>\n </div>\n </div>\n\n <label style="display:inline-block;margin-top:14px;margin-bottom:10px;">\n <input class="input-newwindow" type="checkbox" /> ').concat(o.out("Open New Window"), '&nbsp;\n </label>\n <div style="text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), '</button>\n </div>\n </div>\n </div>\n\n <div class="is-modal imageselect" style="z-index:10005">\n <div style="max-width:800px;height:80%;padding:0;">\n <iframe style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>\n </div>\n </div>\n\n <div id="divImageResizer" data-x=0 data-y=0 class="is-tool moveable resizable">\n </div>\n ');
js.appendHtml(a, s), l = a.querySelector("#divImageTool"), this.imageTool = l, r = document.querySelector("#divImageResizer"), this.imageResizer = r, this.builder.moveable = new Ws(document.body, {
target: r,
resizable: !0,
throttleResize: 0,
keepRatio: !0
}).on("resize", (function (e) {
var t = e.target,
i = e.width;
n.imageTool.style.display = "", a.querySelector(".is-element-tool").style.display = "";
var o = n.builder.activeImage;
o.style.width = "".concat(i, "px"), o.style.height = "auto", t.style.top = o.getBoundingClientRect().top + window.pageYOffset + "px", t.style.left = o.getBoundingClientRect().left + window.pageXOffset + "px", t.style.width = o.offsetWidth + "px", t.style.height = o.offsetHeight + "px", n.repositionHandler(o.offsetWidth, o.offsetHeight), document.selection ? document.selection.empty() : window.getSelection().removeAllRanges();
var r = a.querySelector(".is-column-tool");
js.removeClass(r, "active")
})).on("resizeEnd", (function (e) {
var t = e.target,
i = n.builder.activeImage,
o = getComputedStyle(i.parentNode),
r = parseFloat(o.paddingLeft) + parseFloat(o.paddingRight),
l = parseFloat(o.borderLeftWidth) + parseFloat(o.borderRightWidth),
s = i.parentNode.offsetWidth - r - l,
c = i.offsetWidth,
d = c / s * 100;
i.style.width = d + "%", n.builder.opts.emailMode && i.setAttribute("width", c), t.setAttribute("data-resized", 1), setTimeout((function () {
t.setAttribute("data-resized", 0)
}), 300), n.builder.opts.onChange();
var u = a.querySelector(".is-column-tool");
js.addClass(u, "active")
})), document.querySelector(".moveable-control-box").style.display = "none", r.addEventListener("click", (function () {
n.repositionImageTool(), n.builder.elmTool.repositionElementTool()
}));
var c = l.querySelector("#fileEmbedImage");
js.addEventListener(c, "change", (function (e) {
n.builder.uo.saveForUndo();
var t = e.target,
i = n.builder.activeImage,
o = a.querySelector("#divImageProgress");
o.style.display = "table", o.style.width = i.offsetWidth + "px", o.style.height = i.offsetHeight + "px", o.style.top = i.getBoundingClientRect().top + window.pageYOffset + "px", o.style.left = i.getBoundingClientRect().left + window.pageXOffset + "px";
try {
i.setAttribute("data-filename", t.files[0].name), n.processImage(t.files[0], i, (function () {
o.style.display = "none", (c = l.querySelector("#fileEmbedImage")).value = "", n.refreshIfIsModule(i), n.builder.opts.onChange(), n.builder.elmTool.refresh()
}))
} catch (e) {
o.style.display = "none"
}
})), this.builder.opts.onImageBrowseClick && (c = l.querySelector(".image-embed"), js.addEventListener(c, "click", (function (e) {
return n.builder.opts.onImageBrowseClick(), e.preventDefault(), !1
})));
var d = a.querySelector(".imagelink");
"" === this.builder.opts.largerImageHandler && (d.querySelector(".image-larger1").style.display = "none", d.querySelector(".image-larger2").style.display = "none"), this.builder.opts.onImageSelectClick || "" !== this.builder.opts.imageselect || (d.querySelector(".input-select").style.display = "none"), c = l.querySelector(".image-link"), js.addEventListener(c, "click", (function () {
if (document.querySelector(".moveable-control-box").style.display = "none", n.builder.opts.onImageSettingClick) return n.builder.opts.onImageSettingClick(), !1;
var e, t = n.builder.activeImage;
"a" === t.parentNode.tagName.toLowerCase() && 1 === t.parentNode.childElementCount && (e = t.parentNode);
var i = t.getAttribute("src"),
r = t.getAttribute("alt"),
a = d.querySelector(".input-src"); - 1 === i.indexOf("base64") ? a.value = i : a.value = "[Image Data]";
var l = d.querySelector(".input-title");
l.value = r;
var s = d.querySelector(".input-link");
s.value = "";
var c = d.querySelector(".input-newwindow");
if (c.checked = !1, e) {
if (s.value = e.getAttribute("href"), "" === r) {
var u = e.getAttribute("title");
u && (l.value = u)
}
var p = e.getAttribute("target");
c.checked = "_blank" === p
}
o.showModal(d, !0, null, !0), a.focus()
})), c = d.querySelector(".input-cancel"), js.addEventListener(c, "click", (function () {
o.hideModal(d), document.querySelector(".moveable-control-box").style.display = "block"
})), c = d.querySelector(".input-ok"), js.addEventListener(c, "click", (function () {
n.builder.uo.saveForUndo();
var e, t = n.builder.activeImage;
"a" === t.parentNode.tagName.toLowerCase() && 1 === t.parentNode.childElementCount && (e = t.parentNode);
var i = d.querySelector(".input-src").value,
r = d.querySelector(".input-title").value,
a = d.querySelector(".input-link").value; - 1 === i.indexOf("[Image Data]") && t.setAttribute("src", i), t.setAttribute("alt", r), "" != a ? e ? (e.setAttribute("href", a), e.setAttribute("title", r), d.querySelector(".input-newwindow").checked ? e.setAttribute("target", "_blank") : e.removeAttribute("target"), -1 != a.toLowerCase().indexOf(".jpg") || -1 != a.toLowerCase().indexOf(".jpeg") || -1 != a.toLowerCase().indexOf(".png") || -1 != a.toLowerCase().indexOf(".gif") ? js.addClass(e, "is-lightbox") : js.removeClass(e, "is-lightbox")) : ((e = js.createElement("a")).setAttribute("href", a), e.setAttribute("title", r), e.innerHTML = t.outerHTML, d.querySelector(".input-newwindow").checked ? e.setAttribute("target", "_blank") : e.removeAttribute("target"), -1 != a.toLowerCase().indexOf(".jpg") || -1 != a.toLowerCase().indexOf(".jpeg") || -1 != a.toLowerCase().indexOf(".png") || -1 != a.toLowerCase().indexOf(".gif") ? js.addClass(e, "is-lightbox") : js.removeClass(e, "is-lightbox"), t.outerHTML = e.outerHTML) : e && (e.outerHTML = e.innerHTML), n.refreshIfIsModule(t), n.builder.opts.onChange(), n.builder.opts.onRender(), o.hideModal(d), n.builder.elmTool.refresh()
}));
var u = d.querySelector(".image-src");
this.builder.opts.onImageSelectClick || this.builder.opts.imageselect ? (c = d.querySelector(".input-select")) && js.addEventListener(c, "click", (function () {
if (n.builder.opts.onImageSelectClick) n.builder.opts.onImageSelectClick({
targetInput: d.querySelector(".input-src"),
theTrigger: c
});
else {
var e = a.querySelector(".is-modal.imageselect"),
t = e.querySelector("iframe");
"about:blank" === t.src && (t.src = n.builder.opts.imageselect), o.showModal(e)
}
})) : js.removeClass(u, "image-select");
var v = d.querySelector("#fileImage1");
js.addEventListener(v, "change", (function () {
for (var e = v;
"form" !== e.nodeName.toLowerCase();) e = e.parentNode;
var t = e;
js.addClass(t, "please-wait"), d.querySelector("#hidRefId1").value = n.builder.opts.customval, t.submit()
}));
var h = d.querySelector("#fileImage2");
js.addEventListener(h, "change", (function () {
for (var e = h;
"form" !== e.nodeName.toLowerCase();) e = e.parentNode;
var t = e;
js.addClass(t, "please-wait"), d.querySelector("#hidRefId2").value = n.builder.opts.customval, t.submit()
}));
var f = a.querySelector(".imageedit");
c = l.querySelector(".image-edit"), js.addEventListener(c, "click", (function () {
var e = n.builder.activeImage;
o.showModal(f, !0);
var t = f.querySelector(".imageedit-preview");
e.offsetWidth < 800 && e.offsetHeight < 550 ? t.style.width = e.offsetWidth + "px" : 800 * e.offsetHeight / e.offsetWidth <= 550 ? t.style.width = "800px" : t.style.height = "550px";
t.innerHTML = '<img src="" style="max-width:100%"/>';
var i = f.querySelector("img");
i.src = e.src, n.cropper = new gn(i, {
zoomable: !1
}), document.querySelector(".moveable-control-box").style.display = "none"
}));
var g = f.querySelector(".imageedit-crop").querySelectorAll("button");
Array.prototype.forEach.call(g, (function (e) {
js.addEventListener(e, "click", (function () {
var t = 1 * e.getAttribute("data-crop-size");
n.cropper.setAspectRatio(t)
}))
}));
var m = f.querySelector(".input-cancel");
js.addEventListener(m, "click", (function () {
o.hideModal(f), document.querySelector(".moveable-control-box").style.display = "block"
})), c = f.querySelector(".input-ok"), js.addEventListener(c, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeImage,
t = e.getAttribute("data-filename"),
i = "jpg";
if (t) i = t.substr(t.lastIndexOf(".") + 1).toLowerCase();
else {
var r = e.src;
r.indexOf("/") > -1 ? e.setAttribute("data-filename", r.substr(r.lastIndexOf("/") + 1)) : e.setAttribute("data-filename", r), i = r.substr(r.lastIndexOf(".") + 1).toLowerCase()
}
e.src = "jpg" === i ? n.cropper.getCroppedCanvas().toDataURL("image/jpeg") : n.cropper.getCroppedCanvas().toDataURL(), n.refreshIfIsModule(e), n.builder.opts.onChange(), o.hideModal(f), n.builder.elmTool.refresh()
}))
}
}
return n(e, [{
key: "refreshIfIsModule",
value: function (e) {
var t = this;
if (js.parentsHasAttribute(e, "data-html")) {
if (this.imageTool.style.display = "", e.hasAttribute("data-sync")) {
var i = e.getAttribute("data-src"),
n = e.getAttribute("data-filename");
if (i) {
for (var o = e; !o.getAttribute("data-html");) o = o.parentNode;
var r = o.querySelectorAll("img");
Array.prototype.forEach.call(r, (function (t) {
t.src === i && (t.src = e.src, t.removeAttribute("data-src"), t.setAttribute("data-filename", n))
})), e.removeAttribute("data-src")
}
}
setTimeout((function () {
t.util.refreshModule(), t.imageTool.style.display = ""
}), 1e3)
} else this.refresh()
}
}, {
key: "refresh",
value: function () {
var e = this;
if (this.builder.activeImage) {
var t = this.imageTool;
t.style.display = "", setTimeout((function () {
var i = e.builder.activeImage;
t.style.display = "flex";
var n = t.offsetWidth,
o = i.offsetWidth,
r = i.getBoundingClientRect().top + window.pageYOffset,
a = i.getBoundingClientRect().left;
n + (a += o / 2 - n / 2) > window.innerWidth && (a = i.getBoundingClientRect().left), t.style.top = r + "px", t.style.left = a + "px";
var l = e.imageResizer;
l.style.top = i.getBoundingClientRect().top + window.pageYOffset + "px", l.style.left = i.getBoundingClientRect().left + window.pageXOffset + "px", l.style.width = i.offsetWidth + "px", l.style.height = i.offsetHeight + "px", l.style.display = "block", e.repositionHandler(i.offsetWidth, i.offsetHeight), e.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "block", 0 === i.offsetWidth && (t.style.display = "", e.builder.activeImage = null, l.style.display = "none", l.style.top = "-10px", l.style.left = "-10px", l.style.width = "1px", l.style.height = "1px", e.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none")
}), 300)
}
}
}, {
key: "repositionImageTool",
value: function () {
if (this.builder.activeImage) {
var e = this.imageTool,
t = this.builder.activeImage;
e.style.display = "flex";
var i = e.offsetWidth,
n = t.offsetWidth,
o = t.getBoundingClientRect().top + window.pageYOffset,
r = t.getBoundingClientRect().left;
i + (r += n / 2 - i / 2) > window.innerWidth && (r = t.getBoundingClientRect().left), e.style.top = o + "px", e.style.left = r + "px";
var a = this.imageResizer;
a.style.top = t.getBoundingClientRect().top + window.pageYOffset + "px", a.style.left = t.getBoundingClientRect().left + window.pageXOffset + "px", a.style.width = t.offsetWidth + "px", a.style.height = t.offsetHeight + "px", a.style.display = "block", this.repositionHandler(t.offsetWidth, t.offsetHeight), this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "block"
}
}
}, {
key: "click",
value: function (e) {
var t = e.target;
if ("img" === t.tagName.toLowerCase()) {
var i = !1;
if (t.hasAttribute("data-fixed") && (i = !0), i) {
this.imageTool.style.display = "", this.builder.activeImage = null;
var n = this.imageResizer;
n.style.display = "none", n.style.top = "-10px", n.style.left = "-10px", n.style.width = "1px", n.style.height = "1px", this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
} else {
this.builder.activeImage = t;
var o = this.imageTool;
o.style.display = "flex";
var r = o.offsetWidth,
a = t.offsetWidth,
l = t.getBoundingClientRect().top + window.pageYOffset,
s = t.getBoundingClientRect().left;
if (r + (s += a / 2 - r / 2) > window.innerWidth && (s = t.getBoundingClientRect().left), o.style.top = l + "px", o.style.left = s + "px", t.hasAttribute("data-noresize")) {
var c = this.imageResizer;
c.style.display = "none", c.style.top = "-10px", c.style.left = "-10px", c.style.width = "1px", c.style.height = "1px", this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
} else {
var d = this.imageResizer;
d.style.top = t.getBoundingClientRect().top + window.pageYOffset + "px", d.style.left = t.getBoundingClientRect().left + window.pageXOffset + "px", d.style.width = t.offsetWidth + "px", d.style.height = t.offsetHeight + "px", d.style.display = "block", this.repositionHandler(t.offsetWidth, t.offsetHeight);
var u, p = t.style.width; - 1 != p.indexOf("%") ? (p = 1 * p.replace("%", ""), u = 100 * t.offsetWidth / p) : u = t.offsetWidth, d.setAttribute("data-width", Math.round(u)), this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "block"
}
var v = !1;
if (e.screenX && 0 != e.screenX && e.screenY && 0 != e.screenY || (v = !0), v) {
o.style.display = "";
var h = this.imageResizer;
h.style.display = "none", h.style.top = "-10px", h.style.left = "-10px", h.style.width = "1px", h.style.height = "1px", this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
}
}
} else {
this.imageTool.style.display = "", this.builder.activeImage = null;
var f = this.imageResizer;
f.style.display = "none", f.style.top = "-10px", f.style.left = "-10px", f.style.width = "1px", f.style.height = "1px", this.builder.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
}
}
}, {
key: "repositionHandler",
value: function (e, t) {
var i = document.querySelector("#divImageResizer");
i.style.width = e + "px", i.style.height = t + "px"
}
}, {
key: "processImage",
value: function (e, t, i) {
var n, o, r, a = this;
if (!e) return i(), !1;
if (!document.getElementById("myTmpCanvasNoCrop")) {
var l = document.createElement("canvas");
l.id = "myTmpCanvasNoCrop", l.style.display = "none", document.querySelector("body").appendChild(l)
}
var file = e;
var ext;
"jpg" == (n = e.name ? ext = e.name.substr(e.name.lastIndexOf(".") + 1).toLowerCase() : ext = e.substr(e.lastIndexOf(".") + 1).toLowerCase()) || "jpeg" == n ? (o = "image/" + ext/*o = "image/jpeg"*/, r = this.builder.opts.imageQuality) : (o = "image/" + ext/*o = "image/png"*/, r = 1), Zs(e, (function (n, l) {
var s, c, d;
if (l.exif && (s = l.exif.get("Orientation")), 4 < s && s < 9 ? (c = n.height, d = n.width) : (c = n.width, d = n.height), c < 200 && d < 200) {
var u = new FileReader;
return u.addEventListener("load", (function (e) {
if (!document.getElementById("__preview")) {
var n = document.createElement("img");
n.id = "__preview", n.style.display = "none";
var o = a.util.builderStuff();
js.appendChild(o, n)
}
var r = document.querySelector("#__preview");
r.onload = function () {
var e = document.getElementById("myTmpCanvasNoCrop"),
n = e.getContext("2d");
e.height = r.height, e.width = r.width, n.drawImage(r, 0, 0);
var o = e.toDataURL("image/png");
t.src = o, r.onload = null, e.parentNode.removeChild(e), i()
}, r.src = e.target.result
})), void u.readAsDataURL(e)
}
var p = 2 * t.clientWidth;
p > 1200 && (p = 1200);
var v = (p = 1200) * d / c,
h = !1;
d <= v && c > p ? (d <= (v = d * p / c) && (p = d * p / (v = d)), h = !0) : c <= p && d > v ? (c <= (p = c * v / d) && (v = c * v / (p = c)), h = !0) : c <= p && d <= v ? (p = c, v = d) : (v = d * p / c, h = !0), "image/png" == o && (h = !1);
var f = new Vs(n),
g = document.getElementById("myTmpCanvasNoCrop");
f.render(g, {
width: c,
height: d,
orientation: s
}, (function () {
if (h) {
var e = c,
n = d;
t.onload = function () {
a.count++, n /= 2, ((e /= 2) < p || n < v) && (e = p, n = v), new Vs(t).render(g, {
width: e,
height: n
}, (function () {
if (e <= p || n <= v) {
if (t.src = g.toDataURL(o, r), 3 === a.count) {
t.onload = null;
try {
g.parentNode.removeChild(g)
} catch (e) {}
i()
}
try {
g.parentNode.removeChild(g)
} catch (e) {}
return i(), !1
}
if (t.src = g.toDataURL(o, r), 3 === a.count) {
t.onload = null;
try {
g.parentNode.removeChild(g)
} catch (e) {}
i()
}
}))
}, t.src = g.toDataURL(o, r), a.count = 0
} else t.src = g.toDataURL(o, r), g.parentNode.removeChild(g), i()
if (o == "image/gif")
{
var reader = new FileReader();
reader.onloadend = function () {
t.src = reader.result;
}
reader.readAsDataURL(file);
}
}))
}), {
canvas: !1,
meta: !0
})
}
}]), e
}();
function Xs(e, t, i, n) {
var o = e.naturalWidth,
r = e.naturalHeight;
if (o + r) {
var a = i.width,
l = i.height,
s = t.getContext("2d");
s.save(),
function (e, t, i, n, o) {
switch (o) {
case 5:
case 6:
case 7:
case 8:
e.width = n, e.height = i;
break;
default:
e.width = i, e.height = n
}
switch (o) {
case 2:
t.translate(i, 0), t.scale(-1, 1);
break;
case 3:
t.translate(i, n), t.rotate(Math.PI);
break;
case 4:
t.translate(0, n), t.scale(1, -1);
break;
case 5:
t.rotate(.5 * Math.PI), t.scale(1, -1);
break;
case 6:
t.rotate(.5 * Math.PI), t.translate(0, -n);
break;
case 7:
t.rotate(.5 * Math.PI), t.translate(i, -n), t.scale(-1, 1);
break;
case 8:
t.rotate(-.5 * Math.PI), t.translate(-i, 0)
}
}(t, s, a, l, i.orientation),
/*! Mega pixel image rendering library for iOS6 Safari | Copyright (c) 2012 Shinichi Tomita <shinichi.tomita@gmail.com> | MIT license | https://github.com/stomita/ios-imagefile-megapixel */
function (e) {
var t = e.naturalWidth;
if (t * e.naturalHeight > 1048576) {
var i = document.createElement("canvas");
i.width = i.height = 1;
var n = i.getContext("2d");
return n.drawImage(e, 1 - t, 0), 0 === n.getImageData(0, 0, 1, 1).data[3]
}
return !1
}(e) && (o /= 2, r /= 2);
var c = 1024,
d = document.createElement("canvas");
d.width = d.height = c;
for (var u = d.getContext("2d"), p = n ? function (e, t, i) {
var n = document.createElement("canvas");
n.width = 1, n.height = i;
var o = n.getContext("2d");
o.drawImage(e, 0, 0);
for (var r = o.getImageData(0, 0, 1, i).data, a = 0, l = i, s = i; s > a;) {
0 === r[4 * (s - 1) + 3] ? l = s : a = s, s = l + a >> 1
}
var c = s / i;
return 0 === c ? 1 : c
}(e, 0, r) : 1, v = Math.ceil(c * a / o), h = Math.ceil(c * l / r / p), f = 0, g = 0; f < r;) {
for (var m = 0, y = 0; m < o;) u.clearRect(0, 0, c, c), u.drawImage(e, -m, -f), s.drawImage(d, 0, 0, c, c, y, g, v, h), m += c, y += v;
f += c, g += h
}
s.restore(), d = u = null
}
}
var Gs = window.URL && window.URL.createObjectURL ? window.URL : window.webkitURL && window.webkitURL.createObjectURL ? window.webkitURL : null;
function Vs(e) {
if (window.Blob && e instanceof Blob) {
if (!Gs) throw Error("No createObjectURL function found to create blob url");
var t = new Ys;
t.src = Gs.createObjectURL(e), this.blob = e, e = t
}
if (!e.naturalWidth && !e.naturalHeight) {
var i = this;
e.onload = e.onerror = function () {
var e = i.imageLoadListeners;
if (e) {
i.imageLoadListeners = null;
for (var t = 0, n = e.length; t < n; t++) e[t]()
}
}, this.imageLoadListeners = []
}
this.srcImage = e
}
function Zs(e, t, i) {
var n, o = document.createElement("img");
return o.onerror = function (n) {
return Zs.onerror(o, n, e, t, i)
}, o.onload = function (n) {
return Zs.onload(o, n, e, t, i)
}, "string" == typeof e ? (Zs.fetchBlob(e, (function (t) {
t ? (e = t, n = Zs.createObjectURL(e)) : (n = e, i && i.crossOrigin && (o.crossOrigin = i.crossOrigin)), o.src = n
}), i), o) : Zs.isInstanceOf("Blob", e) || Zs.isInstanceOf("File", e) ? (n = o._objectURL = Zs.createObjectURL(e)) ? (o.src = n, o) : Zs.readFile(e, (function (e) {
var i = e.target;
i && i.result ? o.src = i.result : t && t(e)
})) : void 0
}
Vs.prototype.render = function (e, t, i) {
if (this.imageLoadListeners) {
var n = this;
this.imageLoadListeners.push((function () {
n.render(e, t, i)
}))
} else {
t = t || {};
var o = this.srcImage.naturalWidth,
r = this.srcImage.naturalHeight,
a = t.width,
l = t.height,
s = t.maxWidth,
c = t.maxHeight,
d = !this.blob || "image/jpeg" === this.blob.type;
a && !l ? l = r * a / o << 0 : l && !a ? a = o * l / r << 0 : (a = o, l = r), s && a > s && (l = r * (a = s) / o << 0), c && l > c && (a = o * (l = c) / r << 0);
var u = {
width: a,
height: l
};
for (var p in t) u[p] = t[p];
var v = e.tagName.toLowerCase();
"img" === v ? e.src = function (e, t, i) {
var n = document.createElement("canvas");
return Xs(e, n, t, i), n.toDataURL("image/jpeg", t.quality || .8)
}(this.srcImage, u, d) : "canvas" === v && Xs(this.srcImage, e, u, d), "function" == typeof this.onrender && this.onrender(e), i && i(), this.blob && (this.blob = null, Gs.revokeObjectURL(this.srcImage.src))
}
};
var Ks = Gs.revokeObjectURL && Gs;
function Js(e, t) {
!e._objectURL || t && t.noRevoke || (Zs.revokeObjectURL(e._objectURL), delete e._objectURL)
}
Zs.fetchBlob = function (e, t) {
t()
}, Zs.isInstanceOf = function (e, t) {
return Object.prototype.toString.call(t) === "[object " + e + "]"
}, Zs.transform = function (e, t, i, n, o) {
i(e, o)
}, Zs.onerror = function (e, t, i, n, o) {
Js(e, o), n && n.call(e, t)
}, Zs.onload = function (e, t, i, n, o) {
Js(e, o), n && Zs.transform(e, o, n, i, {
originalWidth: e.naturalWidth || e.width,
originalHeight: e.naturalHeight || e.height
})
}, Zs.createObjectURL = function (e) {
return !!Ks && Ks.createObjectURL(e)
}, Zs.revokeObjectURL = function (e) {
return !!Ks && Ks.revokeObjectURL(e)
}, Zs.readFile = function (e, t, i) {
if (FileReader) {
var n = new FileReader;
if (n.onload = n.onerror = t, n[i = i || "readAsDataURL"]) return n[i](e), n
}
return !1
};
var $s = "undefined" != typeof Blob && (Blob.prototype.slice || Blob.prototype.webkitSlice || Blob.prototype.mozSlice);
Zs.blobSlice = $s && function () {
var e = this.slice || this.webkitSlice || this.mozSlice;
return e.apply(this, arguments)
}, Zs.metaDataParsers = {
jpeg: {
65505: [],
65517: []
}
}, Zs.parseMetaData = function (e, t, i, n) {
n = n || {};
var o = this,
r = (i = i || {}).maxMetaDataSize || 262144;
!!("undefined" != typeof DataView && e && e.size >= 12 && "image/jpeg" === e.type && Zs.blobSlice) && Zs.readFile(Zs.blobSlice.call(e, 0, r), (function (e) {
if (e.target.error) return console.log(e.target.error), void t(n);
var r, a, l, s, c = e.target.result,
d = new DataView(c),
u = 2,
p = d.byteLength - 4,
v = u;
if (65496 === d.getUint16(0)) {
for (; u < p && ((r = d.getUint16(u)) >= 65504 && r <= 65519 || 65534 === r);) {
if (u + (a = d.getUint16(u + 2) + 2) > d.byteLength) {
console.log("Invalid meta data: Invalid segment size.");
break
}
if (l = Zs.metaDataParsers.jpeg[r])
for (s = 0; s < l.length; s += 1) l[s].call(o, d, u, a, n, i);
v = u += a
}!i.disableImageHead && v > 6 && (c.slice ? n.imageHead = c.slice(0, v) : n.imageHead = new Uint8Array(c).subarray(0, v))
} else console.log("Invalid JPEG file: Missing JPEG marker.");
t(n)
}), "readAsArrayBuffer") || t(n)
}, Zs.hasMetaOption = function (e) {
return e && e.meta
};
var Qs = Zs.transform;
Zs.transform = function (e, t, i, n, o) {
Zs.hasMetaOption(t) ? Zs.parseMetaData(n, (function (o) {
Qs.call(Zs, e, t, i, n, o)
}), t, o) : Qs.apply(Zs, arguments)
}, Zs.ExifMap = function () {
return this
}, Zs.ExifMap.prototype.map = {
Orientation: 274
}, Zs.ExifMap.prototype.get = function (e) {
return this[e] || this[this.map[e]]
}, Zs.getExifThumbnail = function (e, t, i) {
if (i && !(t + i > e.byteLength)) return Zs.createObjectURL(new Blob([e.buffer.slice(t, t + i)]));
console.log("Invalid Exif data: Invalid thumbnail data.")
}, Zs.exifTagTypes = {
1: {
getValue: function (e, t) {
return e.getUint8(t)
},
size: 1
},
2: {
getValue: function (e, t) {
return String.fromCharCode(e.getUint8(t))
},
size: 1,
ascii: !0
},
3: {
getValue: function (e, t, i) {
return e.getUint16(t, i)
},
size: 2
},
4: {
getValue: function (e, t, i) {
return e.getUint32(t, i)
},
size: 4
},
5: {
getValue: function (e, t, i) {
return e.getUint32(t, i) / e.getUint32(t + 4, i)
},
size: 8
},
9: {
getValue: function (e, t, i) {
return e.getInt32(t, i)
},
size: 4
},
10: {
getValue: function (e, t, i) {
return e.getInt32(t, i) / e.getInt32(t + 4, i)
},
size: 8
}
}, Zs.exifTagTypes[7] = Zs.exifTagTypes[1], Zs.getExifValue = function (e, t, i, n, o, r) {
var a, l, s, c, d, u, p = Zs.exifTagTypes[n];
if (p) {
if (!((l = (a = p.size * o) > 4 ? t + e.getUint32(i + 8, r) : i + 8) + a > e.byteLength)) {
if (1 === o) return p.getValue(e, l, r);
for (s = [], c = 0; c < o; c += 1) s[c] = p.getValue(e, l + c * p.size, r);
if (p.ascii) {
for (d = "", c = 0; c < s.length && "\0" !== (u = s[c]); c += 1) d += u;
return d
}
return s
}
console.log("Invalid Exif data: Invalid data offset.")
} else console.log("Invalid Exif data: Invalid tag type.")
}, Zs.parseExifTag = function (e, t, i, n, o) {
var r = e.getUint16(i, n);
o.exif[r] = Zs.getExifValue(e, t, i, e.getUint16(i + 2, n), e.getUint32(i + 4, n), n)
}, Zs.parseExifTags = function (e, t, i, n, o) {
var r, a, l;
if (i + 6 > e.byteLength) console.log("Invalid Exif data: Invalid directory offset.");
else {
if (!((a = i + 2 + 12 * (r = e.getUint16(i, n))) + 4 > e.byteLength)) {
for (l = 0; l < r; l += 1) this.parseExifTag(e, t, i + 2 + 12 * l, n, o);
return e.getUint32(a, n)
}
console.log("Invalid Exif data: Invalid directory size.")
}
}, Zs.parseExifData = function (e, t, i, n, o) {
if (!o.disableExif) {
var r, a, l, s = t + 10;
if (1165519206 === e.getUint32(t + 4))
if (s + 8 > e.byteLength) console.log("Invalid Exif data: Invalid segment size.");
else if (0 === e.getUint16(t + 8)) {
switch (e.getUint16(s)) {
case 18761:
r = !0;
break;
case 19789:
r = !1;
break;
default:
return void console.log("Invalid Exif data: Invalid byte alignment marker.")
}
42 === e.getUint16(s + 2, r) ? (a = e.getUint32(s + 4, r), n.exif = new Zs.ExifMap, (a = Zs.parseExifTags(e, s, s + a, r, n)) && !o.disableExifThumbnail && (l = {
exif: {}
}, a = Zs.parseExifTags(e, s, s + a, r, l), l.exif[513] && (n.exif.Thumbnail = Zs.getExifThumbnail(e, s + l.exif[513], l.exif[514]))), n.exif[34665] && !o.disableExifSub && Zs.parseExifTags(e, s, s + n.exif[34665], r, n), n.exif[34853] && !o.disableExifGps && Zs.parseExifTags(e, s, s + n.exif[34853], r, n)) : console.log("Invalid Exif data: Missing TIFF marker.")
} else console.log("Invalid Exif data: Missing byte alignment offset.")
}
}, Zs.metaDataParsers.jpeg[65505].push(Zs.parseExifData);
var ec = new v,
tc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i),
r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector("#divLinkTool");
if (!a) {
var l = '<div id="divLinkTool" class="is-tool">\n <button title="'.concat(o.out("Link"), '" data-title="').concat(o.out("Link"), '" class="link-edit"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>\n <button title="').concat(o.out("Duplicate"), '" data-title="').concat(o.out("Duplicate"), '" class="link-duplicate"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></button>\n <button title="').concat(o.out("Delete"), '" data-title="').concat(o.out("Delete"), '" class="link-remove"><svg class="is-icon-flex" style="width:22px;height:22px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n <div class="is-modal createlink">\n <div style="max-width:526px;"> \n <div class="link-src">\n <input class="input-url" type="text" placeholder="Url"/>\n <button title="').concat(o.out("Select"), '" class="input-select"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n </div>\n <label style="display:inline-block;margin-top:14px;margin-bottom:10px;float:left;">\n <input class="input-newwindow" type="checkbox" /> ').concat(o.out("Open New Window"), '&nbsp;\n </label>\n <input class="input-text" type="text" placeholder="').concat(o.out("Text"), '" style="width:100%;"/>\n <input class="input-title" type="text" placeholder="').concat(o.out("Title"), '" style="width:100%;border-top: none;margin-bottom:12px;"/>\n <div style="text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), '</button>\n </div>\n </div>\n </div>\n \n <div class="is-modal fileselect">\n <div style="max-width:800px;height:80%;padding:0;">\n <iframe style="width:100%;height:100%;border: none;display: block;" src="about:blank"></iframe>\n </div>\n </div>\n ');
ec.appendHtml(r, l);
var s = (a = r.querySelector("#divLinkTool")).querySelector(".link-edit");
ec.addEventListener(s, "click", (function () {
n.editLink()
}));
var c = a.querySelector(".link-duplicate");
ec.addEventListener(c, "click", (function () {
if (n.builder.activeLink) {
n.builder.uo.saveForUndo();
var e = n.builder.activeLink.cloneNode(!0),
t = e.querySelector(".icon-active");
t && ec.removeClass(t, "icon-active"), n.builder.activeLink.parentNode.insertBefore(e, n.builder.activeLink), n.showTool(n.builder.activeLink)
}
}));
var d = a.querySelector(".link-remove");
ec.addEventListener(d, "click", (function () {
n.builder.uo.saveForUndo(), n.builder.activeLink && n.builder.activeLink.parentNode.removeChild(n.builder.activeLink), a.style.display = "", n.builder.activeLink.querySelector(".icon-active") && (n.builder.activeIcon = null)
}));
var u = this.builderStuff.querySelector(".is-modal.createlink"),
v = u.querySelector(".input-ok");
ec.addEventListener(v, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeLink;
if (e) {
var t = u.querySelector(".input-url").value,
i = u.querySelector(".input-title").value,
r = u.querySelector(".input-text").value;
if ("" == r && (r = t), "" != t) e.setAttribute("href", t), u.querySelector(".input-newwindow").checked ? e.setAttribute("target", "_blank") : e.removeAttribute("target"), n.builder.activeIcon || (e.innerHTML = r), e.setAttribute("title", i);
else {
var a = e;
ec.selectElementContents(a), document.execCommand("unlink", !1, null)
}
n.builder.opts.onChange()
} else {
o.restoreSelection();
var l, s = u.querySelector(".input-url").value,
c = u.querySelector(".input-title").value,
d = u.querySelector(".input-text").value;
if ("" == d && (d = s), "" != s)
if (n.builder.uo.saveForUndo(), n.builder.activeIcon) {
var p = n.builder.activeIcon.outerHTML;
n.builder.activeIcon.outerHTML = '<a class="__dummy" href="'.concat(s, '">').concat(p, "</a>"), l = document.querySelector(".__dummy"), ec.removeClass(l, "__dummy"), u.querySelector(".input-newwindow").checked ? l.setAttribute("target", "_blank") : l.removeAttribute("target"), l.setAttribute("title", c), n.builder.activeIcon = l.childNodes[0], o.appleMobile || ec.selectElementContents(n.builder.activeIcon)
} else {
if (n.builder.isIE) return void o.hideModal(u);
document.execCommand("createLink", !1, "http://dummy");
var v = document.querySelector('a[href="http://dummy"]');
v.setAttribute("href", s), v.innerHTML = d, u.querySelector(".input-newwindow").checked ? v.setAttribute("target", "_blank") : v.removeAttribute("target"), v.setAttribute("title", c), o.appleMobile || ec.selectElementContents(v)
} o.saveSelection(), n.builder.opts.onChange(), n.builder.opts.onRender()
}
o.hideModal(u)
}));
var h = u.querySelector(".input-cancel");
ec.addEventListener(h, "click", (function () {
o.hideModal(u), o.appleMobile || o.restoreSelection()
}))
}
this.linkTool = a
}
return n(e, [{
key: "click",
value: function (e, t) {
var i = !1;
e.hasAttribute("data-html") && (i = !0);
var n = t.target;
if (this.builder.activeLink = null, "a" !== n.tagName.toLowerCase() && !ec.parentsHasTag(n, "a") || i) this.hideTool();
else {
if (n.childNodes.length > 0 && n.childNodes[0].tagName && "i" === n.childNodes[0].tagName.toLowerCase() && 1 === n.childNodes.length && "" === n.childNodes[0].innerHTML) {
var o = document.querySelectorAll(".icon-active");
Array.prototype.forEach.call(o, (function (e) {
ec.removeClass(e, "icon-active")
})), ec.addClass(n.childNodes[0], "icon-active"), ec.selectElementContents(n.childNodes[0]), this.builder.activeIcon = n.childNodes[0]
}
if ("img" === n.tagName.toLowerCase()) return;
var r;
if ("a" === n.tagName.toLowerCase()) r = n;
else {
for (var a = n;
"a" !== a.tagName.toLowerCase();) a = a.parentNode;
r = a
}
this.builder.activeLink = r, this.showTool(r), t.preventDefault()
}
}
}, {
key: "showTool",
value: function (e) {
var t = this.linkTool;
"inline-block" === ec.getStyle(e, "display") ? (t.querySelector(".link-duplicate").style.display = "block", t.querySelector(".link-remove").style.display = "block") : this.builder.activeIcon ? (t.querySelector(".link-duplicate").style.display = "block", t.querySelector(".link-remove").style.display = "block") : (t.querySelector(".link-duplicate").style.display = "none", t.querySelector(".link-remove").style.display = "none");
var i = e.getBoundingClientRect().top,
n = e.getBoundingClientRect().left;
t.style.display = "flex";
var o = t.offsetWidth,
r = t.offsetHeight;
t.style.top = i - r + window.pageYOffset - 3 + "px", t.style.left = n + e.offsetWidth - o + "px"
}
}, {
key: "hideTool",
value: function () {
this.linkTool.style.display = ""
}
}, {
key: "createLink",
value: function () {
var e, t = this,
i = new p(this.builder);
if (this.builder.activeLink) e = this.builder.activeLink;
else {
var n;
try {
var o;
window.getSelection ? n = 3 == (o = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? o.parentNode : o : document.selection && (o = document.selection.createRange(), n = document.selection.createRange().parentElement())
} catch (e) {
return
}
if ("a" == n.nodeName.toLowerCase()) e = n;
else {
for (var r = n;
"a" !== r.nodeName.toLowerCase() && "BODY" !== r.tagName && "HTML" !== r.tagName;) r.parentNode && (r = r.parentNode);
"a" === r.nodeName.toLowerCase() && (e = r)
}
e && (this.builder.activeLink = e, "i" === n.nodeName.toLowerCase() && "" === n.innerHTML || (ec.selectElementContents(this.builder.activeLink), i.saveSelection()))
}
var a = ec.getSelected(),
l = this.builderStuff.querySelector(".is-modal.createlink");
if (this.builder.opts.onFileSelectClick || "" != this.builder.opts.fileselect) {
l.querySelector(".input-select").style.display = "block", l.querySelector(".input-url").style.width = "444px";
var s = l.querySelector(".input-select");
ec.addEventListener(s, "click", (function () {
if (t.builder.opts.onFileSelectClick) t.builder.opts.onFileSelectClick({
targetInput: l.querySelector(".input-url"),
theTrigger: l.querySelector(".input-select")
});
else {
var e = t.builderStuff.querySelector(".is-modal.fileselect");
"about:blank" === e.querySelector("iframe").src && (e.querySelector("iframe").src = t.builder.opts.fileselect, i.showModal(e, !1, null, !1))
}
}))
} else l.querySelector(".input-select").style.display = "none", l.querySelector(".input-url").style.width = "100%";
l.querySelector(".input-url").value = "", l.querySelector(".input-newwindow").checked = !1, l.querySelector(".input-title").value = "", l.querySelector(".input-text").value = "", e ? (l.querySelector(".input-url").value = e.href, l.querySelector(".input-title").value = e.title, l.querySelector(".input-text").value = e.innerHTML, "_blank" === e.target ? l.querySelector(".input-newwindow").checked = !0 : l.querySelector(".input-newwindow").checked = !1) : l.querySelector(".input-text").value = a, i.showModal(l, !0, (function () {
i.appleMobile || i.restoreSelection()
}), !0), l.querySelector(".input-url").focus()
}
}, {
key: "editLink",
value: function () {
var e = this,
t = new p(this.builder),
i = this.builder.activeLink,
n = this.builderStuff.querySelector(".is-modal.createlink");
if (this.builder.opts.onFileSelectClick || "" != this.builder.opts.fileselect) {
n.querySelector(".input-select").style.display = "block", n.querySelector(".input-url").style.width = "444px";
var o = n.querySelector(".input-select");
ec.addEventListener(o, "click", (function () {
if (e.builder.opts.onFileSelectClick) e.builder.opts.onFileSelectClick({
targetInput: n.querySelector(".input-url"),
theTrigger: n.querySelector(".input-select")
});
else {
var i = e.builderStuff.querySelector(".is-modal.fileselect");
"about:blank" === i.querySelector("iframe").src && (i.querySelector("iframe").src = e.builder.opts.fileselect), t.showModal(i, !1, null, !1)
}
}))
} else n.querySelector(".input-select").style.display = "none", n.querySelector(".input-url").style.width = "100%";
var r = i.getAttribute("href"),
a = i.getAttribute("target"),
l = i.getAttribute("title"),
s = i.innerHTML;
n.querySelector(".input-url").value = r, n.querySelector(".input-newwindow").checked = "_blank" === a, n.querySelector(".input-title").value = l, n.querySelector(".input-text").value = s, t.showModal(n, !0, null, !0), n.querySelector(".input-url").focus()
}
}]), e
}(),
ic = new v,
nc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector(".is-spacer-tool");
if (!a) {
var l = '\n <div id="divSpacerTool" class="is-tool is-spacer-tool">\n <button title="'.concat(o.out("Decrease"), '" data-value="-"><svg class="is-icon-flex"><use xlink:href="#ion-ios-minus-empty"></use></svg></button>\n <button title="').concat(o.out("Increase"), '" data-value="+" style="border-left: none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n </div>\n ');
ic.appendHtml(r, l);
var s = (a = r.querySelector(".is-spacer-tool")).querySelectorAll("button");
Array.prototype.forEach.call(s, (function (e) {
ic.addEventListener(e, "click", (function () {
n.builder.uo.saveForUndo();
var t = e.getAttribute("data-value"),
i = n.builder.activeSpacer;
"-" === t ? ic.hasClass(i, "height-300") ? (ic.removeClass(i, "height-300"), ic.addClass(i, "height-280")) : ic.hasClass(i, "height-280") ? (ic.removeClass(i, "height-280"), ic.addClass(i, "height-260")) : ic.hasClass(i, "height-260") ? (ic.removeClass(i, "height-260"), ic.addClass(i, "height-240")) : ic.hasClass(i, "height-240") ? (ic.removeClass(i, "height-240"), ic.addClass(i, "height-220")) : ic.hasClass(i, "height-220") ? (ic.removeClass(i, "height-220"), ic.addClass(i, "height-200")) : ic.hasClass(i, "height-200") ? (ic.removeClass(i, "height-200"), ic.addClass(i, "height-180")) : ic.hasClass(i, "height-180") ? (ic.removeClass(i, "height-180"), ic.addClass(i, "height-160")) : ic.hasClass(i, "height-160") ? (ic.removeClass(i, "height-160"), ic.addClass(i, "height-140")) : ic.hasClass(i, "height-140") ? (ic.removeClass(i, "height-140"), ic.addClass(i, "height-120")) : ic.hasClass(i, "height-120") ? (ic.removeClass(i, "height-120"), ic.addClass(i, "height-100")) : ic.hasClass(i, "height-100") ? (ic.removeClass(i, "height-100"), ic.addClass(i, "height-80")) : ic.hasClass(i, "height-80") ? (ic.removeClass(i, "height-80"), ic.addClass(i, "height-60")) : ic.hasClass(i, "height-60") ? (ic.removeClass(i, "height-60"), ic.addClass(i, "height-40")) : ic.hasClass(i, "height-40") && (ic.removeClass(i, "height-40"), ic.addClass(i, "height-20")) : ic.hasClass(i, "height-20") ? (ic.removeClass(i, "height-20"), ic.addClass(i, "height-40")) : ic.hasClass(i, "height-40") ? (ic.removeClass(i, "height-40"), ic.addClass(i, "height-60")) : ic.hasClass(i, "height-60") ? (ic.removeClass(i, "height-60"), ic.addClass(i, "height-80")) : ic.hasClass(i, "height-80") ? (ic.removeClass(i, "height-80"), ic.addClass(i, "height-100")) : ic.hasClass(i, "height-100") ? (ic.removeClass(i, "height-100"), ic.addClass(i, "height-120")) : ic.hasClass(i, "height-120") ? (ic.removeClass(i, "height-120"), ic.addClass(i, "height-140")) : ic.hasClass(i, "height-140") ? (ic.removeClass(i, "height-140"), ic.addClass(i, "height-160")) : ic.hasClass(i, "height-160") ? (ic.removeClass(i, "height-160"), ic.addClass(i, "height-180")) : ic.hasClass(i, "height-180") ? (ic.removeClass(i, "height-180"), ic.addClass(i, "height-200")) : ic.hasClass(i, "height-200") ? (ic.removeClass(i, "height-200"), ic.addClass(i, "height-220")) : ic.hasClass(i, "height-220") ? (ic.removeClass(i, "height-220"), ic.addClass(i, "height-240")) : ic.hasClass(i, "height-240") ? (ic.removeClass(i, "height-240"), ic.addClass(i, "height-260")) : ic.hasClass(i, "height-260") ? (ic.removeClass(i, "height-260"), ic.addClass(i, "height-280")) : ic.hasClass(i, "height-280") && (ic.removeClass(i, "height-280"), ic.addClass(i, "height-300")), n.showTool(i), n.builder.opts.onChange(), n.builder.opts.onRender()
}))
}))
}
this.spacerTool = a
}
return n(e, [{
key: "click",
value: function (e) {
var t = e.target;
ic.hasClass(t, "spacer") ? (this.builder.activeSpacer = t, this.showTool(t)) : this.hideTool()
}
}, {
key: "showTool",
value: function (e) {
var t = e.getBoundingClientRect().top + window.pageYOffset,
i = e.getBoundingClientRect().left;
this.spacerTool.style.display = "flex";
var n = this.spacerTool.offsetWidth,
o = this.spacerTool.offsetHeight;
this.spacerTool.style.top = t + (e.offsetHeight - o) / 2 + "px", this.spacerTool.style.left = i + (e.offsetWidth - n) / 2 + "px"
}
}, {
key: "hideTool",
value: function () {
this.spacerTool.style.display = ""
}
}]), e
}(),
oc = new v,
rc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a, l = r.querySelector(".is-module-tool");
if (!l) {
var s = '\n <div class="is-tool is-module-tool">\n <button title="'.concat(o.out("Settings"), '" data-title="').concat(o.out("Settings"), '" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>\n </div>\n\n <input id="hidContentModuleCode" type="hidden" />\n <input id="hidContentModuleSettings" type="hidden" />\n \n <div class="is-modal custommodule">\n <div style="max-width:900px;height:570px;padding:0;box-sizing:border-box;position:relative;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">').concat(o.out("Module Settings"), '</div>\n <iframe style="position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-bottom:60px solid transparent;border-top:40px solid transparent;margin:0;box-sizing:border-box;" src="about:blank"></iframe>\n <div style="width:100%;height:50px;position:absolute;left:0;bottom:0;border-top: #efefef 1px solid;overflow:hidden;text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>\n </div>\n </div>\n </div> \n ");
oc.appendHtml(r, s), l = r.querySelector(".is-module-tool"), a = r.querySelector(".is-modal.custommodule");
var c = l.querySelector("button");
oc.addEventListener(c, "click", (function () {
var e = n.builder.activeModule;
oc.removeAttributes(document.querySelectorAll("[data-module-active]"), "data-module-active"), e.setAttribute("data-module-active", "1");
var t = e.getAttribute("data-module"),
i = e.getAttribute("data-module-desc");
a.querySelector(".is-modal-bar").innerHTML = i || n.util.out("Module Settings");
var o = e.getAttribute("data-dialog-width");
o && "" != o || (o = "900px");
var r = e.getAttribute("data-dialog-height");
r && "" != r || (r = "570px"), a.querySelector("div").style.maxWidth = o, a.querySelector("div").style.height = r;
var l = 1,
s = e.querySelectorAll("[data-subblock]");
Array.prototype.forEach.call(s, (function (t) {
var i = t.innerHTML;
e.setAttribute("data-html-" + l, encodeURIComponent(i)), l++
})), n.util.showModal(a, !0);
var c = new Date;
a.querySelector("iframe").src = n.builder.opts.modulePath + t + ".html?" + c.getTime()
}));
var d = a.querySelector(".input-ok");
oc.addEventListener(d, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeModule;
e.setAttribute("data-html", encodeURIComponent(n.builderStuff.querySelector("#hidContentModuleCode").value)), e.setAttribute("data-settings", encodeURIComponent(n.builderStuff.querySelector("#hidContentModuleSettings").value));
var t = n.builderStuff.querySelector("#hidContentModuleCode").value;
t = t.replace(/{id}/g, n.util.makeId()), e.innerHTML = "";
var i = document.createRange();
i.setStart(e, 0), e.appendChild(i.createContextualFragment(t));
var o = e.querySelectorAll("[data-subblock]"),
r = 1;
Array.prototype.forEach.call(o, (function (t) {
e.getAttribute("data-html-" + r) && (t.innerHTML = decodeURIComponent(e.getAttribute("data-html-" + r))), r++
})), n.builder.applyBehavior(), n.builder.opts.onChange(), n.builder.opts.onRender(), n.util.hideModal(a), n.util.hideControls()
}));
var u = a.querySelector(".input-cancel");
oc.addEventListener(u, "click", (function () {
n.util.hideModal(a)
}))
}
this.moduleTool = l, this.moduleModal = a
}
return n(e, [{
key: "click",
value: function (e) {
var t = !1;
if (e.hasAttribute("data-module") && (t = !0), t) {
this.builder.activeModule = e;
var i = e;
this.moduleTool.style.display = "flex";
var n = this.moduleTool.offsetWidth,
o = i.offsetWidth,
r = i.getBoundingClientRect().top + window.pageYOffset,
a = i.getBoundingClientRect().left - 2;
n + (a += o - n) > window.innerWidth && (a = i.getBoundingClientRect().left), this.moduleTool.style.top = r + "px", this.moduleTool.style.left = a + "px"
} else this.builder.activeModule = null, this.moduleTool.style.display = ""
}
}]), e
}(),
ac = new v,
lc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = new g(i);
this.htmlUtil = r;
var a = o.builderStuff();
this.builderStuff = a;
var l, s = a.querySelector(".is-code-tool");
if (!s) {
var c = '\n <div class="is-tool is-code-tool">\n <button title="'.concat(o.out("Settings"), '" data-title="').concat(o.out("Settings"), '" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>\n </div>\n \n <div class="is-modal customcode">\n <div style="max-width:900px;height:570px;padding:0;box-sizing:border-box;position:relative;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;">').concat(o.out("Custom Code (Javascript Allowed)"), '</div>\n <textarea class="input-customcode" type="text" style="background: #fff;position: absolute;top: 0;left: 0;width:100%;height:100%;border:none;border-bottom:60px solid transparent;border-top:40px solid transparent;box-sizing:border-box;"></textarea>\n <div style="width:100%;height:50px;position:absolute;left:0;bottom:0;border-top: #efefef 1px solid;overflow:hidden;text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>\n </div>\n </div>\n </div> \n ");
ac.appendHtml(a, c), s = a.querySelector(".is-code-tool"), l = a.querySelector(".is-modal.customcode");
var d = s.querySelector("button");
ac.addEventListener(d, "click", (function () {
var e = n.builder.activeCodeBlock,
t = n.builderStuff.querySelector("#tmp_buildercontent");
t && t.parentNode.removeChild(t), ac.appendHtml(n.builderStuff, '<div id="tmp_buildercontent" style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden;visibility:hidden;"></div>'), t = n.builderStuff.querySelector("#tmp_buildercontent");
var i = 1,
r = e.querySelectorAll("is-builder");
Array.prototype.forEach.call(r, (function (o) {
var r = o.innerHTML;
(t = n.builderStuff.querySelector("#tmp_buildercontent")).innerHTML = r;
var a = t.querySelectorAll(".elm-active");
ac.removeClasses(a, "elm-active"), a = t.querySelectorAll(".elm-inspected"), ac.removeClasses(a, "elm-inspected"), a = t.querySelectorAll(".cell-active"), ac.removeClasses(a, "cell-active"), a = t.querySelectorAll(".row-active"), ac.removeClasses(a, "row-active"), a = t.querySelectorAll(".row-outline"), ac.removeClasses(a, "row-outline"), a = t.querySelectorAll(".row-outline"), ac.removeClasses(a, "row-outline"), a = t.querySelectorAll("[data-click]"), ac.removeAttributes(a, "data-click"), a = t.querySelectorAll("[contenteditable]"), ac.removeAttributes(a, "contenteditable"), a = t.querySelectorAll("[data-module-active]"), ac.removeAttributes(a, "data-module-active"), ac.removeElements(t.querySelectorAll(".is-row-tool")), ac.removeElements(t.querySelectorAll(".is-rowadd-tool")), ac.removeElements(t.querySelectorAll(".ovl")), ac.removeElements(t.querySelectorAll(".irow-add-initial")), a = t.querySelectorAll("[data-keep]"), ac.removeAttributes(a, "data-keep"), r = (r = t.innerHTML.trim()).replace(/<font/g, "<span").replace(/<\/font/g, "</span"), e.setAttribute("data-html-" + i, encodeURIComponent(r)), i++
}));
var a, l = decodeURIComponent(e.getAttribute("data-html"));
l = l.replace(/{id}/g, n.util.makeId()), t.parentNode.removeChild(t), (a = n.builder.opts.htmlSyntaxHighlighting ? n.builderStuff.querySelector(".viewhtmlformatted") : n.builderStuff.querySelector(".viewhtml")).querySelector(".is-modal-footer").innerHTML = '<button title="'.concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>"), o.showModal(a, !0), a.querySelector("textarea").value = l;
var s = a.querySelector(".input-ok");
if (ac.addEventListener(s, "click", (function () {
n.builder.uo.saveForUndo();
var t = a.querySelector("textarea").value;
e.setAttribute("data-html", encodeURIComponent(t)), t = t.replace(/{id}/g, n.util.makeId());
for (var i = 1; i <= 20; i++) t = t.replace("[%HTML" + i + "%]", void 0 === e.getAttribute("data-html-" + i) ? "" : decodeURIComponent(e.getAttribute("data-html-" + i)));
e.innerHTML = "";
var r = document.createRange();
r.setStart(e, 0), e.appendChild(r.createContextualFragment(t)), n.builder.applyBehavior(), n.builder.opts.onChange(), n.builder.opts.onRender(), o.hideModal(a), o.hideControls()
})), s = a.querySelector(".input-cancel"), ac.addEventListener(s, "click", (function () {
o.hideModal(a)
})), n.builder.opts.htmlSyntaxHighlighting) {
var c = a.querySelector("textarea");
c.setAttribute("data-source-active", "1"), c.setAttribute("data-source-ok", ".viewhtmlformatted .input-ok"), c.setAttribute("data-source-cancel", ".viewhtmlformatted .input-cancel"), a.querySelector("iframe").outerHTML = '<iframe id="ifrHtmlFormatted" style="width:100%;height:100%;border: none;" src="about:blank"></iframe>';
var d = a.querySelector("iframe").contentWindow.document;
d.open(), d.write(n.htmlUtil.getIframeHtml()), d.close()
}
}));
var u = l.querySelector(".input-cancel");
ac.addEventListener(u, "click", (function () {
n.util.hideModal(l)
}))
}
this.codeTool = s, this.codeModal = l
}
return n(e, [{
key: "click",
value: function (e) {
var t = !1;
if (e.hasAttribute("data-html") && !e.hasAttribute("data-module") && (t = !0), t) {
this.builder.activeCodeBlock = e;
var i = e;
this.codeTool.style.display = "flex";
var n = this.codeTool.offsetWidth,
o = i.offsetWidth,
r = i.getBoundingClientRect().top + window.pageYOffset,
a = i.getBoundingClientRect().left - 2;
n + (a += o - n) > window.innerWidth && (a = i.getBoundingClientRect().left), this.codeTool.style.top = r + "px", this.codeTool.style.left = a + "px"
} else this.builder.activeCodeBlock = null, this.codeTool.style.display = ""
}
}]), e
}(),
sc = new v,
cc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a, l = r.querySelector(".is-iframe-tool");
if (!l) {
var s = '\n <div class="is-tool is-iframe-tool">\n <button title="'.concat(o.out("Settings"), '" data-title="').concat(o.out("Settings"), '" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>\n </div>\n \n <div class="is-modal iframelink">\n <div style="max-width:550px;">\n <input class="input-src" type="text" placeholder="Source" style="width:100%;margin-bottom:12px;"/>\n <textarea class="input-embedcode" type="text" placeholder="Embed Code" style="width:100%;height:300px;margin-bottom:12px;display:none;"></textarea>\n <div style="text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>\n </div>\n </div>\n </div>\n \n ");
sc.appendHtml(r, s), l = r.querySelector(".is-iframe-tool"), a = r.querySelector(".is-modal.iframelink");
var c = l.querySelector("button");
sc.addEventListener(c, "click", (function () {
var e = n.builder.activeIframe,
t = e.src;
a.querySelector(".input-src").value = "", a.querySelector(".input-embedcode").value = "", null != /^.*\/\/www.youtube.com\/embed\//.exec(t) || null != /^.*\/\/player.vimeo.com\/video\//.exec(t) ? (a.querySelector(".input-embedcode").style.display = "none", a.querySelector(".input-src").style.display = "block", a.querySelector(".input-src").value = t, a.querySelector(".input-src").focus()) : (a.querySelector(".input-src").style.display = "none", a.querySelector(".input-embedcode").style.display = "block", a.querySelector(".input-embedcode").value = e.outerHTML), n.util.showModal(a, !0)
}));
var d = a.querySelector(".input-ok");
sc.addEventListener(d, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeIframe,
t = e.parentNode;
if (n.builder.uo.saveForUndo(), "" !== a.querySelector(".input-src").value) {
var i = a.querySelector(".input-src").value,
o = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#&?]*)/.exec(i),
r = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/)|(video\/))?([0-9]+)\/?/.exec(i);
if (null != o || null != r) {
if (null != o && o.length >= 7) i = "//www.youtube.com/embed/" + o[6] + "?rel=0";
if (null != r && r.length >= 7) i = "//player.vimeo.com/video/" + r[6];
e.src = i
} else e.src = i;
n.builder.opts.onChange()
} else {
var l = a.querySelector(".input-embedcode").value;
"" != l && (e.outerHTML = l), n.builder.activeIframe = t.querySelector("iframe"), n.builder.applyBehavior(), n.builder.opts.onChange()
}
n.util.hideModal(a)
}));
var u = a.querySelector(".input-cancel");
sc.addEventListener(u, "click", (function () {
n.util.hideModal(a)
}))
}
this.iframeTool = l, this.iframeModal = a
}
return n(e, [{
key: "click",
value: function (e) {
if (sc.hasClass(e.target, "ovl")) {
e.target.style.display = "none", this.builder.activeIframe = e.target.parentNode.querySelector("iframe");
var t = this.builder.activeIframe;
this.iframeTool.style.display = "flex";
var i = this.iframeTool.offsetWidth,
n = t.offsetWidth,
o = t.getBoundingClientRect().top + window.pageYOffset,
r = t.getBoundingClientRect().left - 2;
i + (r += n - i) > window.innerWidth && (r = t.getBoundingClientRect().left), this.iframeTool.style.top = o + "px", this.iframeTool.style.left = r + "px"
} else {
var a = document.querySelectorAll(".ovl");
Array.prototype.forEach.call(a, (function (e) {
e.style.display = "block"
})), this.builder.activeIframe = null, this.iframeTool.style.display = ""
}
}
}]), e
}(),
dc = new v,
uc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a, l = r.querySelector(".is-table-tool");
if (!l) {
var s = '\n <div class="is-tool is-table-tool">\n <button title="'.concat(o.out("Settings"), '" style="width:40px;height:40px;background:none;"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>\n </div>\n <div class="is-modal edittable" style="z-index:10002;">\n <div class="is-modal-bar is-draggable" style="background:#f9f9f9;position: absolute;top: 0;left: 0;width: 100%;z-index:1;line-height:30px;height:30px;border:none;">\n ').concat(o.out("Table"), '\n <div class="is-modal-close" style="z-index:1;width:20px;height:20px;position:absolute;top:0px;right:0px;box-sizing:border-box;padding:0;line-height:20px;font-size:10px;color:#777;text-align:center;cursor:pointer;">&#10005;</div>\n </div>\n <div style="padding:0">\n <div class="is-tabs clearfix" data-group="table">\n <a title="').concat(o.out("Style"), '" id="tabTableGeneral" href="" data-content="divTableGeneral" class="active">').concat(o.out("Style"), '</a>\n <a title="').concat(o.out("Layout"), '" id="tabTableLayout" href="" data-content="divTableLayout">').concat(o.out("Layout"), '</a>\n </div>\n <div id="divTableGeneral" class="is-tab-content" data-group="table" style="display:block">\n <div class="is-settings clearfix" style="display:inline-block;width:115px;float:left;margin-bottom:0;">\n <div>').concat(o.out("Background"), ':</div>\n <div>\n <button title="').concat(o.out("Background Color"), '" class="input-table-bgcolor is-btn-color"></button>\n </div>\n </div>\n <div class="is-settings clearfix" style="display:inline-block;width:90px;margin-bottom:0;">\n <div>').concat(o.out("Text Color"), ':</div>\n <div>\n <button title="').concat(o.out("Text Color"), '" class="input-table-textcolor is-btn-color"></button>\n </div>\n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>').concat(o.out("Border Thickness"), ':</div>\n <div>\n <select id="selCellBorderWidth" style="width:120px;"><option value="0">No Border</option><option value="1">1</option><option value="2">2</option><option value="3">3</option></select> \n </div>\n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>').concat(o.out("Border Color"), ':</div>\n <div>\n <button title="').concat(o.out("Border Color"), '" class="input-table-bordercolor is-btn-color"></button>\n </div>\n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>').concat(o.out("Apply To"), ':</div>\n <div>\n <select id="selTableApplyTo" style="width:120px;">\n <option value="table">').concat(o.out("Table"), '</option>\n <option value="currentrow">').concat(o.out("Current Row"), '</option>\n <option value="currentcol">').concat(o.out("Current Column"), '</option>\n <option value="evenrows">').concat(o.out("Even Rows"), '</option>\n <option value="oddrows">').concat(o.out("Odd Rows"), '</option> \n <option value="currentcell">').concat(o.out("Current Cell"), '</option> \n </select>\n </div>\n </div>\n </div>\n <div id="divTableLayout" class="is-tab-content" data-group="table">\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>').concat(o.out("Insert Row"), ':</div>\n <div>\n <button title="').concat(o.out("Above"), '" data-table-cmd="rowabove" title="Insert Row (Above)" style="width:100px;margin-right:5px"> ').concat(o.out("Above"), ' </button>\n <button title="').concat(o.out("Below"), '" data-table-cmd="rowbelow" title="Insert Row (Below)" style="width:100px;"> ').concat(o.out("Below"), ' </button>\n </div> \n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>Insert Column:</div>\n <div>\n <button title="').concat(o.out("Left"), '" data-table-cmd="columnleft" title="Insert Column (Left)" style="width:100px;margin-right:5px"> ').concat(o.out("Left"), ' </button> \n <button title="').concat(o.out("Right"), '" data-table-cmd="columnright" title="Insert Column (Right)" style="width:100px;"> ').concat(o.out("Right"), ' </button> \n </div> \n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>Delete:</div>\n <div>\n <button title="').concat(o.out("Row"), '" data-table-cmd="delrow" title="Delete Row" style="width:100px;margin-right:5px"> ').concat(o.out("Row"), ' </button> \n <button title="').concat(o.out("Column"), '" data-table-cmd="delcolumn" title="Delete Column" style="width:100px;"> ').concat(o.out("Column"), ' </button> \n </div> \n </div>\n <div class="is-settings clearfix" style="margin-bottom:0;">\n <div>').concat(o.out("Merge"), ':</div>\n <button title="').concat(o.out("Merge Cell"), '" data-table-cmd="mergecell" title="Merge Cell" style="width:205px"> Merge Cell </button> \n </div> \n </div>\n </div>\n </div>\n </div>\n \n ');
dc.appendHtml(r, s), l = r.querySelector(".is-table-tool"), a = r.querySelector(".is-modal.edittable");
var c = l.querySelector("button");
dc.addEventListener(c, "click", (function () {
dc.hasClass(a, "active") ? dc.removeClass(a, "active") : dc.addClass(a, "active")
}));
var d = a.querySelector(".is-modal-close");
dc.addEventListener(d, "click", (function () {
dc.removeClass(a, "active")
})), (c = a.querySelector(".input-table-bgcolor")).addEventListener("click", (function (e) {
n.builder.uo.saveForUndo();
var t = e.target;
n.builder.colorPicker.open((function (e) {
if (n.builder.activeTd) {
var i = a.querySelector("#selTableApplyTo").value,
o = n.builder.activeTable,
r = n.builder.activeTd.parentNode,
l = n.builder.activeTd;
"currentcell" == i && (n.builder.activeTd.style.backgroundColor = e);
for (var s = 0; s < o.rows.length; s++)
for (var c = o.rows[s], d = 0; d < c.cells.length; d++) {
var u = c.cells[d];
("table" == i || "evenrows" == i && pc(s + 1) || "oddrows" == i && !pc(s + 1) || "currentrow" == i && c == n.builder.activeTd.parentNode || "currentcol" == i && d == vc(o, r, l)) && (u.style.backgroundColor = e)
}
t.style.backgroundColor = e
}
}), c.style.backgroundColor)
})), (c = a.querySelector(".input-table-textcolor")).addEventListener("click", (function (e) {
n.builder.uo.saveForUndo();
var t = e.target;
n.builder.colorPicker.open((function (e) {
if (n.builder.activeTd) {
var i = a.querySelector("#selTableApplyTo").value,
o = n.builder.activeTable,
r = n.builder.activeTd.parentNode,
l = n.builder.activeTd;
"currentcell" == i && (n.builder.activeTd.style.color = e);
for (var s = 0; s < o.rows.length; s++)
for (var c = o.rows[s], d = 0; d < c.cells.length; d++) {
var u = c.cells[d];
("table" == i || "evenrows" == i && pc(s + 1) || "oddrows" == i && !pc(s + 1) || "currentrow" == i && c == n.builder.activeTd.parentNode || "currentcol" == i && d == vc(o, r, l)) && (u.style.color = e)
}
t.style.backgroundColor = e
}
}), c.style.backgroundColor)
})), (c = a.querySelector(".input-table-bordercolor")).addEventListener("click", (function (e) {
n.builder.uo.saveForUndo();
var t = e.target;
n.builder.colorPicker.open((function (e) {
if (n.builder.activeTd) {
var i = a.querySelector("#selCellBorderWidth").value;
"0" == i && (a.querySelector("#selCellBorderWidth").value = 1, i = 1);
var o = a.querySelector("#selTableApplyTo").value,
r = n.builder.activeTable,
l = n.builder.activeTd.parentNode,
s = n.builder.activeTd;
"currentcell" == o && (n.builder.activeTd.style.borderWidth = i + "px", n.builder.activeTd.style.borderStyle = "solid", n.builder.activeTd.style.borderColor = e);
for (var c = 0; c < r.rows.length; c++)
for (var d = r.rows[c], u = 0; u < d.cells.length; u++) {
var p = d.cells[u];
("table" == o || "evenrows" == o && pc(c + 1) || "oddrows" == o && !pc(c + 1) || "currentrow" == o && d == n.builder.activeTd.parentNode || "currentcol" == o && u == vc(r, l, s)) && (p.style.borderWidth = i + "px", p.style.borderStyle = "solid", p.style.borderColor = e)
}
t.style.backgroundColor = e
}
}), c.style.backgroundColor)
}));
var u = a.querySelector("#selCellBorderWidth");
u.addEventListener("change", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
var e = u.value,
t = a.querySelector(".input-table-bordercolor").style.backgroundColor;
"" == t && (t = "#000000");
var i = a.querySelector("#selTableApplyTo").value,
o = n.builder.activeTable,
r = n.builder.activeTd.parentNode,
l = n.builder.activeTd;
"currentcell" == i && (n.builder.activeTd.style.borderWidth = e + "px", n.builder.activeTd.style.borderStyle = "solid", n.builder.activeTd.style.borderColor = t, "0" == e && (n.builder.activeTd.style.borderWidth = "", n.builder.activeTd.style.borderStyle = "", n.builder.activeTd.style.borderColor = "", a.querySelector(".input-table-bordercolor").style.backgroundColor = ""));
for (var s = 0; s < o.rows.length; s++)
for (var c = o.rows[s], d = 0; d < c.cells.length; d++) {
var p = c.cells[d];
("table" == i || "evenrows" == i && pc(s + 1) || "oddrows" == i && !pc(s + 1) || "currentrow" == i && c == n.builder.activeTd.parentNode || "currentcol" == i && d == vc(o, r, l)) && (p.style.borderWidth = e + "px", p.style.borderStyle = "solid", p.style.borderColor = t, "0" == e && (p.style.borderWidth = "", p.style.borderStyle = "", p.style.borderColor = "", a.querySelector(".input-table-bordercolor").style.backgroundColor = ""))
}
n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="rowabove"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
for (var e = n.builder.activeTable, t = n.builder.activeTd.parentNode, i = e.insertRow(t.rowIndex), o = 0; o < t.cells.length; o++) {
var r = i.insertCell(i.cells.length);
r.setAttribute("style", n.builder.activeTd.getAttribute("style")), r.setAttribute("valign", "top"), r.innerHTML = "<br>"
}
n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="rowbelow"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
for (var e = n.builder.activeTable, t = n.builder.activeTd.parentNode, i = e.insertRow(t.rowIndex + 1), o = 0; o < t.cells.length; o++) {
var r = i.insertCell(i.cells.length);
r.setAttribute("style", n.builder.activeTd.getAttribute("style")), r.setAttribute("valign", "top"), r.innerHTML = "<br>"
}
n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="columnleft"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
for (var e = n.builder.activeTable, t = n.builder.activeTd.cellIndex, i = 0; i < e.rows.length; i++) {
var o = e.rows[i].insertCell(t);
o.setAttribute("style", n.builder.activeTd.getAttribute("style")), o.setAttribute("valign", "top"), o.innerHTML = "<br>"
}
n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="columnright"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
for (var e = n.builder.activeTable, t = n.builder.activeTd.cellIndex, i = 0; i < e.rows.length; i++) {
var o = e.rows[i].insertCell(t + 1);
o.setAttribute("style", n.builder.activeTd.getAttribute("style")), o.setAttribute("valign", "top"), o.innerHTML = "<br>"
}
n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="delrow"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
var e = n.builder.activeTable,
t = n.builder.activeTd.parentNode;
e.deleteRow(t.rowIndex), n.builder.activeTable = null, n.builder.activeTd = null, 0 == e.rows.length && e.parentNode.removeChild(e), n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="delcolumn"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
for (var e = n.builder.activeTable, t = n.builder.activeTd.cellIndex, i = 0; i < e.rows.length; i++) e.rows[i].deleteCell(t);
n.builder.activeTable = null, n.builder.activeTd = null, 0 == e.rows[0].cells.length && e.parentNode.removeChild(e), n.builder.opts.onChange()
}
})), (c = a.querySelector('[data-table-cmd="mergecell"]')).addEventListener("click", (function () {
if (n.builder.activeTd) {
n.builder.uo.saveForUndo();
var e = n.builder.activeTable,
t = n.builder.activeTd.parentNode,
i = n.builder.activeTd;
i.colSpan = i.colSpan + 1, i.cellIndex + 1 < e.rows[t.rowIndex].cells.length && e.rows[t.rowIndex].deleteCell(i.cellIndex + 1), n.builder.opts.onChange()
}
}))
}
this.tableTool = l, this.tableModal = a
}
return n(e, [{
key: "click",
value: function (e) {
if (dc.parentsHasElement(e.target, "table")) {
var t, i, n = e.target;
if ("td" === n.tagName.toLowerCase()) t = n;
else {
for (;
"td" !== n.tagName.toLowerCase();) n = n.parentNode;
t = n
}
for (;
"table" !== n.tagName.toLowerCase();) n = n.parentNode;
if (i = n, dc.hasClass(i, "default")) {
this.builder.activeTd = t, this.builder.activeTable = i;
var o = i;
this.tableTool.style.display = "flex";
var r = this.tableTool.offsetWidth,
a = o.offsetWidth,
l = o.getBoundingClientRect().top + window.pageYOffset,
s = o.getBoundingClientRect().left - 2;
r + (s += a - r) > window.innerWidth && (s = o.getBoundingClientRect().left), this.tableTool.style.top = l + "px", this.tableTool.style.left = s + "px"
} else this.builder.activeTd = null, this.builder.activeTable = null, this.tableTool.style.display = ""
} else this.builder.activeTd = null, this.builder.activeTable = null, this.tableTool.style.display = "";
if (dc.hasClass(this.tableModal, "active") && this.builder.activeTable) {
var c = this.builder.activeTd;
this.tableModal.querySelector(".input-table-bgcolor").style.backgroundColor = c.style.backgroundColor, this.tableModal.querySelector(".input-table-textcolor").style.backgroundColor = c.style.color, this.tableModal.querySelector(".input-table-bordercolor").style.backgroundColor = c.style.borderColor, this.tableModal.querySelector("#selCellBorderWidth").value = parseInt(c.style.borderWidth)
} else this.tableModal.querySelector(".input-table-bgcolor").style.backgroundColor = "", this.tableModal.querySelector(".input-table-textcolor").style.backgroundColor = "", this.tableModal.querySelector(".input-table-bordercolor").style.backgroundColor = "", this.tableModal.querySelector("#selCellBorderWidth").value = 0
}
}]), e
}();
function pc(e) {
return e % 2 == 0
}
function vc(e, t, i) {
for (var n = 0, o = !1, r = 0; r < t.cells.length; r++) 0 == o && (n += t.cells[r].colSpan), i == t.cells[r] && (o = !0);
return (n -= i.colSpan - 1) - 1
}
var hc = new v,
fc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o, this.hyperlink = new tc(i), this.image = new Ys(i), this.spacer = new nc(i), this.module = new rc(i), this.code = new lc(i), this.iframe = new cc(i), this.table = new uc(i);
var r = o.builderStuff();
this.builderStuff = r, window.addEventListener("keydown", (function (e) {
if (46 === e.keyCode && n.builder.activeIcon && hc.parentsHasClass(e.target, "is-builder")) {
if ("a" === n.builder.activeIcon.parentNode.tagName.toLowerCase() && 1 === n.builder.activeIcon.parentNode.childNodes.length) {
var t = n.builder.activeIcon.parentNode;
t.parentNode.removeChild(t), r.querySelector("#divLinkTool").style.display = ""
} else n.builder.activeIcon.parentNode.removeChild(n.builder.activeIcon);
e.preventDefault()
}
if (8 === e.keyCode && n.builder.activeIcon && hc.parentsHasClass(e.target, "is-builder")) {
if ("a" === n.builder.activeIcon.parentNode.tagName.toLowerCase() && 1 === n.builder.activeIcon.parentNode.childNodes.length) {
var i = n.builder.activeIcon.parentNode;
i.parentNode.removeChild(i), r.querySelector("#divLinkTool").style.display = ""
} else n.builder.activeIcon.parentNode.removeChild(n.builder.activeIcon);
e.preventDefault()
}
}), !1)
}
return n(e, [{
key: "applyBehavior",
value: function (e) {
var t = e.querySelectorAll(".is-social");
Array.prototype.forEach.call(t, (function (e) {
e.contentEditable = !1
}));
var i = e.querySelectorAll(".spacer");
Array.prototype.forEach.call(i, (function (e) {
e.contentEditable = !1
}));
var n = e.querySelectorAll("hr");
Array.prototype.forEach.call(n, (function (e) {
e.contentEditable = !1
}));
var o = e.querySelectorAll("a");
Array.prototype.forEach.call(o, (function (e) {
"inline-block" === hc.getStyle(e, "display") && (e.contentEditable = !0, "span" !== e.parentNode.tagName.toLowerCase() ? e.outerHTML = '<span contenteditable="false">' + e.outerHTML + "</span>" : 1 === e.parentNode.childElementCount && (e.parentNode.contentEditable = !1))
}));
var r = e.querySelectorAll(".embed-responsive");
Array.prototype.forEach.call(r, (function (e) {
var t = e.querySelector(".ovl");
t || (hc.appendHtml(e, '<div class="ovl" style="position:absolute;background:#fff;opacity:0.01;cursor:pointer;top:0;left:0px;width:100%;height:100%;z-index:1"></div>'), t = e.querySelector(".ovl"), hc.addEventListener(t, "click", (function () {
t.style.display = "none"
})))
}))
}
}, {
key: "click",
value: function (e, t) {
var i = t.target,
n = !1,
o = !1;
if (e.hasAttribute("data-html") && (n = !0, hc.parentsHasAttribute(i, "data-subblock") && (o = !0)), !n || o) {
this.spacer.click(t);
var r = document.querySelectorAll(".icon-active");
Array.prototype.forEach.call(r, (function (e) {
hc.removeClass(e, "icon-active")
})), this.builder.activeIcon = null, "i" === i.tagName.toLowerCase() && "" === i.innerHTML && (hc.addClass(i, "icon-active"), hc.selectElementContents(i), this.builder.activeIcon = i), this.image.click(t), this.hyperlink.click(e, t), "a" !== i.tagName.toLowerCase() && !hc.parentsHasTag(i, "a") || n || t.preventDefault(), this.table.click(t), this.iframe.click(t)
} else if (this.util.hideControls(), "img" === t.target.tagName.toLowerCase() && t.target.hasAttribute("data-image-embed") && (this.image.click(t), t.target.hasAttribute("data-sync"))) {
var a = t.target;
a.setAttribute("data-src", a.src)
}
this.code.click(e, t), this.module.click(e, t)
}
}]), e
}(),
gc = new v,
mc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i, this.grid = new k(i);
var o = new p(this.builder),
r = new g(i),
a = o.builderStuff(),
l = a.querySelector(".rowmore"),
s = "";
if (i.opts.rowHtmlEditor && (s = '<button title="'.concat(o.out("HTML"), '" class="row-html">\n <span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>').concat(o.out("HTML"), "\n </button>")), !l) {
var c = '<div class="is-pop rowmore" style="z-index:10002;">\n <div style="display:flex;flex-flow:wrap;padding-top:3px;">\n <button title="'.concat(o.out("Move Up"), '" class="row-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>').concat(o.out("Move Up"), '</button>\n <button title="').concat(o.out("Move Down"), '" class="row-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>').concat(o.out("Move Down"), '</button>\n <button title="').concat(o.out("Duplicate"), '" class="row-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>').concat(o.out("Duplicate"), "</button>\n ").concat(s, "\n </div>\n </div>");
gc.appendHtml(a, c);
var d = (l = a.querySelector(".rowmore")).querySelector(".row-up");
d && gc.addEventListener(d, "click", (function () {
n.grid.moveRowUp(), o.clearControls()
})), (d = l.querySelector(".row-down")) && gc.addEventListener(d, "click", (function () {
n.grid.moveRowDown(), o.clearControls()
})), (d = l.querySelector(".row-duplicate")) && gc.addEventListener(d, "click", (function () {
n.grid.duplicateRow(), n.rowMore.style.display = "", o.clearControls()
})), (d = l.querySelector(".row-html")) && gc.addEventListener(d, "click", (function () {
o.cellSelected() && r.view("row")
}))
}
this.rowMore = l, document.addEventListener("mousedown", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if ("flex" === l.style.display) {
var i = gc.parentsHasClass(t, "rowmore"),
n = gc.parentsHasClass(t, "row-more");
if (i || n) return;
l.style.display = ""
}
}))
}
return n(e, [{
key: "render",
value: function (e) {
var t = this,
i = new p(this.builder),
n = i.builderStuff(),
o = this.rowMore,
r = e.querySelector(".is-row-tool");
if (!r) {
var a = '<div class="is-tool is-row-tool">\n <div title="Move" class="row-handle" style="width:100%;cursor:move;text-align:center;"><svg class="is-icon-flex"><use xlink:href="#ion-move"></use></svg></div>\n <button title="'.concat(i.out("More"), '" class="row-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n <button title="').concat(i.out("Grid Editor"), '" class="row-grideditor"><svg class="is-icon-flex"><use xlink:href="#ion-grid"></use></svg></button>\n <button title="').concat(i.out("Delete"), '" class="row-remove"><svg class="is-icon-flex"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>');
gc.appendHtml(e, a);
var l = (r = e.querySelector(".is-row-tool")).querySelectorAll("[title]");
Array.prototype.forEach.call(l, (function (e) {
e.setAttribute("data-title", e.getAttribute("title")), t.builder.tooltip.set(e, 5, 3)
}));
var s = r.querySelector(".row-grideditor");
s && gc.addEventListener(s, "click", (function () {
var e = n.querySelector(".grideditor");
if (gc.hasClass(e, "active")) {
gc.removeClass(e, "active");
var i = document.querySelectorAll(t.builder.opts.container);
Array.prototype.forEach.call(i, (function (e) {
e.removeAttribute("grideditor")
}))
} else {
gc.addClass(e, "active");
var o = document.querySelectorAll(t.builder.opts.container);
Array.prototype.forEach.call(o, (function (e) {
e.setAttribute("grideditor", "")
}))
}
})), (s = r.querySelector(".row-more")) && gc.addEventListener(s, "click", (function () {
var e = i.cellSelected();
if (e) {
var a = e.parentNode;
gc.removeClass(a, "row-outline");
var l = n.querySelector(".is-column-tool");
gc.removeClass(l, "active");
var s = r.querySelector(".row-more"),
c = s.getBoundingClientRect().top + window.pageYOffset,
d = s.getBoundingClientRect().left + window.pageXOffset;
o.style.display = "flex", o.style.top = c - 8 + "px", gc.removeClass(o, "arrow-bottom"), gc.removeClass(o, "arrow-left"), gc.removeClass(o, "arrow-right"), gc.removeClass(o, "center"), gc.removeClass(o, "right"), gc.removeClass(o, "left"), "right" === t.builder.opts.rowTool ? (o.style.left = d - o.offsetWidth - 10 + "px", gc.addClass(o, "arrow-right"), gc.addClass(o, "left")) : (o.style.left = d + 35 + "px", gc.addClass(o, "arrow-left"), gc.addClass(o, "left"));
var u = o.querySelector(".row-html"),
p = o.querySelector(".row-duplicate");
e.getAttribute("data-html") ? (u && (u.style.display = "none"), p && (p.style.display = "none")) : (u && (u.style.display = ""), p && (p.style.display = ""))
}
})), (s = r.querySelector(".row-remove")) && gc.addEventListener(s, "click", (function () {
t.grid.removeRow(), i.clearControls()
}))
}
}
}]), e
}(),
yc = new v,
bc = function () {
function e(i) {
t(this, e), this.builder = i
}
return n(e, [{
key: "render",
value: function (e) {
var t = this,
i = new p(this.builder),
n = C(this.builder),
o = e.querySelector(".is-rowadd-tool");
if (!o) {
var r = '<div class="is-rowadd-tool" style="height:0">\n <button title="'.concat(i.out("Add"), '" title="').concat(i.out("Add"), '" style="outline:none;line-height:1;margin:0;padding:0;cursor:pointer;background-color:rgba(255,255,255,0.9);"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:17px;height:17px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n </div>');
yc.appendHtml(e, r);
var a = (o = e.querySelector(".is-rowadd-tool")).querySelectorAll("[title]");
Array.prototype.forEach.call(a, (function (e) {
e.setAttribute("data-title", e.getAttribute("title")), t.builder.tooltip.set(e, 5, 3)
}))
}
var l = o.querySelector("button");
yc.addEventListener(l, "click", (function () {
n.querySelector(".is-pop-tabs").style.display = "none";
var e = window.innerHeight,
t = l.getBoundingClientRect().top,
i = l.getBoundingClientRect().left;
n.style.display = "flex";
var o = n.offsetWidth,
r = n.offsetHeight;
return e - t > r ? (n.style.top = t + window.pageYOffset + 27 + "px", n.style.left = i - o / 2 + 7 + "px", yc.removeClass(n, "arrow-bottom"), yc.removeClass(n, "arrow-right"), yc.removeClass(n, "arrow-left"), yc.removeClass(n, "center"), yc.addClass(n, "arrow-top"), yc.addClass(n, "center")) : (n.style.top = t + window.pageYOffset - r - 8 + "px", n.style.left = i - o / 2 + 7 + "px", yc.removeClass(n, "arrow-top"), yc.removeClass(n, "arrow-right"), yc.removeClass(n, "arrow-left"), yc.removeClass(n, "center"), yc.addClass(n, "arrow-bottom"), yc.addClass(n, "center")), n.setAttribute("data-mode", "row"), !1
}))
}
}]), e
}(),
xc = new v,
wc = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i, this.grid = new k(i);
var o, r = new p(i),
a = r.builderStuff(),
l = a.querySelector(".is-column-tool"),
s = "";
if (i.opts.columnHtmlEditor && (s = '<button title="'.concat(r.out("HTML"), '" class="cell-html">\n <span><svg class="is-icon-flex" style="margin-right:-3px;width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:12px;height:12px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></span>').concat(r.out("HTML"), "\n </button>")), !l) {
var c = '<div class="is-tool is-column-tool">\n <button title="'.concat(r.out("Add"), '" class="cell-add"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n <button title="').concat(r.out("More"), '" class="cell-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n <button title="').concat(r.out("Delete"), '" class="cell-remove"><svg class="is-icon-flex" style="margin-left:-1px"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n \n <div class="is-pop columnmore">\n <div style="display:flex;flex-flow:wrap;padding-top:3px;">\n <button title="').concat(r.out("Move Left"), '" class="cell-prev"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-left"></use></svg></span>').concat(r.out("Move Left"), '</button>\n <button title="').concat(r.out("Move Right"), '" class="cell-next"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-right"></use></svg></span>').concat(r.out("Move Right"), '</button>\n <button title="').concat(r.out("Move Up"), '" class="cell-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>').concat(r.out("Move Up"), '</button>\n <button title="').concat(r.out("Move Down"), '" class="cell-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>').concat(r.out("Move Down"), '</button>\n <button title="').concat(r.out("Increase"), '" class="cell-increase"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-increase"></use></svg></span>').concat(r.out("Increase"), '</button>\n <button title="').concat(r.out("Decrease"), '" class="cell-decrease"><span><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#icon-decrease"></use></svg></span>').concat(r.out("Decrease"), '</button>\n <button title="').concat(r.out("Duplicate"), '" class="cell-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>').concat(r.out("Duplicate"), "</button>\n ").concat(s, "\n </div>\n </div>\n ");
xc.appendHtml(a, c), l = a.querySelector(".is-column-tool"), o = a.querySelector(".columnmore");
var d = C(i),
u = l.querySelectorAll("[title]");
Array.prototype.forEach.call(u, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
}));
var v = l.querySelector(".cell-add");
xc.addEventListener(v, "click", (function () {
if (r.cellSelected()) {
d.querySelector(".is-pop-tabs").style.display = "flex";
var e = l.querySelector(".cell-add"),
t = e.getBoundingClientRect().top + window.pageYOffset,
i = e.getBoundingClientRect().left + window.pageXOffset;
d.style.display = "flex", d.style.top = t + 35 + "px", d.style.left = i + "px", xc.removeClass(d, "arrow-bottom"), xc.removeClass(d, "arrow-left"), xc.removeClass(d, "arrow-right"), xc.removeClass(d, "center"), xc.removeClass(d, "right"), xc.addClass(d, "arrow-top"), xc.addClass(d, "left"), "left" === d.querySelector(".active").getAttribute("data-value") ? d.setAttribute("data-mode", "cell-left") : d.setAttribute("data-mode", "cell-right")
}
})), v = l.querySelector(".cell-more"), xc.addEventListener(v, "click", (function () {
if (r.cellSelected()) {
var e = l.querySelector(".cell-more"),
t = e.getBoundingClientRect().top + window.pageYOffset,
i = e.getBoundingClientRect().left + window.pageXOffset;
o.style.display = "flex", o.style.top = t + 35 + "px", o.style.left = i - 7 + "px", xc.removeClass(o, "arrow-bottom"), xc.removeClass(o, "arrow-left"), xc.removeClass(o, "arrow-right"), xc.removeClass(o, "center"), xc.removeClass(o, "right"), xc.addClass(o, "arrow-top"), xc.addClass(o, "left")
}
})), v = l.querySelector(".cell-remove"), xc.addEventListener(v, "click", (function () {
n.grid.removeColumn(), r.clearControls()
})), v = o.querySelector(".cell-prev"), xc.addEventListener(v, "click", (function () {
n.grid.moveColumnPrevious(), r.clearControls()
})), v = o.querySelector(".cell-next"), xc.addEventListener(v, "click", (function () {
n.grid.moveColumnNext(), r.clearControls()
})), v = o.querySelector(".cell-up"), xc.addEventListener(v, "click", (function () {
n.grid.moveColumnUp(), r.clearControls()
})), v = o.querySelector(".cell-down"), xc.addEventListener(v, "click", (function () {
n.grid.moveColumnDown(), r.clearControls()
})), v = o.querySelector(".cell-increase"), xc.addEventListener(v, "click", (function () {
n.grid.increaseColumn(), r.clearControls()
})), v = o.querySelector(".cell-decrease"), xc.addEventListener(v, "click", (function () {
n.grid.decreaseColumn(), r.clearControls()
})), v = o.querySelector(".cell-duplicate"), xc.addEventListener(v, "click", (function () {
n.grid.duplicateColumn(), n.columnMore.style.display = "", r.clearControls()
})), (v = o.querySelector(".cell-html")) && xc.addEventListener(v, "click", (function () {
r.cellSelected() && new g(n.builder).view("cell")
})), document.addEventListener("mousedown", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if ("flex" === o.style.display) {
var i = xc.parentsHasClass(t, "columnmore"),
n = xc.parentsHasClass(t, "cell-more");
if (i || n) return;
o.style.display = ""
}
}))
}
this.columnTool = l, this.columnMore = o
}
return n(e, [{
key: "click",
value: function (e) {
if (xc.addClass(this.columnTool, "active"), this.columnTool.style.top = e.getBoundingClientRect().top - 29 + window.pageYOffset + "px", this.columnTool.style.left = e.getBoundingClientRect().left - 1 + "px", xc.parentsHasAttribute(e, "nogrid")) {
this.columnMore.querySelector(".cell-prev").style.display = "none", this.columnMore.querySelector(".cell-next").style.display = "none", this.columnMore.querySelector(".cell-up").style.display = "none", this.columnMore.querySelector(".cell-down").style.display = "none", this.columnMore.querySelector(".cell-increase").style.display = "none", this.columnMore.querySelector(".cell-decrease").style.display = "none", this.columnMore.querySelector(".cell-duplicate").style.display = "none";
var t = this.columnMore.querySelector(".cell-html");
t && (t.style.display = ""), this.columnTool.querySelector(".cell-add").style.display = "none", this.columnTool.querySelector(".cell-remove").style.display = "none", e.getAttribute("data-html") && (this.columnMore.querySelector(".cell-html").style.display = "none", this.columnTool.querySelector(".cell-more").style.display = "none")
} else {
this.columnMore.querySelector(".cell-prev").style.display = "", this.columnMore.querySelector(".cell-next").style.display = "", this.columnMore.querySelector(".cell-up").style.display = "", this.columnMore.querySelector(".cell-down").style.display = "", this.columnMore.querySelector(".cell-increase").style.display = "", this.columnMore.querySelector(".cell-decrease").style.display = "", this.columnMore.querySelector(".cell-duplicate").style.display = "";
var i = this.columnMore.querySelector(".cell-html");
i && (i.style.display = ""), this.columnTool.querySelector(".cell-add").style.display = "", this.columnTool.querySelector(".cell-remove").style.display = "";
var n = e.parentNode;
n.childElementCount - 2 == 1 ? (this.columnMore.querySelector(".cell-prev").style.display = "none", this.columnMore.querySelector(".cell-next").style.display = "none", this.columnMore.querySelector(".cell-increase").style.display = "none", this.columnMore.querySelector(".cell-decrease").style.display = "none") : (this.columnMore.querySelector(".cell-prev").style.display = "", this.columnMore.querySelector(".cell-next").style.display = "", this.columnMore.querySelector(".cell-increase").style.display = "", this.columnMore.querySelector(".cell-decrease").style.display = "");
var o = this.columnMore.querySelector(".cell-duplicate");
if (e.getAttribute("data-html") ? (i && (i.style.display = "none"), o && (o.style.display = "none")) : (i && (i.style.display = ""), o && (o.style.display = "")), n.hasAttribute("data-protected")) n.querySelector(".is-row-tool").style.display = "none", this.columnTool.style.display = "none";
else n.querySelectorAll("[data-protected]").length > 0 ? n.querySelector(".is-row-tool").style.display = "none" : n.querySelector(".is-row-tool").style.display = "", this.columnTool.style.display = "", xc.parentsHasAttribute(e, "data-protected") ? (this.columnTool.querySelector(".cell-remove").style.display = "none", this.columnTool.querySelector(".cell-more").style.display = "none") : (this.columnTool.querySelector(".cell-remove").style.display = "", this.columnTool.querySelector(".cell-more").style.display = "")
}
}
}, {
key: "refreshColumnTool",
value: function (e) {
this.grid.refreshColumnTool(e)
}
}, {
key: "showColumnTool",
value: function (e) {
this.grid.showColumnTool(e)
}
}, {
key: "hideColumnTool",
value: function () {
this.grid.hideColumnTool()
}
}]), e
}(),
Sc = function () {
function e() {
var i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, e);
this.opts = Object.assign(this, {
animateModal: !1,
elementToAnimate: "",
stuffPlacement: "#_cbhtml"
}, i), this.id = this.makeId();
var n = document.querySelector(this.opts.stuffPlacement);
n || ((n = document.createElement("div")).id = "_cbhtml", document.body.appendChild(n)), this.builderStuff = n;
var o = document.createElement("div");
o.id = this.id, n.appendChild(o), this.objStuff = o
}
return n(e, [{
key: "confirm",
value: function (e, t, i) {
var n = this,
o = '<div class="is-modal is-confirm">\n <div style="max-width:526px;text-align:center;">\n <p>'.concat(e, '</p>\n <button title="').concat(this.out("Delete"), '" class="input-ok classic">').concat(this.out("Delete"), "</button>\n </div>\n </div>"),
r = this.objStuff.querySelector(".is-confirm");
r || (this.objStuff.insertAdjacentHTML("beforeend", o), r = this.builderStuff.querySelector(".is-confirm")), this.show(r, !1, (function () {
r.parentNode.removeChild(r), t(!1)
}), i);
var a = r.querySelector(".is-confirm .input-ok");
this.addEventListener(a, "click", (function () {
n.hide(r), r.parentNode.removeChild(r), t(!0)
}))
}
}, {
key: "show",
value: function (e, t, i, n) {
var o = this;
this.addClass(e, "active");
var r;
if (null != n ? n : this.opts.animateModal) {
var a = document.querySelectorAll(this.opts.elementToAnimate);
Array.prototype.forEach.call(a, (function (e) {
e.style.transform = "scale(0.98)", e.style.WebkitTransform = "scale(0.98)", e.style.MozTransform = "scale(0.98)"
}))
}
if (!e.querySelector(".is-modal-overlay") && (r = t ? '<div class="is-modal-overlay" style="position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.3);z-index:-1;"></div>' : '<div class="is-modal-overlay" style="position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,0.000001);z-index:-1;"></div>', e.insertAdjacentHTML("afterbegin", r), !t)) {
var l = e.querySelector(".is-modal-overlay");
this.addEventListener(l, "click", (function () {
i && i(), o.hide(e)
}))
}
}
}, {
key: "hide",
value: function (e) {
if ("" !== this.opts.elementToAnimate) {
var t = document.querySelectorAll(this.opts.elementToAnimate);
Array.prototype.forEach.call(t, (function (e) {
e.style.transform = "", e.style.WebkitTransform = "", e.style.MozTransform = ""
}))
}
this.removeClass(e, "active")
}
}, {
key: "makeId",
value: function () {
for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", i = 0; i < 2; i++) e += t.charAt(Math.floor(Math.random() * t.length));
for (var n = "", o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = 0; r < 5; r++) n += o.charAt(Math.floor(Math.random() * o.length));
return e + n
}
}, {
key: "addClass",
value: function (e, t) {
e && (this.hasClass(e, t) || (0 === e.classList.length ? e.className = t : e.className = e.className + " " + t))
}
}, {
key: "removeClass",
value: function (e, t) {
e && e.classList.length > 0 && (e.className = e.className.replace(t, ""))
}
}, {
key: "hasClass",
value: function (e, t) {
return !!e && (e.classList ? e.classList.contains(t) : new RegExp("\\b" + t + "\\b").test(e.className))
}
}, {
key: "addEventListener",
value: function (e, t, i) {
e.addEventListener(t, i)
}
}]), e
}(),
Cc = function () {
var e = function () {
return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
};
return e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
},
Ec = function (e, t) {
for (var i = arguments.length, n = new Array(i > 2 ? i - 2 : 0), o = 2; o < i; o++) n[o - 2] = arguments[o];
return setTimeout((function () {
return e.apply(null, n)
}), t)
},
kc = function (e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 100;
return function () {
if (!e.debouncing) {
for (var i = arguments.length, n = new Array(i), o = 0; o < i; o++) n[o] = arguments[o];
e.lastReturnVal = e.apply(window, n), e.debouncing = !0
}
return clearTimeout(e.debounceTimeout), e.debounceTimeout = setTimeout((function () {
e.debouncing = !1
}), t), e.lastReturnVal
}
},
Lc = function (e) {
return e === "" + e
},
Ac = function (e) {
return "[object Array]" === Object.prototype.toString.call(e)
},
qc = function (e) {
return null != e && (Lc(e) && isFinite(parseFloat(e)) || isFinite(e))
},
Mc = function () {
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++) t[i] = arguments[i];
if (!t.length) return null;
for (var n = 0, o = t.length; n < o; n++)
if (qc(t[n])) return t[n];
return null
},
_c = function (e) {
return "[object Object]" === Object.prototype.toString.call(e)
},
Tc = function (e, t) {
var i = {};
for (var n in e) i[n] = e[n];
for (var o in t) i[o] = t[o];
return i
},
Oc = function (e, t, i) {
return e < t ? t : e > i ? i : e
},
Nc = Object.freeze({
__proto__: null,
uuid: Cc,
delay: Ec,
debounce: kc,
isString: Lc,
isArray: Ac,
isNumberLike: qc,
getFirsNumberLike: Mc,
isObject: _c,
simpleExtend: Tc,
between: Oc
}),
Rc = function () {
var e = window.navigator.userAgent,
t = e.indexOf("MSIE ");
if (t > 0) return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
if (e.indexOf("Trident/") > 0) {
var i = e.indexOf("rv:");
return parseInt(e.substring(i + 3, e.indexOf(".", i)), 10)
}
var n = e.indexOf("Edge/");
return n > 0 && parseInt(e.substring(n + 5, e.indexOf(".", n)), 10)
},
Bc = Rc(),
Ic = !(!window.PointerEvent || Bc) && {
passive: !1
},
Hc = function (e) {
return 0 === e.offsetWidth || 0 === e.offsetHeight || !1 === e.open
},
Dc = function (e) {
for (var t = [], i = e.parentNode; i && Hc(i);) t.push(i), i = i.parentNode;
return t
},
Fc = function (e, t) {
var i = Dc(e),
n = i.length,
o = [],
r = e[t],
a = function (e) {
void 0 !== e.open && (e.open = !e.open)
};
if (n) {
for (var l = 0; l < n; l++) o.push({
display: i[l].style.display,
height: i[l].style.height,
overflow: i[l].style.overflow,
visibility: i[l].style.visibility
}), i[l].style.display = "block", i[l].style.height = "0", i[l].style.overflow = "hidden", i[l].style.visibility = "hidden", a(i[l]);
r = e[t];
for (var s = 0; s < n; s++) a(i[s]), i[s].style.display = o[s].display, i[s].style.height = o[s].height, i[s].style.overflow = o[s].overflow, i[s].style.visibility = o[s].visibility
}
return r
},
Pc = function (e, t) {
for (var i in t) e.style[i] = t[i];
return e.style
},
Uc = function (e, t) {
return new RegExp(" " + t + " ").test(" " + e.className + " ")
},
zc = function (e, t) {
Uc(e, t) || (e.className += " " + t)
},
Wc = function (e, t) {
var i = " " + e.className.replace(/[\t\r\n]/g, " ") + " ";
if (Uc(e, t)) {
for (; i.indexOf(" " + t + " ") >= 0;) i = i.replace(" " + t + " ", " ");
e.className = i.replace(/^\s+|\s+$/g, "")
}
},
jc = function (e, t, i) {
for (i && t(e); e.parentNode && !t(e);) e = e.parentNode;
return e
},
Yc = function (e, t, i) {
if (!Lc(t)) throw new TypeError("event name must be String");
if (!(e instanceof HTMLElement)) throw new TypeError("element must be HTMLElement");
t = t.trim();
var n = document.createEvent("CustomEvent");
n.initCustomEvent(t, !1, !1, i), e.dispatchEvent(n)
},
Xc = function (e, t) {
return e.parentNode.insertBefore(t, e.nextSibling)
},
Gc = function (e, t, i) {
t.forEach((function (t) {
e.eventListenerList || (e.eventListenerList = {}), e.eventListenerList[t] || (e.eventListenerList[t] = []), e.addEventListener(t, i, Ic), e.eventListenerList[t].indexOf(i) < 0 && e.eventListenerList[t].push(i)
}))
},
Vc = function (e, t, i) {
t.forEach((function (t) {
var n;
e.removeEventListener(t, i, !1), e.eventListenerList && e.eventListenerList[t] && (n = e.eventListenerList[t].indexOf(i)) > -1 && e.eventListenerList[t].splice(n, 1)
}))
},
Zc = function (e, t) {
if (t.eventListenerList) {
for (var i in t.eventListenerList) t.eventListenerList[i].forEach(n, {
eventName: i,
el: t
});
t.eventListenerList = {}
}
function n(t) {
t === e._startEventListener && this.el.removeEventListener(this.eventName, t, !1)
}
},
Kc = function () {
var e = document.createElement("input");
return e.setAttribute("type", "range"), "text" !== e.type
},
Jc = Object.freeze({
__proto__: null,
detectIE: Rc,
isHidden: Hc,
getHiddenParentNodes: Dc,
getDimension: Fc,
setCss: Pc,
hasClass: Uc,
addClass: zc,
removeClass: Wc,
forEachAncestors: jc,
triggerEvent: Yc,
insertAfter: Xc,
addEventListeners: Gc,
removeEventListeners: Vc,
removeAllListenersFromEl: Zc,
supportsRange: Kc
}),
$c = new RegExp("/[\\n\\t]/", "g"),
Qc = 100,
ed = "rangeSlider",
td = Kc(),
id = {
polyfill: !0,
root: document,
rangeClass: "rangeSlider",
disabledClass: "rangeSlider--disabled",
fillClass: "rangeSlider__fill",
bufferClass: "rangeSlider__buffer",
handleClass: "rangeSlider__handle",
startEvent: ["mousedown", "touchstart", "pointerdown"],
moveEvent: ["mousemove", "touchmove", "pointermove"],
endEvent: ["mouseup", "touchend", "pointerup"],
min: null,
max: null,
step: null,
value: null,
buffer: null,
stick: null,
borderRadius: 10,
vertical: !1
},
nd = !1,
od = function () {
function e(i, n) {
var o, r, a, l;
if (t(this, e), e.instances.push(this), this.element = i, this.options = Tc(id, n), this.polyfill = this.options.polyfill, this.vertical = this.options.vertical, this.onInit = this.options.onInit, this.onSlide = this.options.onSlide, this.onSlideStart = this.options.onSlideStart, this.onSlideEnd = this.options.onSlideEnd, this.onSlideEventsCount = -1, this.isInteractsNow = !1, this.needTriggerEvents = !1, this._addVerticalSlideScrollFix(), this.polyfill || !td) {
var s;
this.options.buffer = this.options.buffer || parseFloat(this.element.getAttribute("data-buffer")), this.identifier = "js-" + ed + "-" + Cc(), this.min = Mc(this.options.min, parseFloat(this.element.getAttribute("min")), 0), this.max = Mc(this.options.max, parseFloat(this.element.getAttribute("max")), o = Qc), this.value = Mc(this.options.value, this.element.value, parseFloat(this.element.value || this.min + (this.max - this.min) / 2)), this.step = Mc(this.options.step, parseFloat(this.element.getAttribute("step")) || (r = 1)), this.percent = null, Ac(this.options.stick) && this.options.stick.length >= 1 ? this.stick = this.options.stick : (a = this.element.getAttribute("stick")) && (l = a.split(" ")).length >= 1 && (this.stick = l.map(parseFloat)), this.stick && 1 === this.stick.length && this.stick.push(1.5 * this.step), this._updatePercentFromValue(), this.toFixed = this._toFixed(this.step), this.container = document.createElement("div"), zc(this.container, this.options.fillClass), s = this.vertical ? this.options.fillClass + "__vertical" : this.options.fillClass + "__horizontal", zc(this.container, s), this.handle = document.createElement("div"), zc(this.handle, this.options.handleClass), s = this.vertical ? this.options.handleClass + "__vertical" : this.options.handleClass + "__horizontal", zc(this.handle, s), this.range = document.createElement("div"), zc(this.range, this.options.rangeClass), this.range.id = this.identifier;
var c = i.getAttribute("title");
c && c.length > 0 && this.range.setAttribute("title", c), this.options.bufferClass && (this.buffer = document.createElement("div"), zc(this.buffer, this.options.bufferClass), this.range.appendChild(this.buffer), s = this.vertical ? this.options.bufferClass + "__vertical" : this.options.bufferClass + "__horizontal", zc(this.buffer, s)), this.range.appendChild(this.container), this.range.appendChild(this.handle), s = this.vertical ? this.options.rangeClass + "__vertical" : this.options.rangeClass + "__horizontal", zc(this.range, s), qc(this.options.value) && (this._setValue(this.options.value, !0), this.element.value = this.options.value), qc(this.options.buffer) && this.element.setAttribute("data-buffer", this.options.buffer), qc(this.options.min) && this.element.setAttribute("min", "" + this.min), (qc(this.options.max) || o) && this.element.setAttribute("max", "" + this.max), (qc(this.options.step) || r) && this.element.setAttribute("step", "" + this.step), Xc(this.element, this.range), Pc(this.element, {
position: "absolute",
width: "1px",
height: "1px",
overflow: "hidden",
opacity: "0"
}), this._handleDown = this._handleDown.bind(this), this._handleMove = this._handleMove.bind(this), this._handleEnd = this._handleEnd.bind(this), this._startEventListener = this._startEventListener.bind(this), this._changeEventListener = this._changeEventListener.bind(this), this._handleResize = this._handleResize.bind(this), this._init(), window.addEventListener("resize", this._handleResize, !1), Gc(this.options.root, this.options.startEvent, this._startEventListener), this.element.addEventListener("change", this._changeEventListener, !1)
}
}
return n(e, [{
key: "update",
value: function (e, t) {
return t && (this.needTriggerEvents = !0), _c(e) && (qc(e.min) && (this.element.setAttribute("min", "" + e.min), this.min = e.min), qc(e.max) && (this.element.setAttribute("max", "" + e.max), this.max = e.max), qc(e.step) && (this.element.setAttribute("step", "" + e.step), this.step = e.step, this.toFixed = this._toFixed(e.step)), qc(e.buffer) && this._setBufferPosition(e.buffer), qc(e.value) && this._setValue(e.value)), this._update(), this.onSlideEventsCount = 0, this.needTriggerEvents = !1, this
}
}, {
key: "destroy",
value: function () {
var t = this;
Zc(this, this.options.root), window.removeEventListener("resize", this._handleResize, !1), this.element.removeEventListener("change", this._changeEventListener, !1), this.element.style.cssText = "", delete this.element[ed], this.range && this.range.parentNode.removeChild(this.range), e.instances = e.instances.filter((function (e) {
return e !== t
})), e.instances.some((function (e) {
return e.vertical
})) || this._removeVerticalSlideScrollFix()
}
}, {
key: "_toFixed",
value: function (e) {
return (e + "").replace(".", "").length - 1
}
}, {
key: "_init",
value: function () {
this.onInit && "function" == typeof this.onInit && this.onInit(), this._update(!1)
}
}, {
key: "_updatePercentFromValue",
value: function () {
this.percent = (this.value - this.min) / (this.max - this.min)
}
}, {
key: "_startEventListener",
value: function (e, t) {
var i = this,
n = e.target,
o = !1;
(1 === e.which || "touches" in e) && (jc(n, (function (e) {
return o = e.id === i.identifier && !Uc(e, i.options.disabledClass)
}), !0), o && this._handleDown(e, t))
}
}, {
key: "_changeEventListener",
value: function (e, t) {
if (!t || t.origin !== this.identifier) {
var i = e.target.value,
n = this._getPositionFromValue(i);
this._setPosition(n)
}
}
}, {
key: "_update",
value: function (e) {
var t = this.vertical ? "offsetHeight" : "offsetWidth";
this.handleSize = Fc(this.handle, t), this.rangeSize = Fc(this.range, t), this.maxHandleX = this.rangeSize - this.handleSize, this.grabX = this.handleSize / 2, this.position = this._getPositionFromValue(this.value), this.element.disabled ? zc(this.range, this.options.disabledClass) : Wc(this.range, this.options.disabledClass), this._setPosition(this.position), this.options.bufferClass && this.options.buffer && this._setBufferPosition(this.options.buffer), this._updatePercentFromValue(), !1 !== e && Yc(this.element, "change", {
origin: this.identifier
})
}
}, {
key: "_addVerticalSlideScrollFix",
value: function () {
this.vertical && !nd && (document.addEventListener("touchmove", e._touchMoveScrollHandler, {
passive: !1
}), nd = !0)
}
}, {
key: "_removeVerticalSlideScrollFix",
value: function () {
document.removeEventListener("touchmove", e._touchMoveScrollHandler), nd = !1
}
}, {
key: "_handleResize",
value: function () {
var e = this;
return kc((function () {
Ec((function () {
e._update()
}), 300)
}), 50)()
}
}, {
key: "_handleDown",
value: function (e) {
if (this.isInteractsNow = !0, e.preventDefault(), Gc(this.options.root, this.options.moveEvent, this._handleMove), Gc(this.options.root, this.options.endEvent, this._handleEnd), !((" " + e.target.className + " ").replace($c, " ").indexOf(this.options.handleClass) > -1)) {
var t = this.range.getBoundingClientRect(),
i = this._getRelativePosition(e),
n = this.vertical ? t.bottom : t.left,
o = this._getPositionFromNode(this.handle) - n,
r = i - this.grabX;
this._setPosition(r), i >= o && i < o + 2 * this.options.borderRadius && (this.grabX = i - o), this._updatePercentFromValue()
}
}
}, {
key: "_handleMove",
value: function (e) {
var t = this._getRelativePosition(e);
this.isInteractsNow = !0, e.preventDefault(), this._setPosition(t - this.grabX)
}
}, {
key: "_handleEnd",
value: function (t) {
t.preventDefault(), Vc(this.options.root, this.options.moveEvent, this._handleMove), Vc(this.options.root, this.options.endEvent, this._handleEnd), Yc(this.element, "change", {
origin: this.identifier
}), (this.isInteractsNow || this.needTriggerEvents) && (this.onSlideEnd && "function" == typeof this.onSlideEnd && this.onSlideEnd(this.value, this.percent, this.position), this.vertical && (e.slidingVertically = !1)), this.onSlideEventsCount = 0, this.isInteractsNow = !1
}
}, {
key: "_setPosition",
value: function (t) {
var i, n, o, r, a = this._getValueFromPosition(Oc(t, 0, this.maxHandleX));
this.stick && ((o = a % (r = this.stick[0])) < (n = this.stick[1] || .1) ? a -= o : Math.abs(r - o) < n && (a = a - o + r)), i = this._getPositionFromValue(a), this.vertical ? (this.container.style.height = i + this.grabX + "px", this.handle.style.webkitTransform = "translateY(-" + i + "px)", this.handle.style.msTransform = "translateY(-" + i + "px)", this.handle.style.transform = "translateY(-" + i + "px)") : (this.container.style.width = i + this.grabX + "px", this.handle.style.webkitTransform = "translateX(" + i + "px)", this.handle.style.msTransform = "translateX(" + i + "px)", this.handle.style.transform = "translateX(" + i + "px)"), this._setValue(a), this.position = i, this.value = a, this._updatePercentFromValue(), (this.isInteractsNow || this.needTriggerEvents) && (this.onSlideStart && "function" == typeof this.onSlideStart && 0 === this.onSlideEventsCount && this.onSlideStart(this.value, this.percent, this.position), this.onSlide && "function" == typeof this.onSlide && this.onSlide(this.value, this.percent, this.position), this.vertical && (e.slidingVertically = !0)), this.onSlideEventsCount++
}
}, {
key: "_setBufferPosition",
value: function (e) {
var t = !0;
if (isFinite(e)) e = parseFloat(e);
else {
if (!Lc(e)) return void console.warn("New position must be XXpx or XX%");
e.indexOf("px") > 0 && (t = !1), e = parseFloat(e)
}
if (isNaN(e)) console.warn("New position is NaN");
else if (this.options.bufferClass) {
var i = t ? e : e / this.rangeSize * 100;
i < 0 && (i = 0), i > 100 && (i = 100), this.options.buffer = i;
var n = this.options.borderRadius / this.rangeSize * 100,
o = i - n;
o < 0 && (o = 0), this.vertical ? (this.buffer.style.height = o + "%", this.buffer.style.bottom = .5 * n + "%") : (this.buffer.style.width = o + "%", this.buffer.style.left = .5 * n + "%"), this.element.setAttribute("data-buffer", i)
} else console.warn("You disabled buffer, it's className is empty")
}
}, {
key: "_getPositionFromNode",
value: function (e) {
for (var t = this.vertical ? this.maxHandleX : 0; null !== e;) t += this.vertical ? e.offsetTop : e.offsetLeft, e = e.offsetParent;
return t
}
}, {
key: "_getRelativePosition",
value: function (e) {
var t = this.range.getBoundingClientRect(),
i = this.vertical ? t.bottom : t.left,
n = 0,
o = this.vertical ? "pageY" : "pageX";
return void 0 !== e[o] ? n = e.touches && e.touches.length ? e.touches[0][o] : e[o] : void 0 !== e.originalEvent ? void 0 !== e.originalEvent[o] ? n = e.originalEvent[o] : e.originalEvent.touches && e.originalEvent.touches[0] && void 0 !== e.originalEvent.touches[0][o] && (n = e.originalEvent.touches[0][o]) : e.touches && e.touches[0] && void 0 !== e.touches[0][o] ? n = e.touches[0][o] : !e.currentPoint || void 0 === e.currentPoint.x && void 0 === e.currentPoint.y || (n = this.vertical ? e.currentPoint.y : e.currentPoint.x), this.vertical && (n -= window.pageYOffset), this.vertical ? i - n : n - i
}
}, {
key: "_getPositionFromValue",
value: function (e) {
var t = (e - this.min) / (this.max - this.min) * this.maxHandleX;
return isNaN(t) ? 0 : t
}
}, {
key: "_getValueFromPosition",
value: function (e) {
var t = e / (this.maxHandleX || 1),
i = this.step * Math.round(t * (this.max - this.min) / this.step) + this.min;
return Number(i.toFixed(this.toFixed))
}
}, {
key: "_setValue",
value: function (e, t) {
(e !== this.value || t) && (this.element.value = e, this.value = e, Yc(this.element, "input", {
origin: this.identifier
}))
}
}], [{
key: "create",
value: function (t, i) {
var n = function (t) {
var n = t[ed];
n || (n = new e(t, i), t[ed] = n)
};
t.length ? Array.prototype.slice.call(t).forEach((function (e) {
n(e)
})) : n(t)
}
}, {
key: "_touchMoveScrollHandler",
value: function (t) {
e.slidingVertically && t.preventDefault()
}
}]), e
}();
od.dom = Jc, od.functions = Nc, od.instances = [], od.slidingVertically = !1;
var rd = function () {
function e() {
var i = this,
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, e);
var o = {
onPick: function () {},
color: "",
colors: ["#ff9f01", "#f57c00", "#e64918", "#d32f2f", "#5d4038", "#37474f", "#353535", "#fbc02c", "#b0b42a", "#689f39", "#c21f5b", "#7b21a2", "#522da8", "#616161", "#01b8c9", "#009688", "#388d3c", "#0388d0", "#1465c0", "#2f3f9e", "#9e9e9e"],
renderOn: "",
animateModal: !1,
elementToAnimate: "",
stuffPlacement: "#_cbhtml",
lang: new Array
};
this.opts = Object.assign(this, o, n), this.id = function () {
for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", i = 0; i < 2; i++) e += t.charAt(Math.floor(Math.random() * t.length));
for (var n = "", o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = 0; r < 5; r++) n += o.charAt(Math.floor(Math.random() * o.length));
return e + n
}();
var r = document.querySelector(this.opts.stuffPlacement);
r || ((r = document.createElement("div")).id = "_cbhtml", document.body.appendChild(r)), this.builderStuff = r;
var a = document.createElement("div");
a.id = this.id, r.appendChild(a), this.objStuff = a;
var l = new Sc({
animateModal: this.opts.animateModal,
elementToAnimate: this.opts.elementToAnimate,
stuffPlacement: this.opts.stuffPlacement
});
this.modal = l;
var s = "";
if (this.opts.colors.length > 0) {
s += '<div class="color-default clearfix">';
for (var c = 0; c < this.opts.colors.length; c++) "#ffffff" == this.opts.colors[c] ? s += '<button title="' + this.opts.colors[c] + '" data-color="' + this.opts.colors[c] + '" style="background:' + this.opts.colors[c] + ';outline:rgba(222,222,222,0.75) 1px solid"></button>' : s += '<button title="' + this.opts.colors[c] + '" data-color="' + this.opts.colors[c] + '" style="background:' + this.opts.colors[c] + ';"></button>';
s += "</div>"
}
var d = "";
for (c = 0; c < 106; c++) d += c % 2 == 0 ? '<div style="background:#eee;width:7px;height:7px"></div>' : '<div style="background:#fff;width:7px;height:7px"></div>';
var u = "";
for (c = 0; c < 25; c++) u += c % 2 == 0 ? '<div style="background:#eee;width:7px;height:7px"></div>' : '<div style="background:#fff;width:7px;height:7px"></div>';
var p, v = '<div class="pickcolor" style="width:269px;padding:12px;box-sizing:border-box;">\n '.concat(s, '\n <div class="color-gradient clearfix"></div>\n\n <div class="div-color-opacity" style="height: 10px; margin: 12px 0px 17px;position:relative;">\n <div style="position:absolute;top:0;left:0;width:100%;height:23px;display:flex;flex-direction:column;flex-flow:wrap">\n ').concat(d, '\n </div>\n <input class="color-opacity" type="range" />\n </div>\n <div class="clearfix" style="margin:25px 0 3px;">\n <button title="').concat(this.out("B"), '" data-color="#000000" style="background:#111111;color:#f3f3f3;border:transparent 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;border-right:none;">').concat(this.out("B"), '</button>\n <button title="').concat(this.out("W"), '" data-color="#ffffff" style="background:#ffffff;border:#e7e7e7 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;border-right:none;">').concat(this.out("W"), '</button>\n <button title="').concat(this.out("Clear"), '" data-color="" class="clear classic" style="width:140px;height:35px;line-height:35px;border:#e7e7e7 1px solid;border-right:none;">').concat(this.out("Clear"), '</button>\n <button title="').concat(this.out("More"), '" class="input-hsl" style="background:#ffffff;border:#e7e7e7 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;"><svg class="is-icon-flex" style="fill: rgba(0, 0, 0, 0.45);width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>\n </div>\n <div style="display:flex">\n <div style="width:36px;flex-grow: 0;flex-shrink: 0;flex-basis: 36px;height:35px;border:1px solid rgba(53, 53, 53, 0.28);border-right:none;box-sizing:border-box;margin-top:8px;position:relative;">\n <div style="position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;flex-flow:wrap;overflow:hidden;">\n ').concat(u, '\n </div>\n <button class="is-color-preview" style="position:absolute;top:0;left:0;width:100%;height:100%;transition:none;"></button>\n </div>\n <input class="input-text" type="text" style="width:209px;height:35px;margin-top:8px;font-size:13px;"/>\n <button title="').concat(this.out("Apply"), '" class="input-ok" style="height:35px;border: 1px solid rgb(199, 199, 199);border-left:none;margin-top:8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);"><use xlink:href="#icon-ok"></use></svg></use></svg></svg></button>\n </div>\n </div>'),
h = '<div class="is-modal pickcolor" style="background: rgba(255,255,255,0.001);">\n <div style="max-width:271px;padding:0;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;height:11px;width: 100%;background: transparent;"></div>\n <div style="padding:12px 12px 12px">\n\n '.concat(s, '\n <div class="color-gradient clearfix"></div>\n \n <div class="div-color-opacity" style="height: 10px; margin: 12px 0px 17px;position:relative;">\n <div style="position:absolute;top:0;left:0;width:100%;height:23px;display:flex;flex-direction:column;flex-flow:wrap">\n ').concat(d, '\n </div>\n <input class="color-opacity" type="range" />\n </div>\n <div class="clearfix" style="margin:25px 0 3px;">\n <button title="').concat(this.out("B"), '" data-color="#000000" style="background:#111111;color:#f3f3f3;border:transparent 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;border-right:none;">').concat(this.out("B"), '</button>\n <button title="').concat(this.out("W"), '" data-color="#ffffff" style="background:#ffffff;border:#e7e7e7 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;border-right:none;">').concat(this.out("W"), '</button>\n <button title="').concat(this.out("Clear"), '" data-color="" class="clear classic" style="width:140px;height:35px;line-height:35px;border:#e7e7e7 1px solid;border-right:none;">').concat(this.out("Clear"), '</button>\n <button title="').concat(this.out("More"), '" class="input-hsl" style="background:#ffffff;border:#e7e7e7 1px solid;width:35px;height:35px;line-height:35px;font-size:10px;"><svg class="is-icon-flex" style="fill: rgba(0, 0, 0, 0.45);width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>\n </div>\n <div style="display:flex">\n <div style="width:36px;height:35px;border:1px solid rgba(53, 53, 53, 0.28);border-right:none;box-sizing:border-box;margin-top:8px;position:relative;">\n <div style="position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;flex-flow:wrap;overflow:hidden;">\n ').concat(u, '\n </div>\n <button class="is-color-preview" style="position:absolute;top:0;left:0;width:100%;height:100%;transition:none;"></button>\n </div>\n <input class="input-text" type="text" style="width:209px;height:35px;margin-top:8px;font-size:13px;"/>\n <button title="').concat(this.out("Apply"), '" class="input-ok" style="display:none;height:35px;border: 1px solid rgb(199, 199, 199);border-left:none;margin-top:8px;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);"><use xlink:href="#icon-ok"></use></svg></use></svg></svg></button>\n </div>\n \n </div>\n </div>\n </div>');
"" !== this.opts.renderOn ? (p = document.querySelector(this.opts.renderOn)).insertAdjacentHTML("beforeend", v) : (a.insertAdjacentHTML("beforeend", h), p = a.querySelector(".is-modal.pickcolor")), a.insertAdjacentHTML("beforeend", '<div class="is-modal pickcolormore" style="background: rgba(255,255,255,0.001);">\n <div style="max-width:341px;padding:0;/*transform:translate3d(323px, 0px, 0px)*/">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;height:11px;width: 100%;background: transparent;"></div>\n <div style="padding:12px 12px 12px">\n \n <div class="color-swatch clearfix"></div>\n \n <div class="div-color-hue" style="height: 23px;margin: 10px 0 0;">\n <input class="color-hue" type="range" />\n </div>\n\n </div>\n </div>\n </div>');
var f = a.querySelector(".is-modal.pickcolormore");
this.pickcolor = p, this.pickcolormore = f, new q({
selector: "#" + this.id + " .is-draggable"
});
var g = document.createElement("div");
g.style.backgroundColor = this.opts.color;
var m, y = g.style.backgroundColor;
"" !== y && (m = gd.color(y), this.baseRGB = m);
var b = f.querySelector(".color-swatch"),
x = p.querySelector(".color-gradient");
if (m) {
var w;
w = "" !== y ? hd(m.r, m.g, m.b) : 0, cd(b, w);
var S = md(m.r, m.g, m.b);
dd(x, w, S[1])
} else {
0,
cd(b, 0);
var C = md(255, 255, 255);dd(x, 0, C[1])
}
var E = p.querySelector(".input-hsl");
this.addEventListener(E, "click", (function () {
i.modal.show(f, !1, null, !1)
}));
var k = f.querySelector(".color-hue");
new od(k, {
min: 0,
max: 360,
step: 1,
value: 0,
onSlide: function (e, t) {
cd(b, 361 * t)
}
});
var L = document.createElement("div");
L.style.display = "flex", L.style.position = "absolute", L.style.top = 0, L.style.left = 0;
var A = function (e, t, i, n) {
for (var o = [], r = Math.trunc(360 / n), a = 0; a < n; a++) {
var l = a * r;
o.push("hsla(".concat(l, ",").concat(t, "%,").concat(e, "%,").concat(i, ")"))
}
return o
}(45, 100, 1, 315);
for (c = 0; c < A.length - 1; c++) {
var M = document.createElement("div");
M.style.backgroundColor = A[c], M.style.width = "1px", M.style.height = "23px", L.appendChild(M)
}
f.querySelector(".div-color-hue .rangeSlider").appendChild(L);
var _ = p.querySelector(".color-opacity"),
T = new od(_, {
min: 0,
max: 1,
step: .01,
onSlide: function (e, t) {
var n, o = i.baseRGB;
o && (n = 1 === t ? "rgb(" + o.r + "," + o.g + "," + o.b + ")" : "rgba(" + o.r + "," + o.g + "," + o.b + "," + t + ")", p.querySelector(".is-color-preview").style.backgroundColor = n, p.querySelector(".input-text").value = n, i.opts.onPick(n))
}
});
this.colorOpacitySlider = T, m && (m.a ? _.value = m.a : _.value = 1), T._update();
var O = _.value,
N = "",
R = "";
m && (N = 1 * O == 1 ? "rgb(" + m.r + "," + m.g + "," + m.b + ")" : "rgba(" + m.r + "," + m.g + "," + m.b + "," + O + ")", R = "linear-gradient(90deg, rgba(" + m.r + "," + m.g + "," + m.b + ",0), rgba(" + m.r + "," + m.g + "," + m.b + ",1))"), p.querySelector(".div-color-opacity .rangeSlider").style.backgroundImage = R;
var B = p.querySelector(".is-color-preview");
B.style.background = "none", "" !== N && (B.style.backgroundColor = N);
var I = p.querySelector(".input-text");
I.value = N, navigator.userAgent.indexOf("Firefox") > -1 || this.addEventListener(I, "keydown", (function (e) {
13 !== e.which && 13 !== e.keyCode && "Enter" !== e.key || (i.setColor(e.target.value), e.preventDefault(), e.stopImmediatePropagation())
}));
var H = p.querySelector(".input-ok");
this.addEventListener(H, "click", (function () {
i.setColor(I.value)
}));
var D = p.querySelectorAll("[data-color]");
Array.prototype.forEach.call(D, (function (e) {
i.addEventListener(e, "click", (function (e) {
var t = e.target,
n = t.getAttribute("data-color"),
o = ad(n);
if (i.baseRGB = o, !i.parentsHasClass(t, "color-gradient") && "" !== n)
if (o.r === o.g && o.g === o.b) ud(x);
else {
var r = hd(o.r, o.g, o.b);
cd(b, r), dd(p.querySelector(".color-gradient"), r, md(o.r, o.g, o.b)[1])
} var a = _.value,
l = "",
s = "";
o && (l = 1 * a == 1 ? "rgb(" + o.r + "," + o.g + "," + o.b + ")" : "rgba(" + o.r + "," + o.g + "," + o.b + "," + a + ")", s = "linear-gradient(90deg, rgba(" + o.r + "," + o.g + "," + o.b + ",0), rgba(" + o.r + "," + o.g + "," + o.b + ",1))"), p.querySelector(".div-color-opacity .rangeSlider").style.backgroundImage = s, p.querySelector(".is-color-preview").style.backgroundColor = l, p.querySelector(".input-text").value = l, i.opts.onPick(l)
}))
})), D = f.querySelectorAll("[data-color]"), Array.prototype.forEach.call(D, (function (e) {
i.addEventListener(e, "click", (function () {
var t = ad(e.getAttribute("data-color"));
i.baseRGB = t;
var n = hd(t.r, t.g, t.b),
o = md(t.r, t.g, t.b);
dd(x, n, o[1]);
var r = _.value,
a = "",
l = "";
t && (a = 1 * r == 1 ? "rgb(" + t.r + "," + t.g + "," + t.b + ")" : "rgba(" + t.r + "," + t.g + "," + t.b + "," + r + ")", l = "linear-gradient(90deg, rgba(" + t.r + "," + t.g + "," + t.b + ",0), rgba(" + t.r + "," + t.g + "," + t.b + ",1))"), p.querySelector(".div-color-opacity .rangeSlider").style.backgroundImage = l, p.querySelector(".is-color-preview").style.backgroundColor = a, p.querySelector(".input-text").value = a, i.opts.onPick(a)
}))
}))
}
return n(e, [{
key: "out",
value: function (e) {
if (this.opts.lang) {
var t = this.opts.lang[e];
return t || e
}
return e
}
}, {
key: "open",
value: function (e, t) {
e && (this.opts.onPick = e), t && (this.opts.color = t, this.setColor(t)), this.modal.show(this.pickcolor, !1, null, !1)
}
}, {
key: "setColor",
value: function (e) {
var t, i = this.pickcolor,
n = this.pickcolormore,
o = i.querySelector(".color-opacity"),
r = i.querySelector(".color-gradient"),
a = e;
if (-1 !== a.indexOf("rgb") && (t = gd.color(a)), -1 !== a.indexOf("#") && (t = ad(a)), !t) return ud(r), o.value = 1, this.colorOpacitySlider._update(), i.querySelector(".div-color-opacity .rangeSlider").style.backgroundImage = "", i.querySelector(".is-color-preview").style.background = "none", void(i.querySelector(".input-text").value = "");
if (this.baseRGB = t, t.r === t.g && t.g === t.b) ud(r);
else {
var l = n.querySelector(".color-swatch"),
s = hd(t.r, t.g, t.b);
cd(l, s), dd(r, s, md(t.r, t.g, t.b)[1])
}
t.a || 0 === t.a ? o.value = t.a : o.value = 1, this.colorOpacitySlider._update();
var c = o.value,
d = "",
u = "";
t && (d = 1 * c == 1 ? "rgb(" + t.r + "," + t.g + "," + t.b + ")" : "rgba(" + t.r + "," + t.g + "," + t.b + "," + c + ")", u = "linear-gradient(90deg, rgba(" + t.r + "," + t.g + "," + t.b + ",0), rgba(" + t.r + "," + t.g + "," + t.b + ",1))"), i.querySelector(".div-color-opacity .rangeSlider").style.backgroundImage = u, i.querySelector(".is-color-preview").style.backgroundColor = d, i.querySelector(".input-text").value = d, this.opts.onPick(d)
}
}, {
key: "addEventListener",
value: function (e, t, i) {
e.addEventListener(t, i)
}
}, {
key: "parentsHasClass",
value: function (e, t) {
for (; e;) {
if ("BODY" === e.tagName || "HTML" === e.tagName) return !1;
if (!e.classList) return !1;
if (e.classList.contains(t)) return !0;
e = e.parentNode
}
}
}]), e
}();
function ad(e) {
if ("" === e) return null;
var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
return t ? {
r: parseInt(t[1], 16),
g: parseInt(t[2], 16),
b: parseInt(t[3], 16)
} : null
}
function ld(e) {
var t = "0123456789abcdef",
i = parseInt(e);
return 0 == i || isNaN(e) ? "00" : (i = Math.round(Math.min(Math.max(0, i), 255)), t.charAt((i - i % 16) / 16) + t.charAt(i % 16))
}
function sd(e) {
return ld(e[0]) + ld(e[1]) + ld(e[2])
}
function cd(e, t) {
var i, n;
if ("" === e.innerHTML)
for (i = 0; i < 10; ++i) {
var o = document.createElement("div");
for (o.style.width = "100%", o.id = "row-" + i, e.appendChild(o), n = 0; n < 10; ++n) {
var r = i * (100 / 9) + 5,
a = 10 * n + 5;
a > 50 && a <= 55 && (a = 50), r > 100 && (r = 100);
var l = "#" + sd(vd(t, r, a)),
s = document.createElement("div");
s.title = l, s.style.background = l, s.setAttribute("data-color", l), e.querySelector("#row-" + i).appendChild(s)
}
} else
for (i = 0; i < 10; ++i) {
var c = e.childNodes[i];
for (n = 0; n < 10; ++n) {
var d = c.childNodes[n],
u = i * (100 / 9) + 5,
p = 10 * n + 5;
p > 50 && p <= 55 && (p = 50), u > 100 && (u = 100);
var v = "#" + sd(vd(t, u, p));
d.title = v, d.style.background = v, d.setAttribute("data-color", v)
}
}
}
function dd(e, t, i) {
var n, o, r, a;
if ("" === e.innerHTML)
for (n = 0; n < 5; ++n) {
var l = document.createElement("div");
for (l.style.width = "100%", l.id = "row-" + n, e.appendChild(l), o = 0; o < 7; ++o) {
var s = o * (100 / 7);
s += 2.857142857142857 * (-1 * (n - 5) - 1), 0 === o && (s = o * (100 / 7));
var c = "#" + sd(vd(t, i, s)),
d = document.createElement("div");
d.title = c, d.style.background = c, d.setAttribute("data-color", c), e.querySelector("#row-" + n).appendChild(d)
}
} else
for (n = 0; n < 5; ++n)
for (r = e.childNodes[n], o = 0; o < 7; ++o) {
a = r.childNodes[o];
var u = o * (100 / 7);
u += 2.857142857142857 * (-1 * (n - 5) - 1), 6 === n && 0 === o && (u = 0);
var p = "#" + sd(vd(t, i, u));
a.title = p, a.style.background = p, a.setAttribute("data-color", p)
}
}
function ud(e) {
var t, i, n, o;
if ("" === e.innerHTML)
for (t = 0; t < 5; ++t) {
var r = document.createElement("div");
for (r.style.width = "100%", r.id = "row-" + t, e.appendChild(r), i = 0; i < 7; ++i) {
var a = i * (100 / 7);
a += 2.857142857142857 * (-1 * (t - 5) - 1), 0 === i && (a = i * (100 / 7));
var l = "#" + sd(vd(0, 0, a)),
s = document.createElement("div");
s.title = l, s.style.background = l, s.setAttribute("data-color", l), e.querySelector("#row-" + t).appendChild(s)
}
} else
for (t = 0; t < 5; ++t)
for (n = e.childNodes[t], i = 0; i < 7; ++i) {
o = n.childNodes[i];
var c = i * (100 / 7);
c += 2.857142857142857 * (-1 * (t - 5) - 1), 6 === t && 0 === i && (c = 0);
var d = "#" + sd(vd(0, 0, c));
o.title = d, o.style.background = d, o.setAttribute("data-color", d)
}
}
function pd(e, t, i) {
return i < 0 ? i += 1 : i > 1 && (i -= 1), 6 * i < 1 ? e + (t - e) * i * 6 : 2 * i < 1 ? t : 3 * i < 2 ? e + (t - e) * (2 / 3 - i) * 6 : e
}
function vd(e, t, i) {
e /= 360, t /= 100;
var n = (i /= 100) <= .5 ? i * (t + 1) : i + t - i * t,
o = 2 * i - n;
return [parseInt(255 * pd(o, n, e + 1 / 3)), parseInt(255 * pd(o, n, e)), parseInt(255 * pd(o, n, e - 1 / 3))]
}
function hd(e, t, i) {
e /= 255, t /= 255, i /= 255;
var n, o, r, a = Math.max(e, t, i),
l = a - Math.min(e, t, i);
if (0 == l) n = 0;
else switch (a) {
case e:
r = 0, (o = (t - i) / l) < 0 && (r = 6), n = o + r;
break;
case t:
n = (o = (i - e) / l) + (r = 2);
break;
case i:
n = (o = (e - t) / l) + (r = 4)
}
return 60 * n
}
var fd, gd = (fd = function (e) {
return parseInt(e, 16)
}, {
color: function (e) {
var t = e.slice(0, 1);
return "#" === t ? function (e) {
var t;
return 4 === e.length ? (t = e.replace("#", "").split(""), {
r: fd(t[0] + t[0]),
g: fd(t[1] + t[1]),
b: fd(t[2] + t[2])
}) : {
r: fd(e.slice(1, 3)),
g: fd(e.slice(3, 5)),
b: fd(e.slice(5))
}
}(e) : "r" === t.toLowerCase() ? function (e) {
var t, i = e.slice(e.indexOf("(") + 1, e.indexOf(")")).split(","),
n = !1;
return t = {
r: (i = i.map((function (e, t) {
return 3 !== t ? parseInt(e, 10) : n = !0, parseFloat(e)
})))[0],
g: i[1],
b: i[2]
}, n && (t.a = i[3]), t
}(e) : void console.log("!Ooops! RGBvalues.color(" + e + ") : HEX, RGB, or RGBa strings only")
}
});
function md(e, t, i) {
e /= 255, t /= 255, i /= 255;
var n, o, r = Math.max(e, t, i),
a = Math.min(e, t, i),
l = (r + a) / 2;
if (r == a) n = o = 0;
else {
var s = r - a;
switch (o = l > .5 ? s / (2 - r - a) : s / (r + a), r) {
case e:
n = (t - i) / s + (t < i ? 6 : 0);
break;
case t:
n = (i - e) / s + 2;
break;
case i:
n = (e - t) / s + 4
}
n /= 6
}
return [100 * n + .5 | 0, 100 * o + .5 | 0, 100 * l + .5 | 0]
}
var yd = function () {
function e() {
var i = this,
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, e);
var o = {
colors: ["#ff9f01", "#f57c00", "#e64918", "#d32f2f", "#5d4038", "#37474f", "#353535", "#fbc02c", "#b0b42a", "#689f39", "#c21f5b", "#7b21a2", "#522da8", "#616161", "#01b8c9", "#009688", "#388d3c", "#0388d0", "#1465c0", "#2f3f9e", "#9e9e9e"],
gradientcolors: [
["linear-gradient(0deg, rgb(255, 57, 25), rgb(249, 168, 37))"],
["linear-gradient(0deg, rgb(255, 57, 25), rgb(255, 104, 15))"],
["linear-gradient(0deg, #FF5722, #FF9800)"],
["linear-gradient(0deg, #613ca2, rgb(110, 123, 217))"],
["linear-gradient(0deg, rgb(65, 70, 206), rgb(236, 78, 130))"],
["linear-gradient(0deg, rgb(0, 150, 102), rgb(90, 103, 197))"],
["linear-gradient(30deg, rgb(249, 119, 148), rgb(98, 58, 162))"],
["linear-gradient(0deg, rgb(223, 70, 137), rgb(90, 103, 197))"],
["linear-gradient(0deg, rgb(40, 53, 147), rgb(90, 103, 197))"],
["linear-gradient(0deg, rgb(21, 101, 192), rgb(52, 169, 239))"],
["linear-gradient(0deg, rgb(32, 149, 219), rgb(139, 109, 230))"],
["linear-gradient(0deg, rgb(90, 103, 197), rgb(0, 184, 201))"],
["linear-gradient(0deg, rgb(0, 184, 201), rgb(253, 187, 45))"],
["linear-gradient(0deg, rgb(255, 208, 100), rgb(239, 98, 159))"],
["linear-gradient(0deg, rgb(0, 214, 223), rgb(130, 162, 253))"],
["linear-gradient(0deg, rgb(50, 234, 251), rgb(248, 247, 126))"],
["linear-gradient(0deg, rgb(141, 221, 255), rgb(255, 227, 255))"],
["linear-gradient(0deg, rgb(255, 170, 170), rgb(255, 255, 200))"],
["linear-gradient(0deg, rgb(239, 239, 239), rgb(252, 252, 252))"]
],
animateModal: !1,
elementToAnimate: "",
stuffPlacement: "#_cbhtml",
lang: new Array
};
this.opts = Object.assign(this, o, n), this.id = function () {
for (var e = "", t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", i = 0; i < 2; i++) e += t.charAt(Math.floor(Math.random() * t.length));
for (var n = "", o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", r = 0; r < 5; r++) n += o.charAt(Math.floor(Math.random() * o.length));
return e + n
}();
var r = document.querySelector(this.opts.stuffPlacement);
r || ((r = document.createElement("div")).id = "_cbhtml", document.body.appendChild(r)), this.builderStuff = r;
var a = document.createElement("div");
a.id = this.id, r.appendChild(a), this.objStuff = a;
var l = new Sc({
animateModal: this.opts.animateModal,
elementToAnimate: this.opts.elementToAnimate,
stuffPlacement: this.opts.stuffPlacement
});
this.modal = l;
for (var s = "", c = 0; c < this.opts.gradientcolors.length; c++) s += '<button data-elmgradient="'.concat(this.opts.gradientcolors[c][0], '" data-textcolor="').concat(this.opts.gradientcolors[c][1] ? this.opts.gradientcolors[c][1] : "", '" style="background-image:').concat(this.opts.gradientcolors[c][0], ';width:35px;height:35px;border:none;"></button>');
var d = '\n <div class="is-modal pickgradientcolor">\n <div style="max-width:201px;padding:0;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;height:11px;width: 100%;background: transparent;"></div>\n <div style="padding:12px 12px 12px">\n <div class="div-gradients" style="display: flex;flex-flow: wrap;margin-bottom:10px;">\n '.concat(s, '\n <button class="input-gradient-clear" title="').concat(this.out("Clear"), '" data-value="" style="width:35px;height:35px;border:rgba(0,0,0,0.09) 1px solid;border-left: none;border-top: none;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.8);width:23px;height:23px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n <div class="is-settings" style="margin-bottom:0">\n <div class="is-label" style="margin-top:0">').concat(this.out("Custom"), ':</div>\n <div class="div-custom-gradients clearfix" style="height:auto;display: flex;flex-flow: wrap;"></div>\n <div>\n <button title="').concat(this.out("Select Color"), '" class="input-gradient-color1 is-btn-color" data-value="dark" style="border-right:none"></button>\n <button title="').concat(this.out("Select Color"), '" class="input-gradient-color2 is-btn-color" data-value="dark"></button>\n <input type="text" class="input-gradient-deg" value="0" style="width:60px;height:35px;margin-left:7px;margin-right:5px;font-size:14px;"/> deg\n </div>\n </div>\n <div class="is-settings clearfix" style="margin-bottom:0">\n <button title="').concat(this.out("Add"), '" class="input-gradient-save" style="width:100%;border:none;"> ').concat(this.out("Add"), " </button>\n </div>\n </div>\n </div>\n </div>\n ");
a.insertAdjacentHTML("beforeend", d);
var u = a.querySelector(".is-modal.pickgradientcolor");
this.pickGradient = u, new q({
selector: "#" + this.id + " .is-draggable"
});
var p = new rd({
colors: this.opts.colors,
animateModal: this.opts.animateModal,
elementToAnimate: this.opts.container,
lang: this.opts.lang
}),
v = a.querySelector(".input-gradient-color1");
v.addEventListener("click", (function () {
p.open((function (e) {
var t = e,
n = a.querySelector(".input-gradient-color2").style.backgroundColor,
o = a.querySelector(".input-gradient-deg").value;
"" === n && (n = "#ffffff");
var r = "linear-gradient(".concat(o, "deg, ").concat(t, ", ").concat(n, ")");
i.targetElement.style.backgroundImage = r, i.opts.onChange && i.opts.onChange(r), v.style.backgroundColor = e
}), v.style.backgroundColor)
}));
var h = a.querySelector(".input-gradient-color2");
h.addEventListener("click", (function () {
p.open((function (e) {
var t = a.querySelector(".input-gradient-color1").style.backgroundColor,
n = e,
o = a.querySelector(".input-gradient-deg").value;
"" === t && (t = "#ffffff");
var r = "linear-gradient(".concat(o, "deg, ").concat(t, ", ").concat(n, ")");
i.targetElement.style.backgroundImage = r, i.opts.onChange && i.opts.onChange(r), h.style.backgroundColor = e
}), h.style.backgroundColor)
}));
var f = a.querySelectorAll(".div-gradients [data-elmgradient]");
Array.prototype.forEach.call(f, (function (e) {
var t = e.getAttribute("data-elmgradient"),
n = e.getAttribute("data-textcolor");
e.addEventListener("click", (function () {
i.targetElement.style.backgroundImage = t, i.opts.onChange && i.opts.onChange(t, n);
var o = i.targetElement.style.backgroundImage;
if (-1 != o.indexOf("linear-gradient")) {
var r = bd(o);
if (null !== r) try {
var l = r.colorStopList[0].color,
s = r.colorStopList[1].color,
c = r.line;
i.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = l, i.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = s, -1 != c.indexOf("deg") && (i.objStuff.querySelector(".input-gradient-deg").value = c.replace("deg", ""))
} catch (e) {}
}
var d = a.querySelectorAll(".div-gradients [data-elmgradient]");
Array.prototype.forEach.call(d, (function (e) {
i.removeClass(e, "active")
})), i.addClass(e, "active")
}))
})), a.querySelector(".input-gradient-clear").addEventListener("click", (function () {
i.targetElement.style.backgroundImage = "", i.opts.onChange && i.opts.onChange(""), i.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = "", i.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = "", i.objStuff.querySelector(".input-gradient-deg").value = "0"
}));
var g = a.querySelector(".input-gradient-deg");
g.addEventListener("keyup", (function () {
var e = a.querySelector(".input-gradient-color1").style.backgroundColor,
t = a.querySelector(".input-gradient-color2").style.backgroundColor,
n = g.value;
"" === e && (e = "#ffffff"), "" === t && (t = "#ffffff");
var o = "linear-gradient(".concat(n, "deg, ").concat(e, ", ").concat(t, ")");
i.targetElement.style.backgroundImage = o, i.opts.onChange && i.opts.onChange(o)
})), a.querySelector(".input-gradient-save").addEventListener("click", (function () {
var e = a.querySelector(".input-gradient-color1").style.backgroundColor,
t = a.querySelector(".input-gradient-color2").style.backgroundColor,
n = g.value;
"" === e && (e = "#ffffff"), "" === t && (t = "#ffffff");
var o = "linear-gradient(".concat(n, "deg, ").concat(e, ", ").concat(t, ")"),
r = [];
if (null != localStorage.getItem("_customgradcolors") && (r = JSON.parse(localStorage.getItem("_customgradcolors"))), r.push(o), localStorage.setItem("_customgradcolors", JSON.stringify(r)), null != localStorage.getItem("_customgradcolors")) {
for (var l = JSON.parse(localStorage.getItem("_customgradcolors")), s = "", c = 0; c < l.length; c++) s += '<button class="is-elmgrad-item" data-elmgradient="'.concat(l[c], '" style="background-image:').concat(l[c], ';width:35px;height:35px;padding:0;border:none;"><div class="is-elmgrad-remove"><svg class="is-icon-flex" style="fill:rgba(255, 255, 255, 1);width:20px;height:20px;"><use xlink:href="#ion-ios-close-empty"></use></svg></div></button>');
i.objStuff.querySelector(".div-custom-gradients").innerHTML = s
}
var d = i.objStuff.querySelectorAll(".div-custom-gradients [data-elmgradient]");
Array.prototype.forEach.call(d, (function (e) {
var t = e.getAttribute("data-elmgradient");
e.addEventListener("click", (function () {
i.targetElement.style.backgroundImage = t, i.opts.onChange && i.opts.onChange(t);
var n = i.targetElement.style.backgroundImage;
if (-1 != n.indexOf("linear-gradient")) {
var o = bd(n);
if (null !== o) try {
var r = o.colorStopList[0].color,
l = o.colorStopList[1].color,
s = o.line;
i.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = r, i.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = l, -1 != s.indexOf("deg") && (i.objStuff.querySelector(".input-gradient-deg").value = s.replace("deg", ""))
} catch (e) {}
}
var c = a.querySelectorAll(".div-custom-gradients [data-elmgradient]");
Array.prototype.forEach.call(c, (function (e) {
i.removeClass(e, "active")
})), i.addClass(e, "active")
}))
}));
var u = i.objStuff.querySelectorAll(".div-custom-gradients .is-elmgrad-remove");
Array.prototype.forEach.call(u, (function (e) {
e.addEventListener("click", (function () {
var t = [];
null != localStorage.getItem("_customgradcolors") && (t = JSON.parse(localStorage.getItem("_customgradcolors")));
for (var i = e.parentNode.getAttribute("data-elmgradient"), n = 0; n < t.length; n++) t[n] == i && t.splice(n, 1);
return localStorage.setItem("_customgradcolors", JSON.stringify(t)), e.parentNode.parentNode.removeChild(e.parentNode), !1
}))
}))
}))
}
return n(e, [{
key: "out",
value: function (e) {
if (this.opts.lang) {
var t = this.opts.lang[e];
return t || e
}
return e
}
}, {
key: "open",
value: function (e, t, i) {
var n = this;
this.opts.onChange = t, this.opts.onFinish = i, this.targetElement = e, this.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = "", this.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = "", this.objStuff.querySelector(".input-gradient-deg").value = "0";
var o = e.style.backgroundImage;
if (-1 != o.indexOf("linear-gradient")) {
var r = bd(o);
if (null !== r) try {
var a = r.colorStopList[0].color,
l = r.colorStopList[1].color,
s = r.line;
this.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = a, this.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = l, -1 != s.indexOf("deg") && (this.objStuff.querySelector(".input-gradient-deg").value = s.replace("deg", ""))
} catch (e) {}
}
this.original = o;
var c = [];
if (null != localStorage.getItem("_customgradcolors")) {
c = JSON.parse(localStorage.getItem("_customgradcolors"));
for (var d = "", u = 0; u < c.length; u++) d += '<button class="is-elmgrad-item" data-elmgradient="'.concat(c[u], '" style="background-image:').concat(c[u], ';width:35px;height:35px;padding:0;border:none;"><div class="is-elmgrad-remove"><svg class="is-icon-flex" style="fill:rgba(255, 255, 255, 1);width:20px;height:20px;"><use xlink:href="#ion-ios-close-empty"></use></svg></div></button>');
this.objStuff.querySelector(".div-custom-gradients").innerHTML = d
}
var p = this.objStuff.querySelectorAll(".div-custom-gradients [data-elmgradient]");
Array.prototype.forEach.call(p, (function (e) {
var t = e.getAttribute("data-elmgradient");
e.addEventListener("click", (function () {
n.targetElement.style.backgroundImage = t, n.opts.onChange && n.opts.onChange(t);
var i = n.targetElement.style.backgroundImage;
if (-1 != i.indexOf("linear-gradient")) {
var o = bd(i);
if (null !== o) try {
var r = o.colorStopList[0].color,
a = o.colorStopList[1].color,
l = o.line;
n.objStuff.querySelector(".input-gradient-color1").style.backgroundColor = r, n.objStuff.querySelector(".input-gradient-color2").style.backgroundColor = a, -1 != l.indexOf("deg") && (n.objStuff.querySelector(".input-gradient-deg").value = l.replace("deg", ""))
} catch (e) {}
}
var s = n.objStuff.querySelectorAll(".div-custom-gradients [data-elmgradient]");
Array.prototype.forEach.call(s, (function (e) {
n.removeClass(e, "active")
})), n.addClass(e, "active")
}))
}));
var v = this.objStuff.querySelectorAll(".div-custom-gradients .is-elmgrad-remove");
Array.prototype.forEach.call(v, (function (e) {
e.addEventListener("click", (function () {
var t = [];
null != localStorage.getItem("_customgradcolors") && (t = JSON.parse(localStorage.getItem("_customgradcolors")));
for (var i = e.parentNode.getAttribute("data-elmgradient"), n = 0; n < t.length; n++) t[n] == i && t.splice(n, 1);
return localStorage.setItem("_customgradcolors", JSON.stringify(t)), e.parentNode.parentNode.removeChild(e.parentNode), !1
}))
})), this.modal.show(this.pickGradient, !1, (function () {
n.original === n.targetElement.style.backgroundImage ? n.opts.onFinish && n.opts.onFinish(!1) : n.opts.onFinish && n.opts.onFinish(!0)
}), !1)
}
}, {
key: "addClass",
value: function (e, t) {
e && (this.hasClass(e, t) || (0 === e.classList.length ? e.className = t : e.className = e.className + " " + t))
}
}, {
key: "removeClass",
value: function (e, t) {
e && e.classList.length > 0 && (e.className = e.className.replace(t, ""))
}
}, {
key: "hasClass",
value: function (e, t) {
return !!e && (e.classList ? e.classList.contains(t) : new RegExp("\\b" + t + "\\b").test(e.className))
}
}]), e
}();
function bd(e) {
var t, i = wd(),
n = /.*gradient\s*\(((?:\([^)]*\)|[^)(]*)*)\)/.exec(e);
return null !== n ? (t = Sd(i, n[1])).original.trim() !== n[1].trim() && (t.parseWarning = !0) : t = "Failed to find gradient", t
}
var xd = function (e, t) {
var i, n = "";
for (i = 0; i < e.length; i++) "string" == typeof e[i] ? n += e[i] : n += e[i].source;
return new RegExp(n, t)
},
wd = function () {
var e = /\s*,\s*/,
t = /(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?/,
i = xd(["(?:", /#(?:[a-f0-9]{6}|[a-f0-9]{3})/, "|", "(?:rgb|hsl)", /\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)/, "|", "(?:rgba|hsla)", /\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)/, "|", /[_a-z-][_a-z0-9-]*/, ")"], ""),
n = xd([i, "(?:\\s+", t, "(?:\\s+", t, ")?)?"], ""),
o = xd(["(?:", n, e, ")*", n], ""),
r = xd(["(?:(", /(?:[+-]?\d*\.?\d+)(?:deg|grad|rad|turn)/, ")|", /to\s+((?:(?:left|right)(?:\s+(?:top|bottom))?))/, ")"], "");
return {
gradientSearch: xd(["(?:(", r, ")", e, ")?(", o, ")"], "gi"),
colorStopSearch: xd(["\\s*(", i, ")", "(?:\\s+", "(", t, "))?", "(?:", e, "\\s*)?"], "gi")
}
},
Sd = function (e, t) {
var i, n, o, r;
if (e.gradientSearch.lastIndex = 0, null !== (n = e.gradientSearch.exec(t)))
for (i = {
original: n[0],
colorStopList: []
}, n[1] && (i.line = n[1]), n[2] && (i.angle = n[2]), n[3] && (i.sideCorner = n[3]), e.colorStopSearch.lastIndex = 0, o = e.colorStopSearch.exec(n[4]); null !== o;) r = {
color: o[1]
}, o[2] && (r.position = o[2]), i.colorStopList.push(r), o = e.colorStopSearch.exec(n[4]);
return i
},
Cd = new v,
Ed = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector(".editstyles");
if (!a) {
var l = '\n <div class="is-modal editstyles">\n <div class="is-modal-bar is-draggable" style="">\n <div class="is-modal-close" style="z-index:1;width:20px;height:20px;position:absolute;top:0px;right:0px;box-sizing:border-box;padding:0;line-height:20px;font-size:10px;color:#777;text-align:center;cursor:pointer;">&#10005;</div>\n </div>\n <div style="padding:12px">\n <div class="is-settings clearfix" style="display:inline-block;width:100%;margin-bottom:0;">\n <div>'.concat(o.out("Style"), ':</div>\n <div>\n <textarea id="inpElmInlineStyle" style="width:100%;height:256px;margin:0px;border:none;background:#f3f3f3;font-size: 14px;line-height: 1.5;letter-spacing: 0;"></textarea>\n </div>\n </div>\n <div class="is-settings clearfix" style="display:inline-block;width:100%;margin-bottom:0;">\n <div>').concat(o.out("Class"), ':</div>\n <div>\n <input type="text" id="inpElmClassName" value="" style="width:100%;padding-left: 16px;font-family: courier;font-size: 17px;line-height: 2;letter-spacing: 1px;border:none;background:#f3f3f3;"/>\n </div>\n </div>\n </div>\n </div> \n ');
Cd.appendHtml(r, l);
var s = (a = r.querySelector(".editstyles")).querySelector(".is-modal-close");
Cd.addEventListener(s, "click", (function () {
Cd.removeClass(a, "active");
var e = n.builderStuff.querySelector(".is-side.elementstyles");
if (!Cd.hasClass(e, "active")) {
var t = document.querySelectorAll("[data-saveforundo]");
Array.prototype.forEach.call(t, (function (e) {
e.removeAttribute("data-saveforundo")
})), t = document.querySelectorAll(".elm-inspected"), Array.prototype.forEach.call(t, (function (e) {
Cd.removeClass(e, "elm-inspected")
}))
}
}));
var c = a.querySelector("#inpElmClassName");
c.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = a.querySelector("#inpElmClassName").value,
i = !1;
Cd.hasClass(e, "elm-active") && (i = !0);
var o = !1;
Cd.hasClass(e, "elm-active") && (o = !0);
var r = !1;
Cd.hasClass(e, "row-active") && (r = !0), e.setAttribute("class", t), i && Cd.addClass(e, "elm-active"), o && Cd.addClass(e, "cell-active"), r && Cd.addClass(e, "row-active"), Cd.addClass(e, "elm-inspected"), n.builder.opts.onChange()
})), (c = a.querySelector("#inpElmInlineStyle")).addEventListener("keyup", (function () {
n.builder.inspectedElement.style.cssText = a.querySelector("#inpElmInlineStyle").value, n.builder.opts.onChange()
}))
}
this.modalStyles = a
}
return n(e, [{
key: "toggleStyleEditor",
value: function () {
Cd.hasClass(this.modalStyles, "active") ? Cd.removeClass(this.modalStyles, "active") : Cd.addClass(this.modalStyles, "active")
}
}, {
key: "refresh",
value: function () {
this.modalStyles.querySelector("#inpElmInlineStyle").value = this.builder.inspectedElement.style.cssText;
var e = this.builder.inspectedElement.getAttribute("class");
e && (e = (e = (e = (e = (e = e.replace("elm-active", "")).replace("cell-active", "")).replace("row-active", "")).replace("elm-inspected", "")).replace(" ", " ").trim()), this.modalStyles.querySelector("#inpElmClassName").value = e
}
}]), e
}(),
kd = new v,
Ld = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementBox");
this.panelStuff = l;
var s = '\n <div class="is-settings clearfix">\n <div class="is-label">'.concat(o.out("Background Color"), ':</div>\n <div>\n <button title="').concat(o.out("Background Color"), '" class="input-elm-bgcolor is-btn-color"></button>\n <button title="').concat(o.out("Gradient"), '" class="input-elm-gradient" data-value="+"> ').concat(o.out("Gradient"), ' </button>\n </div>\n </div>\n\n <div style="margin-top: 25px;font-weight:bold;width:100%;">').concat(o.out("Dimension"), '</div>\n \n <div class="is-settings clearfix" style="width:110px">\n <div>Width:</div>\n <div style="display:flex">\n <input type="text" id="inpElmWidth" value="" style="width:45px"/>\n <select id="inpElmWidthUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Height:</div>\n <div style="display:flex">\n <input type="text" id="inpElmHeight" value="" style="width:45px"/>\n <select id="inpElmHeightUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Max Width:</div>\n <div style="display:flex">\n <input type="text" id="inpElmMaxWidth" value="" style="width:45px"/>\n <select id="inpElmMaxWidthUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Max Height:</div>\n <div style="display:flex">\n <input type="text" id="inpElmMaxHeight" value="" style="width:45px"/>\n <select id="inpElmMaxHeightUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Min Width:</div>\n <div style="display:flex">\n <input type="text" id="inpElmMinWidth" value="" style="width:45px"/>\n <select id="inpElmMinWidthUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Min Height:</div>\n <div style="display:flex">\n <input type="text" id="inpElmMinHeight" value="" style="width:45px"/>\n <select id="inpElmMinHeightUnit"">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n \n <div class="is-settings clearfix" style="width:110px;">\n <div>Overflow x:</div>\n <div>\n <select id="inpElmOverflowX"">\n <option value=""></option>\n <option value="auto">Auto</option>\n <option value="hidden">Hidden</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Overflow y:</div>\n <div>\n <select id="inpElmOverflowY"">\n <option value=""></option>\n <option value="auto">Auto</option>\n <option value="hidden">Hidden</option>\n </select>\n </div>\n </div>\n ');
kd.appendHtml(l, s), l.querySelector(".input-elm-bgcolor").addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.backgroundColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), l.querySelector(".input-elm-bgcolor").style.backgroundColor)
}));
var c = new yd({
colors: this.builder.colors,
gradientcolors: this.builder.opts.gradientcolors,
lang: this.builder.opts.lang
});
l.querySelector(".input-elm-gradient").addEventListener("click", (function () {
n.builder.uo.saveForUndo(!0), c.open(n.builder.inspectedElement, (function () {
a.refresh(), n.builder.opts.onChange()
}), (function (e) {
e && a.refresh()
}))
}));
var d = l.querySelector("#inpElmMaxWidth");
d.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), d.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMaxWidth").value,
i = l.querySelector("#inpElmMaxWidthUnit").value;
isNaN(t) || "" == t ? e.style.maxWidth = "" : e.style.maxWidth = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmMaxWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMaxWidth").value,
i = l.querySelector("#inpElmMaxWidthUnit").value;
isNaN(t) || "" == t ? e.style.maxWidth = "" : e.style.maxWidth = t + i, a.refresh(), n.builder.opts.onChange()
}));
var u = l.querySelector("#inpElmMaxHeight");
u.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), u.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMaxHeight").value,
i = l.querySelector("#inpElmMaxHeightUnit").value;
isNaN(t) || "" == t ? e.style.maxHeight = "" : e.style.maxHeight = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmMaxHeightUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMaxHeight").value,
i = l.querySelector("#inpElmMaxHeightUnit").value;
isNaN(t) || "" == t ? e.style.maxHeight = "" : e.style.maxHeight = t + i, a.refresh(), n.builder.opts.onChange()
}));
var v = l.querySelector("#inpElmMinWidth");
v.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), v.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMinWidth").value,
i = l.querySelector("#inpElmMinWidthUnit").value;
isNaN(t) || "" == t ? e.style.minWidth = "" : e.style.minWidth = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmMinWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMinWidth").value,
i = l.querySelector("#inpElmMinWidthUnit").value;
isNaN(t) || "" == t ? e.style.minWidth = "" : e.style.minWidth = t + i, a.refresh(), n.builder.opts.onChange()
}));
var h = l.querySelector("#inpElmMinHeight");
h.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), h.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMinHeight").value,
i = l.querySelector("#inpElmMinHeightUnit").value;
isNaN(t) || "" == t ? e.style.minHeight = "" : e.style.minHeight = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmMinHeightUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmMinHeight").value,
i = l.querySelector("#inpElmMinHeightUnit").value;
isNaN(t) || "" == t ? e.style.minHeight = "" : e.style.minHeight = t + i, a.refresh(), n.builder.opts.onChange()
}));
var f = l.querySelector("#inpElmWidth");
f.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), f.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmWidth").value,
i = l.querySelector("#inpElmWidthUnit").value;
isNaN(t) || "" == t ? e.style.width = "" : e.style.width = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmWidth").value,
i = l.querySelector("#inpElmWidthUnit").value;
isNaN(t) || "" == t ? e.style.width = "" : e.style.width = t + i, a.refresh(), n.builder.opts.onChange()
}));
var g = l.querySelector("#inpElmHeight");
g.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), g.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmHeight").value,
i = l.querySelector("#inpElmHeightUnit").value;
isNaN(t) || "" == t ? e.style.height = "" : e.style.height = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmHeightUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmHeight").value,
i = l.querySelector("#inpElmHeightUnit").value;
isNaN(t) || "" == t ? e.style.height = "" : e.style.height = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmOverflowX").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmOverflowX").value;
e.style.overflowX = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmOverflowY").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmOverflowY").value;
e.style.overflowY = t, a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = e.style.backgroundColor,
n = t.querySelector(".input-elm-bgcolor");
n.style.backgroundColor = i || "transparent";
var o = t.querySelector("#inpElmMaxWidth"),
r = t.querySelector("#inpElmMaxWidthUnit");
o.value = "", r.value = "px", i = e.style.maxWidth;
var a = parseInt(i);
isNaN(a) || (-1 != i.indexOf("%") && (r.value = "%"), -1 != i.indexOf("px") && (r.value = "px"), -1 != i.indexOf("vw") && (r.value = "vw"), -1 != i.indexOf("vh") && (r.value = "vh"), -1 != i.indexOf("em") && (r.value = "em"), o.value = a);
var l = t.querySelector("#inpElmMaxHeight"),
s = t.querySelector("#inpElmMaxHeightUnit");
l.value = "", s.value = "px", i = e.style.maxHeight;
var c = parseInt(i);
isNaN(c) || (-1 != i.indexOf("%") && (s.value = "%"), -1 != i.indexOf("px") && (s.value = "px"), -1 != i.indexOf("vw") && (s.value = "vw"), -1 != i.indexOf("vh") && (s.value = "vh"), -1 != i.indexOf("em") && (s.value = "em"), l.value = c);
var d = t.querySelector("#inpElmMinWidth"),
u = t.querySelector("#inpElmMinWidthUnit");
d.value = "", u.value = "px", i = e.style.minWidth;
var p = parseInt(i);
isNaN(p) || (-1 != i.indexOf("%") && (u.value = "%"), -1 != i.indexOf("px") && (u.value = "px"), -1 != i.indexOf("vw") && (u.value = "vw"), -1 != i.indexOf("vh") && (u.value = "vh"), -1 != i.indexOf("em") && (u.value = "em"), d.value = p);
var v = t.querySelector("#inpElmMinHeight"),
h = t.querySelector("#inpElmMinHeightUnit");
v.value = "", h.value = "px", i = e.style.minHeight;
var f = parseInt(i);
isNaN(f) || (-1 != i.indexOf("%") && (h.value = "%"), -1 != i.indexOf("px") && (h.value = "px"), -1 != i.indexOf("vw") && (h.value = "vw"), -1 != i.indexOf("vh") && (h.value = "vh"), -1 != i.indexOf("em") && (h.value = "em"), v.value = f);
var g = t.querySelector("#inpElmWidth"),
m = t.querySelector("#inpElmWidthUnit");
g.value = "", m.value = "px", i = e.style.width;
var y = parseInt(i);
isNaN(y) || (-1 != i.indexOf("%") && (m.value = "%"), -1 != i.indexOf("px") && (m.value = "px"), -1 != i.indexOf("vw") && (m.value = "vw"), -1 != i.indexOf("vh") && (m.value = "vh"), -1 != i.indexOf("em") && (m.value = "em"), g.value = y);
var b = t.querySelector("#inpElmHeight"),
x = t.querySelector("#inpElmHeightUnit");
b.value = "", x.value = "px", i = e.style.height;
var w = parseInt(i);
isNaN(w) || (-1 != i.indexOf("%") && (x.value = "%"), -1 != i.indexOf("px") && (x.value = "px"), -1 != i.indexOf("vw") && (x.value = "vw"), -1 != i.indexOf("vh") && (x.value = "vh"), -1 != i.indexOf("em") && (x.value = "em"), b.value = w);
var S = t.querySelector("#inpElmOverflowX");
i = e.style.overflowX, S.value = i;
var C = t.querySelector("#inpElmOverflowY");
i = e.style.overflowY, C.value = i
}
}]), e
}(),
Ad = new v,
qd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementSpacing");
this.panelStuff = l;
var s = '\n <div style="margin-top: 13px;font-weight: bold;width:100%">Padding</div>\n \n <div class="is-settings clearfix" style="width:110px;">\n <div>Top:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmPaddingTop" value="" style="width:45px"/>\n <select id="inpElmPaddingTopUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Bottom:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmPaddingBottom" value="" style="width:45px"/>\n <select id="inpElmPaddingBottomUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Left:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmPaddingLeft" value="" style="width:45px"/>\n <select id="inpElmPaddingLeftUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Right:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmPaddingRight" value="" style="width:45px"/>\n <select id="inpElmPaddingRightUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n \n <div style="margin-top: 25px;font-weight: bold;width:100%">Margin</div>\n \n <div class="is-settings clearfix" style="width:110px;">\n <div>Top:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmMarginTop" value="" style="width:45px"/>\n <select id="inpElmMarginTopUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n <option value="auto">auto</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Bottom:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmMarginBottom" value="" style="width:45px"/>\n <select id="inpElmMarginBottomUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n <option value="auto">auto</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Left:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmMarginLeft" value="" style="width:45px"/>\n <select id="inpElmMarginLeftUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n <option value="auto">auto</option>\n </select>\n </div>\n </div>\n <div class="is-settings clearfix" style="width:110px;">\n <div>Right:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmMarginRight" value="" style="width:45px"/>\n <select id="inpElmMarginRightUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n <option value="auto">auto</option>\n </select>\n </div>\n </div>\n \n <div style="margin-top: 25px;font-weight: bold;width:100%">'.concat(o.out("Responsive Positioning"), ':</div>\n \n <div class="is-settings clearfix" style="width:100%;">\n <div>\n <label for="chkResetMarginLeft" style="letter-spacing: 0.5px;"><input type="checkbox" id="chkResetMarginLeft" value="" /> ').concat(o.out("Reset margin left on small screen"), ' </label>\n </div>\n </div>\n <div class="is-settings clearfix" style="margin-top:0;width:100%;">\n <div>\n <label for="chkResetMarginRight" style="letter-spacing: 0.5px;"><input type="checkbox" id="chkResetMarginRight" value="" /> ').concat(o.out("Reset margin right on small screen"), " </label>\n </div>\n </div>\n ");
Ad.appendHtml(l, s);
var c = l.querySelector("#inpElmMarginLeft");
c.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var d = l.querySelector("#inpElmMarginLeftUnit");
c.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = c.value,
i = d.value;
isNaN(t) || "" == t ? e.style.marginLeft = "" : e.style.marginLeft = t + i, "auto" === i && (e.style.marginLeft = "auto"), a.refresh(), n.builder.opts.onChange()
})), d.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = c.value,
i = d.value;
"auto" === i ? (e.style.marginLeft = "auto", c.value = "") : e.style.marginLeft = t + i, a.refresh(), n.builder.opts.onChange()
}));
var u = l.querySelector("#inpElmMarginRight");
u.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var v = l.querySelector("#inpElmMarginRightUnit");
u.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = u.value,
i = v.value;
isNaN(t) || "" == t ? e.style.marginRight = "" : e.style.marginRight = t + i, "auto" === i && (e.style.marginRight = "auto"), a.refresh(), n.builder.opts.onChange()
})), v.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = u.value,
i = v.value;
"auto" === i ? (e.style.marginRight = "auto", u.value = "") : e.style.marginRight = t + i, a.refresh(), n.builder.opts.onChange()
}));
var h = l.querySelector("#inpElmMarginTop");
h.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var f = l.querySelector("#inpElmMarginTopUnit");
h.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = h.value,
i = f.value;
isNaN(t) || "" == t ? e.style.marginTop = "" : e.style.marginTop = t + i, "auto" === i && (e.style.marginTop = "auto"), a.refresh(), n.builder.opts.onChange()
})), f.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = h.value,
i = f.value;
"auto" === i ? (e.style.marginTop = "auto", h.value = "") : e.style.marginTop = t + i, a.refresh(), n.builder.opts.onChange()
}));
var g = l.querySelector("#inpElmMarginBottom");
g.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var m = l.querySelector("#inpElmMarginBottomUnit");
g.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = g.value,
i = m.value;
isNaN(t) || "" == t ? e.style.marginBottom = "" : e.style.marginBottom = t + i, "auto" === i && (e.style.marginBottom = "auto"), a.refresh(), n.builder.opts.onChange()
})), m.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = g.value,
i = m.value;
"auto" === i ? (e.style.marginBottom = "auto", g.value = "") : e.style.marginBottom = t + i, a.refresh(), n.builder.opts.onChange()
}));
var y = l.querySelector("#inpElmPaddingLeft");
y.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var b = l.querySelector("#inpElmPaddingLeftUnit");
y.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = y.value,
i = b.value;
isNaN(t) || "" == t ? e.style.paddingLeft = "" : e.style.paddingLeft = t + i, a.refresh(), n.builder.opts.onChange()
})), b.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = y.value,
i = b.value;
isNaN(t) || "" == t ? e.style.paddingLeft = "" : e.style.paddingLeft = t + i, a.refresh(), n.builder.opts.onChange()
}));
var x = l.querySelector("#inpElmPaddingRight");
x.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var w = l.querySelector("#inpElmPaddingRightUnit");
x.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = x.value,
i = w.value;
isNaN(t) || "" == t ? e.style.paddingRight = "" : e.style.paddingRight = t + i, a.refresh(), n.builder.opts.onChange()
})), w.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = x.value,
i = w.value;
isNaN(t) || "" == t ? e.style.paddingRight = "" : e.style.paddingRight = t + i, a.refresh(), n.builder.opts.onChange()
}));
var S = l.querySelector("#inpElmPaddingTop");
S.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var C = l.querySelector("#inpElmPaddingTopUnit");
S.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = S.value,
i = C.value;
isNaN(t) || "" == t ? e.style.paddingTop = "" : e.style.paddingTop = t + i, a.refresh(), n.builder.opts.onChange()
})), C.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = S.value,
i = C.value;
isNaN(t) || "" == t ? e.style.paddingTop = "" : e.style.paddingTop = t + i, a.refresh(), n.builder.opts.onChange()
}));
var E = l.querySelector("#inpElmPaddingBottom");
E.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var k = l.querySelector("#inpElmPaddingBottomUnit");
E.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = E.value,
i = k.value;
isNaN(t) || "" == t ? e.style.paddingBottom = "" : e.style.paddingBottom = t + i, a.refresh(), n.builder.opts.onChange()
})), k.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = E.value,
i = k.value;
isNaN(t) || "" == t ? e.style.paddingBottom = "" : e.style.paddingBottom = t + i, a.refresh(), n.builder.opts.onChange()
}));
var L = l.querySelector("#chkResetMarginLeft");
L.addEventListener("click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement;
L.checked ? Ad.addClass(e, "margin-left-1024-reset") : Ad.removeClass(e, "margin-left-1024-reset"), a.refresh(), n.builder.opts.onChange()
}));
var A = l.querySelector("#chkResetMarginRight");
A.addEventListener("click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement;
A.checked ? Ad.addClass(e, "margin-right-1024-reset") : Ad.removeClass(e, "margin-right-1024-reset"), a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t, i = this.panelStuff,
n = i.querySelector("#inpElmMarginTop"),
o = i.querySelector("#inpElmMarginTopUnit");
n.value = "", o.value = "px", t = e.style.marginTop;
var r = parseInt(t);
isNaN(r) ? t && -1 != t.indexOf("auto") && (o.value = "auto", n.value = "") : (-1 != t.indexOf("%") && (o.value = "%"), -1 != t.indexOf("px") && (o.value = "px"), -1 != t.indexOf("vw") && (o.value = "vw"), -1 != t.indexOf("vh") && (o.value = "vh"), -1 != t.indexOf("em") && (o.value = "em"), n.value = r);
var a = i.querySelector("#inpElmMarginBottom"),
l = i.querySelector("#inpElmMarginBottomUnit");
a.value = "", l.value = "px", t = e.style.marginBottom;
var s = parseInt(t);
isNaN(s) ? t && -1 != t.indexOf("auto") && (l.value = "auto", a.value = "") : (-1 != t.indexOf("%") && (l.value = "%"), -1 != t.indexOf("px") && (l.value = "px"), -1 != t.indexOf("vw") && (l.value = "vw"), -1 != t.indexOf("vh") && (l.value = "vh"), -1 != t.indexOf("em") && (l.value = "em"), a.value = s);
var c = i.querySelector("#inpElmMarginLeft"),
d = i.querySelector("#inpElmMarginLeftUnit");
c.value = "", d.value = "px", t = e.style.marginLeft;
var u = parseInt(t);
isNaN(u) ? t && -1 != t.indexOf("auto") && (d.value = "auto", c.value = "") : (-1 != t.indexOf("%") && (d.value = "%"), -1 != t.indexOf("px") && (d.value = "px"), -1 != t.indexOf("vw") && (d.value = "vw"), -1 != t.indexOf("vh") && (d.value = "vh"), -1 != t.indexOf("em") && (d.value = "em"), c.value = u);
var p = i.querySelector("#inpElmMarginRight"),
v = i.querySelector("#inpElmMarginRightUnit");
p.value = "", v.value = "px", t = e.style.marginRight;
var h = parseInt(t);
isNaN(h) ? t && -1 != t.indexOf("auto") && (v.value = "auto", p.value = "") : (-1 != t.indexOf("%") && (v.value = "%"), -1 != t.indexOf("px") && (v.value = "px"), -1 != t.indexOf("vw") && (v.value = "vw"), -1 != t.indexOf("vh") && (v.value = "vh"), -1 != t.indexOf("em") && (v.value = "em"), p.value = h);
var f = i.querySelector("#inpElmPaddingTop"),
g = i.querySelector("#inpElmPaddingTopUnit");
f.value = "", g.value = "px", t = e.style.paddingTop;
var m = parseInt(t);
isNaN(m) || (-1 != t.indexOf("%") && (g.value = "%"), -1 != t.indexOf("px") && (g.value = "px"), -1 != t.indexOf("vw") && (g.value = "vw"), -1 != t.indexOf("vh") && (g.value = "vh"), -1 != t.indexOf("em") && (g.value = "em"), f.value = m);
var y = i.querySelector("#inpElmPaddingBottom"),
b = i.querySelector("#inpElmPaddingBottomUnit");
y.value = "", b.value = "px", t = e.style.paddingBottom;
var x = parseInt(t);
isNaN(x) || (-1 != t.indexOf("%") && (b.value = "%"), -1 != t.indexOf("px") && (b.value = "px"), -1 != t.indexOf("vw") && (b.value = "vw"), -1 != t.indexOf("vh") && (b.value = "vh"), -1 != t.indexOf("em") && (b.value = "em"), y.value = x);
var w = i.querySelector("#inpElmPaddingLeft"),
S = i.querySelector("#inpElmPaddingLeftUnit");
w.value = "", S.value = "px", t = e.style.paddingLeft;
var C = parseInt(t);
isNaN(C) || (-1 != t.indexOf("%") && (S.value = "%"), -1 != t.indexOf("px") && (S.value = "px"), -1 != t.indexOf("vw") && (S.value = "vw"), -1 != t.indexOf("vh") && (S.value = "vh"), -1 != t.indexOf("em") && (S.value = "em"), w.value = C);
var E = i.querySelector("#inpElmPaddingRight"),
k = i.querySelector("#inpElmPaddingRightUnit");
E.value = "", k.value = "px", t = e.style.paddingRight;
var L = parseInt(t);
isNaN(L) || (-1 != t.indexOf("%") && (k.value = "%"), -1 != t.indexOf("px") && (k.value = "px"), -1 != t.indexOf("vw") && (k.value = "vw"), -1 != t.indexOf("vh") && (k.value = "vh"), -1 != t.indexOf("em") && (k.value = "em"), E.value = L), Ad.hasClass(e, "margin-left-1024-reset") ? i.querySelector("#chkResetMarginLeft").checked = !0 : i.querySelector("#chkResetMarginLeft").checked = !1, Ad.hasClass(e, "margin-right-1024-reset") ? i.querySelector("#chkResetMarginRight").checked = !0 : i.querySelector("#chkResetMarginRight").checked = !1
}
}]), e
}(),
Md = new v,
_d = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementBorder");
this.panelStuff = l;
var s = '\n <div style="margin-top: 13px;font-weight: bold;line-height: 1.7;">'.concat(o.out("Border"), '</div>\n \n <div class="is-settings clearfix">\n <div style="display:flex;">\n <input type="text" id="inpElmBorderWidth" value="" style="width:45px"/>\n <select id="inpElmBorderWidthUnit" style="margin-right:15px;">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="none">none</option>\n </select>\n <select id="inpElmBorderStyle" style="margin-right:15px;">\n <option value=""></option>\n <option value="solid">Solid</option>\n <option value="dashed">Dashed</option>\n <option value="dotted">Dotted</option>\n </select>\n <button title="').concat(o.out("Border Color"), '" class="input-elm-bordercolor is-btn-color"></button> \n </div>\n </div>\n \n <div style="margin-top: 25px;font-weight: bold;line-height: 1.7;">').concat(o.out("Individual Sides"), '</div>\n \n <div class="is-settings clearfix">\n <div>Border Top:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmBorderTopWidth" value="" style="width:45px"/>\n <select id="inpElmBorderTopWidthUnit" style="margin-right:15px;">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="none">none</option>\n </select>\n <select id="inpElmBorderTopStyle" style="margin-right:15px;">\n <option value=""></option>\n <option value="solid">Solid</option>\n <option value="dashed">Dashed</option>\n <option value="dotted">Dotted</option>\n </select>\n <button title="').concat(o.out("Border Top Color"), '" class="input-elm-bordertopcolor is-btn-color"></button>\n </div>\n </div>\n \n <div class="is-settings clearfix">\n <div>Border Bottom:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmBorderBottomWidth" value="" style="width:45px"/>\n <select id="inpElmBorderBottomWidthUnit" style="margin-right:15px;">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="none">none</option>\n </select>\n <select id="inpElmBorderBottomStyle" style="margin-right:15px;">\n <option value=""></option>\n <option value="solid">Solid</option>\n <option value="dashed">Dashed</option>\n <option value="dotted">Dotted</option>\n </select>\n <button title="').concat(o.out("Border Bottom Color"), '" class="input-elm-borderbottomcolor is-btn-color"></button>\n </div>\n </div>\n \n <div class="is-settings clearfix">\n <div>Border Left:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmBorderLeftWidth" value="" style="width:45px"/>\n <select id="inpElmBorderLeftWidthUnit" style="margin-right:15px;">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="none">none</option>\n </select>\n <select id="inpElmBorderLeftStyle" style="margin-right:15px;">\n <option value=""></option>\n <option value="solid">Solid</option>\n <option value="dashed">Dashed</option>\n <option value="dotted">Dotted</option>\n </select>\n <button title="').concat(o.out("Border Left Color"), '" class="input-elm-borderleftcolor is-btn-color"></button>\n </div>\n </div>\n \n <div class="is-settings clearfix">\n <div>Border Right:</div>\n <div style="display:flex;">\n <input type="text" id="inpElmBorderRightWidth" value="" style="width:45px"/>\n <select id="inpElmBorderRightWidthUnit" style="margin-right:15px;">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="none">none</option>\n </select>\n <select id="inpElmBorderRightStyle" style="margin-right:15px;">\n <option value=""></option>\n <option value="solid">Solid</option>\n <option value="dashed">Dashed</option>\n <option value="dotted">Dotted</option>\n </select>\n <button title="').concat(o.out("Border Right Color"), '" class="input-elm-borderrightcolor is-btn-color"></button> \n </div>\n </div> \n ');
Md.appendHtml(l, s);
var c = l.querySelector(".input-elm-bordercolor");
c.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.borderColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), c.style.backgroundColor)
}));
var d = l.querySelector(".input-elm-bordertopcolor");
d.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.borderTopColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), d.style.backgroundColor)
}));
var u = l.querySelector(".input-elm-borderbottomcolor");
u.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.borderBottomColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), u.style.backgroundColor)
}));
var v = l.querySelector(".input-elm-borderleftcolor");
v.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.borderLeftColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), v.style.backgroundColor)
}));
var h = l.querySelector(".input-elm-borderrightcolor");
h.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.borderRightColor = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), h.style.backgroundColor)
}));
var f = l.querySelector("#inpElmBorderWidth");
f.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), f.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderWidth").value;
isNaN(t) || "" == t ? (e.style.borderStyle = "solid", e.style.borderWidth = "", e.style.borderStyle = "") : (e.style.borderStyle = "solid", e.style.borderWidth = t + l.querySelector("#inpElmBorderWidthUnit").value, e.style.borderStyle = l.querySelector("#inpElmBorderStyle").value), a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderWidthUnit").value;
"none" === t ? (e.style.border = "none", e.style.borderWidth = "", e.style.borderStyle = "") : e.style.borderWidth = l.querySelector("#inpElmBorderWidth").value + t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderStyle").value;
e.style.borderStyle = t, a.refresh(), n.builder.opts.onChange()
}));
var g = l.querySelector("#inpElmBorderTopWidth");
g.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), g.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderTopWidth").value;
isNaN(t) || "" == t ? (e.style.borderTopStyle = "solid", e.style.borderTopWidth = "", e.style.borderTopStyle = "") : (e.style.borderTopStyle = "solid", e.style.borderTopWidth = t + l.querySelector("#inpElmBorderTopWidthUnit").value, e.style.borderTopStyle = l.querySelector("#inpElmBorderTopStyle").value), a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderTopWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderTopWidthUnit").value;
"none" === t ? (e.style.borderTop = "none", e.style.borderTopWidth = "", e.style.borderTopStyle = "", n.panelStuff.querySelector("#inpElmBorderTopWidth").value = "", n.panelStuff.querySelector("#inpElmBorderTopStyle").value = "") : e.style.borderTopWidth = l.querySelector("#inpElmBorderTopWidth").value + t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderTopStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderTopStyle").value;
e.style.borderTopStyle = t, a.refresh(), n.builder.opts.onChange()
}));
var m = l.querySelector("#inpElmBorderBottomWidth");
m.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), m.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderBottomWidth").value;
isNaN(t) || "" == t ? (e.style.borderBottomStyle = "solid", e.style.borderBottomWidth = "", e.style.borderBottomStyle = "") : (e.style.borderBottomStyle = "solid", e.style.borderBottomWidth = t + l.querySelector("#inpElmBorderBottomWidthUnit").value, e.style.borderBottomStyle = l.querySelector("#inpElmBorderBottomStyle").value), a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderBottomWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderBottomWidthUnit").value;
"none" === t ? (e.style.borderBottom = "none", e.style.borderBottomWidth = "", e.style.borderBottomStyle = "", n.panelStuff.querySelector("#inpElmBorderBottomWidth").value = "", n.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "") : e.style.borderBottomWidth = l.querySelector("#inpElmBorderBottomWidth").value + t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderBottomStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderBottomStyle").value;
e.style.borderBottomStyle = t, a.refresh(), n.builder.opts.onChange()
}));
var y = l.querySelector("#inpElmBorderLeftWidth");
y.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), y.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderLeftWidth").value;
isNaN(t) || "" == t ? (e.style.borderLeftStyle = "solid", e.style.borderLeftWidth = "", e.style.borderLeftStyle = "") : (e.style.borderLeftStyle = "solid", e.style.borderLeftWidth = t + l.querySelector("#inpElmBorderLeftWidthUnit").value, e.style.borderLeftStyle = l.querySelector("#inpElmBorderLeftStyle").value), a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderLeftWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderLeftWidthUnit").value;
"none" === t ? (e.style.borderLeft = "none", e.style.borderLeftWidth = "", e.style.borderLeftStyle = "", n.panelStuff.querySelector("#inpElmBorderLeftWidth").value = "", n.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "") : e.style.borderLeftWidth = l.querySelector("#inpElmBorderLeftWidth").value + t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderLeftStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderLeftStyle").value;
e.style.borderLeftStyle = t, a.refresh(), n.builder.opts.onChange()
}));
var b = l.querySelector("#inpElmBorderRightWidth");
b.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), b.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderRightWidth").value;
isNaN(t) || "" == t ? (e.style.borderRightStyle = "solid", e.style.borderRightWidth = "", e.style.borderRightStyle = "") : (e.style.borderRightStyle = "solid", e.style.borderRightWidth = t + l.querySelector("#inpElmBorderRightWidthUnit").value, e.style.borderRightStyle = l.querySelector("#inpElmBorderRightStyle").value), a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderRightWidthUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderRightWidthUnit").value;
"none" === t ? (e.style.borderRight = "none", e.style.borderRightWidth = "", e.style.borderRightStyle = "", n.panelStuff.querySelector("#inpElmBorderRightWidth").value = "", n.panelStuff.querySelector("#inpElmBorderRightStyle").value = "") : e.style.borderRightWidth = l.querySelector("#inpElmBorderRightWidth").value + t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmBorderRightStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderRightStyle").value;
e.style.borderRightStyle = t, a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
this.panelStuff.querySelector(".input-elm-bordercolor").style.backgroundColor = e.style.borderColor, this.panelStuff.querySelector(".input-elm-bordertopcolor").style.backgroundColor = e.style.borderTopColor, this.panelStuff.querySelector(".input-elm-borderbottomcolor").style.backgroundColor = e.style.borderBottomColor, this.panelStuff.querySelector(".input-elm-borderleftcolor").style.backgroundColor = e.style.borderLeftColor, this.panelStuff.querySelector(".input-elm-borderrightcolor").style.backgroundColor = e.style.borderRightColor, this.panelStuff.querySelector("#inpElmBorderWidth").value = "", this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "", this.panelStuff.querySelector("#inpElmBorderStyle").value = "";
var t = e.style.borderWidth,
i = parseInt(t);
isNaN(i) ? -1 !== (t = e.style.border).indexOf("none") && (this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "none", this.panelStuff.querySelector("#inpElmBorderWidth").value = "", this.panelStuff.querySelector("#inpElmBorderStyle").value = "") : (-1 !== t.indexOf("px") && (this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "px"), -1 !== t.indexOf("vw") && (this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "vw"), -1 !== t.indexOf("vh") && (this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "vh"), -1 !== t.indexOf("em") && (this.panelStuff.querySelector("#inpElmBorderWidthUnit").value = "em"), this.panelStuff.querySelector("#inpElmBorderWidth").value = i, -1 !== (t = e.style.borderStyle).indexOf("solid") && (this.panelStuff.querySelector("#inpElmBorderStyle").value = "solid"), -1 !== t.indexOf("dashed") && (this.panelStuff.querySelector("#inpElmBorderStyle").value = "dashed"), -1 !== t.indexOf("dotted") && (this.panelStuff.querySelector("#inpElmBorderStyle").value = "dotted")), this.panelStuff.querySelector("#inpElmBorderTopWidth").value = "", this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "", this.panelStuff.querySelector("#inpElmBorderTopStyle").value = "", t = e.style.borderTopWidth;
var n = parseInt(t);
isNaN(n) ? -1 !== (t = e.style.borderTop).indexOf("none") && (this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "none", this.panelStuff.querySelector("#inpElmBorderTopWidth").value = "", this.panelStuff.querySelector("#inpElmBorderTopStyle").value = "") : (-1 !== t.indexOf("px") && (this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "px"), -1 !== t.indexOf("vw") && (this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "vw"), -1 !== t.indexOf("vh") && (this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "vh"), -1 !== t.indexOf("em") && (this.panelStuff.querySelector("#inpElmBorderTopWidthUnit").value = "em"), this.panelStuff.querySelector("#inpElmBorderTopWidth").value = n, -1 !== t.indexOf("solid") && (this.panelStuff.querySelector("#inpElmBorderTopStyle").value = "solid"), -1 !== t.indexOf("dashed") && (this.panelStuff.querySelector("#inpElmBorderTopStyle").value = "dashed"), -1 !== t.indexOf("dotted") && (this.panelStuff.querySelector("#inpElmBorderTopStyle").value = "dotted")), this.panelStuff.querySelector("#inpElmBorderBottomWidth").value = "", this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "", this.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "", t = e.style.borderBottomWidth;
var o = parseInt(t);
isNaN(o) ? -1 !== (t = e.style.borderBottom).indexOf("none") && (this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "none", this.panelStuff.querySelector("#inpElmBorderBottomWidth").value = "", this.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "") : (-1 !== t.indexOf("px") && (this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "px"), -1 !== t.indexOf("vw") && (this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "vw"), -1 !== t.indexOf("vh") && (this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "vh"), -1 !== t.indexOf("em") && (this.panelStuff.querySelector("#inpElmBorderBottomWidthUnit").value = "em"), this.panelStuff.querySelector("#inpElmBorderBottomWidth").value = o, -1 !== t.indexOf("solid") && (this.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "solid"), -1 !== t.indexOf("dashed") && (this.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "dashed"), -1 !== t.indexOf("dotted") && (this.panelStuff.querySelector("#inpElmBorderBottomStyle").value = "dotted")), this.panelStuff.querySelector("#inpElmBorderLeftWidth").value = "", this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "", this.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "", t = e.style.borderLeftWidth;
var r = parseInt(t);
isNaN(r) ? -1 !== (t = e.style.borderLeft).indexOf("none") && (this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "none", this.panelStuff.querySelector("#inpElmBorderLeftWidth").value = "", this.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "") : (-1 !== t.indexOf("px") && (this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "px"), -1 !== t.indexOf("vw") && (this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "vw"), -1 !== t.indexOf("vh") && (this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "vh"), -1 !== t.indexOf("em") && (this.panelStuff.querySelector("#inpElmBorderLeftWidthUnit").value = "em"), this.panelStuff.querySelector("#inpElmBorderLeftWidth").value = r, -1 !== t.indexOf("solid") && (this.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "solid"), -1 !== t.indexOf("dashed") && (this.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "dashed"), -1 !== t.indexOf("dotted") && (this.panelStuff.querySelector("#inpElmBorderLeftStyle").value = "dotted")), this.panelStuff.querySelector("#inpElmBorderRightWidth").value = "", this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "", this.panelStuff.querySelector("#inpElmBorderRightStyle").value = "", t = e.style.borderRightWidth;
var a = parseInt(t);
isNaN(a) ? -1 !== (t = e.style.borderRight).indexOf("none") && (this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "none", this.panelStuff.querySelector("#inpElmBorderRightWidth").value = "", this.panelStuff.querySelector("#inpElmBorderRightStyle").value = "") : (-1 !== t.indexOf("px") && (this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "px"), -1 !== t.indexOf("vw") && (this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "vw"), -1 !== t.indexOf("vh") && (this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "vh"), -1 !== t.indexOf("em") && (this.panelStuff.querySelector("#inpElmBorderRightWidthUnit").value = "em"), this.panelStuff.querySelector("#inpElmBorderRightWidth").value = a, -1 !== t.indexOf("solid") && (this.panelStuff.querySelector("#inpElmBorderRightStyle").value = "solid"), -1 !== t.indexOf("dashed") && (this.panelStuff.querySelector("#inpElmBorderRightStyle").value = "dashed"), -1 !== t.indexOf("dotted") && (this.panelStuff.querySelector("#inpElmBorderRightStyle").value = "dotted"))
}
}]), e
}(),
Td = new v,
Od = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementText");
this.panelStuff = l;
var s = '\n <div class="is-settings clearfix" style="width:115px;">\n <div>Text Color:</div>\n <div>\n <button title="'.concat(o.out("Text Color"), '" class="input-elm-color is-btn-color"></button>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Font Size:</div>\n <div style="display:flex">\n <input type="text" id="inpElmFontSize" value="" style="width:45px"/>\n <select id="inpElmFontSizeUnit">\n <option value=""></option>\n <option value="px">px</option>\n <option value="pt">pt</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Text Align:</div>\n <div>\n <select id="inpElmTextAlign">\n <option value=""></option>\n <option value="left">Left</option>\n <option value="center">Center</option>\n <option value="right">Right</option>\n <option value="justify">Full</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Line Height:</div>\n <div style="display:flex">\n <input type="text" id="inpElmLineHeight" value="" style="width:45px"/>\n <select id="inpElmLineHeightUnit">\n <option value=""></option>\n <option value="px">px</option>\n <option value="pt">pt</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Font Weight:</div>\n <div>\n <select id="inpElmFontWeight">\n <option value=""></option>\n <option value="100">100</option>\n <option value="200">200</option>\n <option value="300">300</option>\n <option value="400">400</option>\n <option value="500">500</option>\n <option value="600">600</option>\n <option value="700">700</option>\n <option value="800">800</option>\n <option value="900">900</option>\n <option value="bold">Bold</option>\n <option value="normal">Normal</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Font Style:</div>\n <div>\n <select id="inpElmFontStyle">\n <option value=""></option>\n <option value="italic">Italic</option>\n <option value="normal">Normal</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Text Transform:</div>\n <div>\n <select id="inpElmTextTransform">\n <option value=""></option>\n <option value="uppercase">Uppercase</option>\n <option value="lowercase">Lowercase</option>\n <option value="capitalize">Capitalize</option>\n <option value="none">None</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Text Decoration:</div>\n <div>\n <select id="inpElmTextDecoration">\n <option value=""></option>\n <option value="underline">Underline</option>\n <option value="line-through">Line Through</option>\n <option value="overline">Overline</option>\n <option value="none">None</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Letter Spacing:</div>\n <div>\n <input type="text" id="inpElmLetterSpacing" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:115px;">\n <div>Word Spacing:</div>\n <div>\n <input type="text" id="inpElmWordSpacing" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div>Font Family:</div>\n <div style="display:flex">\n <input type="text" id="inpElmFontFamily" value="" style="width:100%"/>\n <button title="').concat(o.out("Select Font"), '" class="input-elm-fontfamily" style="border-left: none;width:45px;padding:0;"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n </div>\n </div>\n ');
Td.appendHtml(l, s);
var c = '\n <div class="is-modal pickfontfamily">\n <div style="max-width:303px;padding:0;box-sizing:border-box;position:relative;">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;width: 100%;z-index:1;"> '.concat(o.out("Font"), ' </div>\n <div class="clearfix" style="margin-top:28px;padding:0px;height:300px;position:relative;">\n <iframe src="about:blank" style="width:100%;height:100%;position:absolute;top:0;left:0;border: none;"></iframe>\n </div>\n </div>\n </div>\n ');
Td.appendHtml(r, c);
var d = r.querySelector(".is-modal.pickfontfamily"),
u = l.querySelector(".input-elm-color");
u.addEventListener("click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = e.target;
n.builder.colorPicker.open((function (e) {
n.builder.inspectedElement.style.color = e, t.style.backgroundColor = e, a.refresh(), n.builder.opts.onChange()
}), u.style.backgroundColor)
})), l.querySelector("#inpElmTextAlign").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmTextAlign").value;
e.style.textAlign = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFontWeight").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFontWeight").value;
e.style.fontWeight = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFontStyle").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFontStyle").value;
e.style.fontStyle = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmTextTransform").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmTextTransform").value;
e.style.textTransform = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmTextDecoration").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmTextDecoration").value;
e.style.textDecoration = t, a.refresh(), n.builder.opts.onChange()
}));
var v = l.querySelector("#inpElmFontSize");
v.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), v.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFontSize").value,
i = l.querySelector("#inpElmFontSizeUnit").value;
"" === i && (l.querySelector("#inpElmFontSizeUnit").value = "px", i = "px"), isNaN(t) || "" == t ? e.style.fontSize = "" : e.style.fontSize = t + i;
for (var o = n.builder.opts.fontSizeClassValues, r = 0; r <= o.length - 1; r++) Td.hasClass(e, "size-" + o[r]) && Td.removeClass(e, "size-" + o[r]);
a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFontSizeUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFontSize").value,
i = l.querySelector("#inpElmFontSizeUnit").value;
isNaN(t) || "" == t ? e.style.fontSize = "" : e.style.fontSize = t + i, a.refresh(), n.builder.opts.onChange()
}));
var h = l.querySelector("#inpElmLineHeight");
h.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), h.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmLineHeight").value,
i = l.querySelector("#inpElmLineHeightUnit").value;
isNaN(t) || "" == t ? e.style.lineHeight = "" : e.style.lineHeight = t + i, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmLineHeightUnit").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmLineHeightUnit").value,
i = l.querySelector("#inpElmLineHeight").value;
isNaN(i) || "" == i ? e.style.lineHeight = "" : e.style.lineHeight = i + t, a.refresh(), n.builder.opts.onChange()
}));
var f = l.querySelector("#inpElmLetterSpacing");
f.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), f.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmLetterSpacing").value;
isNaN(t) || "" == t ? e.style.letterSpacing = "" : e.style.letterSpacing = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var g = l.querySelector("#inpElmWordSpacing");
g.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), g.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmWordSpacing").value;
isNaN(t) || "" == t ? e.style.wordSpacing = "" : e.style.wordSpacing = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var m = l.querySelector("#inpElmFontFamily");
m.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), m.addEventListener("keyup", (function () {
var e = l.querySelector("#inpElmFontFamily").value;
n.builder.inspectedElement.style.fontFamily = e, a.refresh(), n.builder.opts.onChange()
}));
var y = d.querySelector("iframe").contentWindow.document;
y.open(), this.builder.opts.emailMode ? y.write(this.util.getFontFamilyEmail()) : y.write(this.util.getFontFamilyHTML()), y.close(), l.querySelector(".input-elm-fontfamily").addEventListener("click", (function () {
var e = n.builder.inspectedElement;
n.util.showModal(d);
var t = e.style.fontFamily,
i = d.querySelector("iframe"),
o = i.contentDocument || i.contentWindow.document;
if ("" != t) {
var r = t.split(",")[0];
if (r = (r = r.replace('"', "").replace('"', "")).toLowerCase().trim(), o) {
[].forEach.call(o.querySelectorAll("#divFontList > div"), (function (e) {
var t = e.getAttribute("data-font-family");
(t = (t = t.split(",")[0]).trim().toLowerCase()) == r && "" != t ? Td.addClass(e, "on") : Td.removeClass(e, "on")
}));
var a = o.querySelector("#divFontList"),
l = a.querySelector(".on");
l && (a.scrollTop = a.scrollTop + l.getBoundingClientRect().top)
}
} else o && [].forEach.call(o.querySelectorAll("#divFontList > div"), (function (e) {
Td.removeClass(e, "on")
}))
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
this.panelStuff.querySelector(".input-elm-color").style.backgroundColor = e.style.color, this.panelStuff.querySelector("#inpElmTextAlign").value = "";
var t = e.style.textAlign;
this.panelStuff.querySelector("#inpElmTextAlign").value = t, this.panelStuff.querySelector("#inpElmFontSize").value = "";
var i, n = parseInt(e.style.fontSize);
isNaN(n) || (this.panelStuff.querySelector("#inpElmFontSize").value = n), this.panelStuff.querySelector("#inpElmFontSizeUnit").value = "px";
var o = e.style.fontSize; - 1 != o.indexOf("px") && (i = "px"), -1 != o.indexOf("pt") && (i = "pt"), -1 != o.indexOf("em") && (i = "em"), -1 != o.indexOf("vw") && (i = "vw"), -1 != o.indexOf("vh") && (i = "vh"), -1 != o.indexOf("%") && (i = "%"), this.panelStuff.querySelector("#inpElmFontSizeUnit").value = i, this.panelStuff.querySelector("#inpElmFontWeight").value = "";
var r = e.style.fontWeight;
this.panelStuff.querySelector("#inpElmFontWeight").value = r, this.panelStuff.querySelector("#inpElmFontStyle").value = "";
var a = e.style.fontStyle;
this.panelStuff.querySelector("#inpElmFontStyle").value = a, this.panelStuff.querySelector("#inpElmTextTransform").value = "";
var l = e.style.textTransform;
this.panelStuff.querySelector("#inpElmTextTransform").value = l, this.panelStuff.querySelector("#inpElmTextDecoration").value = "";
var s, c = e.style.textDecoration;
if (this.panelStuff.querySelector("#inpElmTextDecoration").value = c, this.panelStuff.querySelector("#inpElmLineHeight").value = "", isNaN(e.style.lineHeight)) {
var d = parseInt(e.style.lineHeight);
isNaN(d) || (this.panelStuff.querySelector("#inpElmLineHeight").value = d)
} else this.panelStuff.querySelector("#inpElmLineHeight").value = e.style.lineHeight;
this.panelStuff.querySelector("#inpElmLineHeightUnit").value = "", -1 != (o = e.style.lineHeight).indexOf("px") && (s = "px"), -1 != o.indexOf("pt") && (s = "pt"), this.panelStuff.querySelector("#inpElmLineHeightUnit").value = s, this.panelStuff.querySelector("#inpElmLetterSpacing").value = "";
var u = parseInt(e.style.letterSpacing);
isNaN(u) || (this.panelStuff.querySelector("#inpElmLetterSpacing").value = u), this.panelStuff.querySelector("#inpElmWordSpacing").value = "";
var p = parseInt(e.style.wordSpacing);
isNaN(p) || (this.panelStuff.querySelector("#inpElmWordSpacing").value = p), this.panelStuff.querySelector("#inpElmFontFamily").value = "";
var v = e.style.fontFamily;
"" != v && (this.panelStuff.querySelector("#inpElmFontFamily").value = v)
}
}]), e
}(),
Nd = new v,
Rd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementCorner");
this.panelStuff = l;
Nd.appendHtml(l, '\n <div style="margin-top: 13px;font-weight: bold;width:100%;">Corners</div>\n\n <div class="is-settings clearfix" style="width:100%;margin-bottom:9px;">\n <div>Border Radius:</div>\n <div>\n <input type="text" id="inpElmBorderRadius" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div style="margin-top: 25px;font-weight: bold;width:100%;">Individual Corners</div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Top Left:</div>\n <div>\n <input type="text" id="inpElmBorderTopLeftRadius" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Top Right:</div>\n <div>\n <input type="text" id="inpElmBorderTopRightRadius" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Bottom Left:</div>\n <div>\n <input type="text" id="inpElmBorderBottomLeftRadius" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Bottom Right:</div>\n <div>\n <input type="text" id="inpElmBorderBottomRightRadius" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n ');
var s = l.querySelector("#inpElmBorderRadius");
s.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), s.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderRadius").value;
isNaN(t) || "" == t ? e.style.borderRadius = "" : e.style.borderRadius = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var c = l.querySelector("#inpElmBorderTopLeftRadius");
c.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), c.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderTopLeftRadius").value;
isNaN(t) || "" == t ? e.style.borderTopLeftRadius = "" : e.style.borderTopLeftRadius = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var d = l.querySelector("#inpElmBorderTopRightRadius");
d.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), d.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderTopRightRadius").value;
isNaN(t) || "" == t ? e.style.borderTopRightRadius = "" : e.style.borderTopRightRadius = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var u = l.querySelector("#inpElmBorderBottomLeftRadius");
u.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), u.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderBottomLeftRadius").value;
isNaN(t) || "" == t ? e.style.borderBottomLeftRadius = "" : e.style.borderBottomLeftRadius = t + "px", a.refresh(), n.builder.opts.onChange()
}));
var v = l.querySelector("#inpElmBorderBottomRightRadius");
v.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), v.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBorderBottomRightRadius").value;
isNaN(t) || "" == t ? e.style.borderBottomRightRadius = "" : e.style.borderBottomRightRadius = t + "px", a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = t.querySelector("#inpElmBorderRadius");
i.value = "";
var n = e.style.borderRadius,
o = parseInt(n);
isNaN(o) || (i.value = o);
var r = t.querySelector("#inpElmBorderTopLeftRadius");
r.value = "", n = e.style.borderTopLeftRadius;
var a = parseInt(n);
isNaN(a) || (r.value = a);
var l = t.querySelector("#inpElmBorderTopRightRadius");
l.value = "", n = e.style.borderTopRightRadius;
var s = parseInt(n);
isNaN(s) || (l.value = s);
var c = t.querySelector("#inpElmBorderBottomLeftRadius");
c.value = "", n = e.style.borderBottomLeftRadius;
var d = parseInt(n);
isNaN(d) || (c.value = d);
var u = t.querySelector("#inpElmBorderBottomRightRadius");
u.value = "", n = e.style.borderBottomRightRadius;
var p = parseInt(n);
isNaN(p) || (u.value = p)
}
}]), e
}(),
Bd = new v,
Id = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementShadow");
this.panelStuff = l;
var s = '\n <div style="margin-top:13px;font-weight:bold;width:100%;">Shadow</div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>x Offset:</div>\n <div style="display:flex">\n <input type="text" id="inpElmBoxShadowX" value="" style="width:45px"/>\n <select id="inpElmBoxShadowXUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>y Offset:</div>\n <div style="display:flex">\n <input type="text" id="inpElmBoxShadowY" value="" style="width:45px"/>\n <select id="inpElmBoxShadowYUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Blur:</div>\n <div style="display:flex">\n <input type="text" id="inpElmBoxShadowBlur" value="" style="width:45px"/>\n <select id="inpElmBoxShadowBlurUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Spread:</div>\n <div style="display:flex">\n <input type="text" id="inpElmBoxShadowSpread" value="" style="width:45px"/>\n <select id="inpElmBoxShadowSpreadUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div>Shadow Color:</div>\n <div>\n <button title="'.concat(o.out("Shadow Color"), '" class="input-elm-shadowcolor is-btn-color"></button>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div>Outer/Inner Shadow:</div>\n <div>\n <select id="inpElmBoxShadowInset">\n <option value="">Outset</option>\n <option value="inset">Inset</option>\n </select>\n </div>\n </div>\n ');
Bd.appendHtml(l, s);
var c = l.querySelector(".input-elm-shadowcolor");
c.addEventListener("click", (function () {
n.builder.uo.saveForUndo(!0), n.builder.colorPicker.open((function (e) {
c.style.backgroundColor = e, n.updateShadow(n.builder.inspectedElement), a.refresh(), n.builder.opts.onChange()
}), c.style.backgroundColor)
}));
var d = l.querySelectorAll("#inpElmBoxShadowX,#inpElmBoxShadowY,#inpElmBoxShadowBlur,#inpElmBoxShadowSpread");
Array.prototype.forEach.call(d, (function (e) {
e.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), e.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement;
n.updateShadow(e), a.refresh(), n.builder.opts.onChange()
}))
})), d = l.querySelectorAll("#inpElmBoxShadowXUnit,#inpElmBoxShadowYUnit,#inpElmBoxShadowBlurUnit,#inpElmBoxShadowSpreadUnit"), Array.prototype.forEach.call(d, (function (e) {
e.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement;
n.updateShadow(e), a.refresh(), n.builder.opts.onChange()
}))
})), l.querySelector("#inpElmBoxShadowInset").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement;
n.updateShadow(e), a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "updateShadow",
value: function (e) {
var t = this.panelStuff,
i = t.querySelector(".input-elm-shadowcolor").style.backgroundColor,
n = t.querySelector("#inpElmBoxShadowInset").value,
o = t.querySelector("#inpElmBoxShadowX").value,
r = t.querySelector("#inpElmBoxShadowXUnit").value,
a = "";
isNaN(o) || "" == o || (a = o + r), o = t.querySelector("#inpElmBoxShadowY").value, r = t.querySelector("#inpElmBoxShadowYUnit").value;
var l = "";
isNaN(o) || "" == o || (l = o + r), o = t.querySelector("#inpElmBoxShadowBlur").value, r = t.querySelector("#inpElmBoxShadowBlurUnit").value;
var s = "";
isNaN(o) || "" == o || (s = o + r), o = t.querySelector("#inpElmBoxShadowSpread").value, r = t.querySelector("#inpElmBoxShadowSpreadUnit").value;
var c = "";
isNaN(o) || "" == o || (c = o + r), e.style.boxShadow = (a + " " + l + " " + s + " " + c + " " + i + " " + n).trim()
}
}, {
key: "readElementStyles",
value: function (e) {
var t, i, n = this.panelStuff,
o = e.style.boxShadow,
r = n.querySelectorAll("#inpElmBoxShadowX,#inpElmBoxShadowY,#inpElmBoxShadowBlur,#inpElmBoxShadowSpread");
if (Array.prototype.forEach.call(r, (function (e) {
e.value = ""
})), r = n.querySelectorAll("#inpElmBoxShadowXUnit,#inpElmBoxShadowYUnit,#inpElmBoxShadowBlurUnit,#inpElmBoxShadowSpreadUnit"), Array.prototype.forEach.call(r, (function (e) {
e.value = "px"
})), n.querySelector("#inpElmBoxShadowInset").value = "", -1 != o.indexOf("inset") && (n.querySelector("#inpElmBoxShadowInset").value = "inset", o = o.replace("inset", "")), "" != o) {
-1 != o.indexOf("rgb") && (t = (t = o.substr(o.indexOf("rgb"))).substr(0, t.indexOf(")") + 1), n.querySelector(".input-elm-shadowcolor").style.backgroundColor = t, i = o.split("rgb")[1].indexOf(")"), o = o.split("rgb")[0] + o.split("rgb")[1].substr(i + 2)), -1 != o.indexOf("#") && (t = (t = o.substr(o.indexOf("#"))).substr(0, t.indexOf(" ")), n.querySelector(".input-elm-shadowcolor").style.backgroundColor = t, i = o.split("#")[1].indexOf(" "), o = o.split("#")[0] + o.split("#")[1].substr(i + 2));
var a = o.split(" "),
l = a.length;
i = 1;
for (var s = 0; s < l; s++) 1 == i && (n.querySelector("#inpElmBoxShadowX").value = parseInt(a[s]), -1 != a[s].indexOf("px") ? n.querySelector("#inpElmBoxShadowXUnit").value = "px" : -1 != a[s].indexOf("em") ? n.querySelector("#inpElmBoxShadowXUnit").value = "em" : n.querySelector("#inpElmBoxShadowX").value = ""), 2 == i && (n.querySelector("#inpElmBoxShadowY").value = parseInt(a[s]), -1 != a[s].indexOf("px") ? n.querySelector("#inpElmBoxShadowYUnit").value = "px" : -1 != a[s].indexOf("em") ? n.querySelector("#inpElmBoxShadowYUnit").value = "em" : n.querySelector("#inpElmBoxShadowY").value = ""), 3 == i && (n.querySelector("#inpElmBoxShadowBlur").value = parseInt(a[s]), -1 != a[s].indexOf("px") ? n.querySelector("#inpElmBoxShadowBlurUnit").value = "px" : -1 != a[s].indexOf("em") ? n.querySelector("#inpElmBoxShadowBlurUnit").value = "em" : n.querySelector("#inpElmBoxShadowBlur").value = ""), 4 == i && (n.querySelector("#inpElmBoxShadowSpread").value = parseInt(a[s]), -1 != a[s].indexOf("px") ? n.querySelector("#inpElmBoxShadowSpreadUnit").value = "px" : -1 != a[s].indexOf("em") ? n.querySelector("#inpElmBoxShadowSpreadUnit").value = "em" : n.querySelector("#inpElmBoxShadowSpread").value = ""), i++
}
}
}]), e
}(),
Hd = new v,
Dd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementDisplay");
this.panelStuff = l;
Hd.appendHtml(l, '\n <div style="margin-top:13px;font-weight:bold;">Display</div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="display:flex">\n <select id="inpElmDisplay" style="width:110px;">\n <option value=""></option>\n <option value="block">Block</option>\n <option value="inline-block">Inline Block</option>\n <option value="inline">Inline</option>\n <option value="flex">Flex</option>\n <option value="none">None</option>\n </select>\n </div>\n </div>\n\n <div style="margin-top:25px;font-weight:bold;width:100%;">Flex</div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Direction:</div>\n <div style="display:flex">\n <select id="inpElmFlexDirection" style="width:110px;">\n <option value=""></option>\n <option value="row">Row</option>\n <option value="row-reverse">Row Reverse</option>\n <option value="column">Column</option>\n <option value="column-reverse">Column Reverse</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Wrap:</div>\n <div style="display:flex">\n <select id="inpElmFlexWrap" style="width:110px;">\n <option value=""></option>\n <option value="no-wrap">No Wrap</option>\n <option value="wrap">Wrap</option>\n <option value="wrap-reverse">Wrap Reverse</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div>Justify Content:</div>\n <div style="display:flex">\n <select id="inpElmJustifyContent" style="width:110px;">\n <option value=""></option>\n <option value="center">Center</option>\n <option value="flex-start">Flex Start</option>\n <option value="flex-end">Flex End</option>\n <option value="space-around">Space Around</option>\n <option value="space-between">Space Between</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Align Items:</div>\n <div style="display:flex">\n <select id="inpElmAlignItems" style="width:110px;">\n <option value=""></option>\n <option value="center">Center</option>\n <option value="flex-start">Flex Start</option>\n <option value="flex-end">Flex End</option>\n <option value="stretch">Stretch</option>\n <option value="baseline">Baseline</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Align Content:</div>\n <div style="display:flex">\n <select id="inpElmAlignContent" style="width:110px;">\n <option value=""></option>\n <option value="center">Center</option>\n <option value="flex-start">Flex Start</option>\n <option value="flex-end">Flex End</option>\n <option value="stretch">Stretch</option>\n <option value="space-around">Space Around</option>\n <option value="space-between">Space Between</option>\n </select>\n </div>\n </div>\n '), l.querySelector("#inpElmDisplay").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmDisplay").value;
e.style.display = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFlexDirection").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFlexDirection").value;
e.style.flexDirection = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFlexWrap").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFlexWrap").value;
e.style.flexWrap = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmJustifyContent").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmJustifyContent").value;
e.style.justifyContent = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmAlignItems").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmAlignItems").value;
e.style.alignItems = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmAlignContent").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmAlignContent").value;
e.style.alignContent = t, a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = t.querySelector("#inpElmDisplay");
i.value = "";
var n = e.style.display;
n && (i.value = n);
var o = t.querySelector("#inpElmFlexDirection");
o.value = "", (n = e.style.flexDirection) && (o.value = n);
var r = t.querySelector("#inpElmFlexWrap");
r.value = "", (n = e.style.flexWrap) && (r.value = n);
var a = t.querySelector("#inpElmJustifyContent");
a.value = "", (n = e.style.justifyContent) && (a.value = n);
var l = t.querySelector("#inpElmAlignItems");
l.value = "", (n = e.style.alignItems) && (l.value = n);
var s = t.querySelector("#inpElmAlignContent");
s.value = "", (n = e.style.alignContent) && (s.value = n)
}
}]), e
}(),
Fd = new v,
Pd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementPosition");
this.panelStuff = l;
Fd.appendHtml(l, '\n <div style="margin-top:13px;font-weight:bold;width:100%;">Position</div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="display:flex">\n <select id="inpElmPosition">\n <option value=""></option>\n <option value="relative">Relative</option>\n <option value="absolute">Absolute</option>\n <option value="fixed">Fixed</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Top:</div>\n <div style="display:flex">\n <input type="text" id="inpElmTop" value="" style="width:45px"/>\n <select id="inpElmTopUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Left:</div>\n <div style="display:flex">\n <input type="text" id="inpElmLeft" value="" style="width:45px"/>\n <select id="inpElmLeftUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Bottom:</div>\n <div style="display:flex">\n <input type="text" id="inpElmBottom" value="" style="width:45px"/>\n <select id="inpElmBottomUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div>Right:</div>\n <div style="display:flex">\n <input type="text" id="inpElmRight" value="" style="width:45px"/>\n <select id="inpElmRightUnit">\n <option value="px">px</option>\n <option value="em">em</option>\n <option value="vw">vw</option>\n <option value="vh">vh</option>\n <option value="%">%</option>\n </select>\n </div>\n </div>\n\n <div style="margin-top: 25px;font-weight: bold;width:100%;">Float</div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="display:flex">\n <select id="inpElmFloat">\n <option value=""></option>\n <option value="left">Left</option>\n <option value="right">Right</option>\n <option value="none">None</option>\n </select>\n </div>\n </div>\n '), l.querySelector("#inpElmPosition").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmPosition").value;
e.style.position = t, a.refresh(), n.builder.opts.onChange()
})), l.querySelector("#inpElmFloat").addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmFloat").value;
e.style.float = t, a.refresh(), n.builder.opts.onChange()
}));
var s = l.querySelector("#inpElmTop");
s.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var c = l.querySelector("#inpElmTopUnit");
s.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = s.value,
i = c.value;
isNaN(t) || "" == t ? e.style.top = "" : e.style.top = t + i, a.refresh(), n.builder.opts.onChange()
})), c.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = s.value,
i = c.value;
isNaN(t) || "" == t ? e.style.top = "" : e.style.top = t + i, a.refresh(), n.builder.opts.onChange()
}));
var d = l.querySelector("#inpElmBottom");
d.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var u = l.querySelector("#inpElmBottomUnit");
d.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = d.value,
i = u.value;
isNaN(t) || "" == t ? e.style.bottom = "" : e.style.bottom = t + i, a.refresh(), n.builder.opts.onChange()
})), u.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = d.value,
i = u.value;
isNaN(t) || "" == t ? e.style.bottom = "" : e.style.bottom = t + i, a.refresh(), n.builder.opts.onChange()
}));
var v = l.querySelector("#inpElmLeft");
v.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var h = l.querySelector("#inpElmLeftUnit");
v.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = v.value,
i = h.value;
isNaN(t) || "" == t ? e.style.left = "" : e.style.left = t + i, a.refresh(), n.builder.opts.onChange()
})), h.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = v.value,
i = h.value;
isNaN(t) || "" == t ? e.style.left = "" : e.style.left = t + i, a.refresh(), n.builder.opts.onChange()
}));
var f = l.querySelector("#inpElmRight");
f.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
}));
var g = l.querySelector("#inpElmRightUnit");
f.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = f.value,
i = g.value;
isNaN(t) || "" == t ? e.style.right = "" : e.style.right = t + i, a.refresh(), n.builder.opts.onChange()
})), g.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = f.value,
i = g.value;
isNaN(t) || "" == t ? e.style.right = "" : e.style.right = t + i, a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = t.querySelector("#inpElmPosition");
i.value = "";
var n = e.style.position;
i.value = n;
var o = t.querySelector("#inpElmFloat");
o.value = "", n = e.style.float, o.value = n;
var r = t.querySelector("#inpElmTop"),
a = t.querySelector("#inpElmTopUnit");
r.value = "", a.value = "px", n = e.style.top;
var l = parseInt(n);
isNaN(l) || (-1 != n.indexOf("%") && (a.value = "%"), -1 != n.indexOf("px") && (a.value = "px"), -1 != n.indexOf("vw") && (a.value = "vw"), -1 != n.indexOf("vh") && (a.value = "vh"), -1 != n.indexOf("em") && (a.value = "em"), r.value = l);
var s = t.querySelector("#inpElmBottom"),
c = t.querySelector("#inpElmBottomUnit");
s.value = "", c.value = "px", n = e.style.bottom;
var d = parseInt(n);
isNaN(d) || (-1 != n.indexOf("%") && (c.value = "%"), -1 != n.indexOf("px") && (c.value = "px"), -1 != n.indexOf("vw") && (c.value = "vw"), -1 != n.indexOf("vh") && (c.value = "vh"), -1 != n.indexOf("em") && (c.value = "em"), s.value = d);
var u = t.querySelector("#inpElmLeft"),
p = t.querySelector("#inpElmLeftUnit");
u.value = "", p.value = "px", n = e.style.left;
var v = parseInt(n);
isNaN(v) || (-1 != n.indexOf("%") && (p.value = "%"), -1 != n.indexOf("px") && (p.value = "px"), -1 != n.indexOf("vw") && (p.value = "vw"), -1 != n.indexOf("vh") && (p.value = "vh"), -1 != n.indexOf("em") && (p.value = "em"), u.value = v);
var h = t.querySelector("#inpElmRight"),
f = t.querySelector("#inpElmRightUnit");
h.value = "", f.value = "px", n = e.style.right;
var g = parseInt(n);
isNaN(g) || (-1 != n.indexOf("%") && (f.value = "%"), -1 != n.indexOf("px") && (f.value = "px"), -1 != n.indexOf("vw") && (f.value = "vw"), -1 != n.indexOf("vh") && (f.value = "vh"), -1 != n.indexOf("em") && (f.value = "em"), h.value = g)
}
}]), e
}(),
Ud = new v,
zd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = new Ed(i),
l = r.querySelector("#divElementEffect");
this.panelStuff = l;
Ud.appendHtml(l, '\n <div style="margin-top:13px;font-weight:bold;">Effects</div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div>Opacity:</div>\n <div style="display:flex">\n <input type="text" id="inpElmOpacity" value="" style="width:45px"/>\n </div>\n </div>\n\n <div style="margin-top:25px;font-weight:bold;width:100%;">Filters</div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Blur:</div>\n <div>\n <input type="text" id="inpElmBlur" value="" style="width:45px"/> &nbsp;px\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Brightness:</div>\n <div>\n <input type="text" id="inpElmBrightness" value="" style="width:45px"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Contrast:</div>\n <div>\n <input type="text" id="inpElmContrast" value="" style="width:45px"/> &nbsp;%\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Grayscale:</div>\n <div>\n <input type="text" id="inpElmGrayscale" value="" style="width:45px"/> &nbsp;%\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Hue Rotate:</div>\n <div>\n <input type="text" id="inpElmHueRotate" value="" style="width:45px"/> &nbsp;<span style="font-size:12px">deg</span>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Invert:</div>\n <div>\n <input type="text" id="inpElmInvert" value="" style="width:45px"/> &nbsp;%\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Saturate:</div>\n <div>\n <input type="text" id="inpElmSaturate" value="" style="width:45px"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div>Sepia:</div>\n <div>\n <input type="text" id="inpElmSepia" value="" style="width:45px"/> &nbsp;%\n </div>\n </div>\n ');
var s, c = l.querySelector("#inpElmOpacity");
c.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), c.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmOpacity").value;
e.style.opacity = t, a.refresh(), n.builder.opts.onChange()
}));
var d = l.querySelector("#inpElmBlur");
d.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), d.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBlur").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("blur") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "blur(" + t + "px)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " blur(" + t + "px)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var u = l.querySelector("#inpElmBrightness");
u.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), u.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmBrightness").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("brightness") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "brightness(" + t + ")", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " brightness(" + t + ")";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var v = l.querySelector("#inpElmContrast");
v.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), v.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmContrast").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("contrast") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "contrast(" + t + "%)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " contrast(" + t + "%)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var h = l.querySelector("#inpElmGrayscale");
h.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), h.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmGrayscale").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("grayscale") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "grayscale(" + t + "%)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " grayscale(" + t + "%)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var f = l.querySelector("#inpElmHueRotate");
f.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), f.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmHueRotate").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("hue-rotate") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "hue-rotate(" + t + "deg)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " hue-rotate(" + t + "deg)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var g = l.querySelector("#inpElmInvert");
g.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), g.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmInvert").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("invert") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "invert(" + t + "%)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " invert(" + t + "%)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var m = l.querySelector("#inpElmSaturate");
m.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), m.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmSaturate").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("saturate") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "saturate(" + t + ")", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " saturate(" + t + ")";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}));
var y = l.querySelector("#inpElmSepia");
y.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), y.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement,
t = l.querySelector("#inpElmSepia").value,
i = e.style.filter,
o = (i = i.replace("none", "")).split(" "),
r = !1;
for (s = 0; s < o.length; s++) {
-1 != o[s].indexOf("sepia") && (isNaN(t) || "" == t ? o[s] = "" : o[s] = "sepia(" + t + "%)", r = !0)
}
if (r)
for (i = "", s = 0; s < o.length; s++) i += " " + o[s];
else i = i + " sepia(" + t + "%)";
"" == i.trim() ? e.style.filter = "none" : e.style.filter = i, a.refresh(), n.builder.opts.onChange()
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = t.querySelector("#inpElmOpacity");
i.value = "";
var n = e.style.opacity;
n && (i.value = n);
var o = e.style.filter.split(" "),
r = t.querySelector("#inpElmBlur");
r.value = "";
var a = t.querySelector("#inpElmBrightness");
a.value = "";
var l = t.querySelector("#inpElmGrayscale");
l.value = "";
var s = t.querySelector("#inpElmContrast");
s.value = "";
var c = t.querySelector("#inpElmHueRotate");
c.value = "";
var d = t.querySelector("#inpElmInvert");
d.value = "";
var u = t.querySelector("#inpElmSaturate");
u.value = "";
var p, v = t.querySelector("#inpElmSepia");
v.value = "";
for (var h = 0; h < o.length; h++) - 1 != (n = o[h]).indexOf("blur") && (p = n.replace("blur(", "").replace(")", ""), p = parseInt(p), r.value = p), -1 != n.indexOf("brightness") && (p = n.replace("brightness(", "").replace(")", ""), p = parseInt(p), a.value = p), -1 != n.indexOf("grayscale") && (p = n.replace("grayscale(", "").replace(")", ""), p = parseInt(p), l.value = p), -1 != n.indexOf("contrast") && (p = n.replace("contrast(", "").replace(")", ""), p = parseInt(p), s.value = p), -1 != n.indexOf("hue-rotate") && (p = n.replace("hue-rotate(", "").replace(")", ""), p = parseInt(p), c.value = p), -1 != n.indexOf("invert") && (p = n.replace("invert(", "").replace(")", ""), p = parseInt(p), d.value = p), -1 != n.indexOf("saturate") && (p = n.replace("saturate(", "").replace(")", ""), p = parseInt(p), u.value = p), -1 != n.indexOf("sepia") && (p = n.replace("sepia(", "").replace(")", ""), p = parseInt(p), v.value = p)
}
}]), e
}(),
Wd = new v,
jd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector("#divElementAttribute");
this.panelStuff = a;
Wd.appendHtml(a, '\n <div style="margin-top:13px;font-weight:bold;width:100%;">Attributes</div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="width:100%">Names:</div>\n <div style="display:flex">\n <input type="text" id="inpElmAttr1" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="width:100%">Values:</div>\n <div style="display:flex">\n <input type="text" id="inpElmAttrVal1" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttr2" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttrVal2" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttr3" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttrVal3" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttr4" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttrVal4" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;">\n <div style="display:flex">\n <input type="text" id="inpElmAttr5" value="" style="width:90%"/>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:120px;float:left;">\n <div style="display:flex">\n <input type="text" id="inpElmAttrVal5" value="" style="width:90%"/>\n </div>\n </div>\n ');
var l = a.querySelectorAll("#inpElmAttr1,#inpElmAttr2,#inpElmAttr3,#inpElmAttr4,#inpElmAttr5,#inpElmAttrVal1,#inpElmAttrVal2,#inpElmAttrVal3,#inpElmAttrVal4,#inpElmAttrVal5");
Array.prototype.forEach.call(l, (function (e) {
e.addEventListener("click", (function () {
n.builder.uo.saveForUndo()
})), e.addEventListener("keyup", (function () {
var e = n.builder.inspectedElement;
n.updateAttributes(e), n.builder.opts.onChange()
}))
}))
}
return n(e, [{
key: "updateAttributes",
value: function (e) {
var t = {};
for (var i in Array.prototype.forEach.call(e.attributes, (function (e) {
t[e.name] = e.value
})), t) Object.prototype.hasOwnProperty.call(t, i) && "id" != i && "style" != i && "class" != i && "href" != i && "src" != i && "contenteditable" != i && "data-filename" != i && e.removeAttribute(i);
var n, o, r = this.panelStuff;
n = r.querySelector("#inpElmAttr1").value, o = r.querySelector("#inpElmAttrVal1").value, "" !== n && e.setAttribute(n, o), n = r.querySelector("#inpElmAttr2").value, o = r.querySelector("#inpElmAttrVal2").value, "" !== n && e.setAttribute(n, o), n = r.querySelector("#inpElmAttr3").value, o = r.querySelector("#inpElmAttrVal3").value, "" !== n && e.setAttribute(n, o), n = r.querySelector("#inpElmAttr4").value, o = r.querySelector("#inpElmAttrVal4").value, "" !== n && e.setAttribute(n, o), n = r.querySelector("#inpElmAttr5").value, o = r.querySelector("#inpElmAttrVal5").value, "" !== n && e.setAttribute(n, o)
}
}, {
key: "readElementStyles",
value: function (e) {
var t = this.panelStuff,
i = t.querySelectorAll("#inpElmAttr1,#inpElmAttr2,#inpElmAttr3,#inpElmAttr4,#inpElmAttr5,#inpElmAttrVal1,#inpElmAttrVal2,#inpElmAttrVal3,#inpElmAttrVal4,#inpElmAttrVal5");
Array.prototype.forEach.call(i, (function (e) {
e.value = ""
}));
var n = 1;
Array.prototype.forEach.call(e.attributes, (function (e) {
"id" !== e.name && "style" !== e.name && "class" !== e.name && "href" !== e.name && "src" !== e.name && "contenteditable" !== e.name && "data-filename" !== e.name && "data-saveforundo" !== e.name && (t.querySelector("#inpElmAttr" + n).value = e.name, t.querySelector("#inpElmAttrVal" + n).value = e.value, n += 1)
}))
}
}]), e
}(),
Yd = new v,
Xd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector("#divElementAnimation");
this.panelStuff = a;
var l = '\n <div style="margin-top:13px;font-weight:bold;">'.concat(o.out("Animate"), '</div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="display:flex">\n <select id="selElmAnim">\n <option value=""></option>\n <option value="fade">fade</option>\n <option value="fade-up">fade-up</option>\n <option value="fade-down">fade-down</option>\n <option value="fade-left">fade-left</option>\n <option value="fade-right">fade-right</option>\n <option value="fade-up-right">fade-up-right</option>\n <option value="fade-up-left">fade-up-left</option>\n <option value="fade-down-right">fade-down-right</option>\n <option value="fade-down-left">fade-down-left</option>\n <option value="flip-up">flip-up</option>\n <option value="flip-down">flip-down</option>\n <option value="flip-left">flip-left</option>\n <option value="flip-right">flip-right</option>\n <option value="slide-up">slide-up</option>\n <option value="slide-down">slide-down</option>\n <option value="slide-left">slide-left</option>\n <option value="slide-right">slide-right</option>\n <option value="zoom-in">zoom-in</option>\n <option value="zoom-in-up">zoom-in-up</option>\n <option value="zoom-in-down">zoom-in-down</option>\n <option value="zoom-in-left">zoom-in-left</option>\n <option value="zoom-in-right">zoom-in-right</option>\n <option value="zoom-out">zoom-out</option>\n <option value="zoom-out-up">zoom-out-up</option>\n <option value="zoom-out-down">zoom-out-down</option>\n <option value="zoom-out-left">zoom-out-left</option>\n <option value="zoom-out-right">zoom-out-right</option>\n </select>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div> ').concat(o.out("Delay"), ':</div>\n <div>\n <select id="selElmAnimDelay">\n <option value=""></option>\n <option value="0">0</option>\n <option value="100">100</option>\n <option value="200">200</option>\n <option value="300">300</option>\n <option value="400">400</option>\n <option value="500">500</option>\n <option value="600">600</option>\n <option value="700">700</option>\n <option value="800">800</option>\n <option value="900">900</option>\n <option value="1000">1000</option>\n <option value="1100">1100</option>\n <option value="1200">1200</option>\n <option value="1300">1300</option>\n <option value="1400">1400</option>\n <option value="1500">1500</option>\n <option value="1600">1600</option>\n <option value="1700">1700</option>\n <option value="1800">1800</option>\n <option value="1900">1900</option>\n <option value="2000">2000</option>\n <option value="2100">2100</option>\n <option value="2200">2200</option>\n <option value="2300">2300</option>\n <option value="2400">2400</option>\n <option value="2500">2500</option>\n <option value="2600">2600</option>\n <option value="2700">2700</option>\n <option value="2800">2800</option>\n <option value="2900">2900</option>\n <option value="3000">3000</option>\n </select> &nbsp;ms\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:110px;">\n <div> ').concat(o.out("Duration"), ':</div>\n <div>\n <select id="selElmAnimDuration">\n <option value=""></option>\n <option value="0">0</option>\n <option value="100">100</option>\n <option value="200">200</option>\n <option value="300">300</option>\n <option value="400">400</option>\n <option value="500">500</option>\n <option value="600">600</option>\n <option value="700">700</option>\n <option value="800">800</option>\n <option value="900">900</option>\n <option value="1000">1000</option>\n <option value="1100">1100</option>\n <option value="1200">1200</option>\n <option value="1300">1300</option>\n <option value="1400">1400</option>\n <option value="1500">1500</option>\n <option value="1600">1600</option>\n <option value="1700">1700</option>\n <option value="1800">1800</option>\n <option value="1900">1900</option>\n <option value="2000">2000</option>\n <option value="2100">2100</option>\n <option value="2200">2200</option>\n <option value="2300">2300</option>\n <option value="2400">2400</option>\n <option value="2500">2500</option>\n <option value="2600">2600</option>\n <option value="2700">2700</option>\n <option value="2800">2800</option>\n <option value="2900">2900</option>\n <option value="3000">3000</option>\n </select> &nbsp;ms\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="margin-top:15px">\n <label for="chkAnimateOnce"><input type="checkbox" id="chkAnimateOnce" value=""> ').concat(o.out("Animate Once"), ' </label>\n </div>\n </div>\n\n <div class="is-settings clearfix" style="width:100%;">\n <div style="display:flex">\n <button title="').concat(o.out("Test"), '" id="btnPreviewAnim" class="classic" value=""> ').concat(o.out("TEST"), " </button>\n </div>\n </div>\n ");
Yd.appendHtml(a, l);
var s = a.querySelector("#selElmAnim");
s.addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = a.querySelector("#selElmAnim").value;
"" == t ? e.removeAttribute("data-aos") : (e.setAttribute("data-aos", t), a.querySelector("#btnPreviewAnim").click()), n.builder.opts.onChange()
})), (s = a.querySelector("#selElmAnimDelay")).addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = a.querySelector("#selElmAnimDelay").value;
"" == t ? e.removeAttribute("data-aos-delay") : e.setAttribute("data-aos-delay", t), n.builder.opts.onChange()
})), (s = a.querySelector("#selElmAnimDuration")).addEventListener("change", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement,
t = a.querySelector("#selElmAnimDuration").value;
"" == t ? e.removeAttribute("data-aos-duration") : e.setAttribute("data-aos-duration", t), n.builder.opts.onChange()
}));
var c = a.querySelector("#chkAnimateOnce");
c.addEventListener("click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.inspectedElement;
a.querySelector("#chkAnimateOnce").checked ? e.setAttribute("data-aos-once", "true") : e.removeAttribute("data-aos-once"), n.builder.opts.onChange()
})), (c = a.querySelector("#btnPreviewAnim")).addEventListener("click", (function () {
var e = n.builder.inspectedElement,
t = e.getAttribute("data-aos-duration");
e.removeAttribute("data-aos-duration"), e.style.visibility = "hidden", window.AOS && window.AOS.init({
duration: 1
}), Yd.removeClass(e, "aos-init"), Yd.removeClass(e, "aos-animate"), setTimeout((function () {
e.style.visibility = "", window.AOS && window.AOS.init({
duration: 1200
}), t && e.setAttribute("data-aos-duration", t)
}), 10)
}))
}
return n(e, [{
key: "readElementStyles",
value: function (e) {
this.panelStuff.querySelector("#selElmAnimDelay").value = "";
var t = e.getAttribute("data-aos-delay");
this.panelStuff.querySelector("#selElmAnimDelay").value = t, this.panelStuff.querySelector("#selElmAnimDuration").value = "", t = e.getAttribute("data-aos-duration"), this.panelStuff.querySelector("#selElmAnimDuration").value = t, this.panelStuff.querySelector("#chkAnimateOnce").checked = !1;
var i = e.getAttribute("data-aos-once");
i && "true" === i && (this.panelStuff.querySelector("#chkAnimateOnce").checked = !0), this.panelStuff.querySelector("#selElmAnim").value = "", t = e.getAttribute("data-aos"), this.panelStuff.querySelector("#selElmAnim").value = t
}
}]), e
}(),
Gd = new v,
Vd = [],
Zd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r;
var a = r.querySelector(".elementstyles");
if (!a) {
var l = '\n <div class="is-side'.concat("right" === this.builder.opts.sidePanel ? "" : " fromleft", ' elementstyles">\n <div class="elm-list" style="z-index:1;width:100%;height:100px;position:absolute;top:0px;left:0px;box-sizing:border-box;display:flex;align-items:center;flex-wrap: wrap;padding:10px 23px 10px 18px;border-bottom:#e8e8e8 1px solid;"></div>\n \n <button title="').concat(o.out("Close"), '" class="is-side-close" style="z-index:1;width:25px;height:25px;position:absolute;top:10px;right:13px;box-sizing:border-box;padding:0;line-height:25px;font-size: 12px;text-align:center;cursor:pointer;"><svg class="is-icon-flex" style="width:25px;height:25px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n \n <div style="position: absolute;bottom:7px;right:7px;width:40px;height:25px;z-index:1;display:flex">\n <button title="').concat(o.out("css"), '" class="elm-editstyle classic" style="width: 40px;height: 25px;font-family: sans-serif;font-size: 10px;padding: 0px;font-weight: bold;">').concat(o.out("css"), '</button>\n </div>\n \n <div style="width:100%;height:100%;overflow-y:auto;overflow-x:hidden;position:absolute;top:0px;left:0px;box-sizing:border-box;border-top:100px solid transparent;padding:0px;">\n \n <div class="is-tabs clearfix" data-group="element" style="padding-right:0;padding-bottom:0;">\n <a title="').concat(o.out("Box"), '" id="tabElementBox" href="" data-content="divElementBox" class="active">').concat(o.out("Box"), '</a>\n <a title="').concat(o.out("Spacing"), '" id="tabElementSpacing" href="" data-content="divElementSpacing">').concat(o.out("Spacing"), '</a>\n <a title="').concat(o.out("Border"), '" id="tabElementBorder" href="" data-content="divElementBorder">').concat(o.out("Border"), '</a>\n <a title="').concat(o.out("Text"), '" id="tabElementText" href="" data-content="divElementText">').concat(o.out("Text"), '</a>\n <a title="').concat(o.out("More"), '" id="tabElementMore" data-menu="divElementMore" href=""><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-more"></use></svg></a>\n </div>\n \n <div id="divElementMore" class="is-tabs-more" data-group="element">\n <a title="').concat(o.out("Corners"), '" id="tabElementCorner" href="" data-content="divElementCorner">').concat(o.out("Corners"), '</a>\n <a title="').concat(o.out("Shadow"), '" id="tabElementShadow" href="" data-content="divElementShadow">').concat(o.out("Shadow"), '</a>\n <a title="').concat(o.out("Display"), '" id="tabElementDisplay" href="" data-content="divElementDisplay">').concat(o.out("Display"), '</a>\n <a title="').concat(o.out("Position"), '" id="tabElementPosition" href="" data-content="divElementPosition">').concat(o.out("Position"), '</a>\n <a title="').concat(o.out("Effects"), '" id="tabElementEffect" href="" data-content="divElementEffect">').concat(o.out("Effects"), '</a>\n <a title="').concat(o.out("Attributes"), '" id="tabElementAttribute" href="" data-content="divElementAttribute">').concat(o.out("Attributes"), "</a>\n ").concat(!0 === this.builder.opts.elementAnimate ? '<a title="'.concat(o.out("Animation"), '" id="tabElementAnimation" href="" data-content="divElementAnimation">').concat(o.out("Animation"), "</a>") : "", '\n </div>\n\n <div id="divElementBox" class="is-tab-content" data-group="element" style="display:flex;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n <div id="divElementSpacing" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n <div id="divElementBorder" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n <div id="divElementText" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n <div id="divElementCorner" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n <div id="divElementShadow" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n \n <div id="divElementDisplay" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n \n <div id="divElementPosition" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n \n <div id="divElementEffect" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n \n <div id="divElementAttribute" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n \n <div id="divElementAnimation" class="is-tab-content" data-group="element" style="display:none;flex-flow:wrap;padding:12px 17px;">\n </div>\n\n </div>\n </div> \n ');
Gd.appendHtml(r, l), this.elementStyleEditor = new Ed(i);
var s = (a = r.querySelector(".elementstyles")).querySelector(".is-side-close");
Gd.addEventListener(s, "click", (function () {
n.hidePanel()
})), s = a.querySelector(".elm-editstyle"), Gd.addEventListener(s, "click", (function () {
n.elementStyleEditor.toggleStyleEditor()
}))
}
this.panel = a;
var c = new Ld(i);
this.elementBoxStyles = c;
var d = new qd(i);
this.elementSpacingStyles = d;
var u = new _d(i);
this.elementBorderStyles = u;
var v = new Od(i);
this.elementTextStyles = v;
var h = new Rd(i);
this.elementCornerStyles = h;
var f = new Id(i);
this.elementShadowStyles = f;
var g = new Dd(i);
this.elementDisplayStyles = g;
var m = new Pd(i);
this.elementPositionStyles = m;
var y = new zd(i);
this.elementEffectStyles = y;
var b = new jd(i);
this.elementAttributeStyles = b;
var x = new Xd(i);
this.elementAnimationStyles = x
}
return n(e, [{
key: "click",
value: function () {
(Gd.hasClass(this.panel, "active") || Gd.hasClass(this.elementStyleEditor.modalStyles, "active")) && this.inspect(this.builder.inspectedElement)
}
}, {
key: "inspect",
value: function (e) {
var t = this;
this.elementBoxStyles.readElementStyles(e), this.elementSpacingStyles.readElementStyles(e), this.elementBorderStyles.readElementStyles(e), this.elementTextStyles.readElementStyles(e), this.elementCornerStyles.readElementStyles(e), this.elementShadowStyles.readElementStyles(e), this.elementDisplayStyles.readElementStyles(e), this.elementPositionStyles.readElementStyles(e), this.elementEffectStyles.readElementStyles(e), this.elementAttributeStyles.readElementStyles(e), this.elementAnimationStyles.readElementStyles(e);
var i = this.panel,
n = document.querySelectorAll("[data-saveforundo]");
Array.prototype.forEach.call(n, (function (e) {
e.removeAttribute("data-saveforundo")
})), e.setAttribute("data-saveforundo", ""), n = document.querySelectorAll(".elm-inspected"), Array.prototype.forEach.call(n, (function (e) {
Gd.removeClass(e, "elm-inspected")
})), setTimeout((function () {
Gd.addClass(e, "elm-inspected")
}), 10), i.querySelector(".elm-list").innerHTML = "";
var o = e,
r = 0;
for (Vd = []; !Gd.hasClass(o, "is-builder") && (Vd.push(o), o) && o.tagName;) {
var a = o.tagName.toLowerCase(),
l = Gd.createElement("a");
l.setAttribute("data-index", r), r++, l.setAttribute("href", "#"), l.innerHTML = a, "" === i.querySelector(".elm-list").innerHTML ? (Gd.addClass(l, "active"), i.querySelector(".elm-list").insertAdjacentHTML("afterbegin", l.outerHTML)) : (i.querySelector(".elm-list").insertAdjacentHTML("afterbegin", "&nbsp;>&nbsp; "), i.querySelector(".elm-list").insertAdjacentHTML("afterbegin", l.outerHTML)), o = o.parentNode
}
var s = i.querySelectorAll(".elm-list a");
Array.prototype.forEach.call(s, (function (e) {
Gd.addEventListener(e, "click", (function (i) {
var n = e.getAttribute("data-index");
t.builder.inspectedElement = Vd[n], t.inspect(Vd[n]), document.querySelector(".elm-inspected.elm-active") || (t.builderStuff.querySelector(".is-element-tool").style.display = "none"), i.preventDefault(), i.stopImmediatePropagation()
}))
})), this.elementStyleEditor.refresh()
}
}, {
key: "showPanel",
value: function () {
var e = this.builderStuff.querySelector(".is-side.elementstyles"),
t = this.builderStuff.querySelectorAll(".is-side");
Array.prototype.forEach.call(t, (function (e) {
Gd.removeClass(e, "active")
})), Gd.addClass(e, "active"), this.inspect(this.builder.inspectedElement)
}
}, {
key: "hidePanel",
value: function () {
var e = this.builderStuff.querySelector(".is-side.elementstyles");
Gd.removeClass(e, "active");
var t = document.querySelectorAll("[data-saveforundo]");
Array.prototype.forEach.call(t, (function (e) {
e.removeAttribute("data-saveforundo")
})), t = document.querySelectorAll(".elm-inspected"), Array.prototype.forEach.call(t, (function (e) {
Gd.removeClass(e, "elm-inspected")
}))
}
}]), e
}(),
Kd = new v,
Jd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = new Zd(i);
this.elementPanel = r;
var a, l = o.builderStuff(),
s = l.querySelector(".is-element-tool");
if (!s) {
var c = '<div class="is-tool is-element-tool">\n <button title="'.concat(o.out("Add"), '" class="elm-add"><svg class="is-icon-flex"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>\n <button title="').concat(o.out("More"), '" class="elm-more"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button>\n <button title="').concat(o.out("Delete"), '" class="elm-remove"><svg class="is-icon-flex" style="margin-left:-1px"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n <button title="').concat(o.out("Settings"), '" class="elm-settings"><svg class="is-icon-flex"><use xlink:href="#ion-ios-gear"></use></svg></button>\n </div>\n <div class="is-pop elmmore" style="z-index:10002;">\n <div style="display:flex;flex-flow:wrap;">\n <button title="').concat(o.out("Move Up"), '" class="elm-up"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-up"></use></svg></span>').concat(o.out("Move Up"), '</button>\n <button title="').concat(o.out("Move Down"), '" class="elm-down"><span><svg class="is-icon-flex" style="width:15px;height:15px;"><use xlink:href="#ion-ios-arrow-thin-down"></use></svg></span>').concat(o.out("Move Down"), '</button>\n <button title="').concat(o.out("Duplicate"), '" class="elm-duplicate"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-photos-outline"></use></svg></span>').concat(o.out("Duplicate"), "</button>\n ").concat(this.builder.opts.elementEditor ? '\n <button title="'.concat(o.out("Settings"), '" class="elm-settings"><span><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-ios-gear"></use></svg></span>').concat(o.out("Settings"), "</button>\n ") : "", " \n </div>\n </div>\n ");
Kd.appendHtml(l, c), s = l.querySelector(".is-element-tool"), a = l.querySelector(".elmmore");
var d = s.querySelectorAll("[title]");
Array.prototype.forEach.call(d, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
}))
}
this.elementTool = s, this.elementMore = a;
var u = C(i),
v = s.querySelector(".elm-add");
Kd.addEventListener(v, "click", (function () {
u.querySelector(".is-pop-tabs").style.display = "none";
var e = window.innerHeight,
t = v.getBoundingClientRect().top,
i = v.getBoundingClientRect().left;
u.style.display = "flex";
var n = u.offsetWidth,
o = u.offsetHeight;
return e - t > o ? (u.style.top = t + window.pageYOffset + 27 + "px", u.style.left = i - n / 2 + 10 + "px", Kd.removeClass(u, "arrow-bottom"), Kd.removeClass(u, "arrow-right"), Kd.removeClass(u, "arrow-left"), Kd.removeClass(u, "center"), Kd.addClass(u, "arrow-top"), Kd.addClass(u, "center")) : (u.style.top = t + window.pageYOffset - o - 8 + "px", u.style.left = i - n / 2 + 10 + "px", Kd.removeClass(u, "arrow-top"), Kd.removeClass(u, "arrow-right"), Kd.removeClass(u, "arrow-left"), Kd.removeClass(u, "center"), Kd.addClass(u, "arrow-bottom"), Kd.addClass(u, "center")), u.setAttribute("data-mode", "elm"), !1
}));
var h = s.querySelector(".elm-remove");
Kd.addEventListener(h, "click", (function () {
o.confirm(o.out("Are you sure you want to delete this element?"), (function (e) {
if (e) {
n.builder.uo.saveForUndo();
var t = n.builder.activeElement;
if (Kd.hasClass(t.parentNode, "cell-active") || t.parentNode.hasAttribute("data-subblock")) t.parentNode.removeChild(t);
else if (t.parentNode.childElementCount > 1) t.parentNode.removeChild(t);
else {
var r = t;
if (Kd.parentsHasAttribute(r, "data-subblock"))
for (; !r.parentNode.hasAttribute("data-subblock") && 1 === t.parentNode.childElementCount;) r = r.parentNode;
else
for (; !Kd.hasClass(r.parentNode, "cell-active") && 1 === t.parentNode.childElementCount;) r = r.parentNode;
r.parentNode.removeChild(r)
}
n.elementTool.style.display = "none";
var a = n.builder.activeCol;
if (a) {
var s = a.parentNode;
if (0 === a.childElementCount && 3 === s.childElementCount) {
s.parentNode.removeChild(s);
var c = l.querySelector(".is-column-tool");
Kd.removeClass(c, "active"), o.checkEmpty()
} else if (0 === a.childElementCount) {
s.removeChild(a), o.fixLayout(s, i);
var d = l.querySelector(".is-column-tool");
Kd.removeClass(d, "active")
}
}
var u = document.querySelectorAll(".is-subblock");
Array.prototype.forEach.call(u, (function (e) {
var t = Kd.elementChildren(e),
i = !0;
t.forEach((function () {
i = !1
})), i && (e.innerHTML = '<div class="spacer height-40" contentEditable="false"></div>')
})), o.clearControls(), n.builder.opts.onChange()
}
}))
}));
var f = s.querySelector(".elm-more");
Kd.addEventListener(f, "click", (function () {
var e = window.innerHeight,
t = f.getBoundingClientRect().top,
i = f.getBoundingClientRect().left;
a.style.display = "flex";
var n = a.offsetWidth,
o = a.offsetHeight;
e - t > o ? (a.style.top = t + window.pageYOffset + 27 + "px", a.style.left = i - n / 2 + 10 + "px", Kd.removeClass(a, "arrow-bottom"), Kd.removeClass(a, "arrow-right"), Kd.removeClass(a, "arrow-left"), Kd.removeClass(a, "center"), Kd.addClass(a, "arrow-top"), Kd.addClass(a, "center")) : (a.style.top = t + window.pageYOffset - o - 8 + "px", a.style.left = i - n / 2 + 10 + "px", Kd.removeClass(a, "arrow-top"), Kd.removeClass(a, "arrow-right"), Kd.removeClass(a, "arrow-left"), Kd.removeClass(a, "center"), Kd.addClass(a, "arrow-bottom"), Kd.addClass(a, "center"))
}));
var g = a.querySelector(".elm-up");
Kd.addEventListener(g, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeElement;
if (e.previousElementSibling) e.parentNode.insertBefore(e, e.previousElementSibling), e.click(), n.position(e);
else {
for (var t = e; !Kd.hasClass(t.parentNode, "cell-active") && !t.parentNode.hasAttribute("data-subblock");) t = t.parentNode;
t.previousElementSibling && t !== e && (t.parentNode.insertBefore(t, t.previousElementSibling), e.click(), n.position(e))
}
e.click(), s.querySelector(".elm-more").click()
}));
var m = a.querySelector(".elm-down");
Kd.addEventListener(m, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeElement;
if (e.nextElementSibling) e.parentNode.insertBefore(e.nextElementSibling, e), e.click(), n.position(e);
else {
for (var t = e; !Kd.hasClass(t.parentNode, "cell-active") && !t.parentNode.hasAttribute("data-subblock");) t = t.parentNode;
t.nextElementSibling && t !== e && (t.parentNode.insertBefore(t.nextElementSibling, t), e.click(), n.position(e))
}
}));
var y = a.querySelector(".elm-duplicate");
Kd.addEventListener(y, "click", (function () {
n.builder.uo.saveForUndo();
var e = n.builder.activeElement,
t = e.cloneNode(!0);
Kd.moveAfter(t, e), setTimeout((function () {
t.click(), n.position(t), n.builder.applyBehavior()
}), 100)
}));
var b = s.querySelector(".elm-settings");
b && Kd.addEventListener(b, "click", (function () {
a.style.display = "", n.elementPanel.showPanel()
}));
var x = a.querySelector(".elm-settings");
x && Kd.addEventListener(x, "click", (function () {
a.style.display = "", n.elementPanel.showPanel()
})), document.addEventListener("mousedown", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if ("flex" === a.style.display) {
var i = Kd.parentsHasClass(t, "elmmore"),
n = Kd.parentsHasClass(t, "elm-more");
if (i || n) return;
a.style.display = ""
}
}))
}
return n(e, [{
key: "hide",
value: function () {
this.elementTool.style.display = "";
var e = document.querySelectorAll(".elm-active");
Array.prototype.forEach.call(e, (function (e) {
Kd.removeClass(e, "elm-active")
}))
}
}, {
key: "position",
value: function () {
var e = this.elementTool,
t = this.elementMore;
Kd.addClass(t, "transition1");
var i = e.querySelector(".elm-more"),
n = window.innerHeight,
o = i.getBoundingClientRect().top,
r = i.getBoundingClientRect().left;
t.style.display = "flex";
var a = t.offsetWidth,
l = t.offsetHeight;
n - o > l ? (t.style.top = o + window.pageYOffset + 27 + "px", t.style.left = r - a / 2 + 10 + "px", Kd.removeClass(t, "arrow-bottom"), Kd.removeClass(t, "arrow-right"), Kd.removeClass(t, "arrow-left"), Kd.removeClass(t, "center"), Kd.addClass(t, "arrow-top"), Kd.addClass(t, "center")) : (t.style.top = o + window.pageYOffset - l - 8 + "px", t.style.left = r - a / 2 + 10 + "px", Kd.removeClass(t, "arrow-top"), Kd.removeClass(t, "arrow-right"), Kd.removeClass(t, "arrow-left"), Kd.removeClass(t, "center"), Kd.addClass(t, "arrow-bottom"), Kd.addClass(t, "center")), setTimeout((function () {
Kd.removeClass(t, "transition1")
}), 300)
}
}, {
key: "click",
value: function (e, t) {
var i = t.target,
n = this.elementTool;
n.style.display = "none";
var o = document.querySelectorAll(".elm-active");
Array.prototype.forEach.call(o, (function (e) {
Kd.removeClass(e, "elm-active")
}));
var r = null,
a = !1;
e.hasAttribute("data-noedit") && (a = !0);
var l = !1;
e.hasAttribute("data-protected") && (l = !0);
var s = !1;
e.hasAttribute("data-html") && (s = !0);
var c = !1;
if (Kd.parentsHasClass(i, "is-subblock") && (c = !0), (s || a || l) && !c);
else {
var d = i.tagName.toLowerCase();
if ("h1" == d || "h2" == d || "h3" == d || "h4" == d || "h5" == d || "h6" == d || "p" == d || "pre" == d || "blockquote" == d || "li" == d || "img" == d || "iframe" == d) r = i;
else if (Kd.hasClass(i, "cell-active") || i.hasAttribute("data-subblock"));
else if (Kd.hasClass(i, "cell-active") || i.parentNode.hasAttribute("data-subblock")) r = i;
else
for (var u = i;
"BODY" !== u.tagName && "HTML" !== u.tagName;) {
var p = u.tagName.toLowerCase();
if ("h1" == p || "h2" == p || "h3" == p || "h4" == p || "h5" == p || "h6" == p || "p" == p || "pre" == p || "blockquote" == p || "li" == p || "img" == p || "iframe" == p) {
r = u;
break
}
if (Kd.hasClass(u.parentNode, "cell-active") || u.parentNode.hasAttribute("data-subblock")) {
r = u;
break
}
u = u.parentNode
}
}
if (r) {
var v = r,
h = v.getBoundingClientRect().top + window.pageYOffset,
f = v.getBoundingClientRect().left + window.pageXOffset,
g = v.offsetWidth,
m = v.offsetHeight;
n.style.display = "flex", n.style.top = h + m + "px", n.style.left = f + g - n.offsetWidth + "px";
var y = window.innerWidth;
f + g > y && (n.style.left = y - n.offsetWidth + "px"), Kd.addClass(v, "elm-active")
}
this.builder.activeElement = r, this.builder.inspectedElement = t.target, this.elementPanel.click(t)
}
}, {
key: "refresh",
value: function () {
var e = this;
if (this.builder.activeElement) {
var t = this.elementTool;
t.style.display = "", setTimeout((function () {
var i = e.builder.activeElement,
n = i.getBoundingClientRect().top + window.pageYOffset,
o = i.getBoundingClientRect().left + window.pageXOffset,
r = i.offsetWidth,
a = i.offsetHeight;
t.style.display = "flex", t.style.top = n + a + "px", t.style.left = o + r - t.offsetWidth + "px";
var l = window.innerWidth;
o + r > l && (t.style.left = l - t.offsetWidth + "px")
}), 300)
}
}
}, {
key: "repositionElementTool",
value: function () {
if (this.builder.activeElement) try {
var e = this.elementTool,
t = this.builder.activeElement,
i = t.getBoundingClientRect().top + window.pageYOffset,
n = t.getBoundingClientRect().left + window.pageXOffset,
o = t.offsetWidth,
r = t.offsetHeight;
e.style.display = "flex", e.style.top = i + r + "px", e.style.left = n + o - e.offsetWidth + "px";
var a = window.innerWidth;
n + o > a && (e.style.left = a - e.offsetWidth + "px")
} catch (e) {}
}
}]), e
}(),
$d = new v,
Qd = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i),
r = o.builderStuff(),
a = r.querySelector(".viewconfig");
if (!a) {
var l = '<div class="is-modal viewconfig">\n <div style="width:100%;max-width:700px;padding:5px 12px 12px 20px">\n <div class="is-modal-bar is-draggable" style="position: absolute;top: 0;left: 0;height:32px;line-height:32px;width:100%;background: transparent;">'.concat(o.out("Preferences"), '</div>\n \n <div style="display:flex;flex-wrap:wrap;width:100%;padding-top:32px;">\n <div style="width:50%">\n <label id="divBuilderMode" style="display:block;margin-top:14px;margin-bottom:5px;">\n ').concat(o.out("Builder Mode"), ':&nbsp;\n <select class="select-buildermode">\n <option value="">').concat(o.out("Default"), '</option>\n <option value="minimal">').concat(o.out("Minimal"), '</option>\n <option value="clean">').concat(o.out("Clean"), '</option>\n </select>\n </label>\n \n <label id="divOutlineMode" style="display:block;margin-top:14px;margin-bottom:5px;">\n ').concat(o.out("Outline Mode"), ':&nbsp;\n <select class="select-outlinemode">\n <option value="">').concat(o.out("Row & column"), '</option>\n <option value="row">').concat(o.out("Row only"), '</option>\n </select>\n </label>\n\n <label style="display:block;margin-top:14px;margin-bottom:5px;">\n ').concat(o.out("Outline Style"), ':&nbsp;\n <select class="select-outlinestyle">\n <option value="">').concat(o.out("Colored"), '</option>\n <option value="grayoutline">').concat(o.out("Gray"), '</option>\n </select>\n </label>\n \n <label style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-hiderowcoloutline" type="checkbox" /> ').concat(o.out("Hide Outline"), '&nbsp;\n </label> \n\n <label id="divHideCellTool" style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-hidecelltool" type="checkbox" /> ').concat(o.out("Hide Column Tool"), '&nbsp;\n </label>\n\n <label style="display:block;margin-top:5px;margin-bottom:5px;">\n ').concat(o.out("Row Tool Position"), ':&nbsp;\n <select class="select-rowtool">\n <option value="right">').concat(o.out("Right"), '</option>\n <option value="left">').concat(o.out("Left"), '</option>\n </select>\n </label> \n\n <label style="display:block;margin-top:5px;margin-bottom:5px;">\n ').concat(o.out("Tool Style"), ':&nbsp;\n <select class="select-toolstyle">\n <option value="">').concat(o.out("Colored"), '</option>\n <option value="gray">').concat(o.out("Gray"), '</option>\n </select>\n </label> \n\n </div>\n <div style="width:50%">\n\n <label style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-hidesnippetaddtool" type="checkbox" /> ').concat(o.out("Hide Snippet (+) Tool"), '&nbsp;\n </label>\n\n <label style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-hideelementtool" type="checkbox" /> ').concat(o.out("Hide element tool"), '&nbsp;\n </label> \n\n <label style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-hideelementhighlight" type="checkbox" /> ').concat(o.out("Hide element highlight"), '&nbsp;\n </label> \n\n <label class="option-opensnippets" style="display:block;margin-top:14px;margin-bottom:10px;">\n <input class="input-opensnippets" type="checkbox" /> ').concat(o.out("Open snippets sidebar on start"), '&nbsp;\n </label>\n\n <label style="display:block;margin-top:14px;margin-bottom:5px;">\n ').concat(o.out("Snippets sidebar visibility"), ':&nbsp;\n <select class="select-snippetssidebardisplay">\n <option value="auto">').concat(o.out("Auto"), '</option>\n <option value="always">').concat(o.out("Always Visible"), '</option>\n </select>\n </label>\n\n <label style="display:block;margin-top:5px;margin-bottom:5px;">\n ').concat(o.out("Paste result"), ':&nbsp;\n <select class="select-pasteresult">\n <option value="html-without-styles">').concat(o.out("HTML (without styles)"), '</option>\n <option value="html">').concat(o.out("HTML (with styles)"), '</option>\n <option value="text">').concat(o.out("Text only"), '</option>\n </select>\n </label> \n\n <label style="display:block;margin-top:14px;margin-bottom:5px;">\n ').concat(o.out("Toolbar visibility"), ':&nbsp;\n <select class="select-editingtoolbardisplay">\n <option value="auto">').concat(o.out("Auto"), '</option>\n <option value="always">').concat(o.out("Always Visible"), '</option>\n </select>\n </label>\n\n <label style="').concat(this.builder.isTouchSupport ? "display:none;" : "display:block;", 'margin-top:5px;margin-bottom:5px;">\n ').concat(o.out("Toolbar position"), ':&nbsp;\n <select class="select-editingtoolbar">\n <option value="top">').concat(o.out("Top"), '</option>\n <option value="left">').concat(o.out("Left"), '</option>\n <option value="right">').concat(o.out("Right"), '</option>\n </select>\n </label> \n\n </div>\n </div>\n <div style="text-align:right;margin-top:30px">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), "</button>\n </div>\n </div>\n </div>");
$d.appendHtml(r, l), a = r.querySelector(".viewconfig"), "#divSnippetList" === i.opts.snippetList && i.opts.snippetJSON.snippets.length > 0 || (a.querySelector(".option-opensnippets").style.display = "none");
var s = a.querySelector(".input-cancel");
$d.addEventListener(s, "click", (function () {
o.hideModal(a)
})), s = a.querySelector(".input-ok"), $d.addEventListener(s, "click", (function () {
n.update(), o.hideModal(a)
})), null !== localStorage.getItem("_hiderowcoloutline") && ("1" === localStorage.getItem("_hiderowcoloutline") ? this.builder.opts.rowcolOutline = !1 : this.builder.opts.rowcolOutline = !0), this.setOutline(!this.builder.opts.rowcolOutline), null !== localStorage.getItem("_outlinemode") && (this.builder.opts.outlineMode = localStorage.getItem("_outlinemode")), this.setOutlineMode(this.builder.opts.outlineMode), null !== localStorage.getItem("_outlinestyle") && (this.builder.opts.outlineStyle = localStorage.getItem("_outlinestyle")), this.setOutlineStyle(this.builder.opts.outlineStyle), null !== localStorage.getItem("_pasteresult") && (this.builder.opts.paste = localStorage.getItem("_pasteresult")), null !== localStorage.getItem("_hidecelltool") && ("1" === localStorage.getItem("_hidecelltool") ? this.builder.opts.columnTool = !1 : this.builder.opts.columnTool = !0), this.setColumnTool(!this.builder.opts.columnTool), null !== localStorage.getItem("_hidesnippetaddtool") && ("1" === localStorage.getItem("_hidesnippetaddtool") ? this.builder.opts.snippetAddTool = !1 : this.builder.opts.snippetAddTool = !0), this.setSnippetAddTool(!this.builder.opts.snippetAddTool), null !== localStorage.getItem("_hideelementtool") && ("1" === localStorage.getItem("_hideelementtool") ? this.builder.opts.elementTool = !1 : this.builder.opts.elementTool = !0), this.setElementTool(!this.builder.opts.elementTool), null !== localStorage.getItem("_hideelementhighlight") && ("1" === localStorage.getItem("_hideelementhighlight") ? this.builder.opts.elementHighlight = !1 : this.builder.opts.elementHighlight = !0), this.setElementHighlight(!this.builder.opts.elementHighlight), null !== localStorage.getItem("_opensnippets") && ("1" === localStorage.getItem("_opensnippets") ? this.builder.opts.snippetOpen = !0 : this.builder.opts.snippetOpen = !1), null !== localStorage.getItem("_buildermode") && (this.builder.opts.builderMode = localStorage.getItem("_buildermode")), this.setBuilderMode(this.builder.opts.builderMode), null !== localStorage.getItem("_rowtool") && (this.builder.opts.rowTool = localStorage.getItem("_rowtool")), this.setRowToolPosition(this.builder.opts.rowTool), null !== localStorage.getItem("_toolstyle") && (this.builder.opts.toolStyle = localStorage.getItem("_toolstyle")), this.setToolStyle(this.builder.opts.toolStyle), null !== localStorage.getItem("_editingtoolbardisplay") && (this.builder.opts.toolbarDisplay = localStorage.getItem("_editingtoolbardisplay")), this.setToolbarDisplay(this.builder.opts.toolbarDisplay), null !== localStorage.getItem("_snippetssidebardisplay") && (this.builder.opts.snippetsSidebarDisplay = localStorage.getItem("_snippetssidebardisplay")), null != localStorage.getItem("_editingtoolbar") && (this.builder.opts.toolbar = localStorage.getItem("_editingtoolbar")), this.setToolbar(this.builder.opts.toolbar), this.builder.opts.emailMode && (this.builder.opts.outlineMode = "row", this.builder.opts.columnTool = !1, this.builder.opts.builderMode = "", null != localStorage.getItem("_outlinemode") && localStorage.setItem("_outlinemode", "row"), null !== localStorage.getItem("_hidecelltool") && localStorage.setItem("_hidecelltool", "1"), null !== localStorage.getItem("_buildermode") && localStorage.setItem("_buildermode", ""), this.setColumnTool(!0), this.setBuilderMode(""), this.setEmailMode(), r.querySelector("#divHideCellTool").style.display = "none", r.querySelector("#divOutlineMode").style.display = "none", r.querySelector("#divBuilderMode").style.display = "none")
}
this.config = a
}
return n(e, [{
key: "view",
value: function () {
var e = new p(this.builder),
t = this.config;
e.showModal(t, !1, null, !1), this.builder.opts.rowcolOutline ? t.querySelector(".input-hiderowcoloutline").checked = !1 : t.querySelector(".input-hiderowcoloutline").checked = !0, this.builder.opts.columnTool ? t.querySelector(".input-hidecelltool").checked = !1 : t.querySelector(".input-hidecelltool").checked = !0, this.builder.opts.snippetAddTool ? t.querySelector(".input-hidesnippetaddtool").checked = !1 : t.querySelector(".input-hidesnippetaddtool").checked = !0, this.builder.opts.elementTool ? t.querySelector(".input-hideelementtool").checked = !1 : t.querySelector(".input-hideelementtool").checked = !0, this.builder.opts.elementHighlight ? t.querySelector(".input-hideelementhighlight").checked = !1 : t.querySelector(".input-hideelementhighlight").checked = !0, this.builder.opts.snippetOpen ? t.querySelector(".input-opensnippets").checked = !0 : t.querySelector(".input-opensnippets").checked = !1, this.config.querySelector(".select-buildermode").value = this.builder.opts.builderMode, this.config.querySelector(".select-rowtool").value = this.builder.opts.rowTool, this.config.querySelector(".select-outlinemode").value = this.builder.opts.outlineMode, this.config.querySelector(".select-outlinestyle").value = this.builder.opts.outlineStyle, this.config.querySelector(".select-toolstyle").value = this.builder.opts.toolStyle, this.config.querySelector(".select-pasteresult").value = this.builder.opts.paste, this.config.querySelector(".select-editingtoolbardisplay").value = this.builder.opts.toolbarDisplay, this.config.querySelector(".select-editingtoolbar").value = this.builder.opts.toolbar, this.config.querySelector(".select-snippetssidebardisplay").value = this.builder.opts.snippetsSidebarDisplay
}
}, {
key: "update",
value: function () {
var e = this.config.querySelector(".input-hiderowcoloutline").checked;
e ? (this.builder.opts.rowcolOutline = !1, localStorage.setItem("_hiderowcoloutline", "1")) : (this.builder.opts.rowcolOutline = !0, localStorage.setItem("_hiderowcoloutline", "0")), this.setOutline(e), this.config.querySelector(".input-hidecelltool").checked ? (this.builder.opts.columnTool = !1, localStorage.setItem("_hidecelltool", "1"), this.setColumnTool(!0)) : (this.builder.opts.columnTool = !0, localStorage.setItem("_hidecelltool", "0"), this.setColumnTool(!1)), this.config.querySelector(".input-hidesnippetaddtool").checked ? (this.builder.opts.snippetAddTool = !1, localStorage.setItem("_hidesnippetaddtool", "1"), this.setSnippetAddTool(!0)) : (this.builder.opts.snippetAddTool = !0, localStorage.setItem("_hidesnippetaddtool", "0"), this.setSnippetAddTool(!1)), this.config.querySelector(".input-hideelementtool").checked ? (this.builder.opts.elementTool = !1, localStorage.setItem("_hideelementtool", "1"), this.setElementTool(!0)) : (this.builder.opts.elementTool = !0, localStorage.setItem("_hideelementtool", "0"), this.setElementTool(!1)), this.config.querySelector(".input-hideelementhighlight").checked ? (this.builder.opts.elementHighlight = !1, localStorage.setItem("_hideelementhighlight", "1"), this.setElementHighlight(!0)) : (this.builder.opts.elementHighlight = !0, localStorage.setItem("_hideelementhighlight", "0"), this.setElementHighlight(!1)), this.config.querySelector(".input-opensnippets").checked ? (this.builder.opts.snippetOpen = !0, localStorage.setItem("_opensnippets", "1")) : (this.builder.opts.snippetOpen = !1, localStorage.setItem("_opensnippets", "0"));
var t = this.config.querySelector(".select-buildermode").value;
this.builder.opts.builderMode = t, localStorage.setItem("_buildermode", t), this.setBuilderMode(t);
var i = this.config.querySelector(".select-rowtool").value;
this.builder.opts.rowTool = i, localStorage.setItem("_rowtool", i), this.setRowToolPosition(i);
var n = this.config.querySelector(".select-outlinemode").value;
this.builder.opts.outlineMode = n, localStorage.setItem("_outlinemode", n), this.setOutlineMode(n);
var o = this.config.querySelector(".select-outlinestyle").value;
this.builder.opts.outlineStyle = o, localStorage.setItem("_outlinestyle", o), this.setOutlineStyle(o);
var r = this.config.querySelector(".select-toolstyle").value;
this.builder.opts.toolStyle = r, localStorage.setItem("_toolstyle", r), this.setToolStyle(r);
var a = this.config.querySelector(".select-pasteresult").value;
this.builder.opts.paste = a, localStorage.setItem("_pasteresult", a);
var l = this.config.querySelector(".select-editingtoolbardisplay").value;
this.builder.opts.toolbarDisplay = l, localStorage.setItem("_editingtoolbardisplay", l), this.setToolbarDisplay(l);
var s = this.config.querySelector(".select-snippetssidebardisplay").value;
this.builder.opts.snippetsSidebarDisplay = s, localStorage.setItem("_snippetssidebardisplay", s);
var c = this.config.querySelector(".select-editingtoolbar").value;
this.builder.opts.toolbar = c, localStorage.setItem("_editingtoolbar", c), this.setToolbar(c)
}
}, {
key: "setToolbar",
value: function (e) {
var t = document.querySelector("#_cbhtml");
"top" === e ? (t.removeAttribute("toolbarleft", ""), t.removeAttribute("toolbarright", "")) : "left" === e ? (t.setAttribute("toolbarleft", ""), t.removeAttribute("toolbarright", "")) : "right" === e && (t.setAttribute("toolbarright", ""), t.removeAttribute("toolbarleft", "")), this.positionToolbar()
}
}, {
key: "setEmailMode",
value: function () {
document.querySelector("#_cbhtml").setAttribute("emailmode", "")
}
}, {
key: "positionToolbar",
value: function () {
var e = document.querySelector("#_cbhtml"),
t = e.querySelector(".is-rte-tool"),
i = e.querySelector(".rte-more-options");
if (t) {
var n = window.innerWidth,
o = window.innerHeight;
if ("left" === this.builder.opts.toolbar || "right" === this.builder.opts.toolbar) {
var r = o / 2 - t.offsetHeight / 2;
t.style.left = "", t.style.top = r + "px"
} else {
var a = n / 2 - t.offsetWidth / 2;
t.style.top = "", t.style.left = a + "px"
}
}
i && ($d.removeClass(i, "active"), $d.addClass(i, "deactive"))
}
}, {
key: "setToolbarDisplay",
value: function (e) {
var t = document.querySelector("#_cbhtml");
if ("auto" === e) {
t.removeAttribute("toolbarstay", "");
var i = t.querySelector(".is-rte-tool");
i && (i.style.display = "")
} else {
t.setAttribute("toolbarstay", "");
var n = window.innerWidth,
o = t.querySelector(".is-rte-tool");
if (o) {
var r = n / 2 - o.offsetWidth / 2;
o.style.left = r + "px"
}
}
}
}, {
key: "setElementTool",
value: function (e) {
var t = document.querySelector("#_cbhtml");
e ? t.setAttribute("hideelementtool", "") : t.removeAttribute("hideelementtool", "")
}
}, {
key: "setElementHighlight",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
e ? t.setAttribute("hideelementhighlight", "") : t.removeAttribute("hideelementhighlight", "")
}))
}
}, {
key: "setOutlineStyle",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
"grayoutline" === e ? t.setAttribute("grayoutline", "") : t.removeAttribute("grayoutline")
}))
}
}, {
key: "setColumnTool",
value: function (e) {
var t = document.querySelector("#_cbhtml");
e ? t.setAttribute("hidecolumntool", "") : t.removeAttribute("hidecolumntool", "")
}
}, {
key: "setSnippetAddTool",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
e ? t.setAttribute("hidesnippetaddtool", "") : t.removeAttribute("hidesnippetaddtool", "")
}))
}
}, {
key: "setToolStyle",
value: function (e) {
var t = document.querySelector("#_cbhtml"),
i = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(i, (function (i) {
"gray" === e ? (i.setAttribute("gray", ""), t.setAttribute("gray", "")) : (i.removeAttribute("gray"), t.removeAttribute("gray", ""))
}))
}
}, {
key: "setOutlineMode",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
"row" === e ? t.setAttribute("rowoutline", "") : t.removeAttribute("rowoutline")
}))
}
}, {
key: "setOutline",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
e ? t.setAttribute("hideoutline", "") : t.removeAttribute("hideoutline")
}))
}
}, {
key: "setRowToolPosition",
value: function (e) {
var t = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(t, (function (t) {
"right" === e ? t.removeAttribute("leftrowtool") : t.setAttribute("leftrowtool", "")
}))
}
}, {
key: "setBuilderMode",
value: function (e) {
var t = document.querySelector("#_cbhtml"),
i = document.querySelectorAll(this.builder.opts.container);
Array.prototype.forEach.call(i, (function (i) {
"" === e ? (i.removeAttribute("minimal"), i.removeAttribute("clean"), t.removeAttribute("minimal"), t.removeAttribute("clean")) : "minimal" === e ? (i.setAttribute("minimal", ""), i.removeAttribute("clean"), t.setAttribute("minimal", ""), t.removeAttribute("clean")) : "clean" === e && (i.setAttribute("clean", ""), i.removeAttribute("minimal"), t.setAttribute("clean", ""), t.removeAttribute("minimal"))
}))
}
}]), e
}(),
eu = new v,
tu = function () {
function e(i) {
var n = this;
t(this, e), this.builder = i;
var o = new p(i);
this.util = o;
var r = o.builderStuff();
this.builderStuff = r, this.elementStyleEditor = new Ed(i), this.hyperlink = new tc(i);
var a, l, s, c, d, u, v, h, f, g, m = r.querySelector("#divRteTool");
if (!m) {
var y = "",
b = "";
if (i.opts.customTags.length > 0) {
y = '<button class="rte-tags"><svg class="is-icon-flex" style="width:14px;height:14px"><use xlink:href="#ion-code-working"></use></svg></button>';
for (var x = 0; x < i.opts.customTags.length; x++) b += '<button data-value="'.concat(i.opts.customTags[x][1], '"> ').concat(i.opts.customTags[x][0], " </button>")
}
for (var w = "", S = 0; S < i.opts.buttonsMore.length; S++) {
var C = i.opts.buttonsMore[S].toLowerCase();
"createlink" == C ? w += '<button title="'.concat(o.out("Hyperlink"), '" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>') : "icon" != C || this.builder.opts.emailMode ? w += "removeformat" == C ? '<button title="'.concat(o.out("Clean"), '" class="rte-clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>') : "bold" == C ? '<button title="'.concat(o.out("Bold"), '" class="rte-format" data-command="bold"><span style="font-family:serif;font-size:14px;">B</span></button>') : "italic" == C ? '<button title="'.concat(o.out("Italic"), '" class="rte-format" data-command="italic"><span style="font-family:serif;font-size:14px;font-style:italic;">i</span></button>') : "underline" == C ? '<button title="'.concat(o.out("Underline"), '" class="rte-format" data-command="underline"><span style="font-family:serif;font-size:14px;text-decoration:underline;">U</span></button>') : "createlink" == C ? '<button title="'.concat(o.out("Hyperlink"), '" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>') : "align" == C ? '<button title="'.concat(o.out("Align"), '" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>') : "list" == C ? '<button title="'.concat(o.out("List"), '" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>') : "color" == C ? '<button title="'.concat(o.out("Color"), '" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>') : "formatting" == C ? '<button title="'.concat(o.out("Formatting"), '" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>') : "tags" == C ? y : "image" == C ? '<button title="'.concat(o.out("Image"), '" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>') : "gridtool" == C ? '<button title="'.concat(o.out("Grid Tool"), '" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;"><use xlink:href="#ion-grid"></use></svg></button>') : "html" == C ? '<button title="'.concat(o.out("HTML"), '" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>') : "preferences" == C ? '<button title="'.concat(o.out("Preferences"), '" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>') : "addsnippet" == C ? '<button title="'.concat(o.out("Add Snippet"), '" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>') : "formatpara" == C ? '<button title="'.concat(o.out("Paragraph"), '" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>') : "font" == C ? '<button title="'.concat(o.out("Font"), '" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>') : "textsettings" == C ? '<button title="'.concat(o.out("Text Settings"), '" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>') : "undo" == C ? '<button title="'.concat(o.out("Undo"), '" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>') : "redo" == C ? '<button title="'.concat(o.out("Redo"), '" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>') : "|" == C ? '<div class="rte-separator"></div>' : '<button title="button not found" data-plugin="'.concat(C, '">-</button>') : w += '<button title="'.concat(o.out("Icon"), '" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px;"><use xlink:href="#ion-android-happy"></use></svg></button>')
}
var E = "";
for (S = 0; S < i.opts.buttons.length; S++) "bold" == (C = i.opts.buttons[S].toLowerCase()) ? E += '<button title="'.concat(o.out("Bold"), '" class="rte-format" data-command="bold"><span style="font-family:serif;font-size:14px;">B</span></button>') : "italic" == C ? E += '<button title="'.concat(o.out("Italic"), '" class="rte-format" data-command="italic"><span style="font-family:serif;font-size:14px;font-style:italic;">i</span></button>') : "underline" == C ? E += '<button title="'.concat(o.out("Underline"), '" class="rte-format" data-command="underline"><span style="font-family:serif;font-size:14px;text-decoration:underline;">U</span></button>') : "createlink" == C ? E += '<button title="'.concat(o.out("Hyperlink"), '" class="rte-link"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#ion-link"></use></svg></button>') : "align" == C ? E += '<button title="'.concat(o.out("Align"), '" class="rte-align"><svg class="is-icon-flex" style="width:12px;height:12px;margin-top:-2px;"><use xlink:href="#icon-align-full"></use></svg></button>') : "formatpara" == C ? E += '<button title="'.concat(o.out("Paragraph"), '" class="rte-paragraph"><span style="font-family:serif;font-size:14px;display:inline-block;margin-top:2px;">H</span></button>') : "color" == C ? E += '<button title="'.concat(o.out("Color"), '" class="rte-color"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#ion-contrast"></use></svg></button>') : "formatting" == C ? E += '<button title="'.concat(o.out("Formatting"), '" class="rte-formatting"><span style="font-family:serif;font-size:15px;display:inline-block;">A</span></button>') : "list" == C ? E += '<button title="'.concat(o.out("List"), '" class="rte-list"><svg class="is-icon-flex" style="width:12px;height:12px;"><use xlink:href="#icon-list-bullet"></use></svg></button>') : "textsettings" == C ? E += '<button title="'.concat(o.out("Text Settings"), '" class="rte-textsettings"><svg class="is-icon-flex" style="width:16px;height:16px;"><use xlink:href="#ion-ios-settings"></use></svg></button>') : "icon" != C || this.builder.opts.emailMode ? E += "tags" == C ? y : "removeformat" == C ? '<button title="'.concat(o.out("Clean"), '" class="rte-format" data-command="clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>') : "font" == C ? '<button title="'.concat(o.out("Font"), '" class="rte-fontfamily"><span style="font-family:serif;font-size:18px;text-transform:none;display:inline-block;margin-top: -3px;">a</span></button>') : "image" == C ? '<button title="'.concat(o.out("Image"), '" class="rte-image"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-image"></use></svg></button>') : "gridtool" == C ? '<button title="'.concat(o.out("Grid Tool"), '" class="rte-grideditor"><svg class="is-icon-flex" style="margin-right:-3px;width:17px;height:17px;"><use xlink:href="#ion-grid"></use></svg></button>') : "html" == C ? '<button title="'.concat(o.out("HTML"), '" class="rte-html"><svg class="is-icon-flex" style="margin-right:-3px;width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-left"></use></svg><svg class="is-icon-flex" style="margin-left:-2px;fill:rgba(0, 0, 0, 0.65);width:14px;height:14px;"><use xlink:href="#ion-ios-arrow-right"></use></svg></button>') : "preferences" == C ? '<button title="'.concat(o.out("Preferences"), '" class="rte-preferences"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-wrench"></use></svg></button>') : "addsnippet" == C ? '<button title="'.concat(o.out("Add Snippet"), '" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>') : "undo" == C ? '<button title="'.concat(o.out("Undo"), '" class="rte-undo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-undo"></use></svg></button>') : "redo" == C ? '<button title="'.concat(o.out("Redo"), '" class="rte-redo"><svg class="is-icon-flex" style="margin-top:2px;width:15px;height:15px;"><use xlink:href="#ion-ios-redo"></use></svg></button>') : "more" == C && "" !== w ? '<button title="'.concat(o.out("More"), '" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>') : "|" == C ? '<div class="rte-separator"></div>' : '<button title="button not found" data-plugin="'.concat(C, '">-</button>') : E += '<button title="'.concat(o.out("Icon"), '" class="rte-icon"><svg class="is-icon-flex" style="width:14px;height:14px;margin-top:2px"><use xlink:href="#ion-android-happy"></use></svg></button>');
this.builder.opts.toolbarAddSnippetButton && -1 === E.indexOf("rte-addsnippet") && -1 === w.indexOf("rte-addsnippet") && (E = '<button title="'.concat(o.out("Add Snippet"), '" class="rte-addsnippet"><svg class="is-icon-flex" style="width:18px;height:18px;margin-top:-1px;"><use xlink:href="#ion-ios-plus-empty"></use></svg></button>') + E), "" != w && -1 === E.indexOf("rte-more") && (E += '<button title="'.concat(o.out("More"), '" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>'));
var k = '<div class="is-rte-tool" style="position:fixed;flex-direction:column;display:none;">\n <div style="display:flex">\n '.concat(E, '\n </div>\n </div>\n\n <div class="rte-formatting-options is-rte-pop">\n <div>\n <button title="').concat(o.out("Strikethrough"), '" class="rte-format" data-command="strikethrough" style="float:left"><svg class="is-icon-flex" style="width:17px;height:17px;"><use xlink:href="#icon-strike"></use></svg></button>\n <button title="').concat(o.out("Superscript"), '" class="rte-format" data-command="superscript" style="float:left"><span style="font-family:serif;font-size:13px;">x</span><sup style="font-size:10px">2</sup></button>\n <button title="').concat(o.out("Subscript"), '" class="rte-format" data-command="subscript" style="float:left"><span style="font-family:serif;font-size:13px;">x</span><sub style="font-size:10px">2</sub></button>\n <button title="').concat(o.out("Uppercase"), '" class="rte-format" data-command="uppercase" style="float:left"><span style="font-family:serif;font-size:14px;display:inline-block;text-transform: none;">Aa</span></button>\n <button title="').concat(o.out("Clean"), '" class="rte-format" data-command="clean"><svg class="is-icon-flex" style="width:11px;height:11px;"><use xlink:href="#icon-clean"></use></svg></button>\n </div>\n </div>\n\n <div class="rte-align-options is-rte-pop">\n <div>\n <button title="').concat(o.out("Align Left"), '" data-align="left"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-left"></use></svg></button>\n <button title="').concat(o.out("Align Center"), '" data-align="center"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-center"></use></svg></button>\n <button title="').concat(o.out("Align Right"), '" data-align="right"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-right"></use></svg></button>\n <button title="').concat(o.out("Align Full"), '" data-align="justify"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-align-full"></use></svg></button>\n </div>\n </div>\n\n <div class="rte-list-options is-rte-pop">\n <div>\n <button title="').concat(o.out("Bullets"), '" data-action="insertUnorderedList"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-list-bullet"></use></svg></button>\n <button title="').concat(o.out("Numbering"), '" data-action="insertOrderedList"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-list-number"></use></svg></button>\n <button title="').concat(o.out("Indent"), '" data-action="indent"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-indent"></use></svg></button>\n <button title="').concat(o.out("Outdent"), '" data-action="outdent"><svg class="is-icon-flex" style="width:14px;height:14px;"><use xlink:href="#icon-outdent"></use></svg></use></svg></svg></button>\n </div>\n </div>\n\n <div class="rte-paragraph-options is-rte-pop">\n <div>\n <div title="').concat(o.out("Heading 1"), '" data-block="h1"><h1>Heading 1</h1></div>\n <div title="').concat(o.out("Heading 2"), '" data-block="h2"><h2>Heading 2</h2></div>\n <div title="').concat(o.out("Heading 3"), '" data-block="h3"><h3>Heading 3</h3></div>\n <div title="').concat(o.out("Heading 4"), '" data-block="h4"><h4>Heading 4</h4></div>\n <div title="').concat(o.out("Paragraph"), '" data-block="p"><p>Paragraph</p></div>\n <div title="').concat(o.out("Preformatted"), '" data-block="pre"><p style="font-family:courier;">Preformatted</p></div>\n </div>\n </div>\n\n <div class="rte-fontfamily-options is-rte-pop">\n <iframe src="about:blank"></iframe>\n </div>\n\n <div class="rte-color-picker is-rte-pop" data-command="forecolor">\n <div class="is-pop-tabs">\n <div class="is-pop-tab-item active" data-value="forecolor">Forecolor</div>\n <div class="is-pop-tab-item" data-value="backcolor">Backcolor</div>\n </div>\n <div class="rte-color-picker-area"></div>\n </div>\n \n <div class="rte-textsetting-options is-rte-pop">\n <div>\n <div class="is-label" style="margin-top:0;border-top:none">').concat(o.out("Font Size"), '</div>\n <div class="rte-fontsize-options" style="display: flex;flex-flow: wrap;">\n <button title="14px" data-value="14">14</button>\n <button title="16px" data-value="16">16</button>\n <button title="18px" data-value="18">18</button>\n <button title="21px" data-value="21">21</button>\n <button title="24px" data-value="24">24</button>\n <button title="28px" data-value="28">28</button>\n <button title="32px" data-value="32">32</button>\n \x3c!--<button title="35px" data-value="35">35</button>--\x3e\n <button title="38px" data-value="38">38</button>\n \x3c!--<button title="42px" data-value="42">42</button>--\x3e\n <button title="48px" data-value="48">48</button>\n \x3c!--<button title="54px" data-value="54">54</button>--\x3e\n <button title="60px" data-value="60">60</button>\n \x3c!--<button title="68px" data-value="68">68</button>--\x3e\n <button title="76px" data-value="76">76</button>\n \x3c!--<button title="84px" data-value="84">84</button>--\x3e\n <button title="96px" data-value="96">96</button>\n <button title="').concat(o.out("Decrease"), '" data-value="-" style="font-size:13px">-</button>\n <button title="').concat(o.out("Increase"), '" data-value="+" style="font-size:13px">+</button>\n <button title="').concat(o.out("Clear"), '" data-value=""><svg class="is-icon-flex" style="width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n <div class="is-label">').concat(o.out("Line Spacing"), '</div>\n <div class="rte-lineheight-options" style="display: flex;flex-flow: wrap;">\n <button title="1" data-value="1">1</button>\n <button title="1.2" data-value="1.2">1.2</button>\n <button title="1.4" data-value="1.4">1.4</button>\n <button title="1.6" data-value="1.6">1.6</button>\n <button title="1.8" data-value="1.8">1.8</button>\n <button title="2" data-value="2">2</button>\n <button title="2.2" data-value="2.2">2.2</button>\n <button title="').concat(o.out("Decrease"), '" data-value="-" style="font-size:13px">-</button>\n <button title="').concat(o.out("Increase"), '" data-value="+" style="font-size:13px">+</button>\n <button title="').concat(o.out("Clear"), '" data-value=""><svg class="is-icon-flex" style="width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n <div class="is-label">').concat(o.out("Letter Spacing"), '</div>\n <div class="rte-letterspacing-options" style="display: flex;flex-flow: wrap;">\n <button title="1" data-value="1">1</button>\n <button title="2" data-value="2">2</button>\n <button title="').concat(o.out("Decrease"), '" data-value="-" style="font-size:13px">-</button>\n <button title="').concat(o.out("Increase"), '" data-value="+" style="font-size:13px">+</button>\n <button title="').concat(o.out("Clear"), '" data-value=""><svg class="is-icon-flex" style="width:18px;height:18px;margin-top: 2px;"><use xlink:href="#ion-ios-close-empty"></use></svg></button>\n </div>\n </div>\n </div>\n\n <div class="is-modal insertimage">\n <div style="max-width:560px;">\n <div class="is-browse-area">\n <div class="is-drop-area">\n <input id="fileInsertImage" type="file" accept="image/*" />\n <div class="drag-text">\n <p style="display:flex;justify-content:center;align-items:center;"><svg class="is-icon-flex" style="fill:rgba(0, 0, 0, 0.7);width:20px;height:20px;"><use xlink:href="#ion-camera"></use></svg> <span style="margin-left:5px;margin-top:3px;"> ').concat(o.out("Drag and drop an image or click to browse."), ' </span></p>\n </div>\n </div>\n <div class="is-preview-area">\n <div><img id="imgInsertImagePreview" alt="" /><i class="ion-ios-close-empty"></i></div>\n </div>\n </div> \n <p>').concat(o.out("Or Specify Image Source"), ":</p>\n ").concat("function(){}" !== (this.builder.opts.onImageSelectClick + "").replace(/\s/g, "") || "" !== this.builder.opts.imageselect ? '<div class="image-src clearfix" style="margin-bottom: 12px;"><input class="input-src" type="text" placeholder="'.concat(o.out("Source"), '"><button title="').concat(o.out("Select"), '" class="input-select" style="flex:none;width:50px;height:50px;"><svg class="is-icon-flex"><use xlink:href="#ion-more"></use></svg></button></div>') : '<div class="image-src clearfix" style="margin-bottom: 12px;"><input class="input-src" type="text" placeholder="'.concat(o.out("Source"), '"></div>'), '\n <div style="text-align:right">\n <button title="').concat(o.out("Cancel"), '" class="input-cancel classic-secondary">').concat(o.out("Cancel"), '</button>\n <button title="').concat(o.out("Ok"), '" class="input-ok classic-primary">').concat(o.out("Ok"), '</button>\n </div>\n </div>\n </div>\n\n <div class="rte-icon-options is-rte-pop">\n <iframe id="ifrIconInsert" src="about:blank"></iframe>\n </div>\n\n <div class="rte-customtag-options is-rte-pop">\n <div>').concat(b, '</div>\n </div>\n\n <div class="rte-more-options is-rte-pop">\n <div>\n ').concat(w, "\n </div>\n </div>\n ");
eu.appendHtml(r, k), m = r.querySelector(".is-rte-tool"), a = r.querySelector(".rte-align-options"), l = r.querySelector(".rte-formatting-options"), s = r.querySelector(".rte-color-picker"), c = r.querySelector(".rte-list-options"), d = r.querySelector(".rte-fontfamily-options"), u = r.querySelector(".rte-paragraph-options"), v = r.querySelector(".rte-more-options"), h = r.querySelector(".rte-textsetting-options"), f = r.querySelector(".rte-icon-options"), g = r.querySelector(".rte-customtag-options");
var L = m.querySelectorAll("[title]");
Array.prototype.forEach.call(L, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
})), L = a.querySelectorAll("[title]"), Array.prototype.forEach.call(L, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
})), L = l.querySelectorAll("[title]"), Array.prototype.forEach.call(L, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
})), L = c.querySelectorAll("[title]"), Array.prototype.forEach.call(L, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
})), L = v.querySelectorAll("[title]"), Array.prototype.forEach.call(L, (function (e) {
e.setAttribute("data-title", e.getAttribute("title"))
})), this.builder.isTouchSupport && document.addEventListener("selectionchange", (function () {
eu.checkEditable() && ("" != eu.getSelected().trim() && o.saveSelection())
}), !1)
}
this.rteTool = m, this.rteAlignOptions = a, this.rteFormattingOptions = l, this.rteColorPicker = s, this.rteListOptions = c, this.rteFontFamilyOptions = d, this.rteParagraphOptions = u, this.rteMoreOptions = v, this.rteTextSettingOptions = h, this.rteIconOptions = f, this.rteCustomTagOptions = g, this.positionToolbar();
var A = this.rteTool.querySelector("button.rte-formatting");
(A = A || this.rteMoreOptions.querySelector("button.rte-formatting")) && eu.addEventListener(A, "click", (function () {
var e = n.rteFormattingOptions,
t = A.getBoundingClientRect().top,
i = A.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var q = this.rteTool.querySelector("button.rte-align");
(q = q || this.rteMoreOptions.querySelector("button.rte-align")) && eu.addEventListener(q, "click", (function () {
var e = n.rteAlignOptions,
t = q.getBoundingClientRect().top,
i = q.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var M = this.rteTool.querySelector("button.rte-list");
(M = M || this.rteMoreOptions.querySelector("button.rte-list")) && eu.addEventListener(M, "click", (function () {
var e = n.rteListOptions,
t = M.getBoundingClientRect().top,
i = M.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var _ = this.rteTool.querySelector("button.rte-tags");
(_ = _ || this.rteMoreOptions.querySelector("button.rte-tags")) && eu.addEventListener(_, "click", (function () {
var e = n.rteCustomTagOptions,
t = _.getBoundingClientRect().top,
i = _.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
if (eu.parentsHasClass(_, "rte-more-options"))
if ("left" === n.builder.opts.toolbar) e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = "auto";
var l = window.innerWidth;
e.style.right = l - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", _.getBoundingClientRect().left + 45 - parseInt(n.rteMoreOptions.style.left) < e.offsetWidth ? e.style.left = parseInt(n.rteMoreOptions.style.left) + "px" : parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - _.getBoundingClientRect().left + 45 < e.offsetWidth && (e.style.left = parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - o + "px"), e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var T = this.rteTool.querySelector("button.rte-paragraph");
(T = T || this.rteMoreOptions.querySelector("button.rte-paragraph")) && eu.addEventListener(T, "click", (function () {
var e = n.rteParagraphOptions,
t = T.getBoundingClientRect().top,
i = T.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
if (eu.parentsHasClass(T, "rte-more-options"))
if ("left" === n.builder.opts.toolbar) e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = "auto";
var l = window.innerWidth;
e.style.right = l - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - o + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
n.getState()
}));
var O = d.querySelector("iframe"),
N = O.contentWindow.document;
N.open(), this.builder.opts.emailMode ? N.write(o.getFontFamilyEmail()) : N.write(o.getFontFamilyHTML()), N.close();
var R = this.rteTool.querySelector("button.rte-fontfamily");
(R = R || this.rteMoreOptions.querySelector("button.rte-fontfamily")) && eu.addEventListener(R, "click", (function () {
var e = n.rteFontFamilyOptions,
t = R.getBoundingClientRect().top,
i = R.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
if (eu.parentsHasClass(R, "rte-more-options"))
if ("left" === n.builder.opts.toolbar) e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = "auto";
var l = window.innerWidth;
e.style.right = l - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - o + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
n.getState();
var s = e.querySelector("iframe").contentWindow.document.querySelector("#divFontList"),
c = s.querySelector(".on");
c && (s.scrollTop = s.scrollTop + c.getBoundingClientRect().top)
})), (N = (O = f.querySelector("iframe")).contentWindow.document).open(), N.write(this.getIconsHTML()), N.close();
var B = this.rteTool.querySelector("button.rte-icon");
(B = B || this.rteMoreOptions.querySelector("button.rte-icon")) && eu.addEventListener(B, "click", (function () {
var e = n.rteIconOptions,
t = B.getBoundingClientRect().top,
i = B.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
if (eu.parentsHasClass(B, "rte-more-options"))
if ("left" === n.builder.opts.toolbar) e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = "auto";
var l = window.innerWidth;
e.style.right = l - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", B.getBoundingClientRect().left + 45 - parseInt(n.rteMoreOptions.style.left) < e.offsetWidth ? e.style.left = parseInt(n.rteMoreOptions.style.left) + "px" : parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - B.getBoundingClientRect().left + 45 < e.offsetWidth && (e.style.left = parseInt(n.rteMoreOptions.style.left) + n.rteMoreOptions.offsetWidth - o + "px"), e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var I = this.rteTool.querySelector("button.rte-color");
(I = I || this.rteMoreOptions.querySelector("button.rte-color")) && eu.addEventListener(I, "click", (function () {
var e = n.rteColorPicker,
t = I.getBoundingClientRect().top,
i = I.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if (n.builder.uo.saveForUndo(!0), "left" === n.builder.opts.toolbar) e.style.top = n.rteTool.style.top, e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = n.rteTool.style.top, e.style.left = "auto";
var r = window.innerWidth;
e.style.right = r - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var H = this.rteTool.querySelector("button.rte-preferences");
(H = H || this.rteMoreOptions.querySelector("button.rte-preferences")) && eu.addEventListener(H, "click", (function () {
n.builder.viewPreferences()
}));
var D = this.rteTool.querySelector("button.rte-html");
(D = D || this.rteMoreOptions.querySelector("button.rte-html")) && eu.addEventListener(D, "click", (function () {
n.builder.viewHtml()
}));
var F = this.rteTool.querySelector("button.rte-grideditor");
(F = F || this.rteMoreOptions.querySelector("button.rte-grideditor")) && eu.addEventListener(F, "click", (function () {
var e = n.builderStuff.querySelector(".grideditor");
eu.addClass(e, "active");
var t = document.querySelectorAll(n.builder.opts.container);
Array.prototype.forEach.call(t, (function (e) {
e.setAttribute("grideditor", "")
}))
}));
var P = this.rteTool.querySelector("button.rte-undo");
(P = P || this.rteMoreOptions.querySelector("button.rte-undo")) && eu.addEventListener(P, "click", (function () {
n.builder.uo.doUndo()
}));
var U = this.rteTool.querySelector("button.rte-redo");
(U = U || this.rteMoreOptions.querySelector("button.rte-redo")) && eu.addEventListener(U, "click", (function () {
n.builder.uo.doRedo()
}));
var z = this.rteTool.querySelector("button.rte-addsnippet");
z && eu.addEventListener(z, "click", (function () {
n.viewSnippets()
}));
var W = this.rteTool.querySelector("button.rte-link");
(W = W || this.rteMoreOptions.querySelector("button.rte-link")) && eu.addEventListener(W, "click", (function () {
new p(n.builder).clearActiveCell(), n.hyperlink.createLink()
}));
var j = this.rteTool.querySelector("button.rte-image");
(j = j || this.rteMoreOptions.querySelector("button.rte-image")) && eu.addEventListener(j, "click", (function () {
var e = n.builderStuff.querySelector(".insertimage");
o.showModal(e, !0, (function () {}), !1), e.querySelector("#fileInsertImage").value = "", e.querySelector(".is-preview-area").style.display = "none", e.querySelector(".is-drop-area").style.display = "block", eu.removeClass(e.querySelector(".is-drop-area"), "image-dropping"), e.querySelector(".input-src").value = ""
}));
var Y = this.builderStuff.querySelector(".insertimage"),
X = Y.querySelector("#fileInsertImage");
eu.addEventListener(X, "change", (function (e) {
var t = e.target;
if (t.files && t.files[0]) {
var i = new FileReader;
i.onload = function (e) {
Y.querySelector(".is-drop-area").style.display = "none", Y.querySelector("#imgInsertImagePreview").src = e.target.result, Y.querySelector(".is-preview-area").style.display = "block";
var i = t.files[0].name;
Y.querySelector("#imgInsertImagePreview").setAttribute("data-filename", i)
}, i.readAsDataURL(t.files[0]), Y.querySelector(".input-src").value = ""
}
}));
var G = Y.querySelector(".input-ok");
eu.addEventListener(G, "click", (function () {
if (n.builder.activeCol) {
n.builder.uo.saveForUndo(), o.restoreSelection();
var e = "";
if ("" !== (e = "none" === Y.querySelector(".is-drop-area").style.display ? Y.querySelector("#imgInsertImagePreview").src : Y.querySelector(".input-src").value)) {
var t = Y.querySelector("#imgInsertImagePreview").getAttribute("data-filename");
o.pasteHtmlAtCaret('<img data-filename="' + t + '" src="' + e + '" alt="" />', !1), o.hideModal(Y), n.builder.applyBehavior(), o.saveSelection(), n.builder.opts.onChange(), n.builder.opts.onRender()
}
} else o.hideModal(Y)
}));
var V = Y.querySelector(".input-cancel");
eu.addEventListener(V, "click", (function () {
o.hideModal(Y)
}));
var Z = Y.querySelector(".is-drop-area");
eu.addEventListener(Z, "dragover", (function () {
eu.addClass(Z, "image-dropping")
})), eu.addEventListener(Z, "dragleave", (function () {
eu.removeClass(Z, "image-dropping")
}));
var K = Y.querySelector(".is-preview-area i");
eu.addEventListener(K, "click", (function () {
Y.querySelector("#fileInsertImage").value = "", Y.querySelector(".is-preview-area").style.display = "none", Z.style.display = "block", eu.removeClass(Z, "image-dropping")
}));
var J = Y.querySelector(".input-src");
if (eu.addEventListener(J, "keyup", (function () {
Y.querySelector("#fileInsertImage").value = "", Y.querySelector(".is-preview-area").style.display = "none", Z.style.display = "block", eu.removeClass(Z, "image-dropping")
})), this.builder.opts.onImageSelectClick || "" !== this.builder.opts.imageselect || (Y.querySelector(".input-select").style.display = "none"), this.builder.opts.onImageSelectClick || "" !== this.builder.opts.imageselect) {
eu.addClass(Y.querySelector(".image-src"), "image-select");
var $ = Y.querySelector(".input-select");
$ && eu.addEventListener($, "click", (function () {
if (n.builder.opts.onImageSelectClick) n.builder.opts.onImageSelectClick({
targetInput: Y.querySelector(".input-src"),
theTrigger: $
});
else {
var e = n.builderStuff.querySelector(".is-modal.imageselect"),
t = e.querySelector("iframe");
"about:blank" === t.src && (t.src = n.builder.opts.imageselect), o.showModal(e)
}
}))
} else eu.removeClass(J, "image-select");
var Q = this.rteTool.querySelector("button.rte-textsettings");
(Q = Q || this.rteMoreOptions.querySelector("button.rte-textsettings")) && eu.addEventListener(Q, "click", (function () {
var e = n.rteTextSettingOptions,
t = Q.getBoundingClientRect().top,
i = Q.getBoundingClientRect().left;
e.style.display = "flex";
var o = e.offsetWidth,
r = e.offsetHeight;
if (eu.hasClass(e, "active")) eu.removeClass(e, "active"), eu.addClass(e, "deactive");
else {
if ("left" === n.builder.opts.toolbar) e.style.top = t - r / 2 + 20 + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = t - r / 2 + 20 + "px", e.style.left = "auto";
var a = window.innerWidth;
e.style.right = a - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
if (eu.parentsHasClass(Q, "rte-more-options"))
if ("left" === n.builder.opts.toolbar) e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = i + 54 + "px", e.style.right = "auto";
else if ("right" === n.builder.opts.toolbar) {
e.style.top = parseInt(n.rteMoreOptions.style.top) + n.rteMoreOptions.offsetHeight - r + "px", e.style.left = "auto";
var l = window.innerWidth;
e.style.right = l - i + 9 + "px"
} else e.style.top = t + 54 - 6 + "px", e.style.left = i - o / 2 + 23 + "px", e.style.right = "auto";
eu.removeClass(e, "deactive"), eu.addClass(e, "active")
}
}));
var ee = this.rteTool.querySelector("button.rte-more");
ee && eu.addEventListener(ee, "click", (function () {
n.showRteMore()
}));
var te = Array.prototype.slice.call(this.rteTool.querySelectorAll(".rte-format")).concat(Array.prototype.slice.call(this.rteFormattingOptions.querySelectorAll(".rte-format"))).concat(Array.prototype.slice.call(this.rteMoreOptions.querySelectorAll(".rte-format")));
Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
var t;
n.builder.uo.saveForUndo();
try {
var i;
window.getSelection ? t = 3 == (i = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? i.parentNode : i : document.selection && (i = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
var r = e.getAttribute("data-command"),
a = eu.getSelected();
if ("bold" === r)
if ("" === a.trim()) {
var l = t.tagName.toLowerCase();
"b" == l ? (eu.selectElementContents(t), document.execCommand("bold", !1, null)) : "bold" === t.style.fontWeight || t.style.fontWeight > 400 ? t.style.fontWeight = "" : t.style.fontWeight = "bold"
} else document.execCommand("bold", !1, null);
("italic" === r && ("" === a.trim() ? "i" == (l = t.tagName.toLowerCase()) ? (eu.selectElementContents(t), document.execCommand("italic", !1, null)) : "italic" === t.style.fontStyle ? t.style.fontStyle = "" : t.style.fontStyle = "italic" : document.execCommand("italic", !1, null)), "underline" === r && ("" === a.trim() ? "u" == (l = t.tagName.toLowerCase()) ? (eu.selectElementContents(t), document.execCommand("underline", !1, null)) : -1 !== t.style.textDecoration.indexOf("underline") ? t.style.textDecoration = "" : t.style.textDecoration = "underline" : document.execCommand("underline", !1, null)), "strikethrough" === r && ("" === a.trim() ? "strike" == (l = t.tagName.toLowerCase()) ? (eu.selectElementContents(t), document.execCommand("strikethrough", !1, null)) : -1 !== t.style.textDecoration.indexOf("line-through") ? t.style.textDecoration = "" : t.style.textDecoration = "line-through" : document.execCommand("strikethrough", !1, null)), "superscript" === r && document.execCommand("superscript", !1, null), "subscript" === r && document.execCommand("subscript", !1, null), "uppercase" === r && ("uppercase" === t.style.textTransform ? t.style.textTransform = "" : t.style.textTransform = "uppercase"), "clean" === r && ("" === a.trim() ? (t.style.cssText = "", t.className = "") : t.innerText.replace(/(\r\n|\n|\r)/gm, "") == a.trim().replace(/(\r\n|\n|\r)/gm, "") ? (t.style.cssText = "", t.className = "", document.execCommand("removeFormat", !1, null), document.execCommand("removeFormat", !1, null)) : (document.execCommand("removeFormat", !1, null), document.execCommand("removeFormat", !1, null))), n.getState(), n.builder.isTouchSupport || o.saveSelection(), "" === a.trim()) && (o.restoreSelection(), n.builder.isTouchSupport && n.rteTool.querySelector("button").focus());
n.builder.opts.onChange()
}))
})), te = this.rteAlignOptions.querySelectorAll("button[data-align]"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
(n.builder.uo.saveForUndo(), o.restoreSelection(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus();
var t, i = e.getAttribute("data-align");
try {
var r;
window.getSelection ? t = 3 == (r = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? r.parentNode : r : document.selection && (r = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
for (var a = t;
"p" !== a.tagName.toLowerCase() && "h1" !== a.tagName.toLowerCase() && "h2" !== a.tagName.toLowerCase() && "h3" !== a.tagName.toLowerCase() && "h4" !== a.tagName.toLowerCase() && "h5" !== a.tagName.toLowerCase() && "h6" !== a.tagName.toLowerCase() && "pre" !== a.tagName.toLowerCase() && "blockquote" !== a.tagName.toLowerCase() && "div" !== a.tagName.toLowerCase();) a = a.parentNode;
a.style.textAlign = i, n.getState(), o.saveSelection(), n.builder.opts.onChange()
}))
})), te = this.rteListOptions.querySelectorAll("button[data-action]"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
n.builder.uo.saveForUndo(), o.restoreSelection();
var t = n.builder.activeCol,
i = t.querySelectorAll("span");
Array.prototype.forEach.call(i, (function (e) {
e.setAttribute("data-keep", "")
}));
var r = e.getAttribute("data-action");
(document.execCommand(r, !1, null), i = (t = n.builder.activeCol).querySelectorAll("span"), Array.prototype.forEach.call(i, (function (e) {
e.getAttribute("data-keep") || (e.outerHTML = e.innerHTML)
})), Array.prototype.forEach.call(i, (function (e) {
e.getAttribute("data-keep") && eu.removeAttribute(e, "data-keep")
})), n.getState(), o.saveSelection(), n.builder.opts.onChange(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus()
}))
})), te = this.rteCustomTagOptions.querySelectorAll("[data-value]"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
n.builder.uo.saveForUndo();
var t = e.getAttribute("data-value");
o.pasteHtmlAtCaret(t, !0), n.rteCustomTagOptions.style.display = ""
}))
})), te = this.rteParagraphOptions.querySelectorAll("[data-block]"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
n.builder.uo.saveForUndo(), o.restoreSelection();
var t = e.getAttribute("data-block"),
i = document.queryCommandValue("FormatBlock");
if ("pre" === (i = i.toLowerCase())) {
var r = eu.textSelection();
if (r) {
for (var a = r;
"pre" !== a.tagName.toLowerCase();) a = a.parentNode;
var l = a.cloneNode(!0).outerHTML.replace("<pre", "<" + t);
l = l.replace("</pre>", "</" + t + ">"), a.outerHTML = l;
var s = n.rteParagraphOptions.querySelectorAll("[data-block]");
Array.prototype.forEach.call(s, (function (e) {
eu.removeClass(e, "on")
})), eu.addClass(n.rteParagraphOptions.querySelector('[data-block="' + t + '"]'), "on")
}
} else document.execCommand("formatBlock", !1, "<" + t + ">");
(n.rteParagraphOptions.style.display = "none", eu.removeClass(n.rteParagraphOptions, "active"), eu.addClass(n.rteParagraphOptions, "deactive"), n.getState(), o.saveSelection(), n.builder.opts.onChange(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus()
}))
}));
var ie = s.querySelectorAll(".is-pop-tab-item");
Array.prototype.forEach.call(ie, (function (e) {
eu.addEventListener(e, "click", (function (e) {
n.builder.uo.saveForUndo(!0);
var t = s.querySelectorAll(".is-pop-tab-item");
Array.prototype.forEach.call(t, (function (e) {
eu.removeClass(e, "active")
})), eu.addClass(e.target, "active"), "forecolor" === s.querySelector(".active").getAttribute("data-value") ? s.setAttribute("data-command", "forecolor") : s.setAttribute("data-command", "backcolor")
}))
})), new rd({
colors: this.builder.opts.colors,
onPick: function (e) {
var t;
o.restoreSelection();
try {
var i;
window.getSelection ? t = 3 == (i = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? i.parentNode : i : document.selection && (i = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
var r = s.getAttribute("data-command"),
a = eu.getSelected();
if ("" === a.trim()) "forecolor" === r ? t.style.color = e : t.style.backgroundColor = e;
else if (t.innerText == a) "forecolor" === r ? t.style.color = e : t.style.backgroundColor = e;
else {
"forecolor" === r ? document.execCommand("ForeColor", !1, e) : document.execCommand("BackColor", !1, e);
for (var l = document.getElementsByTagName("font"), c = 0, d = l.length; c < d; ++c) {
var u = l[c].color;
"" != u && "forecolor" === r && (l[c].removeAttribute("color"), l[c].style.color = u)
}
}(n.builder.isTouchSupport || o.saveSelection(), "" === a.trim() && o.restoreSelection(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus();
n.builder.opts.onChange()
},
renderOn: ".rte-color-picker-area",
animateModal: this.builder.opts.animateModal,
elementToAnimate: this.builder.opts.container,
lang: this.builder.opts.lang
}), te = h.querySelectorAll(".rte-fontsize-options button"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
var t, i = e.getAttribute("data-value");
o.restoreSelection();
try {
var r;
window.getSelection ? t = 3 == (r = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? r.parentNode : r : document.selection && (r = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
var a = eu.getSelected();
if ("" === a.trim() || "" !== a.trim() && t.innerText === a) n.builder.uo.saveForUndo(), n.builder.opts.fontSizeClassValues.length > 0 ? n.applyClassFontSize(t, i) : n.applyInlineFontSize(t, i);
else {
n.builder.uo.saveForUndo();
var l, s = Number(window.getComputedStyle(t).getPropertyValue("font-size").match(/\d+/)[0]);
document.execCommand("fontSize", !1, "7");
for (var c = document.getElementsByTagName("font"), d = 0, u = c.length; d < u; ++d) "7" == c[d].size && (c[d].removeAttribute("size"), c[d].style.fontSize = s + "px", eu.selectElementContents(c[d]), l = c[d]);
l && (n.builder.opts.fontSizeClassValues.length > 0 ? n.applyClassFontSize(l, i) : n.applyInlineFontSize(l, i))
}(o.saveSelection(), n.getState(), n.builder.opts.onChange(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus()
}))
})), te = h.querySelectorAll(".rte-lineheight-options button"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
var t, i = e.getAttribute("data-value");
o.restoreSelection();
try {
var r;
window.getSelection ? t = 3 == (r = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? r.parentNode : r : document.selection && (r = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
n.builder.uo.saveForUndo();
var a, l = Number(window.getComputedStyle(t).getPropertyValue("line-height").match(/\d+/)[0]);
(a = "+" === i ? l + 1 + "px" : "-" === i ? l - 1 + "px" : "" === i ? "" : i, t.style.lineHeight = a, o.saveSelection(), n.getState(), n.builder.opts.onChange(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus()
}))
})), te = h.querySelectorAll(".rte-letterspacing-options button"), Array.prototype.forEach.call(te, (function (e) {
eu.addEventListener(e, "click", (function () {
var t, i = e.getAttribute("data-value");
o.restoreSelection();
try {
var r;
window.getSelection ? t = 3 == (r = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? r.parentNode : r : document.selection && (r = document.selection.createRange(), t = document.selection.createRange().parentElement())
} catch (e) {
return
}
n.builder.uo.saveForUndo();
var a, l = parseInt(window.getComputedStyle(t).getPropertyValue("letter-spacing"));
(isNaN(l) && (l = 0), a = "+" === i ? l + 1 + "px" : "-" === i ? l - 1 + "px" : "" === i ? "" : i + "px", t.style.letterSpacing = a, o.saveSelection(), n.getState(), n.builder.opts.onChange(), n.builder.isTouchSupport) && n.rteTool.querySelector("button").focus()
}))
})), document.addEventListener("click", (function (e) {
var t, i, o, r, a, l = (e = e || window.event).target || e.srcElement;
"flex" === n.rteAlignOptions.style.display && (t = eu.parentsHasClass(l, "rte-align"), i = eu.parentsHasClass(l, "rte-align-options"), t || i || (n.rteAlignOptions.style.display = "", eu.removeClass(n.rteAlignOptions, "active"), eu.addClass(n.rteAlignOptions, "deactive"))), "flex" === n.rteListOptions.style.display && (t = eu.parentsHasClass(l, "rte-list"), i = eu.parentsHasClass(l, "rte-list-options"), t || i || (n.rteListOptions.style.display = "", eu.removeClass(n.rteListOptions, "active"), eu.addClass(n.rteListOptions, "deactive"))), "flex" === n.rteFormattingOptions.style.display && (t = eu.parentsHasClass(l, "rte-formatting"), i = eu.parentsHasClass(l, "rte-formatting-options"), t || i || (n.rteFormattingOptions.style.display = "", eu.removeClass(n.rteFormattingOptions, "active"), eu.addClass(n.rteFormattingOptions, "deactive"))), "flex" === n.rteColorPicker.style.display && (t = eu.parentsHasClass(l, "rte-color"), i = eu.parentsHasClass(l, "rte-color-picker"), o = eu.parentsHasClass(l, "pickcolormore"), t || i || o || (n.rteColorPicker.style.display = "", eu.removeClass(n.rteColorPicker, "active"), eu.addClass(n.rteColorPicker, "deactive"))), "flex" === n.rteFontFamilyOptions.style.display && (t = eu.parentsHasClass(l, "rte-fontfamily"), i = eu.parentsHasClass(l, "rte-fontfamily-options"), t || i || (n.rteFontFamilyOptions.style.display = "", eu.removeClass(n.rteFontFamilyOptions, "active"), eu.addClass(n.rteFontFamilyOptions, "deactive"))), "flex" === n.rteIconOptions.style.display && (t = eu.parentsHasClass(l, "rte-icon"), i = eu.parentsHasClass(l, "rte-icon-options"), o = !1, l.tagName && (o = "i" === l.tagName.toLowerCase() && "" === l.innerHTML), t || i || o || (n.rteIconOptions.style.display = "", eu.removeClass(n.rteIconOptions, "active"), eu.addClass(n.rteIconOptions, "deactive"))), "flex" === n.rteCustomTagOptions.style.display && (t = eu.parentsHasClass(l, "rte-tags"), i = eu.parentsHasClass(l, "rte-customtag-options"), t || i || (n.rteCustomTagOptions.style.display = "", eu.removeClass(n.rteCustomTagOptions, "active"), eu.addClass(n.rteCustomTagOptions, "deactive"))), "flex" === n.rteParagraphOptions.style.display && (t = eu.parentsHasClass(l, "rte-paragraph"), i = eu.parentsHasClass(l, "rte-paragraph-options"), t || i || (n.rteParagraphOptions.style.display = "", eu.removeClass(n.rteParagraphOptions, "active"), eu.addClass(n.rteParagraphOptions, "deactive"))), "flex" === n.rteTextSettingOptions.style.display && (t = eu.parentsHasClass(l, "rte-textsettings"), i = eu.parentsHasClass(l, "rte-textsetting-options"), t || i || (n.rteTextSettingOptions.style.display = "", eu.removeClass(n.rteTextSettingOptions, "active"), eu.addClass(n.rteTextSettingOptions, "deactive"))), "flex" === n.rteMoreOptions.style.display && (t = eu.parentsHasClass(l, "rte-more"), i = eu.parentsHasClass(l, "rte-more-options"), o = eu.parentsHasClass(l, "is-rte-pop"), r = eu.parentsHasClass(l, "is-modal"), a = !1, l.tagName && (a = "i" === l.tagName.toLowerCase() && "" === l.innerHTML && eu.parentsHasClass(B, "rte-more-options")), t || i || o || r || a || (n.rteMoreOptions.style.display = "", eu.removeClass(n.rteMoreOptions, "active"), eu.addClass(n.rteMoreOptions, "deactive")))
}))
}
return n(e, [{
key: "viewSnippets",
value: function () {
var e = new p(this.builder),
t = this.builderStuff.querySelector(".snippets");
e.showModal(t, !1, null, !1);
var i = t.querySelector("iframe");
"about:blank" === i.src && (i.src = this.builder.opts.snippetData)
}
}, {
key: "showRteMore",
value: function () {
var e = this.rteTool.querySelector("button.rte-more"),
t = this.rteMoreOptions,
i = e.getBoundingClientRect().top,
n = e.getBoundingClientRect().left;
t.style.display = "flex";
var o = t.offsetWidth,
r = t.offsetHeight;
if (eu.hasClass(t, "active")) eu.removeClass(t, "active"), eu.addClass(t, "deactive");
else {
if ("left" === this.builder.opts.toolbar) t.style.top = parseInt(this.rteTool.style.top) + this.rteTool.offsetHeight - r + "px", t.style.left = n + 54 + "px", t.style.right = "auto";
else if ("right" === this.builder.opts.toolbar) {
t.style.top = parseInt(this.rteTool.style.top) + this.rteTool.offsetHeight - r + "px", t.style.left = "auto";
var a = window.innerWidth;
t.style.right = a - n + 9 + "px"
} else t.style.top = i + 54 - 6 + "px", t.style.left = parseInt(this.rteTool.style.left) + this.rteTool.offsetWidth - o + "px", t.style.right = "auto";
eu.removeClass(t, "deactive"), eu.addClass(t, "active")
}
}
}, {
key: "applyInlineFontSize",
value: function (e, t) {
var i, n = Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0]);
i = "+" === t ? n + 1 + "px" : "-" === t ? n - 1 + "px" : "" === t ? "" : t + "px", e.style.fontSize = i
}
}, {
key: "applyClassFontSize",
value: function (e, t) {
var i = Number(window.getComputedStyle(e).getPropertyValue("font-size").match(/\d+/)[0]),
n = "";
n = "+" === t || "-" === t || "" === t ? t : "size-" + t;
for (var o = this.builder.opts.fontSizeClassValues, r = "", a = 0; a <= o.length - 1; a++) eu.hasClass(e, "size-" + o[a]) && (r = "size-" + o[a], eu.removeClass(e, "size-" + o[a]));
if ("" === r && "+" === n || "-" === n)
for (a = 0; a <= o.length - 1; a++) i >= o[a] & i < o[a + 1] && (r = "size-" + o[a]);
if ("+" == n) {
a = 1 * r.replace("size-", "");
var l = o.indexOf(a);
l < o.length - 1 && (r = "size-" + o[l + 1]), eu.addClass(e, r)
} else "-" == n ? (a = 1 * r.replace("size-", ""), (l = o.indexOf(a)) >= 1 && (r = "size-" + o[l - 1]), eu.addClass(e, r)) : "" == n || eu.addClass(e, n);
e.style.fontSize = ""
}
}, {
key: "click",
value: function (e) {
"true" === e.contentEditable ? "none" !== this.rteTool.style.display && "" !== this.rteTool.style.display || (this.rteTool.style.display = "flex", this.positionToolbar()) : this.rteTool.style.display = "none", this.util.saveSelection(), this.getState()
}
}, {
key: "getState",
value: function () {
document.queryCommandState("bold") ? eu.addClass(this.rteTool.querySelector("button[data-command=bold]"), "on") : eu.removeClass(this.rteTool.querySelector("button[data-command=bold]"), "on"), document.queryCommandState("italic") ? eu.addClass(this.rteTool.querySelector("button[data-command=italic]"), "on") : eu.removeClass(this.rteTool.querySelector("button[data-command=italic]"), "on"), document.queryCommandState("underline") ? eu.addClass(this.rteTool.querySelector("button[data-command=underline]"), "on") : eu.removeClass(this.rteTool.querySelector("button[data-command=underline]"), "on"), document.queryCommandState("strikethrough") ? eu.addClass(this.rteFormattingOptions.querySelector("[data-command=strikethrough]"), "on") : eu.removeClass(this.rteFormattingOptions.querySelector("[data-command=strikethrough]"), "on"), document.queryCommandState("superscript") ? eu.addClass(this.rteFormattingOptions.querySelector("[data-command=superscript]"), "on") : eu.removeClass(this.rteFormattingOptions.querySelector("[data-command=superscript]"), "on"), document.queryCommandState("subscript") ? eu.addClass(this.rteFormattingOptions.querySelector("[data-command=subscript]"), "on") : eu.removeClass(this.rteFormattingOptions.querySelector("[data-command=subscript]"), "on");
var e = eu.textSelection();
if (e) {
"uppercase" === e.style.textTransform ? eu.addClass(this.rteFormattingOptions.querySelector("[data-command=uppercase]"), "on") : eu.removeClass(this.rteFormattingOptions.querySelector("[data-command=uppercase]"), "on"), document.queryCommandState("JustifyFull") ? eu.addClass(this.rteAlignOptions.querySelector("[data-align=justify]"), "on") : eu.removeClass(this.rteAlignOptions.querySelector("[data-align=justify]"), "on"), document.queryCommandState("JustifyLeft") ? eu.addClass(this.rteAlignOptions.querySelector("[data-align=left]"), "on") : eu.removeClass(this.rteAlignOptions.querySelector("[data-align=left]"), "on"), document.queryCommandState("JustifyRight") ? eu.addClass(this.rteAlignOptions.querySelector("[data-align=right]"), "on") : eu.removeClass(this.rteAlignOptions.querySelector("[data-align=right]"), "on"), document.queryCommandState("JustifyCenter") ? eu.addClass(this.rteAlignOptions.querySelector("[data-align=center]"), "on") : eu.removeClass(this.rteAlignOptions.querySelector("[data-align=center]"), "on");
var t = document.queryCommandValue("FontName").split(",")[0];
t = (t = (t = (t = t.replace(/"/g, "")).replace(/'/g, "")).replace(/&quot;/g, "")).trim().toLowerCase();
var i = this.rteTool.querySelector("button.rte-fontfamily");
if (i = i || this.rteMoreOptions.querySelector("button.rte-fontfamily")) {
var n = this.rteFontFamilyOptions.querySelector("iframe"),
o = n.contentDocument || n.contentWindow.document;
o && [].forEach.call(o.querySelectorAll("#divFontList > div"), (function (e) {
var i = e.getAttribute("data-font-family");
(i = (i = (i = i.split(",")[0]).replace(/'/g, "")).trim().toLowerCase()) == t && "" != i ? eu.addClass(e, "on") : eu.removeClass(e, "on")
}))
}
var r = this.rteParagraphOptions.querySelectorAll("[data-block]");
Array.prototype.forEach.call(r, (function (e) {
eu.removeClass(e, "on")
}));
var a = document.queryCommandValue("FormatBlock");
"normal" === (a = a.toLowerCase()) && (a = "p"), "heading 1" === a && (a = "h1"), "heading 2" === a && (a = "h2"), "heading 3" === a && (a = "h3"), "heading 4" === a && (a = "h4"), "formatted" === a && (a = "pre"), "p" !== a && "h1" !== a && "h2" !== a && "h3" !== a && "h4" !== a && "pre" != a || eu.addClass(this.rteParagraphOptions.querySelector('[data-block="' + a + '"]'), "on")
}
}
}, {
key: "getIconsHTML",
value: function () {
var e = this.builder.assetPath + "ionicons/";
return '\n <!DOCTYPE HTML>\n <html>\n <head>\n <meta charset="utf-8">\n <title>Fonts</title>\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="description" content=""> \n <link href="'.concat(e, 'css/ionicons.min.css" rel="stylesheet" type="text/css" />\n <style>\n html, body {height:100%}\n body {overflow:hidden;margin:0;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size:100%; \n line-height:1.7;\n }\n #divIcons {display:flex;flex-direction:row;flex-wrap:wrap;margin:0;padding:9px 11px 9px 9px;height:100%;overflow-y:scroll !important;box-sizing:border-box;}\n #divIcons > div {width:40px;height:37px;line-height:37px;font-size:14px;color:#111111;cursor:pointer;overflow:hidden;text-align:center;position:relative;} \n #divIcons > div:hover {background:#f5f5f5;}\n </style>\n </head>\n <body>\n\n <div id="divIcons">\n <div><i class="icon ion-alert"> </i></div>\n <div><i class="icon ion-alert-circled"> </i></div>\n <div><i class="icon ion-android-add"> </i></div>\n <div><i class="icon ion-android-add-circle"> </i></div>\n <div><i class="icon ion-android-alarm-clock"> </i></div>\n <div><i class="icon ion-android-alert"> </i></div>\n <div><i class="icon ion-android-apps"> </i></div>\n <div><i class="icon ion-android-archive"> </i></div>\n <div><i class="icon ion-android-arrow-back"> </i></div>\n <div><i class="icon ion-android-arrow-down"> </i></div>\n <div><i class="icon ion-android-arrow-dropdown"> </i></div>\n <div><i class="icon ion-android-arrow-dropdown-circle"> </i></div>\n <div><i class="icon ion-android-arrow-dropleft"> </i></div>\n <div><i class="icon ion-android-arrow-dropleft-circle"> </i></div>\n <div><i class="icon ion-android-arrow-dropright"> </i></div>\n <div><i class="icon ion-android-arrow-dropright-circle"> </i></div>\n <div><i class="icon ion-android-arrow-dropup"> </i></div>\n <div><i class="icon ion-android-arrow-dropup-circle"> </i></div>\n <div><i class="icon ion-android-arrow-forward"> </i></div>\n <div><i class="icon ion-android-arrow-up"> </i></div>\n <div><i class="icon ion-android-attach"> </i></div>\n <div><i class="icon ion-android-bar"> </i></div>\n <div><i class="icon ion-android-bicycle"> </i></div>\n <div><i class="icon ion-android-boat"> </i></div>\n <div><i class="icon ion-android-bookmark"> </i></div>\n <div><i class="icon ion-android-bulb"> </i></div>\n <div><i class="icon ion-android-bus"> </i></div>\n <div><i class="icon ion-android-calendar"> </i></div>\n <div><i class="icon ion-android-call"> </i></div>\n <div><i class="icon ion-android-camera"> </i></div>\n <div><i class="icon ion-android-cancel"> </i></div>\n <div><i class="icon ion-android-car"> </i></div>\n <div><i class="icon ion-android-cart"> </i></div>\n <div><i class="icon ion-android-chat"> </i></div>\n <div><i class="icon ion-android-checkbox"> </i></div>\n <div><i class="icon ion-android-checkbox-blank"> </i></div>\n <div><i class="icon ion-android-checkbox-outline"> </i></div>\n <div><i class="icon ion-android-checkbox-outline-blank"> </i></div>\n <div><i class="icon ion-android-checkmark-circle"> </i></div>\n <div><i class="icon ion-android-clipboard"> </i></div>\n <div><i class="icon ion-android-close"> </i></div>\n <div><i class="icon ion-android-cloud"> </i></div>\n <div><i class="icon ion-android-cloud-circle"> </i></div>\n <div><i class="icon ion-android-cloud-done"> </i></div>\n <div><i class="icon ion-android-cloud-outline"> </i></div>\n <div><i class="icon ion-android-color-palette"> </i></div>\n <div><i class="icon ion-android-compass"> </i></div>\n <div><i class="icon ion-android-contact"> </i></div>\n <div><i class="icon ion-android-contacts"> </i></div>\n <div><i class="icon ion-android-contract"> </i></div>\n <div><i class="icon ion-android-create"> </i></div>\n <div><i class="icon ion-android-delete"> </i></div>\n <div><i class="icon ion-android-desktop"> </i></div>\n <div><i class="icon ion-android-document"> </i></div>\n <div><i class="icon ion-android-done"> </i></div>\n <div><i class="icon ion-android-done-all"> </i></div>\n <div><i class="icon ion-android-download"> </i></div>\n <div><i class="icon ion-android-drafts"> </i></div>\n <div><i class="icon ion-android-exit"> </i></div>\n <div><i class="icon ion-android-expand"> </i></div>\n <div><i class="icon ion-android-favorite"> </i></div>\n <div><i class="icon ion-android-favorite-outline"> </i></div>\n <div><i class="icon ion-android-film"> </i></div>\n <div><i class="icon ion-android-folder"> </i></div>\n <div><i class="icon ion-android-folder-open"> </i></div>\n <div><i class="icon ion-android-funnel"> </i></div>\n <div><i class="icon ion-android-globe"> </i></div>\n <div><i class="icon ion-android-hand"> </i></div>\n <div><i class="icon ion-android-hangout"> </i></div>\n <div><i class="icon ion-android-happy"> </i></div>\n <div><i class="icon ion-android-home"> </i></div>\n <div><i class="icon ion-android-image"> </i></div>\n <div><i class="icon ion-android-laptop"> </i></div>\n <div><i class="icon ion-android-list"> </i></div>\n <div><i class="icon ion-android-locate"> </i></div>\n <div><i class="icon ion-android-lock"> </i></div>\n <div><i class="icon ion-android-mail"> </i></div>\n <div><i class="icon ion-android-map"> </i></div>\n <div><i class="icon ion-android-menu"> </i></div>\n <div><i class="icon ion-android-microphone"> </i></div>\n <div><i class="icon ion-android-microphone-off"> </i></div>\n <div><i class="icon ion-android-more-horizontal"> </i></div>\n <div><i class="icon ion-android-more-vertical"> </i></div>\n <div><i class="icon ion-android-navigate"> </i></div>\n <div><i class="icon ion-android-notifications"> </i></div>\n <div><i class="icon ion-android-notifications-none"> </i></div>\n <div><i class="icon ion-android-notifications-off"> </i></div>\n <div><i class="icon ion-android-open"> </i></div>\n <div><i class="icon ion-android-options"> </i></div>\n <div><i class="icon ion-android-people"> </i></div>\n <div><i class="icon ion-android-person"> </i></div>\n <div><i class="icon ion-android-person-add"> </i></div>\n <div><i class="icon ion-android-phone-landscape"> </i></div>\n <div><i class="icon ion-android-phone-portrait"> </i></div>\n <div><i class="icon ion-android-pin"> </i></div>\n <div><i class="icon ion-android-plane"> </i></div>\n <div><i class="icon ion-android-playstore"> </i></div>\n <div><i class="icon ion-android-print"> </i></div>\n <div><i class="icon ion-android-radio-button-off"> </i></div>\n <div><i class="icon ion-android-radio-button-on"> </i></div>\n <div><i class="icon ion-android-refresh"> </i></div>\n <div><i class="icon ion-android-remove"> </i></div>\n <div><i class="icon ion-android-remove-circle"> </i></div>\n <div><i class="icon ion-android-restaurant"> </i></div>\n <div><i class="icon ion-android-sad"> </i></div>\n <div><i class="icon ion-android-search"> </i></div>\n <div><i class="icon ion-android-send"> </i></div>\n <div><i class="icon ion-android-settings"> </i></div>\n <div><i class="icon ion-android-share"> </i></div>\n <div><i class="icon ion-android-share-alt"> </i></div>\n <div><i class="icon ion-android-star"> </i></div>\n <div><i class="icon ion-android-star-half"> </i></div>\n <div><i class="icon ion-android-star-outline"> </i></div>\n <div><i class="icon ion-android-stopwatch"> </i></div>\n <div><i class="icon ion-android-subway"> </i></div>\n <div><i class="icon ion-android-sunny"> </i></div>\n <div><i class="icon ion-android-sync"> </i></div>\n <div><i class="icon ion-android-textsms"> </i></div>\n <div><i class="icon ion-android-time"> </i></div>\n <div><i class="icon ion-android-train"> </i></div>\n <div><i class="icon ion-android-unlock"> </i></div>\n <div><i class="icon ion-android-upload"> </i></div>\n <div><i class="icon ion-android-volume-down"> </i></div>\n <div><i class="icon ion-android-volume-mute"> </i></div>\n <div><i class="icon ion-android-volume-off"> </i></div>\n <div><i class="icon ion-android-volume-up"> </i></div>\n <div><i class="icon ion-android-walk"> </i></div>\n <div><i class="icon ion-android-warning"> </i></div>\n <div><i class="icon ion-android-watch"> </i></div>\n <div><i class="icon ion-android-wifi"> </i></div>\n <div><i class="icon ion-aperture"> </i></div>\n <div><i class="icon ion-archive"> </i></div>\n <div><i class="icon ion-arrow-down-a"> </i></div>\n <div><i class="icon ion-arrow-down-b"> </i></div>\n <div><i class="icon ion-arrow-down-c"> </i></div>\n <div><i class="icon ion-arrow-expand"> </i></div>\n <div><i class="icon ion-arrow-graph-down-left"> </i></div>\n <div><i class="icon ion-arrow-graph-down-right"> </i></div>\n <div><i class="icon ion-arrow-graph-up-left"> </i></div>\n <div><i class="icon ion-arrow-graph-up-right"> </i></div>\n <div><i class="icon ion-arrow-left-a"> </i></div>\n <div><i class="icon ion-arrow-left-b"> </i></div>\n <div><i class="icon ion-arrow-left-c"> </i></div>\n <div><i class="icon ion-arrow-move"> </i></div>\n <div><i class="icon ion-arrow-resize"> </i></div>\n <div><i class="icon ion-arrow-return-left"> </i></div>\n <div><i class="icon ion-arrow-return-right"> </i></div>\n <div><i class="icon ion-arrow-right-a"> </i></div>\n <div><i class="icon ion-arrow-right-b"> </i></div>\n <div><i class="icon ion-arrow-right-c"> </i></div>\n <div><i class="icon ion-arrow-shrink"> </i></div>\n <div><i class="icon ion-arrow-swap"> </i></div>\n <div><i class="icon ion-arrow-up-a"> </i></div>\n <div><i class="icon ion-arrow-up-b"> </i></div>\n <div><i class="icon ion-arrow-up-c"> </i></div>\n <div><i class="icon ion-asterisk"> </i></div>\n <div><i class="icon ion-at"> </i></div>\n <div><i class="icon ion-backspace"> </i></div>\n <div><i class="icon ion-backspace-outline"> </i></div>\n <div><i class="icon ion-bag"> </i></div>\n <div><i class="icon ion-battery-charging"> </i></div>\n <div><i class="icon ion-battery-empty"> </i></div>\n <div><i class="icon ion-battery-full"> </i></div>\n <div><i class="icon ion-battery-half"> </i></div>\n <div><i class="icon ion-battery-low"> </i></div>\n <div><i class="icon ion-beaker"> </i></div>\n <div><i class="icon ion-beer"> </i></div>\n <div><i class="icon ion-bluetooth"> </i></div>\n <div><i class="icon ion-bonfire"> </i></div>\n <div><i class="icon ion-bookmark"> </i></div>\n <div><i class="icon ion-bowtie"> </i></div>\n <div><i class="icon ion-briefcase"> </i></div>\n <div><i class="icon ion-bug"> </i></div>\n <div><i class="icon ion-calculator"> </i></div>\n <div><i class="icon ion-calendar"> </i></div>\n <div><i class="icon ion-camera"> </i></div>\n <div><i class="icon ion-card"> </i></div>\n <div><i class="icon ion-cash"> </i></div>\n <div><i class="icon ion-chatbox"> </i></div>\n <div><i class="icon ion-chatbox-working"> </i></div>\n <div><i class="icon ion-chatboxes"> </i></div>\n <div><i class="icon ion-chatbubble"> </i></div>\n <div><i class="icon ion-chatbubble-working"> </i></div>\n <div><i class="icon ion-chatbubbles"> </i></div>\n <div><i class="icon ion-checkmark"> </i></div>\n <div><i class="icon ion-checkmark-circled"> </i></div>\n <div><i class="icon ion-checkmark-round"> </i></div>\n <div><i class="icon ion-chevron-down"> </i></div>\n <div><i class="icon ion-chevron-left"> </i></div>\n <div><i class="icon ion-chevron-right"> </i></div>\n <div><i class="icon ion-chevron-up"> </i></div>\n <div><i class="icon ion-clipboard"> </i></div>\n <div><i class="icon ion-clock"> </i></div>\n <div><i class="icon ion-close"> </i></div>\n <div><i class="icon ion-close-circled"> </i></div>\n <div><i class="icon ion-close-round"> </i></div>\n <div><i class="icon ion-closed-captioning"> </i></div>\n <div><i class="icon ion-cloud"> </i></div>\n <div><i class="icon ion-code"> </i></div>\n <div><i class="icon ion-code-download"> </i></div>\n <div><i class="icon ion-code-working"> </i></div>\n <div><i class="icon ion-coffee"> </i></div>\n <div><i class="icon ion-compass"> </i></div>\n <div><i class="icon ion-compose"> </i></div>\n <div><i class="icon ion-connection-bars"> </i></div>\n <div><i class="icon ion-contrast"> </i></div>\n <div><i class="icon ion-crop"> </i></div>\n <div><i class="icon ion-cube"> </i></div>\n <div><i class="icon ion-disc"> </i></div>\n <div><i class="icon ion-document"> </i></div>\n <div><i class="icon ion-document-text"> </i></div>\n <div><i class="icon ion-drag"> </i></div>\n <div><i class="icon ion-earth"> </i></div>\n <div><i class="icon ion-easel"> </i></div>\n <div><i class="icon ion-edit"> </i></div>\n <div><i class="icon ion-egg"> </i></div>\n <div><i class="icon ion-eject"> </i></div>\n <div><i class="icon ion-email"> </i></div>\n <div><i class="icon ion-email-unread"> </i></div>\n <div><i class="icon ion-erlenmeyer-flask"> </i></div>\n <div><i class="icon ion-erlenmeyer-flask-bubbles"> </i></div>\n <div><i class="icon ion-eye"> </i></div>\n <div><i class="icon ion-eye-disabled"> </i></div>\n <div><i class="icon ion-female"> </i></div>\n <div><i class="icon ion-filing"> </i></div>\n <div><i class="icon ion-film-marker"> </i></div>\n <div><i class="icon ion-fireball"> </i></div>\n <div><i class="icon ion-flag"> </i></div>\n <div><i class="icon ion-flame"> </i></div>\n <div><i class="icon ion-flash"> </i></div>\n <div><i class="icon ion-flash-off"> </i></div>\n <div><i class="icon ion-folder"> </i></div>\n <div><i class="icon ion-fork"> </i></div>\n <div><i class="icon ion-fork-repo"> </i></div>\n <div><i class="icon ion-forward"> </i></div>\n <div><i class="icon ion-funnel"> </i></div>\n <div><i class="icon ion-gear-a"> </i></div>\n <div><i class="icon ion-gear-b"> </i></div>\n <div><i class="icon ion-grid"> </i></div>\n <div><i class="icon ion-hammer"> </i></div>\n <div><i class="icon ion-happy"> </i></div>\n <div><i class="icon ion-happy-outline"> </i></div>\n <div><i class="icon ion-headphone"> </i></div>\n <div><i class="icon ion-heart"> </i></div>\n <div><i class="icon ion-heart-broken"> </i></div>\n <div><i class="icon ion-help"> </i></div>\n <div><i class="icon ion-help-buoy"> </i></div>\n <div><i class="icon ion-help-circled"> </i></div>\n <div><i class="icon ion-home"> </i></div>\n <div><i class="icon ion-icecream"> </i></div>\n <div><i class="icon ion-image"> </i></div>\n <div><i class="icon ion-images"> </i></div>\n <div><i class="icon ion-information"> </i></div>\n <div><i class="icon ion-information-circled"> </i></div>\n <div><i class="icon ion-ionic"> </i></div>\n <div><i class="icon ion-ios-alarm"> </i></div>\n <div><i class="icon ion-ios-alarm-outline"> </i></div>\n <div><i class="icon ion-ios-albums"> </i></div>\n <div><i class="icon ion-ios-albums-outline"> </i></div>\n <div><i class="icon ion-ios-americanfootball"> </i></div>\n <div><i class="icon ion-ios-americanfootball-outline"> </i></div>\n <div><i class="icon ion-ios-analytics"> </i></div>\n <div><i class="icon ion-ios-analytics-outline"> </i></div>\n <div><i class="icon ion-ios-arrow-back"> </i></div>\n <div><i class="icon ion-ios-arrow-down"> </i></div>\n <div><i class="icon ion-ios-arrow-forward"> </i></div>\n <div><i class="icon ion-ios-arrow-left"> </i></div>\n <div><i class="icon ion-ios-arrow-right"> </i></div>\n <div><i class="icon ion-ios-arrow-thin-down"> </i></div>\n <div><i class="icon ion-ios-arrow-thin-left"> </i></div>\n <div><i class="icon ion-ios-arrow-thin-right"> </i></div>\n <div><i class="icon ion-ios-arrow-thin-up"> </i></div>\n <div><i class="icon ion-ios-arrow-up"> </i></div>\n <div><i class="icon ion-ios-at"> </i></div>\n <div><i class="icon ion-ios-at-outline"> </i></div>\n <div><i class="icon ion-ios-barcode"> </i></div>\n <div><i class="icon ion-ios-barcode-outline"> </i></div>\n <div><i class="icon ion-ios-baseball"> </i></div>\n <div><i class="icon ion-ios-baseball-outline"> </i></div>\n <div><i class="icon ion-ios-basketball"> </i></div>\n <div><i class="icon ion-ios-basketball-outline"> </i></div>\n <div><i class="icon ion-ios-bell"> </i></div>\n <div><i class="icon ion-ios-bell-outline"> </i></div>\n <div><i class="icon ion-ios-body"> </i></div>\n <div><i class="icon ion-ios-body-outline"> </i></div>\n <div><i class="icon ion-ios-bolt"> </i></div>\n <div><i class="icon ion-ios-bolt-outline"> </i></div>\n <div><i class="icon ion-ios-book"> </i></div>\n <div><i class="icon ion-ios-book-outline"> </i></div>\n <div><i class="icon ion-ios-bookmarks"> </i></div>\n <div><i class="icon ion-ios-bookmarks-outline"> </i></div>\n <div><i class="icon ion-ios-box"> </i></div>\n <div><i class="icon ion-ios-box-outline"> </i></div>\n <div><i class="icon ion-ios-briefcase"> </i></div>\n <div><i class="icon ion-ios-briefcase-outline"> </i></div>\n <div><i class="icon ion-ios-browsers"> </i></div>\n <div><i class="icon ion-ios-browsers-outline"> </i></div>\n <div><i class="icon ion-ios-calculator"> </i></div>\n <div><i class="icon ion-ios-calculator-outline"> </i></div>\n <div><i class="icon ion-ios-calendar"> </i></div>\n <div><i class="icon ion-ios-calendar-outline"> </i></div>\n <div><i class="icon ion-ios-camera"> </i></div>\n <div><i class="icon ion-ios-camera-outline"> </i></div>\n <div><i class="icon ion-ios-cart"> </i></div>\n <div><i class="icon ion-ios-cart-outline"> </i></div>\n <div><i class="icon ion-ios-chatboxes"> </i></div>\n <div><i class="icon ion-ios-chatboxes-outline"> </i></div>\n <div><i class="icon ion-ios-chatbubble"> </i></div>\n <div><i class="icon ion-ios-chatbubble-outline"> </i></div>\n <div><i class="icon ion-ios-checkmark"> </i></div>\n <div><i class="icon ion-ios-checkmark-empty"> </i></div>\n <div><i class="icon ion-ios-checkmark-outline"> </i></div>\n <div><i class="icon ion-ios-circle-filled"> </i></div>\n <div><i class="icon ion-ios-circle-outline"> </i></div>\n <div><i class="icon ion-ios-clock"> </i></div>\n <div><i class="icon ion-ios-clock-outline"> </i></div>\n <div><i class="icon ion-ios-close"> </i></div>\n <div><i class="icon ion-ios-close-empty"> </i></div>\n <div><i class="icon ion-ios-close-outline"> </i></div>\n <div><i class="icon ion-ios-cloud"> </i></div>\n <div><i class="icon ion-ios-cloud-download"> </i></div>\n <div><i class="icon ion-ios-cloud-download-outline"> </i></div>\n <div><i class="icon ion-ios-cloud-outline"> </i></div>\n <div><i class="icon ion-ios-cloud-upload"> </i></div>\n <div><i class="icon ion-ios-cloud-upload-outline"> </i></div>\n <div><i class="icon ion-ios-cloudy"> </i></div>\n <div><i class="icon ion-ios-cloudy-night"> </i></div>\n <div><i class="icon ion-ios-cloudy-night-outline"> </i></div>\n <div><i class="icon ion-ios-cloudy-outline"> </i></div>\n <div><i class="icon ion-ios-cog"> </i></div>\n <div><i class="icon ion-ios-cog-outline"> </i></div>\n <div><i class="icon ion-ios-color-filter"> </i></div>\n <div><i class="icon ion-ios-color-filter-outline"> </i></div>\n <div><i class="icon ion-ios-color-wand"> </i></div>\n <div><i class="icon ion-ios-color-wand-outline"> </i></div>\n <div><i class="icon ion-ios-compose"> </i></div>\n <div><i class="icon ion-ios-compose-outline"> </i></div>\n <div><i class="icon ion-ios-contact"> </i></div>\n <div><i class="icon ion-ios-contact-outline"> </i></div>\n <div><i class="icon ion-ios-copy"> </i></div>\n <div><i class="icon ion-ios-copy-outline"> </i></div>\n <div><i class="icon ion-ios-crop"> </i></div>\n <div><i class="icon ion-ios-crop-strong"> </i></div>\n <div><i class="icon ion-ios-download"> </i></div>\n <div><i class="icon ion-ios-download-outline"> </i></div>\n <div><i class="icon ion-ios-drag"> </i></div>\n <div><i class="icon ion-ios-email"> </i></div>\n <div><i class="icon ion-ios-email-outline"> </i></div>\n <div><i class="icon ion-ios-eye"> </i></div>\n <div><i class="icon ion-ios-eye-outline"> </i></div>\n <div><i class="icon ion-ios-fastforward"> </i></div>\n <div><i class="icon ion-ios-fastforward-outline"> </i></div>\n <div><i class="icon ion-ios-filing"> </i></div>\n <div><i class="icon ion-ios-filing-outline"> </i></div>\n <div><i class="icon ion-ios-film"> </i></div>\n <div><i class="icon ion-ios-film-outline"> </i></div>\n <div><i class="icon ion-ios-flag"> </i></div>\n <div><i class="icon ion-ios-flag-outline"> </i></div>\n <div><i class="icon ion-ios-flame"> </i></div>\n <div><i class="icon ion-ios-flame-outline"> </i></div>\n <div><i class="icon ion-ios-flask"> </i></div>\n <div><i class="icon ion-ios-flask-outline"> </i></div>\n <div><i class="icon ion-ios-flower"> </i></div>\n <div><i class="icon ion-ios-flower-outline"> </i></div>\n <div><i class="icon ion-ios-folder"> </i></div>\n <div><i class="icon ion-ios-folder-outline"> </i></div>\n <div><i class="icon ion-ios-football"> </i></div>\n <div><i class="icon ion-ios-football-outline"> </i></div>\n <div><i class="icon ion-ios-game-controller-a"> </i></div>\n <div><i class="icon ion-ios-game-controller-a-outline"> </i></div>\n <div><i class="icon ion-ios-game-controller-b"> </i></div>\n <div><i class="icon ion-ios-game-controller-b-outline"> </i></div>\n <div><i class="icon ion-ios-gear"> </i></div>\n <div><i class="icon ion-ios-gear-outline"> </i></div>\n <div><i class="icon ion-ios-glasses"> </i></div>\n <div><i class="icon ion-ios-glasses-outline"> </i></div>\n <div><i class="icon ion-ios-grid-view"> </i></div>\n <div><i class="icon ion-ios-grid-view-outline"> </i></div>\n <div><i class="icon ion-ios-heart"> </i></div>\n <div><i class="icon ion-ios-heart-outline"> </i></div>\n <div><i class="icon ion-ios-help"> </i></div>\n <div><i class="icon ion-ios-help-empty"> </i></div>\n <div><i class="icon ion-ios-help-outline"> </i></div>\n <div><i class="icon ion-ios-home"> </i></div>\n <div><i class="icon ion-ios-home-outline"> </i></div>\n <div><i class="icon ion-ios-infinite"> </i></div>\n <div><i class="icon ion-ios-infinite-outline"> </i></div>\n <div><i class="icon ion-ios-information"> </i></div>\n <div><i class="icon ion-ios-information-empty"> </i></div>\n <div><i class="icon ion-ios-information-outline"> </i></div>\n <div><i class="icon ion-ios-ionic-outline"> </i></div>\n <div><i class="icon ion-ios-keypad"> </i></div>\n <div><i class="icon ion-ios-keypad-outline"> </i></div>\n <div><i class="icon ion-ios-lightbulb"> </i></div>\n <div><i class="icon ion-ios-lightbulb-outline"> </i></div>\n <div><i class="icon ion-ios-list"> </i></div>\n <div><i class="icon ion-ios-list-outline"> </i></div>\n <div><i class="icon ion-ios-location"> </i></div>\n <div><i class="icon ion-ios-location-outline"> </i></div>\n <div><i class="icon ion-ios-locked"> </i></div>\n <div><i class="icon ion-ios-locked-outline"> </i></div>\n <div><i class="icon ion-ios-loop"> </i></div>\n <div><i class="icon ion-ios-loop-strong"> </i></div>\n <div><i class="icon ion-ios-medical"> </i></div>\n <div><i class="icon ion-ios-medical-outline"> </i></div>\n <div><i class="icon ion-ios-medkit"> </i></div>\n <div><i class="icon ion-ios-medkit-outline"> </i></div>\n <div><i class="icon ion-ios-mic"> </i></div>\n <div><i class="icon ion-ios-mic-off"> </i></div>\n <div><i class="icon ion-ios-mic-outline"> </i></div>\n <div><i class="icon ion-ios-minus"> </i></div>\n <div><i class="icon ion-ios-minus-empty"> </i></div>\n <div><i class="icon ion-ios-minus-outline"> </i></div>\n <div><i class="icon ion-ios-monitor"> </i></div>\n <div><i class="icon ion-ios-monitor-outline"> </i></div>\n <div><i class="icon ion-ios-moon"> </i></div>\n <div><i class="icon ion-ios-moon-outline"> </i></div>\n <div><i class="icon ion-ios-more"> </i></div>\n <div><i class="icon ion-ios-more-outline"> </i></div>\n <div><i class="icon ion-ios-musical-note"> </i></div>\n <div><i class="icon ion-ios-musical-notes"> </i></div>\n <div><i class="icon ion-ios-navigate"> </i></div>\n <div><i class="icon ion-ios-navigate-outline"> </i></div>\n <div><i class="icon ion-ios-nutrition"> </i></div>\n <div><i class="icon ion-ios-nutrition-outline"> </i></div>\n <div><i class="icon ion-ios-paper"> </i></div>\n <div><i class="icon ion-ios-paper-outline"> </i></div>\n <div><i class="icon ion-ios-paperplane"> </i></div>\n <div><i class="icon ion-ios-paperplane-outline"> </i></div>\n <div><i class="icon ion-ios-partlysunny"> </i></div>\n <div><i class="icon ion-ios-partlysunny-outline"> </i></div>\n <div><i class="icon ion-ios-pause"> </i></div>\n <div><i class="icon ion-ios-pause-outline"> </i></div>\n <div><i class="icon ion-ios-paw"> </i></div>\n <div><i class="icon ion-ios-paw-outline"> </i></div>\n <div><i class="icon ion-ios-people"> </i></div>\n <div><i class="icon ion-ios-people-outline"> </i></div>\n <div><i class="icon ion-ios-person"> </i></div>\n <div><i class="icon ion-ios-person-outline"> </i></div>\n <div><i class="icon ion-ios-personadd"> </i></div>\n <div><i class="icon ion-ios-personadd-outline"> </i></div>\n <div><i class="icon ion-ios-photos"> </i></div>\n <div><i class="icon ion-ios-photos-outline"> </i></div>\n <div><i class="icon ion-ios-pie"> </i></div>\n <div><i class="icon ion-ios-pie-outline"> </i></div>\n <div><i class="icon ion-ios-pint"> </i></div>\n <div><i class="icon ion-ios-pint-outline"> </i></div>\n <div><i class="icon ion-ios-play"> </i></div>\n <div><i class="icon ion-ios-play-outline"> </i></div>\n <div><i class="icon ion-ios-plus"> </i></div>\n <div><i class="icon ion-ios-plus-empty"> </i></div>\n <div><i class="icon ion-ios-plus-outline"> </i></div>\n <div><i class="icon ion-ios-pricetag"> </i></div>\n <div><i class="icon ion-ios-pricetag-outline"> </i></div>\n <div><i class="icon ion-ios-pricetags"> </i></div>\n <div><i class="icon ion-ios-pricetags-outline"> </i></div>\n <div><i class="icon ion-ios-printer"> </i></div>\n <div><i class="icon ion-ios-printer-outline"> </i></div>\n <div><i class="icon ion-ios-pulse"> </i></div>\n <div><i class="icon ion-ios-pulse-strong"> </i></div>\n <div><i class="icon ion-ios-rainy"> </i></div>\n <div><i class="icon ion-ios-rainy-outline"> </i></div>\n <div><i class="icon ion-ios-recording"> </i></div>\n <div><i class="icon ion-ios-recording-outline"> </i></div>\n <div><i class="icon ion-ios-redo"> </i></div>\n <div><i class="icon ion-ios-redo-outline"> </i></div>\n <div><i class="icon ion-ios-refresh"> </i></div>\n <div><i class="icon ion-ios-refresh-empty"> </i></div>\n <div><i class="icon ion-ios-refresh-outline"> </i></div>\n <div><i class="icon ion-ios-reload"> </i></div>\n <div><i class="icon ion-ios-reverse-camera"> </i></div>\n <div><i class="icon ion-ios-reverse-camera-outline"> </i></div>\n <div><i class="icon ion-ios-rewind"> </i></div>\n <div><i class="icon ion-ios-rewind-outline"> </i></div>\n <div><i class="icon ion-ios-rose"> </i></div>\n <div><i class="icon ion-ios-rose-outline"> </i></div>\n <div><i class="icon ion-ios-search"> </i></div>\n <div><i class="icon ion-ios-search-strong"> </i></div>\n <div><i class="icon ion-ios-settings"> </i></div>\n <div><i class="icon ion-ios-settings-strong"> </i></div>\n <div><i class="icon ion-ios-shuffle"> </i></div>\n <div><i class="icon ion-ios-shuffle-strong"> </i></div>\n <div><i class="icon ion-ios-skipbackward"> </i></div>\n <div><i class="icon ion-ios-skipbackward-outline"> </i></div>\n <div><i class="icon ion-ios-skipforward"> </i></div>\n <div><i class="icon ion-ios-skipforward-outline"> </i></div>\n <div><i class="icon ion-ios-snowy"> </i></div>\n <div><i class="icon ion-ios-speedometer"> </i></div>\n <div><i class="icon ion-ios-speedometer-outline"> </i></div>\n <div><i class="icon ion-ios-star"> </i></div>\n <div><i class="icon ion-ios-star-half"> </i></div>\n <div><i class="icon ion-ios-star-outline"> </i></div>\n <div><i class="icon ion-ios-stopwatch"> </i></div>\n <div><i class="icon ion-ios-stopwatch-outline"> </i></div>\n <div><i class="icon ion-ios-sunny"> </i></div>\n <div><i class="icon ion-ios-sunny-outline"> </i></div>\n <div><i class="icon ion-ios-telephone"> </i></div>\n <div><i class="icon ion-ios-telephone-outline"> </i></div>\n <div><i class="icon ion-ios-tennisball"> </i></div>\n <div><i class="icon ion-ios-tennisball-outline"> </i></div>\n <div><i class="icon ion-ios-thunderstorm"> </i></div>\n <div><i class="icon ion-ios-thunderstorm-outline"> </i></div>\n <div><i class="icon ion-ios-time"> </i></div>\n <div><i class="icon ion-ios-time-outline"> </i></div>\n <div><i class="icon ion-ios-timer"> </i></div>\n <div><i class="icon ion-ios-timer-outline"> </i></div>\n <div><i class="icon ion-ios-toggle"> </i></div>\n <div><i class="icon ion-ios-toggle-outline"> </i></div>\n <div><i class="icon ion-ios-trash"> </i></div>\n <div><i class="icon ion-ios-trash-outline"> </i></div>\n <div><i class="icon ion-ios-undo"> </i></div>\n <div><i class="icon ion-ios-undo-outline"> </i></div>\n <div><i class="icon ion-ios-unlocked"> </i></div>\n <div><i class="icon ion-ios-unlocked-outline"> </i></div>\n <div><i class="icon ion-ios-upload"> </i></div>\n <div><i class="icon ion-ios-upload-outline"> </i></div>\n <div><i class="icon ion-ios-videocam"> </i></div>\n <div><i class="icon ion-ios-videocam-outline"> </i></div>\n <div><i class="icon ion-ios-volume-high"> </i></div>\n <div><i class="icon ion-ios-volume-low"> </i></div>\n <div><i class="icon ion-ios-wineglass"> </i></div>\n <div><i class="icon ion-ios-wineglass-outline"> </i></div>\n <div><i class="icon ion-ios-world"> </i></div>\n <div><i class="icon ion-ios-world-outline"> </i></div>\n <div><i class="icon ion-ipad"> </i></div>\n <div><i class="icon ion-iphone"> </i></div>\n <div><i class="icon ion-ipod"> </i></div>\n <div><i class="icon ion-jet"> </i></div>\n <div><i class="icon ion-key"> </i></div>\n <div><i class="icon ion-knife"> </i></div>\n <div><i class="icon ion-laptop"> </i></div>\n <div><i class="icon ion-leaf"> </i></div>\n <div><i class="icon ion-levels"> </i></div>\n <div><i class="icon ion-lightbulb"> </i></div>\n <div><i class="icon ion-link"> </i></div>\n <div><i class="icon ion-load-a"> </i></div>\n <div><i class="icon ion-load-b"> </i></div>\n <div><i class="icon ion-load-c"> </i></div>\n <div><i class="icon ion-load-d"> </i></div>\n <div><i class="icon ion-location"> </i></div>\n <div><i class="icon ion-lock-combination"> </i></div>\n <div><i class="icon ion-locked"> </i></div>\n <div><i class="icon ion-log-in"> </i></div>\n <div><i class="icon ion-log-out"> </i></div>\n <div><i class="icon ion-loop"> </i></div>\n <div><i class="icon ion-magnet"> </i></div>\n <div><i class="icon ion-male"> </i></div>\n <div><i class="icon ion-man"> </i></div>\n <div><i class="icon ion-map"> </i></div>\n <div><i class="icon ion-medkit"> </i></div>\n <div><i class="icon ion-merge"> </i></div>\n <div><i class="icon ion-mic-a"> </i></div>\n <div><i class="icon ion-mic-b"> </i></div>\n <div><i class="icon ion-mic-c"> </i></div>\n <div><i class="icon ion-minus"> </i></div>\n <div><i class="icon ion-minus-circled"> </i></div>\n <div><i class="icon ion-minus-round"> </i></div>\n <div><i class="icon ion-model-s"> </i></div>\n <div><i class="icon ion-monitor"> </i></div>\n <div><i class="icon ion-more"> </i></div>\n <div><i class="icon ion-mouse"> </i></div>\n <div><i class="icon ion-music-note"> </i></div>\n <div><i class="icon ion-navicon"> </i></div>\n <div><i class="icon ion-navicon-round"> </i></div>\n <div><i class="icon ion-navigate"> </i></div>\n <div><i class="icon ion-network"> </i></div>\n <div><i class="icon ion-no-smoking"> </i></div>\n <div><i class="icon ion-nuclear"> </i></div>\n <div><i class="icon ion-outlet"> </i></div>\n <div><i class="icon ion-paintbrush"> </i></div>\n <div><i class="icon ion-paintbucket"> </i></div>\n <div><i class="icon ion-paper-airplane"> </i></div>\n <div><i class="icon ion-paperclip"> </i></div>\n <div><i class="icon ion-pause"> </i></div>\n <div><i class="icon ion-person"> </i></div>\n <div><i class="icon ion-person-add"> </i></div>\n <div><i class="icon ion-person-stalker"> </i></div>\n <div><i class="icon ion-pie-graph"> </i></div>\n <div><i class="icon ion-pin"> </i></div>\n <div><i class="icon ion-pinpoint"> </i></div>\n <div><i class="icon ion-pizza"> </i></div>\n <div><i class="icon ion-plane"> </i></div>\n <div><i class="icon ion-planet"> </i></div>\n <div><i class="icon ion-play"> </i></div>\n <div><i class="icon ion-playstation"> </i></div>\n <div><i class="icon ion-plus"> </i></div>\n <div><i class="icon ion-plus-circled"> </i></div>\n <div><i class="icon ion-plus-round"> </i></div>\n <div><i class="icon ion-podium"> </i></div>\n <div><i class="icon ion-pound"> </i></div>\n <div><i class="icon ion-power"> </i></div>\n <div><i class="icon ion-pricetag"> </i></div>\n <div><i class="icon ion-pricetags"> </i></div>\n <div><i class="icon ion-printer"> </i></div>\n <div><i class="icon ion-pull-request"> </i></div>\n <div><i class="icon ion-qr-scanner"> </i></div>\n <div><i class="icon ion-quote"> </i></div>\n <div><i class="icon ion-radio-waves"> </i></div>\n <div><i class="icon ion-record"> </i></div>\n <div><i class="icon ion-refresh"> </i></div>\n <div><i class="icon ion-reply"> </i></div>\n <div><i class="icon ion-reply-all"> </i></div>\n <div><i class="icon ion-ribbon-a"> </i></div>\n <div><i class="icon ion-ribbon-b"> </i></div>\n <div><i class="icon ion-sad"> </i></div>\n <div><i class="icon ion-sad-outline"> </i></div>\n <div><i class="icon ion-scissors"> </i></div>\n <div><i class="icon ion-search"> </i></div>\n <div><i class="icon ion-settings"> </i></div>\n <div><i class="icon ion-share"> </i></div>\n <div><i class="icon ion-shuffle"> </i></div>\n <div><i class="icon ion-skip-backward"> </i></div>\n <div><i class="icon ion-skip-forward"> </i></div>\n <div><i class="icon ion-social-android"> </i></div>\n <div><i class="icon ion-social-android-outline"> </i></div>\n <div><i class="icon ion-social-angular"> </i></div>\n <div><i class="icon ion-social-angular-outline"> </i></div>\n <div><i class="icon ion-social-apple"> </i></div>\n <div><i class="icon ion-social-apple-outline"> </i></div>\n <div><i class="icon ion-social-bitcoin"> </i></div>\n <div><i class="icon ion-social-bitcoin-outline"> </i></div>\n <div><i class="icon ion-social-buffer"> </i></div>\n <div><i class="icon ion-social-buffer-outline"> </i></div>\n <div><i class="icon ion-social-chrome"> </i></div>\n <div><i class="icon ion-social-chrome-outline"> </i></div>\n <div><i class="icon ion-social-codepen"> </i></div>\n <div><i class="icon ion-social-codepen-outline"> </i></div>\n <div><i class="icon ion-social-css3"> </i></div>\n <div><i class="icon ion-social-css3-outline"> </i></div>\n <div><i class="icon ion-social-designernews"> </i></div>\n <div><i class="icon ion-social-designernews-outline"> </i></div>\n <div><i class="icon ion-social-dribbble"> </i></div>\n <div><i class="icon ion-social-dribbble-outline"> </i></div>\n <div><i class="icon ion-social-dropbox"> </i></div>\n <div><i class="icon ion-social-dropbox-outline"> </i></div>\n <div><i class="icon ion-social-euro"> </i></div>\n <div><i class="icon ion-social-euro-outline"> </i></div>\n <div><i class="icon ion-social-facebook"> </i></div>\n <div><i class="icon ion-social-facebook-outline"> </i></div>\n <div><i class="icon ion-social-foursquare"> </i></div>\n <div><i class="icon ion-social-foursquare-outline"> </i></div>\n <div><i class="icon ion-social-freebsd-devil"> </i></div>\n <div><i class="icon ion-social-github"> </i></div>\n <div><i class="icon ion-social-github-outline"> </i></div>\n <div><i class="icon ion-social-google"> </i></div>\n <div><i class="icon ion-social-google-outline"> </i></div>\n <div><i class="icon ion-social-googleplus"> </i></div>\n <div><i class="icon ion-social-googleplus-outline"> </i></div>\n <div><i class="icon ion-social-hackernews"> </i></div>\n <div><i class="icon ion-social-hackernews-outline"> </i></div>\n <div><i class="icon ion-social-html5"> </i></div>\n <div><i class="icon ion-social-html5-outline"> </i></div>\n <div><i class="icon ion-social-instagram"> </i></div>\n <div><i class="icon ion-social-instagram-outline"> </i></div>\n <div><i class="icon ion-social-javascript"> </i></div>\n <div><i class="icon ion-social-javascript-outline"> </i></div>\n <div><i class="icon ion-social-linkedin"> </i></div>\n <div><i class="icon ion-social-linkedin-outline"> </i></div>\n <div><i class="icon ion-social-markdown"> </i></div>\n <div><i class="icon ion-social-nodejs"> </i></div>\n <div><i class="icon ion-social-octocat"> </i></div>\n <div><i class="icon ion-social-pinterest"> </i></div>\n <div><i class="icon ion-social-pinterest-outline"> </i></div>\n <div><i class="icon ion-social-python"> </i></div>\n <div><i class="icon ion-social-reddit"> </i></div>\n <div><i class="icon ion-social-reddit-outline"> </i></div>\n <div><i class="icon ion-social-rss"> </i></div>\n <div><i class="icon ion-social-rss-outline"> </i></div>\n <div><i class="icon ion-social-sass"> </i></div>\n <div><i class="icon ion-social-skype"> </i></div>\n <div><i class="icon ion-social-skype-outline"> </i></div>\n <div><i class="icon ion-social-snapchat"> </i></div>\n <div><i class="icon ion-social-snapchat-outline"> </i></div>\n <div><i class="icon ion-social-tumblr"> </i></div>\n <div><i class="icon ion-social-tumblr-outline"> </i></div>\n <div><i class="icon ion-social-tux"> </i></div>\n <div><i class="icon ion-social-twitch"> </i></div>\n <div><i class="icon ion-social-twitch-outline"> </i></div>\n <div><i class="icon ion-social-twitter"> </i></div>\n <div><i class="icon ion-social-twitter-outline"> </i></div>\n <div><i class="icon ion-social-usd"> </i></div>\n <div><i class="icon ion-social-usd-outline"> </i></div>\n <div><i class="icon ion-social-vimeo"> </i></div>\n <div><i class="icon ion-social-vimeo-outline"> </i></div>\n <div><i class="icon ion-social-whatsapp"> </i></div>\n <div><i class="icon ion-social-whatsapp-outline"> </i></div>\n <div><i class="icon ion-social-windows"> </i></div>\n <div><i class="icon ion-social-windows-outline"> </i></div>\n <div><i class="icon ion-social-wordpress"> </i></div>\n <div><i class="icon ion-social-wordpress-outline"> </i></div>\n <div><i class="icon ion-social-yahoo"> </i></div>\n <div><i class="icon ion-social-yahoo-outline"> </i></div>\n <div><i class="icon ion-social-yen"> </i></div>\n <div><i class="icon ion-social-yen-outline"> </i></div>\n <div><i class="icon ion-social-youtube"> </i></div>\n <div><i class="icon ion-social-youtube-outline"> </i></div>\n <div><i class="icon ion-soup-can"> </i></div>\n <div><i class="icon ion-soup-can-outline"> </i></div>\n <div><i class="icon ion-speakerphone"> </i></div>\n <div><i class="icon ion-speedometer"> </i></div>\n <div><i class="icon ion-spoon"> </i></div>\n <div><i class="icon ion-star"> </i></div>\n <div><i class="icon ion-stats-bars"> </i></div>\n <div><i class="icon ion-steam"> </i></div>\n <div><i class="icon ion-stop"> </i></div>\n <div><i class="icon ion-thermometer"> </i></div>\n <div><i class="icon ion-thumbsdown"> </i></div>\n <div><i class="icon ion-thumbsup"> </i></div>\n <div><i class="icon ion-toggle"> </i></div>\n <div><i class="icon ion-toggle-filled"> </i></div>\n <div><i class="icon ion-transgender"> </i></div>\n <div><i class="icon ion-trash-a"> </i></div>\n <div><i class="icon ion-trash-b"> </i></div>\n <div><i class="icon ion-trophy"> </i></div>\n <div><i class="icon ion-tshirt"> </i></div>\n <div><i class="icon ion-tshirt-outline"> </i></div>\n <div><i class="icon ion-umbrella"> </i></div>\n <div><i class="icon ion-university"> </i></div>\n <div><i class="icon ion-unlocked"> </i></div>\n <div><i class="icon ion-upload"> </i></div>\n <div><i class="icon ion-usb"> </i></div>\n <div><i class="icon ion-videocamera"> </i></div>\n <div><i class="icon ion-volume-high"> </i></div>\n <div><i class="icon ion-volume-low"> </i></div>\n <div><i class="icon ion-volume-medium"> </i></div>\n <div><i class="icon ion-volume-mute"> </i></div>\n <div><i class="icon ion-wand"> </i></div>\n <div><i class="icon ion-waterdrop"> </i></div>\n <div><i class="icon ion-wifi"> </i></div>\n <div><i class="icon ion-wineglass"> </i></div>\n <div><i class="icon ion-woman"> </i></div>\n <div><i class="icon ion-wrench"> </i></div>\n <div><i class="icon ion-xbox"> </i></div>\n </div>\n\n <script type="text/javascript">\n var elms = document.querySelectorAll(\'#divIcons > div\');\n for(var i=0;i<elms.length;i++) {\n elms[i].addEventListener(\'click\', function(e){\n\n var elm = e.target;\n if(!elm.className) elm = elm.childNodes[0];\n parent._cb.addIcon(elm.className)\n\n });\n }\n\n <\/script>\n\n </body>\n </html>\n \n \n ')
}
}, {
key: "addIcon",
value: function (e) {
if (this.util.restoreSelection(), this.builder.activeIcon) {
this.builder.uo.saveForUndo();
for (var t = this.builder.opts.fontSizeClassValues, i = "", n = 0; n <= t.length - 1; n++) eu.hasClass(this.builder.activeIcon, "size-" + t[n]) && (i = "size-" + t[n]);
this.builder.activeIcon.className = e + ("" !== i ? " " + i : ""), eu.addClass(this.builder.activeIcon, "icon-active"), eu.selectElementContents(this.builder.activeIcon), this.util.saveSelection()
} else {
if (!eu.textSelection()) return;
this.builder.uo.saveForUndo(), this.util.pasteHtmlAtCaret('<i class="' + e + ' icon-active"></i>', !0), this.builder.activeIcon = document.querySelector(".icon-active"), eu.selectElementContents(this.builder.activeIcon), this.util.saveSelection()
}
this.builder.opts.onChange(), this.builder.opts.onRender()
}
}, {
key: "clearFont",
value: function () {
this.builder.uo.saveForUndo(), this.applyFont("", "", "")
}
}, {
key: "applyFont",
value: function (e, t, i) {
var n, o = this,
r = this.builderStuff.querySelector(".is-side.elementstyles");
if (eu.hasClass(r, "active")) this.builder.uo.saveForUndo(), (n = this.builder.inspectedElement).style.fontFamily = e, this.builderStuff.querySelector("#inpElmFontFamily").value = e, this.elementStyleEditor.refresh();
else {
try {
var a;
window.getSelection ? "H1" != (n = 3 == (a = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? a.parentNode : a).tagName && "H2" != n.tagName && "H3" != n.tagName && "H4" != n.tagName && "H5" != n.tagName && "H6" != n.tagName && "P" != n.tagName && (n = n.parentNode) : document.selection && (a = document.selection.createRange(), "H1" != (n = document.selection.createRange().parentElement()).tagName && "H2" != n.tagName && "H3" != n.tagName && "H4" != n.tagName && "H5" != n.tagName && "H6" != n.tagName && "P" != n.tagName && (n = n.parentElement()))
} catch (e) {
return
}
this.builder.uo.saveForUndo();
var l = eu.getSelected();
if ("" !== l.trim() && n.innerText !== l) {
document.execCommand("fontName", !1, e);
for (var s = document.getElementsByTagName("font"), c = 0, d = s.length; c < d; ++c) s[c].face == e && (s[c].removeAttribute("face"), s[c].style.fontFamily = e, eu.selectElementContents(s[c]))
} else "" !== l.trim() && n.innerText, n.style.fontFamily = e
}
var u = t;
u = u ? ":" + u : "";
var p = e.split(",")[0];
if ("google" == i) {
var v = !1,
h = document.getElementsByTagName("link");
for (c = 0; c < h.length; c++) {
var f = h[c].href.toLowerCase(); - 1 != (f = f.replace(/\+/g, " ").replace(/%20/g, " ")).indexOf(p.toLowerCase()) && (v = !0)
}
if (!v) {
for (var g = n; !eu.hasClass(g, "is-builder");) g = g.parentNode;
eu.appendHtml(g, '<link href="//fonts.googleapis.com/css?family=' + p + u + '" rel="stylesheet" property="stylesheet" type="text/css">')
}
}
if (!this.builder.inspectedElement) {
if (this.util.saveSelection(), this.builder.isTouchSupport) this.rteTool.querySelector("button").focus();
this.getState()
}
for (this.builder.opts.onChange(), setTimeout((function () {
o.builder.opts.onChange()
}), 300), h = document.getElementsByTagName("link"), c = 0; c < h.length; c++) {
if (-1 != (f = h[c].href.toLowerCase()).indexOf("googleapis"))
if (-1 != (p = (f = f.replace(/\+/g, " ").replace(/%20/g, " ")).substr(f.indexOf("family=") + 7)).indexOf(":") && (p = p.split(":")[0]), -1 != p.indexOf("|") && (p = p.split("|")[0]), document.body.innerHTML.toLowerCase().split(p).length < 3) h[c].getAttribute("data-protect") || h[c].setAttribute("data-rel", "_del")
} [].forEach.call(document.querySelectorAll('link[data-rel="_del"]'), (function (e) {
e.parentNode.removeChild(e)
}))
}
}, {
key: "setFont",
value: function (e, t, i, n) {
var o, r = this.builderStuff.querySelector(".is-side.elementstyles");
if (eu.hasClass(r, "active")) this.builder.uo.saveForUndo(), (o = this.builder.inspectedElement).style.fontFamily = e, this.builderStuff.querySelector("#inpElmFontFamily").value = e, this.elementStyleEditor.refresh();
else {
this.builder.isIE && this.util.restoreSelection();
try {
var a;
window.getSelection ? "H1" != (o = 3 == (a = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? a.parentNode : a).tagName && "H2" != o.tagName && "H3" != o.tagName && "H4" != o.tagName && "H5" != o.tagName && "H6" != o.tagName && "P" != o.tagName && (o = o.parentNode) : document.selection && (a = document.selection.createRange(), "H1" != (o = document.selection.createRange().parentElement()).tagName && "H2" != o.tagName && "H3" != o.tagName && "H4" != o.tagName && "H5" != o.tagName && "H6" != o.tagName && "P" != o.tagName && (o = o.parentElement()))
} catch (e) {
return
}
this.builder.uo.saveForUndo();
var l = eu.getSelected();
if ("" !== l.trim() && o.innerText !== l) {
document.execCommand("fontName", !1, e);
for (var s = document.getElementsByTagName("font"), c = 0, d = s.length; c < d; ++c) s[c].face.replace(/'/g, "") == e.replace(/'/g, "") && (s[c].removeAttribute("face"), s[c].style.fontFamily = e, eu.selectElementContents(s[c]));
for (c = 0, d = (s = document.querySelectorAll("[face]")).length; c < d; ++c) {
var u = s[c].getAttribute("face");
if (-1 !== u.indexOf(",")) {
var p = u.split(",")[0],
v = u.split(",")[1]; - 1 !== p.indexOf(" ") && (u = "'".concat(p, "',").concat(v))
}
s[c].style.fontFamily = u, s[c].removeAttribute("face")
}
} else if ("" !== l.trim() && o.innerText === l) {
o.style.fontFamily = e;
var h = o.querySelectorAll("*");
Array.prototype.forEach.call(h, (function (e) {
"" !== e.style.fontFamily && (e.style.fontFamily = "")
}))
} else o.style.fontFamily = e
}
var f = t;
f = f ? ":" + f : "";
var g = "";
i && (g = "&display=swap");
var m = e.split(",")[0];
if (m = m.replace(/'/g, ""), "google" == n) {
var y = !1,
b = document.getElementsByTagName("link");
for (c = 0; c < b.length; c++) {
var x = b[c].href.toLowerCase(); - 1 != (x = x.replace(/\+/g, " ").replace(/%20/g, " ")).indexOf(m.toLowerCase()) && (y = !0)
}
if (!y) {
for (var w = o; !eu.hasClass(w, "is-builder");) w = w.parentNode;
eu.appendHtml(w, '<link href="//fonts.googleapis.com/css?family=' + m + g + f + '" rel="stylesheet" property="stylesheet" type="text/css">')
}
}
if (!this.builder.inspectedElement) {
if (this.util.saveSelection(), this.builder.isTouchSupport) this.rteTool.querySelector("button").focus();
this.getState()
}
for (this.builder.opts.onChange(), b = document.getElementsByTagName("link"), c = 0; c < b.length; c++) {
if (-1 != (x = b[c].href.toLowerCase()).indexOf("googleapis"))
if (-1 != (m = (x = x.replace(/\+/g, " ").replace(/%20/g, " ")).substr(x.indexOf("family=") + 7)).indexOf(":") && (m = m.split(":")[0]), -1 != m.indexOf("|") && (m = m.split("|")[0]), m = m.replace("&display=swap", ""), document.body.innerHTML.toLowerCase().split(m).length < 3) b[c].getAttribute("data-protect") || b[c].setAttribute("data-rel", "_del")
} [].forEach.call(document.querySelectorAll('link[data-rel="_del"]'), (function (e) {
e.parentNode.removeChild(e)
}))
}
}, {
key: "positionToolbar",
value: function () {
var e = window.innerWidth,
t = window.innerHeight;
if ("left" === this.builder.opts.toolbar || "right" === this.builder.opts.toolbar) {
var i = t / 2 - this.rteTool.offsetHeight / 2;
this.rteTool.style.left = "", this.rteTool.style.top = i + "px"
} else {
var n = e / 2 - this.rteTool.offsetWidth / 2;
this.rteTool.style.top = "", this.rteTool.style.left = n + "px"
}
}
}]), e
}(),
iu = new v,
nu = function () {
function i() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, i);
this.opts = Object.assign(this, {
page: "",
container: ".container",
handler: "saveimage.php",
onComplete: function () {},
customval: "",
stuffPlacement: "#_cbhtml",
hiquality: !1
}, e), this.count = 0;
var n = document.querySelector(this.opts.stuffPlacement);
n || ((n = document.createElement("div")).id = "_cbhtml", iu.appendChild(document.body, n)), this.builderStuff = n
}
return n(i, [{
key: "save",
value: function () {
var e = this;
if ("" !== this.opts.page) {
var t = document.querySelector(this.opts.page);
this.uploadImages(t)
} else {
var i = document.querySelectorAll(this.opts.container);
Array.prototype.forEach.call(i, (function (t) {
e.uploadImages(t)
}))
}
var n = setInterval((function () {
var t = !0;
if ("" !== e.opts.page) {
var i = document.querySelector(e.opts.page);
t = e.checkImages(i)
} else {
var o = document.querySelectorAll(e.opts.container);
Array.prototype.forEach.call(o, (function (i) {
!1 === e.checkImages(i) && (t = !1)
}))
}
t && (e.opts.onComplete(), window.clearInterval(n))
}), 2e3)
}
}, {
key: "checkImages",
value: function (t) {
var i = t.querySelectorAll("img");
return Array.prototype.forEach.call(i, (function (t) {
var i = t.getAttribute("src");
if ("undefined" !== e(i) && !1 !== i && -1 != i.indexOf("base64")) return !1
})), !0
}
}, {
key: "uploadImages",
value: function (t) {
var i = this;
if (t) {
var n = t.querySelectorAll("img");
Array.prototype.forEach.call(n, (function (t) {
var n = t.getAttribute("src");
if ("undefined" !== e(n) && !1 !== n && -1 != n.indexOf("base64")) {
i.count++;
var o = n;
if (o = o.replace(/^data:image\/(png|jpeg);base64,/, ""), !i.builderStuff.querySelector("#form-" + i.count)) {
var r = '<form id="form-' + i.count + '" target="frame-' + i.count + '" method="post" enctype="multipart/form-data"><input id="hidimg-' + i.count + '" name="hidimg-' + i.count + '" type="hidden" /><input id="hidname-' + i.count + '" name="hidname-' + i.count + '" type="hidden" /><input id="hidtype-' + i.count + '" name="hidtype-' + i.count + '" type="hidden" /><input id="hidcustomval-' + i.count + '" name="hidcustomval-' + i.count + '" type="hidden" /><iframe id="frame-' + i.count + '" name="frame-' + i.count + '" style="width:1px;height:1px;border:none;position:absolute;z-index:-100000;left:-5px;"></iframe></form>';
i.builderStuff.insertAdjacentHTML("beforeend", r)
}
t.setAttribute("id", "img-" + i.count), i.builderStuff.querySelector("#hidimg-" + i.count).value = o, i.builderStuff.querySelector("#hidcustomval-" + i.count).value = i.customval;
var a = t.getAttribute("data-filename");
if (a) {
var l = a.substr(0, a.lastIndexOf(".")) || a;
l = l.toLowerCase().replace(/ /g, "-"), i.builderStuff.querySelector("#hidname-" + i.count).value = l
}
if (i.opts.hiquality) i.builderStuff.querySelector("#hidtype-" + i.count).value = "png";
else {
var s = a.substr(a.lastIndexOf(".") + 1);
s = s.toLowerCase(), i.builderStuff.querySelector("#hidtype-" + i.count).value = "jpg" == s || "jpeg" == s ? "jpg" : "png"
}
i.builderStuff.querySelector("#form-" + i.count).setAttribute("action", i.opts.handler + (i.opts.handler.indexOf("?") >= 0 ? "&" : "?") + "count=" + i.count), i.builderStuff.querySelector("#form-" + i.count).submit()
}
}))
}
}
}]), i
}(),
ou = new v,
ru = function () {
function e(i) {
t(this, e);
var n = new p(i).builderStuff();
this.builderStuff = n;
var o = n.querySelector(".is-tooltip");
if (!o) {
ou.appendHtml(n, '<div class="is-tooltip"></div>'), o = n.querySelector(".is-tooltip")
}
this.tooltip = o
}
return n(e, [{
key: "setAll",
value: function (e) {
var t = this,
i = (e || this.builderStuff).querySelectorAll("[data-title]");
Array.prototype.forEach.call(i, (function (e) {
t.set(e, 0, 0)
}))
}
}, {
key: "set",
value: function (e, t, i) {
t || (t = 0), i || (i = 0);
var n = this.tooltip;
e.addEventListener("mouseover", (function (o) {
var r = o.relatedTarget;
if (this !== r && !au(this, r)) {
e = this;
var a = window.getComputedStyle(e.parentNode).getPropertyValue("flex-direction"),
l = e.getAttribute("data-title");
n.innerHTML = l;
var s = e.getBoundingClientRect().top + window.pageYOffset,
c = e.getBoundingClientRect().left + window.pageXOffset;
n.style.display = "flex";
var d = e.offsetWidth,
u = e.offsetHeight;
n.style.marginRight = "";
var p = window.innerWidth;
if (n.style.top = s + u + 5 + t + "px", u < 30 && (n.style.top = s + u + 2 + t + "px"), "column" === a) n.style.top = s + u / 2 - n.offsetHeight / 2 + t + "px", n.style.left = c + d + 3 + i + "px", p - (c + d) < 100 && (n.style.left = c - n.offsetWidth - 3 + i + "px");
else {
var v = c + d / 2 - n.offsetWidth / 2 + i;
n.style.left = v + "px";
var h = v + n.offsetWidth;
if (h > p) {
var f = h - p;
n.style.left = v - f - 3 + "px", n.offsetHeight > 25 && (n.style.marginRight = "5px")
}
v < 0 && (n.style.left = "3px")
}
e.hasAttribute("data-tooltip-top") && (n.style.top = s - n.offsetHeight - 3 + "px"), e.removeAttribute("title")
}
}), !1), e.addEventListener("mouseout", (function (t) {
var i = t.relatedTarget;
this === i || au(this, i) || ((e = this).setAttribute("title", e.getAttribute("data-title")), n.style.display = "none")
}), !1), e.addEventListener("click", (function (t) {
var i = t.relatedTarget;
this === i || au(this, i) || ((e = this).setAttribute("title", e.getAttribute("data-title")), n.style.display = "none")
}), !1)
}
}]), e
}();
function au(e, t) {
if (e === t) return !1;
for (; t && t !== e;) t = t.parentNode;
return t === e
}
var lu = new v,
su = function e() {
t(this, e);
var i = document.querySelectorAll(".is-tabs a");
Array.prototype.forEach.call(i, (function (e) {
lu.addEventListener(e, "click", (function (t) {
var i = e.getAttribute("data-menu");
if (i) return document.querySelector("#" + i).style.display = "block", t.preventDefault(), !1;
if (lu.hasClass(e, "active")) return t.preventDefault(), !1;
var n = e.getAttribute("data-content");
if (!n) return t.preventDefault(), !1;
var o = e.parentNode.getAttribute("data-group"),
r = document.querySelectorAll('.is-tabs[data-group="' + o + '"] > a');
Array.prototype.forEach.call(r, (function (e) {
lu.removeClass(e, "active")
})), r = document.querySelectorAll('.is-tabs-more[data-group="' + o + '"] > a'), Array.prototype.forEach.call(r, (function (e) {
lu.removeClass(e, "active")
})), lu.addClass(e, "active");
var a = document.querySelectorAll('.is-tab-content[data-group="' + o + '"]');
return Array.prototype.forEach.call(a, (function (e) {
e.style.display = "none"
})), document.querySelector("#" + n).style.display = "flex", document.querySelector(".is-tabs-more").style.display = "none", t.preventDefault(), !1
}))
})), i = document.querySelectorAll(".is-tabs-more a"), Array.prototype.forEach.call(i, (function (e) {
lu.addEventListener(e, "click", (function (t) {
if (lu.hasClass(e, "active")) return t.preventDefault(), !1;
var i = e.getAttribute("data-content");
if (!i) return t.preventDefault(), !1;
var n = e.parentNode.getAttribute("data-group"),
o = document.querySelectorAll('.is-tabs[data-group="' + n + '"] > a');
Array.prototype.forEach.call(o, (function (e) {
lu.removeClass(e, "active")
})), o = document.querySelectorAll('.is-tabs-more[data-group="' + n + '"] > a'), Array.prototype.forEach.call(o, (function (e) {
lu.removeClass(e, "active")
})), lu.addClass(e, "active");
var r = document.querySelectorAll('.is-tab-content[data-group="' + n + '"]');
return Array.prototype.forEach.call(r, (function (e) {
e.style.display = "none"
})), document.querySelector("#" + i) && (document.querySelector("#" + i).style.display = "flex"), document.querySelector(".is-tabs-more") && (document.querySelector(".is-tabs-more").style.display = "none"), t.preventDefault(), !1
}))
}));
var n = !1;
document.addEventListener("mousedown", (function (e) {
var t = (e = e || window.event).target || e.srcElement,
i = document.querySelectorAll(".is-tabs-more");
if (Array.prototype.forEach.call(i, (function (e) {
"block" === e.style.display && (n = !0)
})), n) {
var o = lu.parentsHasAttribute(t, "data-menu"),
r = lu.parentsHasClass(t, "is-tabs-more");
o || r || document.querySelector(".is-tabs-more") && (document.querySelector(".is-tabs-more").style.display = "none")
}
})), document.addEventListener("click", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
if (n) {
var i = lu.parentsHasAttribute(t, "data-menu"),
o = lu.parentsHasClass(t, "is-tabs-more");
i || o || document.querySelector(".is-tabs-more") && (document.querySelector(".is-tabs-more").style.display = "none")
}
}))
};
function cu(e, t) {
return e(t = {
exports: {}
}, t.exports), t.exports
}! function (e) {
e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") && e.default
}(cu((function (e) {
var t, i, n;
t = 1, i = 1,
function (e) {
var t = {};
function i(n) {
if (t[n]) return t[n].exports;
var o = t[n] = {
i: n,
l: !1,
exports: {}
};
return e[n].call(o.exports, o, o.exports, i), o.l = !0, o.exports
}
i.m = e, i.c = t, i.d = function (e, t, n) {
i.o(e, t) || Object.defineProperty(e, t, {
configurable: !1,
enumerable: !0,
get: n
})
}, i.n = function (e) {
var t = e && e.__esModule ? function () {
return e.default
} : function () {
return e
};
return i.d(t, "a", t), t
}, i.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}, i.p = "", i(i.s = 129)
}([function (e, t, i) {
var o = i(2),
r = i(13),
a = i(14),
l = i(15),
s = i(19),
c = function (e, t, i) {
var d, u, p, v, h = e & c.F,
f = e & c.G,
g = e & c.S,
m = e & c.P,
y = e & c.B,
b = f ? o : g ? o[t] || (o[t] = {}) : (o[t] || {}).prototype,
x = f ? r : r[t] || (r[t] = {}),
w = x.prototype || (x.prototype = {});
for (d in f && (i = t), i) p = ((u = !h && b && b[d] !== n) ? b : i)[d], v = y && u ? s(p, o) : m && "function" == typeof p ? s(Function.call, p) : p, b && l(b, d, p, e & c.U), x[d] != p && a(x, d, v), m && w[d] != p && (w[d] = p)
};
o.core = r, c.F = 1, c.G = 2, c.S = 4, c.P = 8, c.B = 16, c.W = 32, c.U = 64, c.R = 128, e.exports = c
}, function (e, t, i) {
var n = i(3);
e.exports = function (e) {
if (!n(e)) throw TypeError(e + " is not an object!");
return e
}
}, function (e, t) {
var n = e.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")();
"number" == typeof i && (i = n)
}, function (e, t) {
e.exports = function (e) {
return "object" == typeof e ? null !== e : "function" == typeof e
}
}, function (e, t) {
e.exports = function (e) {
try {
return !!e()
} catch (e) {
return !0
}
}
}, function (e, t, i) {
var n = i(50)("wks"),
o = i(36),
r = i(2).Symbol,
a = "function" == typeof r;
(e.exports = function (e) {
return n[e] || (n[e] = a && r[e] || (a ? r : o)("Symbol." + e))
}).store = n
}, function (e, t, i) {
var n = i(1),
o = i(95),
r = i(22),
a = Object.defineProperty;
t.f = i(7) ? Object.defineProperty : function (e, t, i) {
if (n(e), t = r(t, !0), n(i), o) try {
return a(e, t, i)
} catch (e) {}
if ("get" in i || "set" in i) throw TypeError("Accessors not supported!");
return "value" in i && (e[t] = i.value), e
}
}, function (e, t, i) {
e.exports = !i(4)((function () {
return 7 != Object.defineProperty({}, "a", {
get: function () {
return 7
}
}).a
}))
}, function (e, t, i) {
var n = i(24),
o = Math.min;
e.exports = function (e) {
return e > 0 ? o(n(e), 9007199254740991) : 0
}
}, function (e, t, i) {
var n = i(23);
e.exports = function (e) {
return Object(n(e))
}
}, function (e, t) {
e.exports = function (e) {
if ("function" != typeof e) throw TypeError(e + " is not a function!");
return e
}
}, function (e, t, i) {
var n = i(47),
o = i(23);
e.exports = function (e) {
return n(o(e))
}
}, function (e, t) {
var i = {}.hasOwnProperty;
e.exports = function (e, t) {
return i.call(e, t)
}
}, function (e, i) {
var n = e.exports = {
version: "2.5.7"
};
"number" == typeof t && (t = n)
}, function (e, t, i) {
var n = i(6),
o = i(31);
e.exports = i(7) ? function (e, t, i) {
return n.f(e, t, o(1, i))
} : function (e, t, i) {
return e[t] = i, e
}
}, function (e, t, i) {
var n = i(2),
o = i(14),
r = i(12),
a = i(36)("src"),
l = Function.toString,
s = ("" + l).split("toString");
i(13).inspectSource = function (e) {
return l.call(e)
}, (e.exports = function (e, t, i, l) {
var c = "function" == typeof i;
c && (r(i, "name") || o(i, "name", t)), e[t] !== i && (c && (r(i, a) || o(i, a, e[t] ? "" + e[t] : s.join(String(t)))), e === n ? e[t] = i : l ? e[t] ? e[t] = i : o(e, t, i) : (delete e[t], o(e, t, i)))
})(Function.prototype, "toString", (function () {
return "function" == typeof this && this[a] || l.call(this)
}))
}, function (e, t, i) {
var n = i(48),
o = i(31),
r = i(11),
a = i(22),
l = i(12),
s = i(95),
c = Object.getOwnPropertyDescriptor;
t.f = i(7) ? c : function (e, t) {
if (e = r(e), t = a(t, !0), s) try {
return c(e, t)
} catch (e) {}
if (l(e, t)) return o(!n.f.call(e, t), e[t])
}
}, function (e, t, i) {
var n = i(12),
o = i(9),
r = i(69)("IE_PROTO"),
a = Object.prototype;
e.exports = Object.getPrototypeOf || function (e) {
return e = o(e), n(e, r) ? e[r] : "function" == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? a : null
}
}, function (e, t, i) {
var n = i(0),
o = i(4),
r = i(23),
a = /"/g,
l = function (e, t, i, n) {
var o = String(r(e)),
l = "<" + t;
return "" !== i && (l += " " + i + '="' + String(n).replace(a, "&quot;") + '"'), l + ">" + o + "</" + t + ">"
};
e.exports = function (e, t) {
var i = {};
i[e] = t(l), n(n.P + n.F * o((function () {
var t = "" [e]('"');
return t !== t.toLowerCase() || t.split('"').length > 3
})), "String", i)
}
}, function (e, t, i) {
var o = i(10);
e.exports = function (e, t, i) {
if (o(e), t === n) return e;
switch (i) {
case 1:
return function (i) {
return e.call(t, i)
};
case 2:
return function (i, n) {
return e.call(t, i, n)
};
case 3:
return function (i, n, o) {
return e.call(t, i, n, o)
}
}
return function () {
return e.apply(t, arguments)
}
}
}, function (e, t) {
var i = {}.toString;
e.exports = function (e) {
return i.call(e).slice(8, -1)
}
}, function (e, t, i) {
var n = i(4);
e.exports = function (e, t) {
return !!e && n((function () {
t ? e.call(null, (function () {}), 1) : e.call(null)
}))
}
}, function (e, t, i) {
var n = i(3);
e.exports = function (e, t) {
if (!n(e)) return e;
var i, o;
if (t && "function" == typeof (i = e.toString) && !n(o = i.call(e))) return o;
if ("function" == typeof (i = e.valueOf) && !n(o = i.call(e))) return o;
if (!t && "function" == typeof (i = e.toString) && !n(o = i.call(e))) return o;
throw TypeError("Can't convert object to primitive value")
}
}, function (e, t) {
e.exports = function (e) {
if (e == n) throw TypeError("Can't call method on " + e);
return e
}
}, function (e, t) {
var i = Math.ceil,
n = Math.floor;
e.exports = function (e) {
return isNaN(e = +e) ? 0 : (e > 0 ? n : i)(e)
}
}, function (e, t, i) {
var n = i(0),
o = i(13),
r = i(4);
e.exports = function (e, t) {
var i = (o.Object || {})[e] || Object[e],
a = {};
a[e] = t(i), n(n.S + n.F * r((function () {
i(1)
})), "Object", a)
}
}, function (e, t, i) {
var o = i(19),
r = i(47),
a = i(9),
l = i(8),
s = i(85);
e.exports = function (e, t) {
var i = 1 == e,
c = 2 == e,
d = 3 == e,
u = 4 == e,
p = 6 == e,
v = 5 == e || p,
h = t || s;
return function (t, s, f) {
for (var g, m, y = a(t), b = r(y), x = o(s, f, 3), w = l(b.length), S = 0, C = i ? h(t, w) : c ? h(t, 0) : n; w > S; S++)
if ((v || S in b) && (m = x(g = b[S], S, y), e))
if (i) C[S] = m;
else if (m) switch (e) {
case 3:
return !0;
case 5:
return g;
case 6:
return S;
case 2:
C.push(g)
} else if (u) return !1;
return p ? -1 : d || u ? u : C
}
}
}, function (e, t, i) {
var n = i(97),
o = i(70);
e.exports = Object.keys || function (e) {
return n(e, o)
}
}, function (e, t, i) {
var o = i(1),
r = i(98),
a = i(70),
l = i(69)("IE_PROTO"),
s = function () {},
c = function () {
var e, t = i(67)("iframe"),
n = a.length;
for (t.style.display = "none", i(71).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(), e.write("<script>document.F=Object<\/script>"), e.close(), c = e.F; n--;) delete c.prototype[a[n]];
return c()
};
e.exports = Object.create || function (e, t) {
var i;
return null !== e ? (s.prototype = o(e), i = new s, s.prototype = null, i[l] = e) : i = c(), t === n ? i : r(i, t)
}
}, function (e, t, i) {
if (i(7)) {
var o = i(33),
r = i(2),
a = i(4),
l = i(0),
s = i(63),
c = i(93),
d = i(19),
u = i(42),
p = i(31),
v = i(14),
h = i(43),
f = i(24),
g = i(8),
m = i(118),
y = i(37),
b = i(22),
x = i(12),
w = i(39),
S = i(3),
C = i(9),
E = i(83),
k = i(28),
L = i(17),
A = i(38).f,
q = i(49),
M = i(36),
_ = i(5),
T = i(26),
O = i(51),
N = i(60),
R = i(87),
B = i(40),
I = i(57),
H = i(41),
D = i(86),
F = i(109),
P = i(6),
U = i(16),
z = P.f,
W = U.f,
j = r.RangeError,
Y = r.TypeError,
X = r.Uint8Array,
G = Array.prototype,
V = c.ArrayBuffer,
Z = c.DataView,
K = T(0),
J = T(2),
$ = T(3),
Q = T(4),
ee = T(5),
te = T(6),
ie = O(!0),
ne = O(!1),
oe = R.values,
re = R.keys,
ae = R.entries,
le = G.lastIndexOf,
se = G.reduce,
ce = G.reduceRight,
de = G.join,
ue = G.sort,
pe = G.slice,
ve = G.toString,
he = G.toLocaleString,
fe = _("iterator"),
ge = _("toStringTag"),
me = M("typed_constructor"),
ye = M("def_constructor"),
be = s.CONSTR,
xe = s.TYPED,
we = s.VIEW,
Se = T(1, (function (e, t) {
return Ae(N(e, e[ye]), t)
})),
Ce = a((function () {
return 1 === new X(new Uint16Array([1]).buffer)[0]
})),
Ee = !!X && !!X.prototype.set && a((function () {
new X(1).set({})
})),
ke = function (e, t) {
var i = f(e);
if (i < 0 || i % t) throw j("Wrong offset!");
return i
},
Le = function (e) {
if (S(e) && xe in e) return e;
throw Y(e + " is not a typed array!")
},
Ae = function (e, t) {
if (!(S(e) && me in e)) throw Y("It is not a typed array constructor!");
return new e(t)
},
qe = function (e, t) {
return Me(N(e, e[ye]), t)
},
Me = function (e, t) {
for (var i = 0, n = t.length, o = Ae(e, n); n > i;) o[i] = t[i++];
return o
},
_e = function (e, t, i) {
z(e, t, {
get: function () {
return this._d[i]
}
})
},
Te = function (e) {
var t, i, o, r, a, l, s = C(e),
c = arguments.length,
u = c > 1 ? arguments[1] : n,
p = u !== n,
v = q(s);
if (v != n && !E(v)) {
for (l = v.call(s), o = [], t = 0; !(a = l.next()).done; t++) o.push(a.value);
s = o
}
for (p && c > 2 && (u = d(u, arguments[2], 2)), t = 0, i = g(s.length), r = Ae(this, i); i > t; t++) r[t] = p ? u(s[t], t) : s[t];
return r
},
Oe = function () {
for (var e = 0, t = arguments.length, i = Ae(this, t); t > e;) i[e] = arguments[e++];
return i
},
Ne = !!X && a((function () {
he.call(new X(1))
})),
Re = function () {
return he.apply(Ne ? pe.call(Le(this)) : Le(this), arguments)
},
Be = {
copyWithin: function (e, t) {
return F.call(Le(this), e, t, arguments.length > 2 ? arguments[2] : n)
},
every: function (e) {
return Q(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
fill: function (e) {
return D.apply(Le(this), arguments)
},
filter: function (e) {
return qe(this, J(Le(this), e, arguments.length > 1 ? arguments[1] : n))
},
find: function (e) {
return ee(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
findIndex: function (e) {
return te(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
forEach: function (e) {
K(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
indexOf: function (e) {
return ne(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
includes: function (e) {
return ie(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
join: function (e) {
return de.apply(Le(this), arguments)
},
lastIndexOf: function (e) {
return le.apply(Le(this), arguments)
},
map: function (e) {
return Se(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
reduce: function (e) {
return se.apply(Le(this), arguments)
},
reduceRight: function (e) {
return ce.apply(Le(this), arguments)
},
reverse: function () {
for (var e, t = Le(this).length, i = Math.floor(t / 2), n = 0; n < i;) e = this[n], this[n++] = this[--t], this[t] = e;
return this
},
some: function (e) {
return $(Le(this), e, arguments.length > 1 ? arguments[1] : n)
},
sort: function (e) {
return ue.call(Le(this), e)
},
subarray: function (e, t) {
var i = Le(this),
o = i.length,
r = y(e, o);
return new(N(i, i[ye]))(i.buffer, i.byteOffset + r * i.BYTES_PER_ELEMENT, g((t === n ? o : y(t, o)) - r))
}
},
Ie = function (e, t) {
return qe(this, pe.call(Le(this), e, t))
},
He = function (e) {
Le(this);
var t = ke(arguments[1], 1),
i = this.length,
n = C(e),
o = g(n.length),
r = 0;
if (o + t > i) throw j("Wrong length!");
for (; r < o;) this[t + r] = n[r++]
},
De = {
entries: function () {
return ae.call(Le(this))
},
keys: function () {
return re.call(Le(this))
},
values: function () {
return oe.call(Le(this))
}
},
Fe = function (e, t) {
return S(e) && e[xe] && "symbol" != typeof t && t in e && String(+t) == String(t)
},
Pe = function (e, t) {
return Fe(e, t = b(t, !0)) ? p(2, e[t]) : W(e, t)
},
Ue = function (e, t, i) {
return !(Fe(e, t = b(t, !0)) && S(i) && x(i, "value")) || x(i, "get") || x(i, "set") || i.configurable || x(i, "writable") && !i.writable || x(i, "enumerable") && !i.enumerable ? z(e, t, i) : (e[t] = i.value, e)
};
be || (U.f = Pe, P.f = Ue), l(l.S + l.F * !be, "Object", {
getOwnPropertyDescriptor: Pe,
defineProperty: Ue
}), a((function () {
ve.call({})
})) && (ve = he = function () {
return de.call(this)
});
var ze = h({}, Be);
h(ze, De), v(ze, fe, De.values), h(ze, {
slice: Ie,
set: He,
constructor: function () {},
toString: ve,
toLocaleString: Re
}), _e(ze, "buffer", "b"), _e(ze, "byteOffset", "o"), _e(ze, "byteLength", "l"), _e(ze, "length", "e"), z(ze, ge, {
get: function () {
return this[xe]
}
}), e.exports = function (e, t, i, c) {
var d = e + ((c = !!c) ? "Clamped" : "") + "Array",
p = "get" + e,
h = "set" + e,
f = r[d],
y = f || {},
b = f && L(f),
x = !f || !s.ABV,
C = {},
E = f && f.prototype,
q = function (e, i) {
z(e, i, {
get: function () {
return function (e, i) {
var n = e._d;
return n.v[p](i * t + n.o, Ce)
}(this, i)
},
set: function (e) {
return function (e, i, n) {
var o = e._d;
c && (n = (n = Math.round(n)) < 0 ? 0 : n > 255 ? 255 : 255 & n), o.v[h](i * t + o.o, n, Ce)
}(this, i, e)
},
enumerable: !0
})
};
x ? (f = i((function (e, i, o, r) {
u(e, f, d, "_d");
var a, l, s, c, p = 0,
h = 0;
if (S(i)) {
if (!(i instanceof V || "ArrayBuffer" == (c = w(i)) || "SharedArrayBuffer" == c)) return xe in i ? Me(f, i) : Te.call(f, i);
a = i, h = ke(o, t);
var y = i.byteLength;
if (r === n) {
if (y % t) throw j("Wrong length!");
if ((l = y - h) < 0) throw j("Wrong length!")
} else if ((l = g(r) * t) + h > y) throw j("Wrong length!");
s = l / t
} else s = m(i), a = new V(l = s * t);
for (v(e, "_d", {
b: a,
o: h,
l: l,
e: s,
v: new Z(a)
}); p < s;) q(e, p++)
})), E = f.prototype = k(ze), v(E, "constructor", f)) : a((function () {
f(1)
})) && a((function () {
new f(-1)
})) && I((function (e) {
new f, new f(null), new f(1.5), new f(e)
}), !0) || (f = i((function (e, i, o, r) {
var a;
return u(e, f, d), S(i) ? i instanceof V || "ArrayBuffer" == (a = w(i)) || "SharedArrayBuffer" == a ? r !== n ? new y(i, ke(o, t), r) : o !== n ? new y(i, ke(o, t)) : new y(i) : xe in i ? Me(f, i) : Te.call(f, i) : new y(m(i))
})), K(b !== Function.prototype ? A(y).concat(A(b)) : A(y), (function (e) {
e in f || v(f, e, y[e])
})), f.prototype = E, o || (E.constructor = f));
var M = E[fe],
_ = !!M && ("values" == M.name || M.name == n),
T = De.values;
v(f, me, !0), v(E, xe, d), v(E, we, !0), v(E, ye, f), (c ? new f(1)[ge] == d : ge in E) || z(E, ge, {
get: function () {
return d
}
}), C[d] = f, l(l.G + l.W + l.F * (f != y), C), l(l.S, d, {
BYTES_PER_ELEMENT: t
}), l(l.S + l.F * a((function () {
y.of.call(f, 1)
})), d, {
from: Te,
of: Oe
}), "BYTES_PER_ELEMENT" in E || v(E, "BYTES_PER_ELEMENT", t), l(l.P, d, Be), H(d), l(l.P + l.F * Ee, d, {
set: He
}), l(l.P + l.F * !_, d, De), o || E.toString == ve || (E.toString = ve), l(l.P + l.F * a((function () {
new f(1).slice()
})), d, {
slice: Ie
}), l(l.P + l.F * (a((function () {
return [1, 2].toLocaleString() != new f([1, 2]).toLocaleString()
})) || !a((function () {
E.toLocaleString.call([1, 2])
}))), d, {
toLocaleString: Re
}), B[d] = _ ? M : T, o || _ || v(E, fe, T)
}
} else e.exports = function () {}
}, function (e, t, i) {
var o = i(113),
r = i(0),
a = i(50)("metadata"),
l = a.store || (a.store = new(i(116))),
s = function (e, t, i) {
var r = l.get(e);
if (!r) {
if (!i) return n;
l.set(e, r = new o)
}
var a = r.get(t);
if (!a) {
if (!i) return n;
r.set(t, a = new o)
}
return a
};
e.exports = {
store: l,
map: s,
has: function (e, t, i) {
var o = s(t, i, !1);
return o !== n && o.has(e)
},
get: function (e, t, i) {
var o = s(t, i, !1);
return o === n ? n : o.get(e)
},
set: function (e, t, i, n) {
s(i, n, !0).set(e, t)
},
keys: function (e, t) {
var i = s(e, t, !1),
n = [];
return i && i.forEach((function (e, t) {
n.push(t)
})), n
},
key: function (e) {
return e === n || "symbol" == typeof e ? e : String(e)
},
exp: function (e) {
r(r.S, "Reflect", e)
}
}
}, function (e, t) {
e.exports = function (e, t) {
return {
enumerable: !(1 & e),
configurable: !(2 & e),
writable: !(4 & e),
value: t
}
}
}, function (e, t, i) {
var n = i(36)("meta"),
o = i(3),
r = i(12),
a = i(6).f,
l = 0,
s = Object.isExtensible || function () {
return !0
},
c = !i(4)((function () {
return s(Object.preventExtensions({}))
})),
d = function (e) {
a(e, n, {
value: {
i: "O" + ++l,
w: {}
}
})
},
u = e.exports = {
KEY: n,
NEED: !1,
fastKey: function (e, t) {
if (!o(e)) return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e;
if (!r(e, n)) {
if (!s(e)) return "F";
if (!t) return "E";
d(e)
}
return e[n].i
},
getWeak: function (e, t) {
if (!r(e, n)) {
if (!s(e)) return !0;
if (!t) return !1;
d(e)
}
return e[n].w
},
onFreeze: function (e) {
return c && u.NEED && s(e) && !r(e, n) && d(e), e
}
}
}, function (e, t) {
e.exports = !1
}, function (e, t, i) {
var o = i(5)("unscopables"),
r = Array.prototype;
r[o] == n && i(14)(r, o, {}), e.exports = function (e) {
r[o][e] = !0
}
}, function (e, t, i) {
var n = i(19),
o = i(107),
r = i(83),
a = i(1),
l = i(8),
s = i(49),
c = {},
d = {};
(t = e.exports = function (e, t, i, u, p) {
var v, h, f, g, m = p ? function () {
return e
} : s(e),
y = n(i, u, t ? 2 : 1),
b = 0;
if ("function" != typeof m) throw TypeError(e + " is not iterable!");
if (r(m)) {
for (v = l(e.length); v > b; b++)
if ((g = t ? y(a(h = e[b])[0], h[1]) : y(e[b])) === c || g === d) return g
} else
for (f = m.call(e); !(h = f.next()).done;)
if ((g = o(f, y, h.value, t)) === c || g === d) return g
}).BREAK = c, t.RETURN = d
}, function (e, t) {
var i = 0,
o = Math.random();
e.exports = function (e) {
return "Symbol(".concat(e === n ? "" : e, ")_", (++i + o).toString(36))
}
}, function (e, t, i) {
var n = i(24),
o = Math.max,
r = Math.min;
e.exports = function (e, t) {
return (e = n(e)) < 0 ? o(e + t, 0) : r(e, t)
}
}, function (e, t, i) {
var n = i(97),
o = i(70).concat("length", "prototype");
t.f = Object.getOwnPropertyNames || function (e) {
return n(e, o)
}
}, function (e, t, i) {
var o = i(20),
r = i(5)("toStringTag"),
a = "Arguments" == o(function () {
return arguments
}());
e.exports = function (e) {
var t, i, l;
return e === n ? "Undefined" : null === e ? "Null" : "string" == typeof (i = function (e, t) {
try {
return e[t]
} catch (e) {}
}(t = Object(e), r)) ? i : a ? o(t) : "Object" == (l = o(t)) && "function" == typeof t.callee ? "Arguments" : l
}
}, function (e, t) {
e.exports = {}
}, function (e, t, i) {
var n = i(2),
o = i(6),
r = i(7),
a = i(5)("species");
e.exports = function (e) {
var t = n[e];
r && t && !t[a] && o.f(t, a, {
configurable: !0,
get: function () {
return this
}
})
}
}, function (e, t) {
e.exports = function (e, t, i, o) {
if (!(e instanceof t) || o !== n && o in e) throw TypeError(i + ": incorrect invocation!");
return e
}
}, function (e, t, i) {
var n = i(15);
e.exports = function (e, t, i) {
for (var o in t) n(e, o, t[o], i);
return e
}
}, function (e, t, i) {
var n = i(6).f,
o = i(12),
r = i(5)("toStringTag");
e.exports = function (e, t, i) {
e && !o(e = i ? e : e.prototype, r) && n(e, r, {
configurable: !0,
value: t
})
}
}, function (e, t, i) {
var n = i(0),
o = i(23),
r = i(4),
a = i(76),
l = "[" + a + "]",
s = RegExp("^" + l + l + "*"),
c = RegExp(l + l + "*$"),
d = function (e, t, i) {
var o = {},
l = r((function () {
return !!a[e]() || "…" != "…"[e]()
})),
s = o[e] = l ? t(u) : a[e];
i && (o[i] = s), n(n.P + n.F * l, "String", o)
},
u = d.trim = function (e, t) {
return e = String(o(e)), 1 & t && (e = e.replace(s, "")), 2 & t && (e = e.replace(c, "")), e
};
e.exports = d
}, function (e, t, i) {
var n = i(3);
e.exports = function (e, t) {
if (!n(e) || e._t !== t) throw TypeError("Incompatible receiver, " + t + " required!");
return e
}
}, function (e, t, i) {
var n = i(20);
e.exports = Object("z").propertyIsEnumerable(0) ? Object : function (e) {
return "String" == n(e) ? e.split("") : Object(e)
}
}, function (e, t) {
t.f = {}.propertyIsEnumerable
}, function (e, t, i) {
var o = i(39),
r = i(5)("iterator"),
a = i(40);
e.exports = i(13).getIteratorMethod = function (e) {
if (e != n) return e[r] || e["@@iterator"] || a[o(e)]
}
}, function (e, t, i) {
var o = i(13),
r = i(2),
a = r["__core-js_shared__"] || (r["__core-js_shared__"] = {});
(e.exports = function (e, t) {
return a[e] || (a[e] = t !== n ? t : {})
})("versions", []).push({
version: o.version,
mode: i(33) ? "pure" : "global",
copyright: "© 2018 Denis Pushkarev (zloirock.ru)"
})
}, function (e, t, i) {
var n = i(11),
o = i(8),
r = i(37);
e.exports = function (e) {
return function (t, i, a) {
var l, s = n(t),
c = o(s.length),
d = r(a, c);
if (e && i != i) {
for (; c > d;)
if ((l = s[d++]) != l) return !0
} else
for (; c > d; d++)
if ((e || d in s) && s[d] === i) return e || d || 0;
return !e && -1
}
}
}, function (e, t) {
t.f = Object.getOwnPropertySymbols
}, function (e, t, i) {
var n = i(20);
e.exports = Array.isArray || function (e) {
return "Array" == n(e)
}
}, function (e, t, i) {
var o = i(3),
r = i(20),
a = i(5)("match");
e.exports = function (e) {
var t;
return o(e) && ((t = e[a]) !== n ? !!t : "RegExp" == r(e))
}
}, function (e, t, i) {
var o = i(33),
r = i(0),
a = i(15),
l = i(14),
s = i(40),
c = i(56),
d = i(44),
u = i(17),
p = i(5)("iterator"),
v = !([].keys && "next" in [].keys()),
h = function () {
return this
};
e.exports = function (e, t, i, f, g, m, y) {
c(i, t, f);
var b, x, w, S = function (e) {
if (!v && e in L) return L[e];
switch (e) {
case "keys":
case "values":
return function () {
return new i(this, e)
}
}
return function () {
return new i(this, e)
}
},
C = t + " Iterator",
E = "values" == g,
k = !1,
L = e.prototype,
A = L[p] || L["@@iterator"] || g && L[g],
q = A || S(g),
M = g ? E ? S("entries") : q : n,
_ = "Array" == t && L.entries || A;
if (_ && (w = u(_.call(new e))) !== Object.prototype && w.next && (d(w, C, !0), o || "function" == typeof w[p] || l(w, p, h)), E && A && "values" !== A.name && (k = !0, q = function () {
return A.call(this)
}), o && !y || !v && !k && L[p] || l(L, p, q), s[t] = q, s[C] = h, g)
if (b = {
values: E ? q : S("values"),
keys: m ? q : S("keys"),
entries: M
}, y)
for (x in b) x in L || a(L, x, b[x]);
else r(r.P + r.F * (v || k), t, b);
return b
}
}, function (e, t, i) {
var n = i(28),
o = i(31),
r = i(44),
a = {};
i(14)(a, i(5)("iterator"), (function () {
return this
})), e.exports = function (e, t, i) {
e.prototype = n(a, {
next: o(1, i)
}), r(e, t + " Iterator")
}
}, function (e, t, i) {
var n = i(5)("iterator"),
o = !1;
try {
var r = [7][n]();
r.return = function () {
o = !0
}, Array.from(r, (function () {
throw 2
}))
} catch (e) {}
e.exports = function (e, t) {
if (!t && !o) return !1;
var i = !1;
try {
var r = [7],
a = r[n]();
a.next = function () {
return {
done: i = !0
}
}, r[n] = function () {
return a
}, e(r)
} catch (e) {}
return i
}
}, function (e, t, i) {
var n = i(1);
e.exports = function () {
var e = n(this),
t = "";
return e.global && (t += "g"), e.ignoreCase && (t += "i"), e.multiline && (t += "m"), e.unicode && (t += "u"), e.sticky && (t += "y"), t
}
}, function (e, t, i) {
var n = i(14),
o = i(15),
r = i(4),
a = i(23),
l = i(5);
e.exports = function (e, t, i) {
var s = l(e),
c = i(a, s, "" [e]),
d = c[0],
u = c[1];
r((function () {
var t = {};
return t[s] = function () {
return 7
}, 7 != "" [e](t)
})) && (o(String.prototype, e, d), n(RegExp.prototype, s, 2 == t ? function (e, t) {
return u.call(e, this, t)
} : function (e) {
return u.call(e, this)
}))
}
}, function (e, t, i) {
var o = i(1),
r = i(10),
a = i(5)("species");
e.exports = function (e, t) {
var i, l = o(e).constructor;
return l === n || (i = o(l)[a]) == n ? t : r(i)
}
}, function (e, t, i) {
var n = i(2).navigator;
e.exports = n && n.userAgent || ""
}, function (e, t, i) {
var o = i(2),
r = i(0),
a = i(15),
l = i(43),
s = i(32),
c = i(35),
d = i(42),
u = i(3),
p = i(4),
v = i(57),
h = i(44),
f = i(75);
e.exports = function (e, t, i, g, m, y) {
var b = o[e],
x = b,
w = m ? "set" : "add",
S = x && x.prototype,
C = {},
E = function (e) {
var t = S[e];
a(S, e, "delete" == e ? function (e) {
return !(y && !u(e)) && t.call(this, 0 === e ? 0 : e)
} : "has" == e ? function (e) {
return !(y && !u(e)) && t.call(this, 0 === e ? 0 : e)
} : "get" == e ? function (e) {
return y && !u(e) ? n : t.call(this, 0 === e ? 0 : e)
} : "add" == e ? function (e) {
return t.call(this, 0 === e ? 0 : e), this
} : function (e, i) {
return t.call(this, 0 === e ? 0 : e, i), this
})
};
if ("function" == typeof x && (y || S.forEach && !p((function () {
(new x).entries().next()
})))) {
var k = new x,
L = k[w](y ? {} : -0, 1) != k,
A = p((function () {
k.has(1)
})),
q = v((function (e) {
new x(e)
})),
M = !y && p((function () {
for (var e = new x, t = 5; t--;) e[w](t, t);
return !e.has(-0)
}));
q || ((x = t((function (t, i) {
d(t, x, e);
var o = f(new b, t, x);
return i != n && c(i, m, o[w], o), o
}))).prototype = S, S.constructor = x), (A || M) && (E("delete"), E("has"), m && E("get")), (M || L) && E(w), y && S.clear && delete S.clear
} else x = g.getConstructor(t, e, m, w), l(x.prototype, i), s.NEED = !0;
return h(x, e), C[e] = x, r(r.G + r.W + r.F * (x != b), C), y || g.setStrong(x, e, m), x
}
}, function (e, t, i) {
for (var n, o = i(2), r = i(14), a = i(36), l = a("typed_array"), s = a("view"), c = !(!o.ArrayBuffer || !o.DataView), d = c, u = 0, p = "Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(","); u < 9;)(n = o[p[u++]]) ? (r(n.prototype, l, !0), r(n.prototype, s, !0)) : d = !1;
e.exports = {
ABV: c,
CONSTR: d,
TYPED: l,
VIEW: s
}
}, function (e, t, i) {
e.exports = i(33) || !i(4)((function () {
var e = Math.random();
__defineSetter__.call(null, e, (function () {})), delete i(2)[e]
}))
}, function (e, t, i) {
var n = i(0);
e.exports = function (e) {
n(n.S, e, {
of: function () {
for (var e = arguments.length, t = new Array(e); e--;) t[e] = arguments[e];
return new this(t)
}
})
}
}, function (e, t, i) {
var o = i(0),
r = i(10),
a = i(19),
l = i(35);
e.exports = function (e) {
o(o.S, e, {
from: function (e) {
var t, i, o, s, c = arguments[1];
return r(this), (t = c !== n) && r(c), e == n ? new this : (i = [], t ? (o = 0, s = a(c, arguments[2], 2), l(e, !1, (function (e) {
i.push(s(e, o++))
}))) : l(e, !1, i.push, i), new this(i))
}
})
}
}, function (e, t, i) {
var n = i(3),
o = i(2).document,
r = n(o) && n(o.createElement);
e.exports = function (e) {
return r ? o.createElement(e) : {}
}
}, function (e, t, i) {
var n = i(2),
o = i(13),
r = i(33),
a = i(96),
l = i(6).f;
e.exports = function (e) {
var t = o.Symbol || (o.Symbol = r ? {} : n.Symbol || {});
"_" == e.charAt(0) || e in t || l(t, e, {
value: a.f(e)
})
}
}, function (e, t, i) {
var n = i(50)("keys"),
o = i(36);
e.exports = function (e) {
return n[e] || (n[e] = o(e))
}
}, function (e, t) {
e.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")
}, function (e, t, i) {
var n = i(2).document;
e.exports = n && n.documentElement
}, function (e, t, i) {
var n = i(27),
o = i(52),
r = i(48),
a = i(9),
l = i(47),
s = Object.assign;
e.exports = !s || i(4)((function () {
var e = {},
t = {},
i = Symbol(),
n = "abcdefghijklmnopqrst";
return e[i] = 7, n.split("").forEach((function (e) {
t[e] = e
})), 7 != s({}, e)[i] || Object.keys(s({}, t)).join("") != n
})) ? function (e, t) {
for (var i = a(e), s = arguments.length, c = 1, d = o.f, u = r.f; s > c;)
for (var p, v = l(arguments[c++]), h = d ? n(v).concat(d(v)) : n(v), f = h.length, g = 0; f > g;) u.call(v, p = h[g++]) && (i[p] = v[p]);
return i
} : s
}, function (e, t, i) {
var o = i(3),
r = i(1),
a = function (e, t) {
if (r(e), !o(t) && null !== t) throw TypeError(t + ": can't set as prototype!")
};
e.exports = {
set: Object.setPrototypeOf || ("__proto__" in {} ? function (e, t, n) {
try {
(n = i(19)(Function.call, i(16).f(Object.prototype, "__proto__").set, 2))(e, []), t = !(e instanceof Array)
} catch (e) {
t = !0
}
return function (e, i) {
return a(e, i), t ? e.__proto__ = i : n(e, i), e
}
}({}, !1) : n),
check: a
}
}, function (e, t) {
e.exports = function (e, t, i) {
var o = i === n;
switch (t.length) {
case 0:
return o ? e() : e.call(i);
case 1:
return o ? e(t[0]) : e.call(i, t[0]);
case 2:
return o ? e(t[0], t[1]) : e.call(i, t[0], t[1]);
case 3:
return o ? e(t[0], t[1], t[2]) : e.call(i, t[0], t[1], t[2]);
case 4:
return o ? e(t[0], t[1], t[2], t[3]) : e.call(i, t[0], t[1], t[2], t[3])
}
return e.apply(i, t)
}
}, function (e, t, i) {
var n = i(3),
o = i(73).set;
e.exports = function (e, t, i) {
var r, a = t.constructor;
return a !== i && "function" == typeof a && (r = a.prototype) !== i.prototype && n(r) && o && o(e, r), e
}
}, function (e, t) {
e.exports = "\t\n\v\f\r    \u2028\u2029\ufeff"
}, function (e, t, i) {
var n = i(24),
o = i(23);
e.exports = function (e) {
var t = String(o(this)),
i = "",
r = n(e);
if (r < 0 || r == 1 / 0) throw RangeError("Count can't be negative");
for (; r > 0;
(r >>>= 1) && (t += t)) 1 & r && (i += t);
return i
}
}, function (e, t) {
e.exports = Math.sign || function (e) {
return 0 == (e = +e) || e != e ? e : e < 0 ? -1 : 1
}
}, function (e, t) {
var i = Math.expm1;
e.exports = !i || i(10) > 22025.465794806718 || i(10) < 22025.465794806718 || -2e-17 != i(-2e-17) ? function (e) {
return 0 == (e = +e) ? e : e > -1e-6 && e < 1e-6 ? e + e * e / 2 : Math.exp(e) - 1
} : i
}, function (e, t, i) {
var o = i(24),
r = i(23);
e.exports = function (e) {
return function (t, i) {
var a, l, s = String(r(t)),
c = o(i),
d = s.length;
return c < 0 || c >= d ? e ? "" : n : (a = s.charCodeAt(c)) < 55296 || a > 56319 || c + 1 === d || (l = s.charCodeAt(c + 1)) < 56320 || l > 57343 ? e ? s.charAt(c) : a : e ? s.slice(c, c + 2) : l - 56320 + (a - 55296 << 10) + 65536
}
}
}, function (e, t, i) {
var n = i(54),
o = i(23);
e.exports = function (e, t, i) {
if (n(t)) throw TypeError("String#" + i + " doesn't accept regex!");
return String(o(e))
}
}, function (e, t, i) {
var n = i(5)("match");
e.exports = function (e) {
var t = /./;
try {
"/./" [e](t)
} catch (i) {
try {
return t[n] = !1, !"/./" [e](t)
} catch (e) {}
}
return !0
}
}, function (e, t, i) {
var o = i(40),
r = i(5)("iterator"),
a = Array.prototype;
e.exports = function (e) {
return e !== n && (o.Array === e || a[r] === e)
}
}, function (e, t, i) {
var n = i(6),
o = i(31);
e.exports = function (e, t, i) {
t in e ? n.f(e, t, o(0, i)) : e[t] = i
}
}, function (e, t, i) {
var n = i(213);
e.exports = function (e, t) {
return new(n(e))(t)
}
}, function (e, t, i) {
var o = i(9),
r = i(37),
a = i(8);
e.exports = function (e) {
for (var t = o(this), i = a(t.length), l = arguments.length, s = r(l > 1 ? arguments[1] : n, i), c = l > 2 ? arguments[2] : n, d = c === n ? i : r(c, i); d > s;) t[s++] = e;
return t
}
}, function (e, t, i) {
var o = i(34),
r = i(88),
a = i(40),
l = i(11);
e.exports = i(55)(Array, "Array", (function (e, t) {
this._t = l(e), this._i = 0, this._k = t
}), (function () {
var e = this._t,
t = this._k,
i = this._i++;
return !e || i >= e.length ? (this._t = n, r(1)) : r(0, "keys" == t ? i : "values" == t ? e[i] : [i, e[i]])
}), "values"), a.Arguments = a.Array, o("keys"), o("values"), o("entries")
}, function (e, t) {
e.exports = function (e, t) {
return {
value: t,
done: !!e
}
}
}, function (e, t, i) {
var n, o, r, a = i(19),
l = i(74),
s = i(71),
c = i(67),
d = i(2),
u = d.process,
p = d.setImmediate,
v = d.clearImmediate,
h = d.MessageChannel,
f = d.Dispatch,
g = 0,
m = {},
y = function () {
var e = +this;
if (m.hasOwnProperty(e)) {
var t = m[e];
delete m[e], t()
}
},
b = function (e) {
y.call(e.data)
};
p && v || (p = function (e) {
for (var t = [], i = 1; arguments.length > i;) t.push(arguments[i++]);
return m[++g] = function () {
l("function" == typeof e ? e : Function(e), t)
}, n(g), g
}, v = function (e) {
delete m[e]
}, "process" == i(20)(u) ? n = function (e) {
u.nextTick(a(y, e, 1))
} : f && f.now ? n = function (e) {
f.now(a(y, e, 1))
} : h ? (r = (o = new h).port2, o.port1.onmessage = b, n = a(r.postMessage, r, 1)) : d.addEventListener && "function" == typeof postMessage && !d.importScripts ? (n = function (e) {
d.postMessage(e + "", "*")
}, d.addEventListener("message", b, !1)) : n = "onreadystatechange" in c("script") ? function (e) {
s.appendChild(c("script")).onreadystatechange = function () {
s.removeChild(this), y.call(e)
}
} : function (e) {
setTimeout(a(y, e, 1), 0)
}), e.exports = {
set: p,
clear: v
}
}, function (e, t, i) {
var o = i(2),
r = i(89).set,
a = o.MutationObserver || o.WebKitMutationObserver,
l = o.process,
s = o.Promise,
c = "process" == i(20)(l);
e.exports = function () {
var e, t, i, d = function () {
var o, r;
for (c && (o = l.domain) && o.exit(); e;) {
r = e.fn, e = e.next;
try {
r()
} catch (o) {
throw e ? i() : t = n, o
}
}
t = n, o && o.enter()
};
if (c) i = function () {
l.nextTick(d)
};
else if (!a || o.navigator && o.navigator.standalone)
if (s && s.resolve) {
var u = s.resolve(n);
i = function () {
u.then(d)
}
} else i = function () {
r.call(o, d)
};
else {
var p = !0,
v = document.createTextNode("");
new a(d).observe(v, {
characterData: !0
}), i = function () {
v.data = p = !p
}
}
return function (o) {
var r = {
fn: o,
next: n
};
t && (t.next = r), e || (e = r, i()), t = r
}
}
}, function (e, t, i) {
var o = i(10);
function r(e) {
var t, i;
this.promise = new e((function (e, o) {
if (t !== n || i !== n) throw TypeError("Bad Promise constructor");
t = e, i = o
})), this.resolve = o(t), this.reject = o(i)
}
e.exports.f = function (e) {
return new r(e)
}
}, function (e, t, i) {
var n = i(38),
o = i(52),
r = i(1),
a = i(2).Reflect;
e.exports = a && a.ownKeys || function (e) {
var t = n.f(r(e)),
i = o.f;
return i ? t.concat(i(e)) : t
}
}, function (e, t, i) {
var o = i(2),
r = i(7),
a = i(33),
l = i(63),
s = i(14),
c = i(43),
d = i(4),
u = i(42),
p = i(24),
v = i(8),
h = i(118),
f = i(38).f,
g = i(6).f,
m = i(86),
y = i(44),
b = "prototype",
x = "Wrong index!",
w = o.ArrayBuffer,
S = o.DataView,
C = o.Math,
E = o.RangeError,
k = o.Infinity,
L = w,
A = C.abs,
q = C.pow,
M = C.floor,
_ = C.log,
T = C.LN2,
O = r ? "_b" : "buffer",
N = r ? "_l" : "byteLength",
R = r ? "_o" : "byteOffset";
function B(e, t, i) {
var n, o, r, a = new Array(i),
l = 8 * i - t - 1,
s = (1 << l) - 1,
c = s >> 1,
d = 23 === t ? q(2, -24) - q(2, -77) : 0,
u = 0,
p = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
for ((e = A(e)) != e || e === k ? (o = e != e ? 1 : 0, n = s) : (n = M(_(e) / T), e * (r = q(2, -n)) < 1 && (n--, r *= 2), (e += n + c >= 1 ? d / r : d * q(2, 1 - c)) * r >= 2 && (n++, r /= 2), n + c >= s ? (o = 0, n = s) : n + c >= 1 ? (o = (e * r - 1) * q(2, t), n += c) : (o = e * q(2, c - 1) * q(2, t), n = 0)); t >= 8; a[u++] = 255 & o, o /= 256, t -= 8);
for (n = n << t | o, l += t; l > 0; a[u++] = 255 & n, n /= 256, l -= 8);
return a[--u] |= 128 * p, a
}
function I(e, t, i) {
var n, o = 8 * i - t - 1,
r = (1 << o) - 1,
a = r >> 1,
l = o - 7,
s = i - 1,
c = e[s--],
d = 127 & c;
for (c >>= 7; l > 0; d = 256 * d + e[s], s--, l -= 8);
for (n = d & (1 << -l) - 1, d >>= -l, l += t; l > 0; n = 256 * n + e[s], s--, l -= 8);
if (0 === d) d = 1 - a;
else {
if (d === r) return n ? NaN : c ? -k : k;
n += q(2, t), d -= a
}
return (c ? -1 : 1) * n * q(2, d - t)
}
function H(e) {
return e[3] << 24 | e[2] << 16 | e[1] << 8 | e[0]
}
function D(e) {
return [255 & e]
}
function F(e) {
return [255 & e, e >> 8 & 255]
}
function P(e) {
return [255 & e, e >> 8 & 255, e >> 16 & 255, e >> 24 & 255]
}
function U(e) {
return B(e, 52, 8)
}
function z(e) {
return B(e, 23, 4)
}
function W(e, t, i) {
g(e[b], t, {
get: function () {
return this[i]
}
})
}
function j(e, t, i, n) {
var o = h(+i);
if (o + t > e[N]) throw E(x);
var r = e[O]._b,
a = o + e[R],
l = r.slice(a, a + t);
return n ? l : l.reverse()
}
function Y(e, t, i, n, o, r) {
var a = h(+i);
if (a + t > e[N]) throw E(x);
for (var l = e[O]._b, s = a + e[R], c = n(+o), d = 0; d < t; d++) l[s + d] = c[r ? d : t - d - 1]
}
if (l.ABV) {
if (!d((function () {
w(1)
})) || !d((function () {
new w(-1)
})) || d((function () {
return new w, new w(1.5), new w(NaN), "ArrayBuffer" != w.name
}))) {
for (var X, G = (w = function (e) {
return u(this, w), new L(h(e))
})[b] = L[b], V = f(L), Z = 0; V.length > Z;)(X = V[Z++]) in w || s(w, X, L[X]);
a || (G.constructor = w)
}
var K = new S(new w(2)),
J = S[b].setInt8;
K.setInt8(0, 2147483648), K.setInt8(1, 2147483649), !K.getInt8(0) && K.getInt8(1) || c(S[b], {
setInt8: function (e, t) {
J.call(this, e, t << 24 >> 24)
},
setUint8: function (e, t) {
J.call(this, e, t << 24 >> 24)
}
}, !0)
} else w = function (e) {
u(this, w, "ArrayBuffer");
var t = h(e);
this._b = m.call(new Array(t), 0), this[N] = t
}, S = function (e, t, i) {
u(this, S, "DataView"), u(e, w, "DataView");
var o = e[N],
r = p(t);
if (r < 0 || r > o) throw E("Wrong offset!");
if (r + (i = i === n ? o - r : v(i)) > o) throw E("Wrong length!");
this[O] = e, this[R] = r, this[N] = i
}, r && (W(w, "byteLength", "_l"), W(S, "buffer", "_b"), W(S, "byteLength", "_l"), W(S, "byteOffset", "_o")), c(S[b], {
getInt8: function (e) {
return j(this, 1, e)[0] << 24 >> 24
},
getUint8: function (e) {
return j(this, 1, e)[0]
},
getInt16: function (e) {
var t = j(this, 2, e, arguments[1]);
return (t[1] << 8 | t[0]) << 16 >> 16
},
getUint16: function (e) {
var t = j(this, 2, e, arguments[1]);
return t[1] << 8 | t[0]
},
getInt32: function (e) {
return H(j(this, 4, e, arguments[1]))
},
getUint32: function (e) {
return H(j(this, 4, e, arguments[1])) >>> 0
},
getFloat32: function (e) {
return I(j(this, 4, e, arguments[1]), 23, 4)
},
getFloat64: function (e) {
return I(j(this, 8, e, arguments[1]), 52, 8)
},
setInt8: function (e, t) {
Y(this, 1, e, D, t)
},
setUint8: function (e, t) {
Y(this, 1, e, D, t)
},
setInt16: function (e, t) {
Y(this, 2, e, F, t, arguments[2])
},
setUint16: function (e, t) {
Y(this, 2, e, F, t, arguments[2])
},
setInt32: function (e, t) {
Y(this, 4, e, P, t, arguments[2])
},
setUint32: function (e, t) {
Y(this, 4, e, P, t, arguments[2])
},
setFloat32: function (e, t) {
Y(this, 4, e, z, t, arguments[2])
},
setFloat64: function (e, t) {
Y(this, 8, e, U, t, arguments[2])
}
});
y(w, "ArrayBuffer"), y(S, "DataView"), s(S[b], l.VIEW, !0), t.ArrayBuffer = w, t.DataView = S
}, function (e, t) {
e.exports = function (e, t) {
var i = t === Object(t) ? function (e) {
return t[e]
} : t;
return function (t) {
return String(t).replace(e, i)
}
}
}, function (e, t, i) {
e.exports = !i(7) && !i(4)((function () {
return 7 != Object.defineProperty(i(67)("div"), "a", {
get: function () {
return 7
}
}).a
}))
}, function (e, t, i) {
t.f = i(5)
}, function (e, t, i) {
var n = i(12),
o = i(11),
r = i(51)(!1),
a = i(69)("IE_PROTO");
e.exports = function (e, t) {
var i, l = o(e),
s = 0,
c = [];
for (i in l) i != a && n(l, i) && c.push(i);
for (; t.length > s;) n(l, i = t[s++]) && (~r(c, i) || c.push(i));
return c
}
}, function (e, t, i) {
var n = i(6),
o = i(1),
r = i(27);
e.exports = i(7) ? Object.defineProperties : function (e, t) {
o(e);
for (var i, a = r(t), l = a.length, s = 0; l > s;) n.f(e, i = a[s++], t[i]);
return e
}
}, function (e, t, i) {
var n = i(11),
o = i(38).f,
r = {}.toString,
a = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
e.exports.f = function (e) {
return a && "[object Window]" == r.call(e) ? function (e) {
try {
return o(e)
} catch (e) {
return a.slice()
}
}(e) : o(n(e))
}
}, function (e, t, i) {
var n = i(10),
o = i(3),
r = i(74),
a = [].slice,
l = {},
s = function (e, t, i) {
if (!(t in l)) {
for (var n = [], o = 0; o < t; o++) n[o] = "a[" + o + "]";
l[t] = Function("F,a", "return new F(" + n.join(",") + ")")
}
return l[t](e, i)
};
e.exports = Function.bind || function (e) {
var t = n(this),
i = a.call(arguments, 1),
l = function () {
var n = i.concat(a.call(arguments));
return this instanceof l ? s(t, n.length, n) : r(t, n, e)
};
return o(t.prototype) && (l.prototype = t.prototype), l
}
}, function (e, t, i) {
var n = i(20);
e.exports = function (e, t) {
if ("number" != typeof e && "Number" != n(e)) throw TypeError(t);
return +e
}
}, function (e, t, i) {
var n = i(3),
o = Math.floor;
e.exports = function (e) {
return !n(e) && isFinite(e) && o(e) === e
}
}, function (e, t, i) {
var n = i(2).parseFloat,
o = i(45).trim;
e.exports = 1 / n(i(76) + "-0") != -1 / 0 ? function (e) {
var t = o(String(e), 3),
i = n(t);
return 0 === i && "-" == t.charAt(0) ? -0 : i
} : n
}, function (e, t, i) {
var n = i(2).parseInt,
o = i(45).trim,
r = i(76),
a = /^[-+]?0[xX]/;
e.exports = 8 !== n(r + "08") || 22 !== n(r + "0x16") ? function (e, t) {
var i = o(String(e), 3);
return n(i, t >>> 0 || (a.test(i) ? 16 : 10))
} : n
}, function (e, t) {
e.exports = Math.log1p || function (e) {
return (e = +e) > -1e-8 && e < 1e-8 ? e - e * e / 2 : Math.log(1 + e)
}
}, function (e, t, i) {
var n = i(78),
o = Math.pow,
r = o(2, -52),
a = o(2, -23),
l = o(2, 127) * (2 - a),
s = o(2, -126);
e.exports = Math.fround || function (e) {
var t, i, o = Math.abs(e),
c = n(e);
return o < s ? c * function (e) {
return e + 1 / r - 1 / r
}(o / s / a) * s * a : (i = (t = (1 + a / r) * o) - (t - o)) > l || i != i ? c * (1 / 0) : c * i
}
}, function (e, t, i) {
var o = i(1);
e.exports = function (e, t, i, r) {
try {
return r ? t(o(i)[0], i[1]) : t(i)
} catch (t) {
var a = e.return;
throw a !== n && o(a.call(e)), t
}
}
}, function (e, t, i) {
var n = i(10),
o = i(9),
r = i(47),
a = i(8);
e.exports = function (e, t, i, l, s) {
n(t);
var c = o(e),
d = r(c),
u = a(c.length),
p = s ? u - 1 : 0,
v = s ? -1 : 1;
if (i < 2)
for (;;) {
if (p in d) {
l = d[p], p += v;
break
}
if (p += v, s ? p < 0 : u <= p) throw TypeError("Reduce of empty array with no initial value")
}
for (; s ? p >= 0 : u > p; p += v) p in d && (l = t(l, d[p], p, c));
return l
}
}, function (e, t, i) {
var o = i(9),
r = i(37),
a = i(8);
e.exports = [].copyWithin || function (e, t) {
var i = o(this),
l = a(i.length),
s = r(e, l),
c = r(t, l),
d = arguments.length > 2 ? arguments[2] : n,
u = Math.min((d === n ? l : r(d, l)) - c, l - s),
p = 1;
for (c < s && s < c + u && (p = -1, c += u - 1, s += u - 1); u-- > 0;) c in i ? i[s] = i[c] : delete i[s], s += p, c += p;
return i
}
}, function (e, t, i) {
i(7) && "g" != /./g.flags && i(6).f(RegExp.prototype, "flags", {
configurable: !0,
get: i(58)
})
}, function (e, t) {
e.exports = function (e) {
try {
return {
e: !1,
v: e()
}
} catch (e) {
return {
e: !0,
v: e
}
}
}
}, function (e, t, i) {
var n = i(1),
o = i(3),
r = i(91);
e.exports = function (e, t) {
if (n(e), o(t) && t.constructor === e) return t;
var i = r.f(e);
return (0, i.resolve)(t), i.promise
}
}, function (e, t, i) {
var o = i(114),
r = i(46);
e.exports = i(62)("Map", (function (e) {
return function () {
return e(this, arguments.length > 0 ? arguments[0] : n)
}
}), {
get: function (e) {
var t = o.getEntry(r(this, "Map"), e);
return t && t.v
},
set: function (e, t) {
return o.def(r(this, "Map"), 0 === e ? 0 : e, t)
}
}, o, !0)
}, function (e, t, i) {
var o = i(6).f,
r = i(28),
a = i(43),
l = i(19),
s = i(42),
c = i(35),
d = i(55),
u = i(88),
p = i(41),
v = i(7),
h = i(32).fastKey,
f = i(46),
g = v ? "_s" : "size",
m = function (e, t) {
var i, n = h(t);
if ("F" !== n) return e._i[n];
for (i = e._f; i; i = i.n)
if (i.k == t) return i
};
e.exports = {
getConstructor: function (e, t, i, d) {
var u = e((function (e, o) {
s(e, u, t, "_i"), e._t = t, e._i = r(null), e._f = n, e._l = n, e[g] = 0, o != n && c(o, i, e[d], e)
}));
return a(u.prototype, {
clear: function () {
for (var e = f(this, t), i = e._i, o = e._f; o; o = o.n) o.r = !0, o.p && (o.p = o.p.n = n), delete i[o.i];
e._f = e._l = n, e[g] = 0
},
delete: function (e) {
var i = f(this, t),
n = m(i, e);
if (n) {
var o = n.n,
r = n.p;
delete i._i[n.i], n.r = !0, r && (r.n = o), o && (o.p = r), i._f == n && (i._f = o), i._l == n && (i._l = r), i[g]--
}
return !!n
},
forEach: function (e) {
f(this, t);
for (var i, o = l(e, arguments.length > 1 ? arguments[1] : n, 3); i = i ? i.n : this._f;)
for (o(i.v, i.k, this); i && i.r;) i = i.p
},
has: function (e) {
return !!m(f(this, t), e)
}
}), v && o(u.prototype, "size", {
get: function () {
return f(this, t)[g]
}
}), u
},
def: function (e, t, i) {
var o, r, a = m(e, t);
return a ? a.v = i : (e._l = a = {
i: r = h(t, !0),
k: t,
v: i,
p: o = e._l,
n: n,
r: !1
}, e._f || (e._f = a), o && (o.n = a), e[g]++, "F" !== r && (e._i[r] = a)), e
},
getEntry: m,
setStrong: function (e, t, i) {
d(e, t, (function (e, i) {
this._t = f(e, t), this._k = i, this._l = n
}), (function () {
for (var e = this._k, t = this._l; t && t.r;) t = t.p;
return this._t && (this._l = t = t ? t.n : this._t._f) ? u(0, "keys" == e ? t.k : "values" == e ? t.v : [t.k, t.v]) : (this._t = n, u(1))
}), i ? "entries" : "values", !i, !0), p(t)
}
}
}, function (e, t, i) {
var o = i(114),
r = i(46);
e.exports = i(62)("Set", (function (e) {
return function () {
return e(this, arguments.length > 0 ? arguments[0] : n)
}
}), {
add: function (e) {
return o.def(r(this, "Set"), e = 0 === e ? 0 : e, e)
}
}, o)
}, function (e, t, i) {
var o, r = i(26)(0),
a = i(15),
l = i(32),
s = i(72),
c = i(117),
d = i(3),
u = i(4),
p = i(46),
v = l.getWeak,
h = Object.isExtensible,
f = c.ufstore,
g = {},
m = function (e) {
return function () {
return e(this, arguments.length > 0 ? arguments[0] : n)
}
},
y = {
get: function (e) {
if (d(e)) {
var t = v(e);
return !0 === t ? f(p(this, "WeakMap")).get(e) : t ? t[this._i] : n
}
},
set: function (e, t) {
return c.def(p(this, "WeakMap"), e, t)
}
},
b = e.exports = i(62)("WeakMap", m, y, c, !0, !0);
u((function () {
return 7 != (new b).set((Object.freeze || Object)(g), 7).get(g)
})) && (s((o = c.getConstructor(m, "WeakMap")).prototype, y), l.NEED = !0, r(["delete", "has", "get", "set"], (function (e) {
var t = b.prototype,
i = t[e];
a(t, e, (function (t, n) {
if (d(t) && !h(t)) {
this._f || (this._f = new o);
var r = this._f[e](t, n);
return "set" == e ? this : r
}
return i.call(this, t, n)
}))
})))
}, function (e, t, i) {
var o = i(43),
r = i(32).getWeak,
a = i(1),
l = i(3),
s = i(42),
c = i(35),
d = i(26),
u = i(12),
p = i(46),
v = d(5),
h = d(6),
f = 0,
g = function (e) {
return e._l || (e._l = new m)
},
m = function () {
this.a = []
},
y = function (e, t) {
return v(e.a, (function (e) {
return e[0] === t
}))
};
m.prototype = {
get: function (e) {
var t = y(this, e);
if (t) return t[1]
},
has: function (e) {
return !!y(this, e)
},
set: function (e, t) {
var i = y(this, e);
i ? i[1] = t : this.a.push([e, t])
},
delete: function (e) {
var t = h(this.a, (function (t) {
return t[0] === e
}));
return ~t && this.a.splice(t, 1), !!~t
}
}, e.exports = {
getConstructor: function (e, t, i, a) {
var d = e((function (e, o) {
s(e, d, t, "_i"), e._t = t, e._i = f++, e._l = n, o != n && c(o, i, e[a], e)
}));
return o(d.prototype, {
delete: function (e) {
if (!l(e)) return !1;
var i = r(e);
return !0 === i ? g(p(this, t)).delete(e) : i && u(i, this._i) && delete i[this._i]
},
has: function (e) {
if (!l(e)) return !1;
var i = r(e);
return !0 === i ? g(p(this, t)).has(e) : i && u(i, this._i)
}
}), d
},
def: function (e, t, i) {
var n = r(a(t), !0);
return !0 === n ? g(e).set(t, i) : n[e._i] = i, e
},
ufstore: g
}
}, function (e, t, i) {
var o = i(24),
r = i(8);
e.exports = function (e) {
if (e === n) return 0;
var t = o(e),
i = r(t);
if (t !== i) throw RangeError("Wrong length!");
return i
}
}, function (e, t, i) {
var o = i(53),
r = i(3),
a = i(8),
l = i(19),
s = i(5)("isConcatSpreadable");
e.exports = function e(t, i, c, d, u, p, v, h) {
for (var f, g, m = u, y = 0, b = !!v && l(v, h, 3); y < d;) {
if (y in c) {
if (f = b ? b(c[y], y, i) : c[y], g = !1, r(f) && (g = (g = f[s]) !== n ? !!g : o(f)), g && p > 0) m = e(t, i, f, a(f.length), m, p - 1) - 1;
else {
if (m >= 9007199254740991) throw TypeError();
t[m] = f
}
m++
}
y++
}
return m
}
}, function (e, t, i) {
var o = i(8),
r = i(77),
a = i(23);
e.exports = function (e, t, i, l) {
var s = String(a(e)),
c = s.length,
d = i === n ? " " : String(i),
u = o(t);
if (u <= c || "" == d) return s;
var p = u - c,
v = r.call(d, Math.ceil(p / d.length));
return v.length > p && (v = v.slice(0, p)), l ? v + s : s + v
}
}, function (e, t, i) {
var n = i(27),
o = i(11),
r = i(48).f;
e.exports = function (e) {
return function (t) {
for (var i, a = o(t), l = n(a), s = l.length, c = 0, d = []; s > c;) r.call(a, i = l[c++]) && d.push(e ? [i, a[i]] : a[i]);
return d
}
}
}, function (e, t, i) {
var n = i(39),
o = i(123);
e.exports = function (e) {
return function () {
if (n(this) != e) throw TypeError(e + "#toJSON isn't generic");
return o(this)
}
}
}, function (e, t, i) {
var n = i(35);
e.exports = function (e, t) {
var i = [];
return n(e, !1, i.push, i, t), i
}
}, function (e, t) {
e.exports = Math.scale || function (e, t, i, n, o) {
return 0 === arguments.length || e != e || t != t || i != i || n != n || o != o ? NaN : e === 1 / 0 || e === -1 / 0 ? e : (e - t) * (o - n) / (i - t) + n
}
}, function (e, t, i) {
var o = i(39),
r = i(5)("iterator"),
a = i(40);
e.exports = i(13).isIterable = function (e) {
var t = Object(e);
return t[r] !== n || "@@iterator" in t || a.hasOwnProperty(o(t))
}
}, function (e, t, i) {
var n = i(127),
o = i(74),
r = i(10);
e.exports = function () {
for (var e = r(this), t = arguments.length, i = new Array(t), a = 0, l = n._, s = !1; t > a;)(i[a] = arguments[a++]) === l && (s = !0);
return function () {
var n, r = this,
a = arguments.length,
c = 0,
d = 0;
if (!s && !a) return o(e, i, r);
if (n = i.slice(), s)
for (; t > c; c++) n[c] === l && (n[c] = arguments[d++]);
for (; a > d;) n.push(arguments[d++]);
return o(e, n, r)
}
}
}, function (e, t, i) {
e.exports = i(2)
}, function (e, t, i) {
var n = i(6),
o = i(16),
r = i(92),
a = i(11);
e.exports = function (e, t) {
for (var i, l = r(a(t)), s = l.length, c = 0; s > c;) n.f(e, i = l[c++], o.f(t, i));
return e
}
}, function (e, t, i) {
i(130), i(132), i(133), i(134), i(135), i(136), i(137), i(138), i(139), i(140), i(141), i(142), i(143), i(144), i(145), i(146), i(148), i(149), i(150), i(151), i(152), i(153), i(154), i(155), i(156), i(157), i(158), i(159), i(160), i(161), i(162), i(163), i(164), i(165), i(166), i(167), i(168), i(169), i(170), i(171), i(172), i(173), i(174), i(175), i(176), i(177), i(178), i(179), i(180), i(181), i(182), i(183), i(184), i(185), i(186), i(187), i(188), i(189), i(190), i(191), i(192), i(193), i(194), i(195), i(196), i(197), i(198), i(199), i(200), i(201), i(202), i(203), i(204), i(205), i(206), i(207), i(208), i(209), i(210), i(211), i(212), i(214), i(215), i(216), i(217), i(218), i(219), i(220), i(221), i(222), i(223), i(224), i(225), i(87), i(226), i(227), i(228), i(110), i(229), i(230), i(231), i(232), i(233), i(113), i(115), i(116), i(234), i(235), i(236), i(237), i(238), i(239), i(240), i(241), i(242), i(243), i(244), i(245), i(246), i(247), i(248), i(249), i(250), i(251), i(253), i(254), i(256), i(257), i(258), i(259), i(260), i(261), i(262), i(263), i(264), i(265), i(266), i(267), i(268), i(269), i(270), i(271), i(272), i(273), i(274), i(275), i(276), i(277), i(278), i(279), i(280), i(281), i(282), i(283), i(284), i(285), i(286), i(287), i(288), i(289), i(290), i(291), i(292), i(293), i(294), i(295), i(296), i(297), i(298), i(299), i(300), i(301), i(302), i(303), i(304), i(305), i(306), i(307), i(308), i(309), i(310), i(311), i(312), i(313), i(314), i(315), i(316), i(317), i(318), i(319), i(320), i(321), i(322), i(323), i(324), i(325), i(326), i(49), i(328), i(125), i(329), i(330), i(331), i(332), i(333), i(334), i(335), i(336), i(337), e.exports = i(338)
}, function (e, t, i) {
var o = i(2),
r = i(12),
a = i(7),
l = i(0),
s = i(15),
c = i(32).KEY,
d = i(4),
u = i(50),
p = i(44),
v = i(36),
h = i(5),
f = i(96),
g = i(68),
m = i(131),
y = i(53),
b = i(1),
x = i(3),
w = i(11),
S = i(22),
C = i(31),
E = i(28),
k = i(99),
L = i(16),
A = i(6),
q = i(27),
M = L.f,
_ = A.f,
T = k.f,
O = o.Symbol,
N = o.JSON,
R = N && N.stringify,
B = h("_hidden"),
I = h("toPrimitive"),
H = {}.propertyIsEnumerable,
D = u("symbol-registry"),
F = u("symbols"),
P = u("op-symbols"),
U = Object.prototype,
z = "function" == typeof O,
W = o.QObject,
j = !W || !W.prototype || !W.prototype.findChild,
Y = a && d((function () {
return 7 != E(_({}, "a", {
get: function () {
return _(this, "a", {
value: 7
}).a
}
})).a
})) ? function (e, t, i) {
var n = M(U, t);
n && delete U[t], _(e, t, i), n && e !== U && _(U, t, n)
} : _,
X = function (e) {
var t = F[e] = E(O.prototype);
return t._k = e, t
},
G = z && "symbol" == typeof O.iterator ? function (e) {
return "symbol" == typeof e
} : function (e) {
return e instanceof O
},
V = function (e, t, i) {
return e === U && V(P, t, i), b(e), t = S(t, !0), b(i), r(F, t) ? (i.enumerable ? (r(e, B) && e[B][t] && (e[B][t] = !1), i = E(i, {
enumerable: C(0, !1)
})) : (r(e, B) || _(e, B, C(1, {})), e[B][t] = !0), Y(e, t, i)) : _(e, t, i)
},
Z = function (e, t) {
b(e);
for (var i, n = m(t = w(t)), o = 0, r = n.length; r > o;) V(e, i = n[o++], t[i]);
return e
},
K = function (e) {
var t = H.call(this, e = S(e, !0));
return !(this === U && r(F, e) && !r(P, e)) && (!(t || !r(this, e) || !r(F, e) || r(this, B) && this[B][e]) || t)
},
J = function (e, t) {
if (e = w(e), t = S(t, !0), e !== U || !r(F, t) || r(P, t)) {
var i = M(e, t);
return !i || !r(F, t) || r(e, B) && e[B][t] || (i.enumerable = !0), i
}
},
$ = function (e) {
for (var t, i = T(w(e)), n = [], o = 0; i.length > o;) r(F, t = i[o++]) || t == B || t == c || n.push(t);
return n
},
Q = function (e) {
for (var t, i = e === U, n = T(i ? P : w(e)), o = [], a = 0; n.length > a;) !r(F, t = n[a++]) || i && !r(U, t) || o.push(F[t]);
return o
};
z || (s((O = function () {
if (this instanceof O) throw TypeError("Symbol is not a constructor!");
var e = v(arguments.length > 0 ? arguments[0] : n),
t = function (i) {
this === U && t.call(P, i), r(this, B) && r(this[B], e) && (this[B][e] = !1), Y(this, e, C(1, i))
};
return a && j && Y(U, e, {
configurable: !0,
set: t
}), X(e)
}).prototype, "toString", (function () {
return this._k
})), L.f = J, A.f = V, i(38).f = k.f = $, i(48).f = K, i(52).f = Q, a && !i(33) && s(U, "propertyIsEnumerable", K, !0), f.f = function (e) {
return X(h(e))
}), l(l.G + l.W + l.F * !z, {
Symbol: O
});
for (var ee = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), te = 0; ee.length > te;) h(ee[te++]);
for (var ie = q(h.store), ne = 0; ie.length > ne;) g(ie[ne++]);
l(l.S + l.F * !z, "Symbol", {
for: function (e) {
return r(D, e += "") ? D[e] : D[e] = O(e)
},
keyFor: function (e) {
if (!G(e)) throw TypeError(e + " is not a symbol!");
for (var t in D)
if (D[t] === e) return t
},
useSetter: function () {
j = !0
},
useSimple: function () {
j = !1
}
}), l(l.S + l.F * !z, "Object", {
create: function (e, t) {
return t === n ? E(e) : Z(E(e), t)
},
defineProperty: V,
defineProperties: Z,
getOwnPropertyDescriptor: J,
getOwnPropertyNames: $,
getOwnPropertySymbols: Q
}), N && l(l.S + l.F * (!z || d((function () {
var e = O();
return "[null]" != R([e]) || "{}" != R({
a: e
}) || "{}" != R(Object(e))
}))), "JSON", {
stringify: function (e) {
for (var t, i, o = [e], r = 1; arguments.length > r;) o.push(arguments[r++]);
if (i = t = o[1], (x(t) || e !== n) && !G(e)) return y(t) || (t = function (e, t) {
if ("function" == typeof i && (t = i.call(this, e, t)), !G(t)) return t
}), o[1] = t, R.apply(N, o)
}
}), O.prototype[I] || i(14)(O.prototype, I, O.prototype.valueOf), p(O, "Symbol"), p(Math, "Math", !0), p(o.JSON, "JSON", !0)
}, function (e, t, i) {
var n = i(27),
o = i(52),
r = i(48);
e.exports = function (e) {
var t = n(e),
i = o.f;
if (i)
for (var a, l = i(e), s = r.f, c = 0; l.length > c;) s.call(e, a = l[c++]) && t.push(a);
return t
}
}, function (e, t, i) {
var n = i(0);
n(n.S + n.F * !i(7), "Object", {
defineProperty: i(6).f
})
}, function (e, t, i) {
var n = i(0);
n(n.S + n.F * !i(7), "Object", {
defineProperties: i(98)
})
}, function (e, t, i) {
var n = i(11),
o = i(16).f;
i(25)("getOwnPropertyDescriptor", (function () {
return function (e, t) {
return o(n(e), t)
}
}))
}, function (e, t, i) {
var n = i(0);
n(n.S, "Object", {
create: i(28)
})
}, function (e, t, i) {
var n = i(9),
o = i(17);
i(25)("getPrototypeOf", (function () {
return function (e) {
return o(n(e))
}
}))
}, function (e, t, i) {
var n = i(9),
o = i(27);
i(25)("keys", (function () {
return function (e) {
return o(n(e))
}
}))
}, function (e, t, i) {
i(25)("getOwnPropertyNames", (function () {
return i(99).f
}))
}, function (e, t, i) {
var n = i(3),
o = i(32).onFreeze;
i(25)("freeze", (function (e) {
return function (t) {
return e && n(t) ? e(o(t)) : t
}
}))
}, function (e, t, i) {
var n = i(3),
o = i(32).onFreeze;
i(25)("seal", (function (e) {
return function (t) {
return e && n(t) ? e(o(t)) : t
}
}))
}, function (e, t, i) {
var n = i(3),
o = i(32).onFreeze;
i(25)("preventExtensions", (function (e) {
return function (t) {
return e && n(t) ? e(o(t)) : t
}
}))
}, function (e, t, i) {
var n = i(3);
i(25)("isFrozen", (function (e) {
return function (t) {
return !n(t) || !!e && e(t)
}
}))
}, function (e, t, i) {
var n = i(3);
i(25)("isSealed", (function (e) {
return function (t) {
return !n(t) || !!e && e(t)
}
}))
}, function (e, t, i) {
var n = i(3);
i(25)("isExtensible", (function (e) {
return function (t) {
return !!n(t) && (!e || e(t))
}
}))
}, function (e, t, i) {
var n = i(0);
n(n.S + n.F, "Object", {
assign: i(72)
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Object", {
is: i(147)
})
}, function (e, t) {
e.exports = Object.is || function (e, t) {
return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t
}
}, function (e, t, i) {
var n = i(0);
n(n.S, "Object", {
setPrototypeOf: i(73).set
})
}, function (e, t, i) {
var n = i(39),
o = {};
o[i(5)("toStringTag")] = "z", o + "" != "[object z]" && i(15)(Object.prototype, "toString", (function () {
return "[object " + n(this) + "]"
}), !0)
}, function (e, t, i) {
var n = i(0);
n(n.P, "Function", {
bind: i(100)
})
}, function (e, t, i) {
var n = i(6).f,
o = Function.prototype,
r = /^\s*function ([^ (]*)/;
"name" in o || i(7) && n(o, "name", {
configurable: !0,
get: function () {
try {
return ("" + this).match(r)[1]
} catch (e) {
return ""
}
}
})
}, function (e, t, i) {
var n = i(3),
o = i(17),
r = i(5)("hasInstance"),
a = Function.prototype;
r in a || i(6).f(a, r, {
value: function (e) {
if ("function" != typeof this || !n(e)) return !1;
if (!n(this.prototype)) return e instanceof this;
for (; e = o(e);)
if (this.prototype === e) return !0;
return !1
}
})
}, function (e, t, i) {
var n = i(2),
o = i(12),
r = i(20),
a = i(75),
l = i(22),
s = i(4),
c = i(38).f,
d = i(16).f,
u = i(6).f,
p = i(45).trim,
v = n.Number,
h = v,
f = v.prototype,
g = "Number" == r(i(28)(f)),
m = "trim" in String.prototype,
y = function (e) {
var t = l(e, !1);
if ("string" == typeof t && t.length > 2) {
var i, n, o, r = (t = m ? t.trim() : p(t, 3)).charCodeAt(0);
if (43 === r || 45 === r) {
if (88 === (i = t.charCodeAt(2)) || 120 === i) return NaN
} else if (48 === r) {
switch (t.charCodeAt(1)) {
case 66:
case 98:
n = 2, o = 49;
break;
case 79:
case 111:
n = 8, o = 55;
break;
default:
return +t
}
for (var a, s = t.slice(2), c = 0, d = s.length; c < d; c++)
if ((a = s.charCodeAt(c)) < 48 || a > o) return NaN;
return parseInt(s, n)
}
}
return +t
};
if (!v(" 0o1") || !v("0b1") || v("+0x1")) {
v = function (e) {
var t = arguments.length < 1 ? 0 : e,
i = this;
return i instanceof v && (g ? s((function () {
f.valueOf.call(i)
})) : "Number" != r(i)) ? a(new h(y(t)), i, v) : y(t)
};
for (var b, x = i(7) ? c(h) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), w = 0; x.length > w; w++) o(h, b = x[w]) && !o(v, b) && u(v, b, d(h, b));
v.prototype = f, f.constructor = v, i(15)(n, "Number", v)
}
}, function (e, t, i) {
var n = i(0),
o = i(24),
r = i(101),
a = i(77),
l = 1..toFixed,
s = Math.floor,
c = [0, 0, 0, 0, 0, 0],
d = "Number.toFixed: incorrect invocation!",
u = function (e, t) {
for (var i = -1, n = t; ++i < 6;) n += e * c[i], c[i] = n % 1e7, n = s(n / 1e7)
},
p = function (e) {
for (var t = 6, i = 0; --t >= 0;) i += c[t], c[t] = s(i / e), i = i % e * 1e7
},
v = function () {
for (var e = 6, t = ""; --e >= 0;)
if ("" !== t || 0 === e || 0 !== c[e]) {
var i = String(c[e]);
t = "" === t ? i : t + a.call("0", 7 - i.length) + i
} return t
},
h = function (e, t, i) {
return 0 === t ? i : t % 2 == 1 ? h(e, t - 1, i * e) : h(e * e, t / 2, i)
};
n(n.P + n.F * (!!l && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== (0xde0b6b3a7640080).toFixed(0)) || !i(4)((function () {
l.call({})
}))), "Number", {
toFixed: function (e) {
var t, i, n, l, s = r(this, d),
c = o(e),
f = "",
g = "0";
if (c < 0 || c > 20) throw RangeError(d);
if (s != s) return "NaN";
if (s <= -1e21 || s >= 1e21) return String(s);
if (s < 0 && (f = "-", s = -s), s > 1e-21)
if (i = (t = function (e) {
for (var t = 0, i = e; i >= 4096;) t += 12, i /= 4096;
for (; i >= 2;) t += 1, i /= 2;
return t
}(s * h(2, 69, 1)) - 69) < 0 ? s * h(2, -t, 1) : s / h(2, t, 1), i *= 4503599627370496, (t = 52 - t) > 0) {
for (u(0, i), n = c; n >= 7;) u(1e7, 0), n -= 7;
for (u(h(10, n, 1), 0), n = t - 1; n >= 23;) p(1 << 23), n -= 23;
p(1 << n), u(1, 1), p(2), g = v()
} else u(0, i), u(1 << -t, 0), g = v() + a.call("0", c);
return g = c > 0 ? f + ((l = g.length) <= c ? "0." + a.call("0", c - l) + g : g.slice(0, l - c) + "." + g.slice(l - c)) : f + g
}
})
}, function (e, t, i) {
var o = i(0),
r = i(4),
a = i(101),
l = 1..toPrecision;
o(o.P + o.F * (r((function () {
return "1" !== l.call(1, n)
})) || !r((function () {
l.call({})
}))), "Number", {
toPrecision: function (e) {
var t = a(this, "Number#toPrecision: incorrect invocation!");
return e === n ? l.call(t) : l.call(t, e)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Number", {
EPSILON: Math.pow(2, -52)
})
}, function (e, t, i) {
var n = i(0),
o = i(2).isFinite;
n(n.S, "Number", {
isFinite: function (e) {
return "number" == typeof e && o(e)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Number", {
isInteger: i(102)
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Number", {
isNaN: function (e) {
return e != e
}
})
}, function (e, t, i) {
var n = i(0),
o = i(102),
r = Math.abs;
n(n.S, "Number", {
isSafeInteger: function (e) {
return o(e) && r(e) <= 9007199254740991
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Number", {
MAX_SAFE_INTEGER: 9007199254740991
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Number", {
MIN_SAFE_INTEGER: -9007199254740991
})
}, function (e, t, i) {
var n = i(0),
o = i(103);
n(n.S + n.F * (Number.parseFloat != o), "Number", {
parseFloat: o
})
}, function (e, t, i) {
var n = i(0),
o = i(104);
n(n.S + n.F * (Number.parseInt != o), "Number", {
parseInt: o
})
}, function (e, t, i) {
var n = i(0),
o = i(104);
n(n.G + n.F * (parseInt != o), {
parseInt: o
})
}, function (e, t, i) {
var n = i(0),
o = i(103);
n(n.G + n.F * (parseFloat != o), {
parseFloat: o
})
}, function (e, t, i) {
var n = i(0),
o = i(105),
r = Math.sqrt,
a = Math.acosh;
n(n.S + n.F * !(a && 710 == Math.floor(a(Number.MAX_VALUE)) && a(1 / 0) == 1 / 0), "Math", {
acosh: function (e) {
return (e = +e) < 1 ? NaN : e > 94906265.62425156 ? Math.log(e) + Math.LN2 : o(e - 1 + r(e - 1) * r(e + 1))
}
})
}, function (e, t, i) {
var n = i(0),
o = Math.asinh;
n(n.S + n.F * !(o && 1 / o(0) > 0), "Math", {
asinh: function e(t) {
return isFinite(t = +t) && 0 != t ? t < 0 ? -e(-t) : Math.log(t + Math.sqrt(t * t + 1)) : t
}
})
}, function (e, t, i) {
var n = i(0),
o = Math.atanh;
n(n.S + n.F * !(o && 1 / o(-0) < 0), "Math", {
atanh: function (e) {
return 0 == (e = +e) ? e : Math.log((1 + e) / (1 - e)) / 2
}
})
}, function (e, t, i) {
var n = i(0),
o = i(78);
n(n.S, "Math", {
cbrt: function (e) {
return o(e = +e) * Math.pow(Math.abs(e), 1 / 3)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
clz32: function (e) {
return (e >>>= 0) ? 31 - Math.floor(Math.log(e + .5) * Math.LOG2E) : 32
}
})
}, function (e, t, i) {
var n = i(0),
o = Math.exp;
n(n.S, "Math", {
cosh: function (e) {
return (o(e = +e) + o(-e)) / 2
}
})
}, function (e, t, i) {
var n = i(0),
o = i(79);
n(n.S + n.F * (o != Math.expm1), "Math", {
expm1: o
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
fround: i(106)
})
}, function (e, t, i) {
var n = i(0),
o = Math.abs;
n(n.S, "Math", {
hypot: function (e, t) {
for (var i, n, r = 0, a = 0, l = arguments.length, s = 0; a < l;) s < (i = o(arguments[a++])) ? (r = r * (n = s / i) * n + 1, s = i) : r += i > 0 ? (n = i / s) * n : i;
return s === 1 / 0 ? 1 / 0 : s * Math.sqrt(r)
}
})
}, function (e, t, i) {
var n = i(0),
o = Math.imul;
n(n.S + n.F * i(4)((function () {
return -5 != o(4294967295, 5) || 2 != o.length
})), "Math", {
imul: function (e, t) {
var i = +e,
n = +t,
o = 65535 & i,
r = 65535 & n;
return 0 | o * r + ((65535 & i >>> 16) * r + o * (65535 & n >>> 16) << 16 >>> 0)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
log10: function (e) {
return Math.log(e) * Math.LOG10E
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
log1p: i(105)
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
log2: function (e) {
return Math.log(e) / Math.LN2
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
sign: i(78)
})
}, function (e, t, i) {
var n = i(0),
o = i(79),
r = Math.exp;
n(n.S + n.F * i(4)((function () {
return -2e-17 != !Math.sinh(-2e-17)
})), "Math", {
sinh: function (e) {
return Math.abs(e = +e) < 1 ? (o(e) - o(-e)) / 2 : (r(e - 1) - r(-e - 1)) * (Math.E / 2)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(79),
r = Math.exp;
n(n.S, "Math", {
tanh: function (e) {
var t = o(e = +e),
i = o(-e);
return t == 1 / 0 ? 1 : i == 1 / 0 ? -1 : (t - i) / (r(e) + r(-e))
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
trunc: function (e) {
return (e > 0 ? Math.floor : Math.ceil)(e)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(37),
r = String.fromCharCode,
a = String.fromCodePoint;
n(n.S + n.F * (!!a && 1 != a.length), "String", {
fromCodePoint: function (e) {
for (var t, i = [], n = arguments.length, a = 0; n > a;) {
if (t = +arguments[a++], o(t, 1114111) !== t) throw RangeError(t + " is not a valid code point");
i.push(t < 65536 ? r(t) : r(55296 + ((t -= 65536) >> 10), t % 1024 + 56320))
}
return i.join("")
}
})
}, function (e, t, i) {
var n = i(0),
o = i(11),
r = i(8);
n(n.S, "String", {
raw: function (e) {
for (var t = o(e.raw), i = r(t.length), n = arguments.length, a = [], l = 0; i > l;) a.push(String(t[l++])), l < n && a.push(String(arguments[l]));
return a.join("")
}
})
}, function (e, t, i) {
i(45)("trim", (function (e) {
return function () {
return e(this, 3)
}
}))
}, function (e, t, i) {
var n = i(0),
o = i(80)(!1);
n(n.P, "String", {
codePointAt: function (e) {
return o(this, e)
}
})
}, function (e, t, i) {
var o = i(0),
r = i(8),
a = i(81),
l = "".endsWith;
o(o.P + o.F * i(82)("endsWith"), "String", {
endsWith: function (e) {
var t = a(this, e, "endsWith"),
i = arguments.length > 1 ? arguments[1] : n,
o = r(t.length),
s = i === n ? o : Math.min(r(i), o),
c = String(e);
return l ? l.call(t, c, s) : t.slice(s - c.length, s) === c
}
})
}, function (e, t, i) {
var o = i(0),
r = i(81);
o(o.P + o.F * i(82)("includes"), "String", {
includes: function (e) {
return !!~r(this, e, "includes").indexOf(e, arguments.length > 1 ? arguments[1] : n)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.P, "String", {
repeat: i(77)
})
}, function (e, t, i) {
var o = i(0),
r = i(8),
a = i(81),
l = "".startsWith;
o(o.P + o.F * i(82)("startsWith"), "String", {
startsWith: function (e) {
var t = a(this, e, "startsWith"),
i = r(Math.min(arguments.length > 1 ? arguments[1] : n, t.length)),
o = String(e);
return l ? l.call(t, o, i) : t.slice(i, i + o.length) === o
}
})
}, function (e, t, i) {
var o = i(80)(!0);
i(55)(String, "String", (function (e) {
this._t = String(e), this._i = 0
}), (function () {
var e, t = this._t,
i = this._i;
return i >= t.length ? {
value: n,
done: !0
} : (e = o(t, i), this._i += e.length, {
value: e,
done: !1
})
}))
}, function (e, t, i) {
i(18)("anchor", (function (e) {
return function (t) {
return e(this, "a", "name", t)
}
}))
}, function (e, t, i) {
i(18)("big", (function (e) {
return function () {
return e(this, "big", "", "")
}
}))
}, function (e, t, i) {
i(18)("blink", (function (e) {
return function () {
return e(this, "blink", "", "")
}
}))
}, function (e, t, i) {
i(18)("bold", (function (e) {
return function () {
return e(this, "b", "", "")
}
}))
}, function (e, t, i) {
i(18)("fixed", (function (e) {
return function () {
return e(this, "tt", "", "")
}
}))
}, function (e, t, i) {
i(18)("fontcolor", (function (e) {
return function (t) {
return e(this, "font", "color", t)
}
}))
}, function (e, t, i) {
i(18)("fontsize", (function (e) {
return function (t) {
return e(this, "font", "size", t)
}
}))
}, function (e, t, i) {
i(18)("italics", (function (e) {
return function () {
return e(this, "i", "", "")
}
}))
}, function (e, t, i) {
i(18)("link", (function (e) {
return function (t) {
return e(this, "a", "href", t)
}
}))
}, function (e, t, i) {
i(18)("small", (function (e) {
return function () {
return e(this, "small", "", "")
}
}))
}, function (e, t, i) {
i(18)("strike", (function (e) {
return function () {
return e(this, "strike", "", "")
}
}))
}, function (e, t, i) {
i(18)("sub", (function (e) {
return function () {
return e(this, "sub", "", "")
}
}))
}, function (e, t, i) {
i(18)("sup", (function (e) {
return function () {
return e(this, "sup", "", "")
}
}))
}, function (e, t, i) {
var n = i(0);
n(n.S, "Array", {
isArray: i(53)
})
}, function (e, t, i) {
var o = i(19),
r = i(0),
a = i(9),
l = i(107),
s = i(83),
c = i(8),
d = i(84),
u = i(49);
r(r.S + r.F * !i(57)((function (e) {})), "Array", {
from: function (e) {
var t, i, r, p, v = a(e),
h = "function" == typeof this ? this : Array,
f = arguments.length,
g = f > 1 ? arguments[1] : n,
m = g !== n,
y = 0,
b = u(v);
if (m && (g = o(g, f > 2 ? arguments[2] : n, 2)), b == n || h == Array && s(b))
for (i = new h(t = c(v.length)); t > y; y++) d(i, y, m ? g(v[y], y) : v[y]);
else
for (p = b.call(v), i = new h; !(r = p.next()).done; y++) d(i, y, m ? l(p, g, [r.value, y], !0) : r.value);
return i.length = y, i
}
})
}, function (e, t, i) {
var n = i(0),
o = i(84);
n(n.S + n.F * i(4)((function () {
function e() {}
return !(Array.of.call(e) instanceof e)
})), "Array", {
of: function () {
for (var e = 0, t = arguments.length, i = new("function" == typeof this ? this : Array)(t); t > e;) o(i, e, arguments[e++]);
return i.length = t, i
}
})
}, function (e, t, i) {
var o = i(0),
r = i(11),
a = [].join;
o(o.P + o.F * (i(47) != Object || !i(21)(a)), "Array", {
join: function (e) {
return a.call(r(this), e === n ? "," : e)
}
})
}, function (e, t, i) {
var o = i(0),
r = i(71),
a = i(20),
l = i(37),
s = i(8),
c = [].slice;
o(o.P + o.F * i(4)((function () {
r && c.call(r)
})), "Array", {
slice: function (e, t) {
var i = s(this.length),
o = a(this);
if (t = t === n ? i : t, "Array" == o) return c.call(this, e, t);
for (var r = l(e, i), d = l(t, i), u = s(d - r), p = new Array(u), v = 0; v < u; v++) p[v] = "String" == o ? this.charAt(r + v) : this[r + v];
return p
}
})
}, function (e, t, i) {
var o = i(0),
r = i(10),
a = i(9),
l = i(4),
s = [].sort,
c = [1, 2, 3];
o(o.P + o.F * (l((function () {
c.sort(n)
})) || !l((function () {
c.sort(null)
})) || !i(21)(s)), "Array", {
sort: function (e) {
return e === n ? s.call(a(this)) : s.call(a(this), r(e))
}
})
}, function (e, t, i) {
var n = i(0),
o = i(26)(0),
r = i(21)([].forEach, !0);
n(n.P + n.F * !r, "Array", {
forEach: function (e) {
return o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var o = i(3),
r = i(53),
a = i(5)("species");
e.exports = function (e) {
var t;
return r(e) && ("function" != typeof (t = e.constructor) || t !== Array && !r(t.prototype) || (t = n), o(t) && null === (t = t[a]) && (t = n)), t === n ? Array : t
}
}, function (e, t, i) {
var n = i(0),
o = i(26)(1);
n(n.P + n.F * !i(21)([].map, !0), "Array", {
map: function (e) {
return o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var n = i(0),
o = i(26)(2);
n(n.P + n.F * !i(21)([].filter, !0), "Array", {
filter: function (e) {
return o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var n = i(0),
o = i(26)(3);
n(n.P + n.F * !i(21)([].some, !0), "Array", {
some: function (e) {
return o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var n = i(0),
o = i(26)(4);
n(n.P + n.F * !i(21)([].every, !0), "Array", {
every: function (e) {
return o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var n = i(0),
o = i(108);
n(n.P + n.F * !i(21)([].reduce, !0), "Array", {
reduce: function (e) {
return o(this, e, arguments.length, arguments[1], !1)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(108);
n(n.P + n.F * !i(21)([].reduceRight, !0), "Array", {
reduceRight: function (e) {
return o(this, e, arguments.length, arguments[1], !0)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(51)(!1),
r = [].indexOf,
a = !!r && 1 / [1].indexOf(1, -0) < 0;
n(n.P + n.F * (a || !i(21)(r)), "Array", {
indexOf: function (e) {
return a ? r.apply(this, arguments) || 0 : o(this, e, arguments[1])
}
})
}, function (e, t, i) {
var n = i(0),
o = i(11),
r = i(24),
a = i(8),
l = [].lastIndexOf,
s = !!l && 1 / [1].lastIndexOf(1, -0) < 0;
n(n.P + n.F * (s || !i(21)(l)), "Array", {
lastIndexOf: function (e) {
if (s) return l.apply(this, arguments) || 0;
var t = o(this),
i = a(t.length),
n = i - 1;
for (arguments.length > 1 && (n = Math.min(n, r(arguments[1]))), n < 0 && (n = i + n); n >= 0; n--)
if (n in t && t[n] === e) return n || 0;
return -1
}
})
}, function (e, t, i) {
var n = i(0);
n(n.P, "Array", {
copyWithin: i(109)
}), i(34)("copyWithin")
}, function (e, t, i) {
var n = i(0);
n(n.P, "Array", {
fill: i(86)
}), i(34)("fill")
}, function (e, t, i) {
var o = i(0),
r = i(26)(5),
a = !0;
"find" in [] && Array(1).find((function () {
a = !1
})), o(o.P + o.F * a, "Array", {
find: function (e) {
return r(this, e, arguments.length > 1 ? arguments[1] : n)
}
}), i(34)("find")
}, function (e, t, i) {
var o = i(0),
r = i(26)(6),
a = "findIndex",
l = !0;
a in [] && Array(1)[a]((function () {
l = !1
})), o(o.P + o.F * l, "Array", {
findIndex: function (e) {
return r(this, e, arguments.length > 1 ? arguments[1] : n)
}
}), i(34)(a)
}, function (e, t, i) {
i(41)("Array")
}, function (e, t, i) {
var o = i(2),
r = i(75),
a = i(6).f,
l = i(38).f,
s = i(54),
c = i(58),
d = o.RegExp,
u = d,
p = d.prototype,
v = /a/g,
h = /a/g,
f = new d(v) !== v;
if (i(7) && (!f || i(4)((function () {
return h[i(5)("match")] = !1, d(v) != v || d(h) == h || "/a/i" != d(v, "i")
})))) {
d = function (e, t) {
var i = this instanceof d,
o = s(e),
a = t === n;
return !i && o && e.constructor === d && a ? e : r(f ? new u(o && !a ? e.source : e, t) : u((o = e instanceof d) ? e.source : e, o && a ? c.call(e) : t), i ? this : p, d)
};
for (var g = function (e) {
e in d || a(d, e, {
configurable: !0,
get: function () {
return u[e]
},
set: function (t) {
u[e] = t
}
})
}, m = l(u), y = 0; m.length > y;) g(m[y++]);
p.constructor = d, d.prototype = p, i(15)(o, "RegExp", d)
}
i(41)("RegExp")
}, function (e, t, i) {
i(110);
var o = i(1),
r = i(58),
a = i(7),
l = /./.toString,
s = function (e) {
i(15)(RegExp.prototype, "toString", e, !0)
};
i(4)((function () {
return "/a/b" != l.call({
source: "a",
flags: "b"
})
})) ? s((function () {
var e = o(this);
return "/".concat(e.source, "/", "flags" in e ? e.flags : !a && e instanceof RegExp ? r.call(e) : n)
})) : "toString" != l.name && s((function () {
return l.call(this)
}))
}, function (e, t, i) {
i(59)("match", 1, (function (e, t, i) {
return [function (i) {
var o = e(this),
r = i == n ? n : i[t];
return r !== n ? r.call(i, o) : new RegExp(i)[t](String(o))
}, i]
}))
}, function (e, t, i) {
i(59)("replace", 2, (function (e, t, i) {
return [function (o, r) {
var a = e(this),
l = o == n ? n : o[t];
return l !== n ? l.call(o, a, r) : i.call(String(a), o, r)
}, i]
}))
}, function (e, t, i) {
i(59)("search", 1, (function (e, t, i) {
return [function (i) {
var o = e(this),
r = i == n ? n : i[t];
return r !== n ? r.call(i, o) : new RegExp(i)[t](String(o))
}, i]
}))
}, function (e, t, i) {
i(59)("split", 2, (function (e, t, o) {
var r = i(54),
a = o,
l = [].push;
if ("c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 != "ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/).length > 1 || "".split(/.?/).length) {
var s = /()??/.exec("")[1] === n;
o = function (e, t) {
var i = String(this);
if (e === n && 0 === t) return [];
if (!r(e)) return a.call(i, e, t);
var o, c, d, u, p, v = [],
h = (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.unicode ? "u" : "") + (e.sticky ? "y" : ""),
f = 0,
g = t === n ? 4294967295 : t >>> 0,
m = new RegExp(e.source, h + "g");
for (s || (o = new RegExp("^" + m.source + "$(?!\\s)", h));
(c = m.exec(i)) && !((d = c.index + c[0].length) > f && (v.push(i.slice(f, c.index)), !s && c.length > 1 && c[0].replace(o, (function () {
for (p = 1; p < arguments.length - 2; p++) arguments[p] === n && (c[p] = n)
})), c.length > 1 && c.index < i.length && l.apply(v, c.slice(1)), u = c[0].length, f = d, v.length >= g));) m.lastIndex === c.index && m.lastIndex++;
return f === i.length ? !u && m.test("") || v.push("") : v.push(i.slice(f)), v.length > g ? v.slice(0, g) : v
}
} else "0".split(n, 0).length && (o = function (e, t) {
return e === n && 0 === t ? [] : a.call(this, e, t)
});
return [function (i, r) {
var a = e(this),
l = i == n ? n : i[t];
return l !== n ? l.call(i, a, r) : o.call(String(a), i, r)
}, o]
}))
}, function (e, t, i) {
var o, r, a, l, s = i(33),
c = i(2),
d = i(19),
u = i(39),
p = i(0),
v = i(3),
h = i(10),
f = i(42),
g = i(35),
m = i(60),
y = i(89).set,
b = i(90)(),
x = i(91),
w = i(111),
S = i(61),
C = i(112),
E = c.TypeError,
k = c.process,
L = k && k.versions,
A = L && L.v8 || "",
q = c.Promise,
M = "process" == u(k),
_ = function () {},
T = r = x.f,
O = !! function () {
try {
var e = q.resolve(1),
t = (e.constructor = {})[i(5)("species")] = function (e) {
e(_, _)
};
return (M || "function" == typeof PromiseRejectionEvent) && e.then(_) instanceof t && 0 !== A.indexOf("6.6") && -1 === S.indexOf("Chrome/66")
} catch (e) {}
}(),
N = function (e) {
var t;
return !(!v(e) || "function" != typeof (t = e.then)) && t
},
R = function (e, t) {
if (!e._n) {
e._n = !0;
var i = e._c;
b((function () {
for (var n = e._v, o = 1 == e._s, r = 0, a = function (t) {
var i, r, a, l = o ? t.ok : t.fail,
s = t.resolve,
c = t.reject,
d = t.domain;
try {
l ? (o || (2 == e._h && H(e), e._h = 1), !0 === l ? i = n : (d && d.enter(), i = l(n), d && (d.exit(), a = !0)), i === t.promise ? c(E("Promise-chain cycle")) : (r = N(i)) ? r.call(i, s, c) : s(i)) : c(n)
} catch (e) {
d && !a && d.exit(), c(e)
}
}; i.length > r;) a(i[r++]);
e._c = [], e._n = !1, t && !e._h && B(e)
}))
}
},
B = function (e) {
y.call(c, (function () {
var t, i, o, r = e._v,
a = I(e);
if (a && (t = w((function () {
M ? k.emit("unhandledRejection", r, e) : (i = c.onunhandledrejection) ? i({
promise: e,
reason: r
}) : (o = c.console) && o.error && o.error("Unhandled promise rejection", r)
})), e._h = M || I(e) ? 2 : 1), e._a = n, a && t.e) throw t.v
}))
},
I = function (e) {
return 1 !== e._h && 0 === (e._a || e._c).length
},
H = function (e) {
y.call(c, (function () {
var t;
M ? k.emit("rejectionHandled", e) : (t = c.onrejectionhandled) && t({
promise: e,
reason: e._v
})
}))
},
D = function (e) {
var t = this;
t._d || (t._d = !0, (t = t._w || t)._v = e, t._s = 2, t._a || (t._a = t._c.slice()), R(t, !0))
},
F = function (e) {
var t, i = this;
if (!i._d) {
i._d = !0, i = i._w || i;
try {
if (i === e) throw E("Promise can't be resolved itself");
(t = N(e)) ? b((function () {
var n = {
_w: i,
_d: !1
};
try {
t.call(e, d(F, n, 1), d(D, n, 1))
} catch (e) {
D.call(n, e)
}
})): (i._v = e, i._s = 1, R(i, !1))
} catch (e) {
D.call({
_w: i,
_d: !1
}, e)
}
}
};
O || (q = function (e) {
f(this, q, "Promise", "_h"), h(e), o.call(this);
try {
e(d(F, this, 1), d(D, this, 1))
} catch (e) {
D.call(this, e)
}
}, (o = function (e) {
this._c = [], this._a = n, this._s = 0, this._d = !1, this._v = n, this._h = 0, this._n = !1
}).prototype = i(43)(q.prototype, {
then: function (e, t) {
var i = T(m(this, q));
return i.ok = "function" != typeof e || e, i.fail = "function" == typeof t && t, i.domain = M ? k.domain : n, this._c.push(i), this._a && this._a.push(i), this._s && R(this, !1), i.promise
},
catch: function (e) {
return this.then(n, e)
}
}), a = function () {
var e = new o;
this.promise = e, this.resolve = d(F, e, 1), this.reject = d(D, e, 1)
}, x.f = T = function (e) {
return e === q || e === l ? new a(e) : r(e)
}), p(p.G + p.W + p.F * !O, {
Promise: q
}), i(44)(q, "Promise"), i(41)("Promise"), l = i(13).Promise, p(p.S + p.F * !O, "Promise", {
reject: function (e) {
var t = T(this);
return (0, t.reject)(e), t.promise
}
}), p(p.S + p.F * (s || !O), "Promise", {
resolve: function (e) {
return C(s && this === l ? q : this, e)
}
}), p(p.S + p.F * !(O && i(57)((function (e) {
q.all(e).catch(_)
}))), "Promise", {
all: function (e) {
var t = this,
i = T(t),
o = i.resolve,
r = i.reject,
a = w((function () {
var i = [],
a = 0,
l = 1;
g(e, !1, (function (e) {
var s = a++,
c = !1;
i.push(n), l++, t.resolve(e).then((function (e) {
c || (c = !0, i[s] = e, --l || o(i))
}), r)
})), --l || o(i)
}));
return a.e && r(a.v), i.promise
},
race: function (e) {
var t = this,
i = T(t),
n = i.reject,
o = w((function () {
g(e, !1, (function (e) {
t.resolve(e).then(i.resolve, n)
}))
}));
return o.e && n(o.v), i.promise
}
})
}, function (e, t, i) {
var o = i(117),
r = i(46);
i(62)("WeakSet", (function (e) {
return function () {
return e(this, arguments.length > 0 ? arguments[0] : n)
}
}), {
add: function (e) {
return o.def(r(this, "WeakSet"), e, !0)
}
}, o, !1, !0)
}, function (e, t, i) {
var n = i(0),
o = i(10),
r = i(1),
a = (i(2).Reflect || {}).apply,
l = Function.apply;
n(n.S + n.F * !i(4)((function () {
a((function () {}))
})), "Reflect", {
apply: function (e, t, i) {
var n = o(e),
s = r(i);
return a ? a(n, t, s) : l.call(n, t, s)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(28),
r = i(10),
a = i(1),
l = i(3),
s = i(4),
c = i(100),
d = (i(2).Reflect || {}).construct,
u = s((function () {
function e() {}
return !(d((function () {}), [], e) instanceof e)
})),
p = !s((function () {
d((function () {}))
}));
n(n.S + n.F * (u || p), "Reflect", {
construct: function (e, t) {
r(e), a(t);
var i = arguments.length < 3 ? e : r(arguments[2]);
if (p && !u) return d(e, t, i);
if (e == i) {
switch (t.length) {
case 0:
return new e;
case 1:
return new e(t[0]);
case 2:
return new e(t[0], t[1]);
case 3:
return new e(t[0], t[1], t[2]);
case 4:
return new e(t[0], t[1], t[2], t[3])
}
var n = [null];
return n.push.apply(n, t), new(c.apply(e, n))
}
var s = i.prototype,
v = o(l(s) ? s : Object.prototype),
h = Function.apply.call(e, v, t);
return l(h) ? h : v
}
})
}, function (e, t, i) {
var n = i(6),
o = i(0),
r = i(1),
a = i(22);
o(o.S + o.F * i(4)((function () {
Reflect.defineProperty(n.f({}, 1, {
value: 1
}), 1, {
value: 2
})
})), "Reflect", {
defineProperty: function (e, t, i) {
r(e), t = a(t, !0), r(i);
try {
return n.f(e, t, i), !0
} catch (e) {
return !1
}
}
})
}, function (e, t, i) {
var n = i(0),
o = i(16).f,
r = i(1);
n(n.S, "Reflect", {
deleteProperty: function (e, t) {
var i = o(r(e), t);
return !(i && !i.configurable) && delete e[t]
}
})
}, function (e, t, i) {
var o = i(0),
r = i(1),
a = function (e) {
this._t = r(e), this._i = 0;
var t, i = this._k = [];
for (t in e) i.push(t)
};
i(56)(a, "Object", (function () {
var e, t = this._k;
do {
if (this._i >= t.length) return {
value: n,
done: !0
}
} while (!((e = t[this._i++]) in this._t));
return {
value: e,
done: !1
}
})), o(o.S, "Reflect", {
enumerate: function (e) {
return new a(e)
}
})
}, function (e, t, i) {
var o = i(16),
r = i(17),
a = i(12),
l = i(0),
s = i(3),
c = i(1);
l(l.S, "Reflect", {
get: function e(t, i) {
var l, d, u = arguments.length < 3 ? t : arguments[2];
return c(t) === u ? t[i] : (l = o.f(t, i)) ? a(l, "value") ? l.value : l.get !== n ? l.get.call(u) : n : s(d = r(t)) ? e(d, i, u) : void 0
}
})
}, function (e, t, i) {
var n = i(16),
o = i(0),
r = i(1);
o(o.S, "Reflect", {
getOwnPropertyDescriptor: function (e, t) {
return n.f(r(e), t)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(17),
r = i(1);
n(n.S, "Reflect", {
getPrototypeOf: function (e) {
return o(r(e))
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Reflect", {
has: function (e, t) {
return t in e
}
})
}, function (e, t, i) {
var n = i(0),
o = i(1),
r = Object.isExtensible;
n(n.S, "Reflect", {
isExtensible: function (e) {
return o(e), !r || r(e)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Reflect", {
ownKeys: i(92)
})
}, function (e, t, i) {
var n = i(0),
o = i(1),
r = Object.preventExtensions;
n(n.S, "Reflect", {
preventExtensions: function (e) {
o(e);
try {
return r && r(e), !0
} catch (e) {
return !1
}
}
})
}, function (e, t, i) {
var o = i(6),
r = i(16),
a = i(17),
l = i(12),
s = i(0),
c = i(31),
d = i(1),
u = i(3);
s(s.S, "Reflect", {
set: function e(t, i, s) {
var p, v, h = arguments.length < 4 ? t : arguments[3],
f = r.f(d(t), i);
if (!f) {
if (u(v = a(t))) return e(v, i, s, h);
f = c(0)
}
if (l(f, "value")) {
if (!1 === f.writable || !u(h)) return !1;
if (p = r.f(h, i)) {
if (p.get || p.set || !1 === p.writable) return !1;
p.value = s, o.f(h, i, p)
} else o.f(h, i, c(0, s));
return !0
}
return f.set !== n && (f.set.call(h, s), !0)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(73);
o && n(n.S, "Reflect", {
setPrototypeOf: function (e, t) {
o.check(e, t);
try {
return o.set(e, t), !0
} catch (e) {
return !1
}
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Date", {
now: function () {
return (new Date).getTime()
}
})
}, function (e, t, i) {
var n = i(0),
o = i(9),
r = i(22);
n(n.P + n.F * i(4)((function () {
return null !== new Date(NaN).toJSON() || 1 !== Date.prototype.toJSON.call({
toISOString: function () {
return 1
}
})
})), "Date", {
toJSON: function (e) {
var t = o(this),
i = r(t);
return "number" != typeof i || isFinite(i) ? t.toISOString() : null
}
})
}, function (e, t, i) {
var n = i(0),
o = i(252);
n(n.P + n.F * (Date.prototype.toISOString !== o), "Date", {
toISOString: o
})
}, function (e, t, i) {
var n = i(4),
o = Date.prototype.getTime,
r = Date.prototype.toISOString,
a = function (e) {
return e > 9 ? e : "0" + e
};
e.exports = n((function () {
return "0385-07-25T07:06:39.999Z" != r.call(new Date(-5e13 - 1))
})) || !n((function () {
r.call(new Date(NaN))
})) ? function () {
if (!isFinite(o.call(this))) throw RangeError("Invalid time value");
var e = this,
t = e.getUTCFullYear(),
i = e.getUTCMilliseconds(),
n = t < 0 ? "-" : t > 9999 ? "+" : "";
return n + ("00000" + Math.abs(t)).slice(n ? -6 : -4) + "-" + a(e.getUTCMonth() + 1) + "-" + a(e.getUTCDate()) + "T" + a(e.getUTCHours()) + ":" + a(e.getUTCMinutes()) + ":" + a(e.getUTCSeconds()) + "." + (i > 99 ? i : "0" + a(i)) + "Z"
} : r
}, function (e, t, i) {
var n = Date.prototype,
o = n.toString,
r = n.getTime;
new Date(NaN) + "" != "Invalid Date" && i(15)(n, "toString", (function () {
var e = r.call(this);
return e == e ? o.call(this) : "Invalid Date"
}))
}, function (e, t, i) {
var n = i(5)("toPrimitive"),
o = Date.prototype;
n in o || i(14)(o, n, i(255))
}, function (e, t, i) {
var n = i(1),
o = i(22);
e.exports = function (e) {
if ("string" !== e && "number" !== e && "default" !== e) throw TypeError("Incorrect hint");
return o(n(this), "number" != e)
}
}, function (e, t, i) {
var o = i(0),
r = i(63),
a = i(93),
l = i(1),
s = i(37),
c = i(8),
d = i(3),
u = i(2).ArrayBuffer,
p = i(60),
v = a.ArrayBuffer,
h = a.DataView,
f = r.ABV && u.isView,
g = v.prototype.slice,
m = r.VIEW;
o(o.G + o.W + o.F * (u !== v), {
ArrayBuffer: v
}), o(o.S + o.F * !r.CONSTR, "ArrayBuffer", {
isView: function (e) {
return f && f(e) || d(e) && m in e
}
}), o(o.P + o.U + o.F * i(4)((function () {
return !new v(2).slice(1, n).byteLength
})), "ArrayBuffer", {
slice: function (e, t) {
if (g !== n && t === n) return g.call(l(this), e);
for (var i = l(this).byteLength, o = s(e, i), r = s(t === n ? i : t, i), a = new(p(this, v))(c(r - o)), d = new h(this), u = new h(a), f = 0; o < r;) u.setUint8(f++, d.getUint8(o++));
return a
}
}), i(41)("ArrayBuffer")
}, function (e, t, i) {
var n = i(0);
n(n.G + n.W + n.F * !i(63).ABV, {
DataView: i(93).DataView
})
}, function (e, t, i) {
i(29)("Int8", 1, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Uint8", 1, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Uint8", 1, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}), !0)
}, function (e, t, i) {
i(29)("Int16", 2, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Uint16", 2, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Int32", 4, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Uint32", 4, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Float32", 4, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
i(29)("Float64", 8, (function (e) {
return function (t, i, n) {
return e(this, t, i, n)
}
}))
}, function (e, t, i) {
var o = i(0),
r = i(51)(!0);
o(o.P, "Array", {
includes: function (e) {
return r(this, e, arguments.length > 1 ? arguments[1] : n)
}
}), i(34)("includes")
}, function (e, t, i) {
var n = i(0),
o = i(119),
r = i(9),
a = i(8),
l = i(10),
s = i(85);
n(n.P, "Array", {
flatMap: function (e) {
var t, i, n = r(this);
return l(e), t = a(n.length), i = s(n, 0), o(i, n, n, t, 0, 1, e, arguments[1]), i
}
}), i(34)("flatMap")
}, function (e, t, i) {
var o = i(0),
r = i(119),
a = i(9),
l = i(8),
s = i(24),
c = i(85);
o(o.P, "Array", {
flatten: function () {
var e = arguments[0],
t = a(this),
i = l(t.length),
o = c(t, 0);
return r(o, t, t, i, 0, e === n ? 1 : s(e)), o
}
}), i(34)("flatten")
}, function (e, t, i) {
var n = i(0),
o = i(80)(!0);
n(n.P, "String", {
at: function (e) {
return o(this, e)
}
})
}, function (e, t, i) {
var o = i(0),
r = i(120),
a = i(61);
o(o.P + o.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(a), "String", {
padStart: function (e) {
return r(this, e, arguments.length > 1 ? arguments[1] : n, !0)
}
})
}, function (e, t, i) {
var o = i(0),
r = i(120),
a = i(61);
o(o.P + o.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(a), "String", {
padEnd: function (e) {
return r(this, e, arguments.length > 1 ? arguments[1] : n, !1)
}
})
}, function (e, t, i) {
i(45)("trimLeft", (function (e) {
return function () {
return e(this, 1)
}
}), "trimStart")
}, function (e, t, i) {
i(45)("trimRight", (function (e) {
return function () {
return e(this, 2)
}
}), "trimEnd")
}, function (e, t, i) {
var n = i(0),
o = i(23),
r = i(8),
a = i(54),
l = i(58),
s = RegExp.prototype,
c = function (e, t) {
this._r = e, this._s = t
};
i(56)(c, "RegExp String", (function () {
var e = this._r.exec(this._s);
return {
value: e,
done: null === e
}
})), n(n.P, "String", {
matchAll: function (e) {
if (o(this), !a(e)) throw TypeError(e + " is not a regexp!");
var t = String(this),
i = "flags" in s ? String(e.flags) : l.call(e),
n = new RegExp(e.source, ~i.indexOf("g") ? i : "g" + i);
return n.lastIndex = r(e.lastIndex), new c(n, t)
}
})
}, function (e, t, i) {
i(68)("asyncIterator")
}, function (e, t, i) {
i(68)("observable")
}, function (e, t, i) {
var o = i(0),
r = i(92),
a = i(11),
l = i(16),
s = i(84);
o(o.S, "Object", {
getOwnPropertyDescriptors: function (e) {
for (var t, i, o = a(e), c = l.f, d = r(o), u = {}, p = 0; d.length > p;)(i = c(o, t = d[p++])) !== n && s(u, t, i);
return u
}
})
}, function (e, t, i) {
var n = i(0),
o = i(121)(!1);
n(n.S, "Object", {
values: function (e) {
return o(e)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(121)(!0);
n(n.S, "Object", {
entries: function (e) {
return o(e)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(9),
r = i(10),
a = i(6);
i(7) && n(n.P + i(64), "Object", {
__defineGetter__: function (e, t) {
a.f(o(this), e, {
get: r(t),
enumerable: !0,
configurable: !0
})
}
})
}, function (e, t, i) {
var n = i(0),
o = i(9),
r = i(10),
a = i(6);
i(7) && n(n.P + i(64), "Object", {
__defineSetter__: function (e, t) {
a.f(o(this), e, {
set: r(t),
enumerable: !0,
configurable: !0
})
}
})
}, function (e, t, i) {
var n = i(0),
o = i(9),
r = i(22),
a = i(17),
l = i(16).f;
i(7) && n(n.P + i(64), "Object", {
__lookupGetter__: function (e) {
var t, i = o(this),
n = r(e, !0);
do {
if (t = l(i, n)) return t.get
} while (i = a(i))
}
})
}, function (e, t, i) {
var n = i(0),
o = i(9),
r = i(22),
a = i(17),
l = i(16).f;
i(7) && n(n.P + i(64), "Object", {
__lookupSetter__: function (e) {
var t, i = o(this),
n = r(e, !0);
do {
if (t = l(i, n)) return t.set
} while (i = a(i))
}
})
}, function (e, t, i) {
var n = i(0);
n(n.P + n.R, "Map", {
toJSON: i(122)("Map")
})
}, function (e, t, i) {
var n = i(0);
n(n.P + n.R, "Set", {
toJSON: i(122)("Set")
})
}, function (e, t, i) {
i(65)("Map")
}, function (e, t, i) {
i(65)("Set")
}, function (e, t, i) {
i(65)("WeakMap")
}, function (e, t, i) {
i(65)("WeakSet")
}, function (e, t, i) {
i(66)("Map")
}, function (e, t, i) {
i(66)("Set")
}, function (e, t, i) {
i(66)("WeakMap")
}, function (e, t, i) {
i(66)("WeakSet")
}, function (e, t, i) {
var n = i(0);
n(n.G, {
global: i(2)
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "System", {
global: i(2)
})
}, function (e, t, i) {
var n = i(0),
o = i(20);
n(n.S, "Error", {
isError: function (e) {
return "Error" === o(e)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
clamp: function (e, t, i) {
return Math.min(i, Math.max(t, e))
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
DEG_PER_RAD: Math.PI / 180
})
}, function (e, t, i) {
var n = i(0),
o = 180 / Math.PI;
n(n.S, "Math", {
degrees: function (e) {
return e * o
}
})
}, function (e, t, i) {
var n = i(0),
o = i(124),
r = i(106);
n(n.S, "Math", {
fscale: function (e, t, i, n, a) {
return r(o(e, t, i, n, a))
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
iaddh: function (e, t, i, n) {
var o = e >>> 0,
r = i >>> 0;
return (t >>> 0) + (n >>> 0) + ((o & r | (o | r) & ~(o + r >>> 0)) >>> 31) | 0
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
isubh: function (e, t, i, n) {
var o = e >>> 0,
r = i >>> 0;
return (t >>> 0) - (n >>> 0) - ((~o & r | ~(o ^ r) & o - r >>> 0) >>> 31) | 0
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
imulh: function (e, t) {
var i = +e,
n = +t,
o = 65535 & i,
r = 65535 & n,
a = i >> 16,
l = n >> 16,
s = (a * r >>> 0) + (o * r >>> 16);
return a * l + (s >> 16) + ((o * l >>> 0) + (65535 & s) >> 16)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
RAD_PER_DEG: 180 / Math.PI
})
}, function (e, t, i) {
var n = i(0),
o = Math.PI / 180;
n(n.S, "Math", {
radians: function (e) {
return e * o
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
scale: i(124)
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
umulh: function (e, t) {
var i = +e,
n = +t,
o = 65535 & i,
r = 65535 & n,
a = i >>> 16,
l = n >>> 16,
s = (a * r >>> 0) + (o * r >>> 16);
return a * l + (s >>> 16) + ((o * l >>> 0) + (65535 & s) >>> 16)
}
})
}, function (e, t, i) {
var n = i(0);
n(n.S, "Math", {
signbit: function (e) {
return (e = +e) != e ? e : 0 == e ? 1 / e == 1 / 0 : e > 0
}
})
}, function (e, t, i) {
var n = i(0),
o = i(13),
r = i(2),
a = i(60),
l = i(112);
n(n.P + n.R, "Promise", {
finally: function (e) {
var t = a(this, o.Promise || r.Promise),
i = "function" == typeof e;
return this.then(i ? function (i) {
return l(t, e()).then((function () {
return i
}))
} : e, i ? function (i) {
return l(t, e()).then((function () {
throw i
}))
} : e)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(91),
r = i(111);
n(n.S, "Promise", {
try: function (e) {
var t = o.f(this),
i = r(e);
return (i.e ? t.reject : t.resolve)(i.v), t.promise
}
})
}, function (e, t, i) {
var n = i(30),
o = i(1),
r = n.key,
a = n.set;
n.exp({
defineMetadata: function (e, t, i, n) {
a(e, t, o(i), r(n))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = o.key,
l = o.map,
s = o.store;
o.exp({
deleteMetadata: function (e, t) {
var i = arguments.length < 3 ? n : a(arguments[2]),
o = l(r(t), i, !1);
if (o === n || !o.delete(e)) return !1;
if (o.size) return !0;
var c = s.get(t);
return c.delete(i), !!c.size || s.delete(t)
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = i(17),
l = o.has,
s = o.get,
c = o.key,
d = function (e, t, i) {
if (l(e, t, i)) return s(e, t, i);
var o = a(t);
return null !== o ? d(e, o, i) : n
};
o.exp({
getMetadata: function (e, t) {
return d(e, r(t), arguments.length < 3 ? n : c(arguments[2]))
}
})
}, function (e, t, i) {
var o = i(115),
r = i(123),
a = i(30),
l = i(1),
s = i(17),
c = a.keys,
d = a.key,
u = function (e, t) {
var i = c(e, t),
n = s(e);
if (null === n) return i;
var a = u(n, t);
return a.length ? i.length ? r(new o(i.concat(a))) : a : i
};
a.exp({
getMetadataKeys: function (e) {
return u(l(e), arguments.length < 2 ? n : d(arguments[1]))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = o.get,
l = o.key;
o.exp({
getOwnMetadata: function (e, t) {
return a(e, r(t), arguments.length < 3 ? n : l(arguments[2]))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = o.keys,
l = o.key;
o.exp({
getOwnMetadataKeys: function (e) {
return a(r(e), arguments.length < 2 ? n : l(arguments[1]))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = i(17),
l = o.has,
s = o.key,
c = function (e, t, i) {
if (l(e, t, i)) return !0;
var n = a(t);
return null !== n && c(e, n, i)
};
o.exp({
hasMetadata: function (e, t) {
return c(e, r(t), arguments.length < 3 ? n : s(arguments[2]))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = o.has,
l = o.key;
o.exp({
hasOwnMetadata: function (e, t) {
return a(e, r(t), arguments.length < 3 ? n : l(arguments[2]))
}
})
}, function (e, t, i) {
var o = i(30),
r = i(1),
a = i(10),
l = o.key,
s = o.set;
o.exp({
metadata: function (e, t) {
return function (i, o) {
s(e, t, (o !== n ? r : a)(i), l(o))
}
}
})
}, function (e, t, i) {
var n = i(0),
o = i(90)(),
r = i(2).process,
a = "process" == i(20)(r);
n(n.G, {
asap: function (e) {
var t = a && r.domain;
o(t ? t.bind(e) : e)
}
})
}, function (e, t, i) {
var o = i(0),
r = i(2),
a = i(13),
l = i(90)(),
s = i(5)("observable"),
c = i(10),
d = i(1),
u = i(42),
p = i(43),
v = i(14),
h = i(35),
f = h.RETURN,
g = function (e) {
return null == e ? n : c(e)
},
m = function (e) {
var t = e._c;
t && (e._c = n, t())
},
y = function (e) {
return e._o === n
},
b = function (e) {
y(e) || (e._o = n, m(e))
},
x = function (e, t) {
d(e), this._c = n, this._o = e, e = new w(this);
try {
var i = t(e),
o = i;
null != i && ("function" == typeof i.unsubscribe ? i = function () {
o.unsubscribe()
} : c(i), this._c = i)
} catch (t) {
return void e.error(t)
}
y(this) && m(this)
};
x.prototype = p({}, {
unsubscribe: function () {
b(this)
}
});
var w = function (e) {
this._s = e
};
w.prototype = p({}, {
next: function (e) {
var t = this._s;
if (!y(t)) {
var i = t._o;
try {
var n = g(i.next);
if (n) return n.call(i, e)
} catch (e) {
try {
b(t)
} finally {
throw e
}
}
}
},
error: function (e) {
var t = this._s;
if (y(t)) throw e;
var i = t._o;
t._o = n;
try {
var o = g(i.error);
if (!o) throw e;
e = o.call(i, e)
} catch (e) {
try {
m(t)
} finally {
throw e
}
}
return m(t), e
},
complete: function (e) {
var t = this._s;
if (!y(t)) {
var i = t._o;
t._o = n;
try {
var o = g(i.complete);
e = o ? o.call(i, e) : n
} catch (e) {
try {
m(t)
} finally {
throw e
}
}
return m(t), e
}
}
});
var S = function (e) {
u(this, S, "Observable", "_f")._f = c(e)
};
p(S.prototype, {
subscribe: function (e) {
return new x(e, this._f)
},
forEach: function (e) {
var t = this;
return new(a.Promise || r.Promise)((function (i, n) {
c(e);
var o = t.subscribe({
next: function (t) {
try {
return e(t)
} catch (e) {
n(e), o.unsubscribe()
}
},
error: n,
complete: i
})
}))
}
}), p(S, {
from: function (e) {
var t = "function" == typeof this ? this : S,
i = g(d(e)[s]);
if (i) {
var n = d(i.call(e));
return n.constructor === t ? n : new t((function (e) {
return n.subscribe(e)
}))
}
return new t((function (t) {
var i = !1;
return l((function () {
if (!i) {
try {
if (h(e, !1, (function (e) {
if (t.next(e), i) return f
})) === f) return
} catch (e) {
if (i) throw e;
return void t.error(e)
}
t.complete()
}
})),
function () {
i = !0
}
}))
},
of: function () {
for (var e = 0, t = arguments.length, i = new Array(t); e < t;) i[e] = arguments[e++];
return new("function" == typeof this ? this : S)((function (e) {
var t = !1;
return l((function () {
if (!t) {
for (var n = 0; n < i.length; ++n)
if (e.next(i[n]), t) return;
e.complete()
}
})),
function () {
t = !0
}
}))
}
}), v(S.prototype, s, (function () {
return this
})), o(o.G, {
Observable: S
}), i(41)("Observable")
}, function (e, t, i) {
var n = i(0),
o = i(89);
n(n.G + n.B, {
setImmediate: o.set,
clearImmediate: o.clear
})
}, function (e, t, i) {
for (var n = i(87), o = i(27), r = i(15), a = i(2), l = i(14), s = i(40), c = i(5), d = c("iterator"), u = c("toStringTag"), p = s.Array, v = {
CSSRuleList: !0,
CSSStyleDeclaration: !1,
CSSValueList: !1,
ClientRectList: !1,
DOMRectList: !1,
DOMStringList: !1,
DOMTokenList: !0,
DataTransferItemList: !1,
FileList: !1,
HTMLAllCollection: !1,
HTMLCollection: !1,
HTMLFormElement: !1,
HTMLSelectElement: !1,
MediaList: !0,
MimeTypeArray: !1,
NamedNodeMap: !1,
NodeList: !0,
PaintRequestList: !1,
Plugin: !1,
PluginArray: !1,
SVGLengthList: !1,
SVGNumberList: !1,
SVGPathSegList: !1,
SVGPointList: !1,
SVGStringList: !1,
SVGTransformList: !1,
SourceBufferList: !1,
StyleSheetList: !0,
TextTrackCueList: !1,
TextTrackList: !1,
TouchList: !1
}, h = o(v), f = 0; f < h.length; f++) {
var g, m = h[f],
y = v[m],
b = a[m],
x = b && b.prototype;
if (x && (x[d] || l(x, d, p), x[u] || l(x, u, m), s[m] = p, y))
for (g in n) x[g] || r(x, g, n[g], !0)
}
}, function (e, t, i) {
var n = i(2),
o = i(0),
r = i(61),
a = [].slice,
l = /MSIE .\./.test(r),
s = function (e) {
return function (t, i) {
var n = arguments.length > 2,
o = !!n && a.call(arguments, 2);
return e(n ? function () {
("function" == typeof t ? t : Function(t)).apply(this, o)
} : t, i)
}
};
o(o.G + o.B + o.F * l, {
setTimeout: s(n.setTimeout),
setInterval: s(n.setInterval)
})
}, function (e, t, i) {
var o = i(19),
r = i(0),
a = i(31),
l = i(72),
s = i(28),
c = i(17),
d = i(27),
u = i(6),
p = i(327),
v = i(10),
h = i(35),
f = i(125),
g = i(56),
m = i(88),
y = i(3),
b = i(11),
x = i(7),
w = i(12),
S = function (e) {
var t = 1 == e,
i = 4 == e;
return function (r, a, l) {
var s, c, d, u = o(a, l, 3),
p = b(r),
v = t || 7 == e || 2 == e ? new("function" == typeof this ? this : L) : n;
for (s in p)
if (w(p, s) && (d = u(c = p[s], s, r), e))
if (t) v[s] = d;
else if (d) switch (e) {
case 2:
v[s] = c;
break;
case 3:
return !0;
case 5:
return c;
case 6:
return s;
case 7:
v[d[0]] = d[1]
} else if (i) return !1;
return 3 == e || i ? i : v
}
},
C = S(6),
E = function (e) {
return function (t) {
return new k(t, e)
}
},
k = function (e, t) {
this._t = b(e), this._a = d(e), this._i = 0, this._k = t
};
function L(e) {
var t = s(null);
return e != n && (f(e) ? h(e, !0, (function (e, i) {
t[e] = i
})) : l(t, e)), t
}
g(k, "Dict", (function () {
var e, t = this._t,
i = this._a,
o = this._k;
do {
if (this._i >= i.length) return this._t = n, m(1)
} while (!w(t, e = i[this._i++]));
return m(0, "keys" == o ? e : "values" == o ? t[e] : [e, t[e]])
})), L.prototype = null, r(r.G + r.F, {
Dict: L
}), r(r.S, "Dict", {
keys: E("keys"),
values: E("values"),
entries: E("entries"),
forEach: S(0),
map: S(1),
filter: S(2),
some: S(3),
every: S(4),
find: S(5),
findKey: C,
mapPairs: S(7),
reduce: function (e, t, i) {
v(t);
var n, o, r = b(e),
a = d(r),
l = a.length,
s = 0;
if (arguments.length < 3) {
if (!l) throw TypeError("Reduce of empty object with no initial value");
n = r[a[s++]]
} else n = Object(i);
for (; l > s;) w(r, o = a[s++]) && (n = t(n, r[o], o, e));
return n
},
keyOf: p,
includes: function (e, t) {
return (t == t ? p(e, t) : C(e, (function (e) {
return e != e
}))) !== n
},
has: w,
get: function (e, t) {
if (w(e, t)) return e[t]
},
set: function (e, t, i) {
return x && t in Object ? u.f(e, t, a(0, i)) : e[t] = i, e
},
isDict: function (e) {
return y(e) && c(e) === L.prototype
}
})
}, function (e, t, i) {
var n = i(27),
o = i(11);
e.exports = function (e, t) {
for (var i, r = o(e), a = n(r), l = a.length, s = 0; l > s;)
if (r[i = a[s++]] === t) return i
}
}, function (e, t, i) {
var n = i(1),
o = i(49);
e.exports = i(13).getIterator = function (e) {
var t = o(e);
if ("function" != typeof t) throw TypeError(e + " is not iterable!");
return n(t.call(e))
}
}, function (e, t, i) {
var n = i(2),
o = i(13),
r = i(0),
a = i(126);
r(r.G + r.F, {
delay: function (e) {
return new(o.Promise || n.Promise)((function (t) {
setTimeout(a.call(t, !0), e)
}))
}
})
}, function (e, t, i) {
var n = i(127),
o = i(0);
i(13)._ = n._ = n._ || {}, o(o.P + o.F, "Function", {
part: i(126)
})
}, function (e, t, i) {
var n = i(0);
n(n.S + n.F, "Object", {
isObject: i(3)
})
}, function (e, t, i) {
var n = i(0);
n(n.S + n.F, "Object", {
classof: i(39)
})
}, function (e, t, i) {
var n = i(0),
o = i(128);
n(n.S + n.F, "Object", {
define: o
})
}, function (e, t, i) {
var n = i(0),
o = i(128),
r = i(28);
n(n.S + n.F, "Object", {
make: function (e, t) {
return o(r(e), t)
}
})
}, function (e, t, i) {
i(55)(Number, "Number", (function (e) {
this._l = +e, this._i = 0
}), (function () {
var e = this._i++,
t = !(e < this._l);
return {
done: t,
value: t ? n : e
}
}))
}, function (e, t, i) {
var n = i(0),
o = i(94)(/[\\^$*+?.()|[\]{}]/g, "\\$&");
n(n.S, "RegExp", {
escape: function (e) {
return o(e)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(94)(/[&<>"']/g, {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&apos;"
});
n(n.P + n.F, "String", {
escapeHTML: function () {
return o(this)
}
})
}, function (e, t, i) {
var n = i(0),
o = i(94)(/&(?:amp|lt|gt|quot|apos);/g, {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&apos;": "'"
});
n(n.P + n.F, "String", {
unescapeHTML: function () {
return o(this)
}
})
}]), e.exports ? e.exports = t : "function" == typeof n && n.amd ? n((function () {
return t
})) : i.core = t
})));
cu((function (e) {
var t = function (e) {
var t, i = Object.prototype,
n = i.hasOwnProperty,
o = "function" == typeof Symbol ? Symbol : {},
r = o.iterator || "@@iterator",
a = o.asyncIterator || "@@asyncIterator",
l = o.toStringTag || "@@toStringTag";
function s(e, t, i, n) {
var o = t && t.prototype instanceof f ? t : f,
r = Object.create(o.prototype),
a = new A(n || []);
return r._invoke = function (e, t, i) {
var n = d;
return function (o, r) {
if (n === p) throw new Error("Generator is already running");
if (n === v) {
if ("throw" === o) throw r;
return M()
}
for (i.method = o, i.arg = r;;) {
var a = i.delegate;
if (a) {
var l = E(a, i);
if (l) {
if (l === h) continue;
return l
}
}
if ("next" === i.method) i.sent = i._sent = i.arg;
else if ("throw" === i.method) {
if (n === d) throw n = v, i.arg;
i.dispatchException(i.arg)
} else "return" === i.method && i.abrupt("return", i.arg);
n = p;
var s = c(e, t, i);
if ("normal" === s.type) {
if (n = i.done ? v : u, s.arg === h) continue;
return {
value: s.arg,
done: i.done
}
}
"throw" === s.type && (n = v, i.method = "throw", i.arg = s.arg)
}
}
}(e, i, a), r
}
function c(e, t, i) {
try {
return {
type: "normal",
arg: e.call(t, i)
}
} catch (e) {
return {
type: "throw",
arg: e
}
}
}
e.wrap = s;
var d = "suspendedStart",
u = "suspendedYield",
p = "executing",
v = "completed",
h = {};
function f() {}
function g() {}
function m() {}
var y = {};
y[r] = function () {
return this
};
var b = Object.getPrototypeOf,
x = b && b(b(q([])));
x && x !== i && n.call(x, r) && (y = x);
var w = m.prototype = f.prototype = Object.create(y);
function S(e) {
["next", "throw", "return"].forEach((function (t) {
e[t] = function (e) {
return this._invoke(t, e)
}
}))
}
function C(e) {
var t;
this._invoke = function (i, o) {
function r() {
return new Promise((function (t, r) {
! function t(i, o, r, a) {
var l = c(e[i], e, o);
if ("throw" !== l.type) {
var s = l.arg,
d = s.value;
return d && "object" == typeof d && n.call(d, "__await") ? Promise.resolve(d.__await).then((function (e) {
t("next", e, r, a)
}), (function (e) {
t("throw", e, r, a)
})) : Promise.resolve(d).then((function (e) {
s.value = e, r(s)
}), (function (e) {
return t("throw", e, r, a)
}))
}
a(l.arg)
}(i, o, t, r)
}))
}
return t = t ? t.then(r, r) : r()
}
}
function E(e, i) {
var n = e.iterator[i.method];
if (n === t) {
if (i.delegate = null, "throw" === i.method) {
if (e.iterator.return && (i.method = "return", i.arg = t, E(e, i), "throw" === i.method)) return h;
i.method = "throw", i.arg = new TypeError("The iterator does not provide a 'throw' method")
}
return h
}
var o = c(n, e.iterator, i.arg);
if ("throw" === o.type) return i.method = "throw", i.arg = o.arg, i.delegate = null, h;
var r = o.arg;
return r ? r.done ? (i[e.resultName] = r.value, i.next = e.nextLoc, "return" !== i.method && (i.method = "next", i.arg = t), i.delegate = null, h) : r : (i.method = "throw", i.arg = new TypeError("iterator result is not an object"), i.delegate = null, h)
}
function k(e) {
var t = {
tryLoc: e[0]
};
1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t)
}
function L(e) {
var t = e.completion || {};
t.type = "normal", delete t.arg, e.completion = t
}
function A(e) {
this.tryEntries = [{
tryLoc: "root"
}], e.forEach(k, this), this.reset(!0)
}
function q(e) {
if (e) {
var i = e[r];
if (i) return i.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var o = -1,
a = function i() {
for (; ++o < e.length;)
if (n.call(e, o)) return i.value = e[o], i.done = !1, i;
return i.value = t, i.done = !0, i
};
return a.next = a
}
}
return {
next: M
}
}
function M() {
return {
value: t,
done: !0
}
}
return g.prototype = w.constructor = m, m.constructor = g, m[l] = g.displayName = "GeneratorFunction", e.isGeneratorFunction = function (e) {
var t = "function" == typeof e && e.constructor;
return !!t && (t === g || "GeneratorFunction" === (t.displayName || t.name))
}, e.mark = function (e) {
return Object.setPrototypeOf ? Object.setPrototypeOf(e, m) : (e.__proto__ = m, l in e || (e[l] = "GeneratorFunction")), e.prototype = Object.create(w), e
}, e.awrap = function (e) {
return {
__await: e
}
}, S(C.prototype), C.prototype[a] = function () {
return this
}, e.AsyncIterator = C, e.async = function (t, i, n, o) {
var r = new C(s(t, i, n, o));
return e.isGeneratorFunction(i) ? r : r.next().then((function (e) {
return e.done ? e.value : r.next()
}))
}, S(w), w[l] = "Generator", w[r] = function () {
return this
}, w.toString = function () {
return "[object Generator]"
}, e.keys = function (e) {
var t = [];
for (var i in e) t.push(i);
return t.reverse(),
function i() {
for (; t.length;) {
var n = t.pop();
if (n in e) return i.value = n, i.done = !1, i
}
return i.done = !0, i
}
}, e.values = q, A.prototype = {
constructor: A,
reset: function (e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(L), !e)
for (var i in this) "t" === i.charAt(0) && n.call(this, i) && !isNaN(+i.slice(1)) && (this[i] = t)
},
stop: function () {
this.done = !0;
var e = this.tryEntries[0].completion;
if ("throw" === e.type) throw e.arg;
return this.rval
},
dispatchException: function (e) {
if (this.done) throw e;
var i = this;
function o(n, o) {
return l.type = "throw", l.arg = e, i.next = n, o && (i.method = "next", i.arg = t), !!o
}
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var a = this.tryEntries[r],
l = a.completion;
if ("root" === a.tryLoc) return o("end");
if (a.tryLoc <= this.prev) {
var s = n.call(a, "catchLoc"),
c = n.call(a, "finallyLoc");
if (s && c) {
if (this.prev < a.catchLoc) return o(a.catchLoc, !0);
if (this.prev < a.finallyLoc) return o(a.finallyLoc)
} else if (s) {
if (this.prev < a.catchLoc) return o(a.catchLoc, !0)
} else {
if (!c) throw new Error("try statement without catch or finally");
if (this.prev < a.finallyLoc) return o(a.finallyLoc)
}
}
}
},
abrupt: function (e, t) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var o = this.tryEntries[i];
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
var r = o;
break
}
}
r && ("break" === e || "continue" === e) && r.tryLoc <= t && t <= r.finallyLoc && (r = null);
var a = r ? r.completion : {};
return a.type = e, a.arg = t, r ? (this.method = "next", this.next = r.finallyLoc, h) : this.complete(a)
},
complete: function (e, t) {
if ("throw" === e.type) throw e.arg;
return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), h
},
finish: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.finallyLoc === e) return this.complete(i.completion, i.afterLoc), L(i), h
}
},
catch: function (e) {
for (var t = this.tryEntries.length - 1; t >= 0; --t) {
var i = this.tryEntries[t];
if (i.tryLoc === e) {
var n = i.completion;
if ("throw" === n.type) {
var o = n.arg;
L(i)
}
return o
}
}
throw new Error("illegal catch attempt")
},
delegateYield: function (e, i, n) {
return this.delegate = {
iterator: q(e),
resultName: i,
nextLoc: n
}, "next" === this.method && (this.arg = t), h
}
}, e
}(e.exports);
try {
regeneratorRuntime = t
} catch (e) {
Function("r", "regeneratorRuntime = r")(t)
}
}));
var du = new v,
uu = function () {
function e() {
var i = this,
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
t(this, e);
var o = {
page: "",
container: ".container",
row: "",
cols: [],
colequal: [],
colsizes: [],
imageQuality: .92,
elementSelection: !0,
paste: "text",
snippetJSON: {
snippets: []
},
scriptPath: "",
pluginPath: "",
modulePath: "assets/modules/",
assetPath: "assets/",
fontAssetPath: "assets/fonts/",
snippetData: "assets/minimalist-blocks/snippetlist.html",
snippetPath: "",
snippetPathReplace: [],
snippetCategories: [
[120, "Basic"],
[118, "Article"],
[101, "Headline"],
[119, "Buttons"],
[102, "Photos"],
[103, "Profile"],
[116, "Contact"],
[104, "Products"],
[105, "Features"],
[106, "Process"],
[107, "Pricing"],
[108, "Skills"],
[109, "Achievements"],
[110, "Quotes"],
[111, "Partners"],
[112, "As Featured On"],
[113, "Page Not Found"],
[114, "Coming Soon"],
[115, "Help, FAQ"]
],
defaultSnippetCategory: 120,
snippetHandle: !0,
sidePanel: "right",
snippetSampleImage: "",
snippetList: "#divSnippetList",
onRender: function () {},
onContentClick: function () {},
onChange: function () {},
largerImageHandler: "",
colors: ["#ff8f00", "#ef6c00", "#d84315", "#c62828", "#58362f", "#37474f", "#353535", "#f9a825", "#9e9d24", "#558b2f", "#ad1457", "#6a1b9a", "#4527a0", "#616161", "#00b8c9", "#009666", "#2e7d32", "#0277bd", "#1565c0", "#283593", "#9e9e9e"],
builderMode: "",
rowTool: "right",
rowcolOutline: !0,
columnTool: !0,
outlineMode: "",
toolStyle: "",
outlineStyle: "",
snippetAddTool: !0,
elementTool: !0,
elementHighlight: !0,
columnHtmlEditor: !0,
rowHtmlEditor: !0,
htmlSyntaxHighlighting: !0,
snippetOpen: !1,
toolbar: "top",
toolbarDisplay: "auto",
snippetsSidebarDisplay: "auto",
plugins: [],
imageEmbed: !0,
imageselect: "",
fileselect: "",
customTags: [],
buttons: ["bold", "italic", "underline", "formatting", "color", "align", "textsettings", "createLink", "tags", "more", "|", "undo", "redo"],
buttonsMore: ["icon", "image", "|", "list", "font", "formatPara", "|", "html", "preferences"],
lang: new Array,
checkLang: !1,
clearPreferences: !1,
toolbarAddSnippetButton: !1,
animateModal: !0,
fontSizeClassValues: [12, 14, 16, 18, 21, 24, 28, 32, 35, 38, 42, 46, 48, 50, 54, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220],
gradientcolors: [
["linear-gradient(0deg, rgb(255, 57, 25), rgb(249, 168, 37))"],
["linear-gradient(0deg, rgb(255, 57, 25), rgb(255, 104, 15))"],
["linear-gradient(0deg, #FF5722, #FF9800)"],
["linear-gradient(0deg, #613ca2, rgb(110, 123, 217))"],
["linear-gradient(0deg, rgb(65, 70, 206), rgb(236, 78, 130))"],
["linear-gradient(0deg, rgb(0, 150, 102), rgb(90, 103, 197))"],
["linear-gradient(30deg, rgb(249, 119, 148), rgb(98, 58, 162))"],
["linear-gradient(0deg, rgb(223, 70, 137), rgb(90, 103, 197))"],
["linear-gradient(0deg, rgb(40, 53, 147), rgb(90, 103, 197))"],
["linear-gradient(0deg, rgb(21, 101, 192), rgb(52, 169, 239))"],
["linear-gradient(0deg, rgb(32, 149, 219), rgb(139, 109, 230))"],
["linear-gradient(0deg, rgb(90, 103, 197), rgb(0, 184, 201))"],
["linear-gradient(0deg, rgb(0, 184, 201), rgb(253, 187, 45))"],
["linear-gradient(0deg, rgb(255, 208, 100), rgb(239, 98, 159))"],
["linear-gradient(0deg, rgb(0, 214, 223), rgb(130, 162, 253))"],
["linear-gradient(0deg, rgb(50, 234, 251), rgb(248, 247, 126))"],
["linear-gradient(0deg, rgb(141, 221, 255), rgb(255, 227, 255))"],
["linear-gradient(0deg, rgb(255, 170, 170), rgb(255, 255, 200))"],
["linear-gradient(0deg, rgb(239, 239, 239), rgb(252, 252, 252))"]
],
elementEditor: !0,
customval: "",
moduleConfig: [],
elementAnimate: !1,
framework: "",
cellFormat: "",
rowFormat: "",
emailMode: !1,
absolutePath: !1,
emailSnippetCategories: [
[1, "Logo"],
[14, "Call to Action"],
[2, "Title"],
[3, "Title, Subtitle"],
[4, "Info, Title"],
[7, "Paragraph"],
[6, "Heading"],
[8, "Buttons"],
[9, "Callouts"],
[10, "Images + Caption"],
[12, "Images"],
[13, "List"],
[15, "Pricing"],
[16, "Quotes"],
[17, "Profile"],
[18, "Contact Info"],
[19, "Footer"],
[20, "Separator"]
],
defaultEmailSnippetCategory: 14,
undoRedoStyles: !1
};
this.opts = Object.assign(this, o, n),
window.data_basic &&
(this.opts.snippetJSON = window.data_basic, "" === this.opts.snippetPath && (this.opts.snippetPath = window._snippets_path)),
"" === this.opts.scriptPath && (this.opts.scriptPath = this.currentScriptPath()),
window._txt && (this.opts.lang = window._txt), this.settings = this.opts,
"bootstrap" == this.opts.framework ?
(this.opts.row = "row",
this.opts.cols = ["col-md-1", "col-md-2", "col-md-3", "col-md-4", "col-md-5", "col-md-6", "col-md-7", "col-md-8", "col-md-9", "col-md-10", "col-md-11", "col-md-12"],
this.opts.colequal = [], this.opts.colsizes = []) :
"foundation" == this.opts.framework ?
(this.opts.row = "row",
this.opts.cols = ["large-1 columns", "large-2 columns", "large-3 columns", "large-4 columns", "large-5 columns", "large-6 columns", "large-7 columns", "large-8 columns", "large-9 columns", "large-10 columns", "large-11 columns", "large-12 columns"],
this.opts.colequal = [], this.opts.colsizes = []) :
"material" == this.opts.framework ?
(this.opts.row = "mdl-grid",
this.opts.cols = ["mdl-cell mdl-cell--1-col", "mdl-cell mdl-cell--2-col", "mdl-cell mdl-cell--3-col", "mdl-cell mdl-cell--4-col", "mdl-cell mdl-cell--5-col", "mdl-cell mdl-cell--6-col", "mdl-cell mdl-cell--7-col", "mdl-cell mdl-cell--8-col", "mdl-cell mdl-cell--9-col", "mdl-cell mdl-cell--10-col", "mdl-cell mdl-cell--11-col", "mdl-cell mdl-cell--12-col"],
this.opts.colequal = [], this.opts.colsizes = []) :
"uikit" == this.opts.framework ? (
this.opts.row = "", this.opts.cols = [], this.opts.colequal = [], this.opts.colsizes = [], this.opts.cellFormat = '<div class="uk-width-1-1"></div>',
this.opts.rowFormat = '<div class="uk-grid"></div>') :
"" != this.opts.row && this.opts.cols.length > 0 || "" == this.opts.cellFormat && "" == this.opts.rowFormat
&& (
this.opts.row = "row clearfix",
this.opts.cols = ["column sixth", "column fifth", "column fourth", "column third", "column half", "column two-third", "column two-fourth", "column two-fifth", "column two-sixth", "column full"],
this.opts.colequal = [
["column fifth", "column fifth", "column fifth", "column fifth", "column fifth"],
["column fourth", "column fourth", "column fourth", "column fourth"],
["column third", "column third", "column third"],
["column half", "column half"]
], this.opts.colsizes = [
[
["column third", "column third", "column third"],
["column half", "column fourth", "column fourth"]
],
[
["column sixth", "column two-sixth"],
["column fifth", "column two-fifth"],
["column fourth", "column two-fourth"],
["column third", "column two-third"],
["column half", "column half"],
["column two-third", "column third"],
["column two-fourth", "column fourth"],
["column two-fifth", "column fifth"],
["column two-sixth", "column sixth"]
]
]), this.sortableObjects = [];
var r = new p(this);
this.util = r, this.isTouchSupport = r.isTouchSupport(), this.isIE = r.detectIE(), this.opts.clearPreferences && r.clearPreferences(), this.uoTm = null, this.uo = new y(this), this.autoclean = !1, this.filesAdded = "", this.opts.emailMode && this.applyStyle("emailmode", ".is-builder > div {display: block}");
var a = document.querySelector("#_cbhtml");
a || ((a = du.createElement("div")).id = "_cbhtml", du.appendChild(document.body, a)), this.builderStuff = a, w(), this.preferences = new Qd(this), _(this), this.opts.snippetJSON.snippets.length > 0 && Jt(this), this.colTool = new wc(this);
var l = this.opts.onChange;
this.opts.onChange = function () {
var e = l.apply(this, arguments);
return this.activeCol && this.colTool.refreshColumnTool(this.activeCol), this.elmTool.repositionElementTool(), e
}, this.elmTool = new Jd(this), this.element = new fc(this), this.rte = new tu(this), this.tooltip = new ru(this), this.applyBehavior();
var s = 0,
c = this.opts.scriptPath + "config.js";
"" !== this.opts.pluginPath && (c = this.opts.pluginPath + "config.js"), this.loadScript(c).then((function () {
var e, t = i.builderStuff.querySelector(".rte-more-options");
for (e = i.opts.plugins.length - 1; e >= 0; e--) t.querySelector("div").insertAdjacentHTML("afterbegin", '<button title="button not found" data-plugin="' + i.opts.plugins[e] + '">-</button>');
for (e = 0; e < i.opts.plugins.length; e++) {
var n = i.opts.scriptPath + "plugins/" + i.opts.plugins[e] + "/plugin.js";
"" !== i.opts.pluginPath && (n = i.opts.pluginPath + "plugins/" + i.opts.plugins[e] + "/plugin.js"), i.loadScript(n).then((function () {
if (++s == i.opts.plugins.length) {
var e = t.querySelectorAll("[data-plugin]");
Array.prototype.forEach.call(e, (function (e) {
e.outerHTML = ""
})), i.opts.onPluginsLoaded && i.opts.onPluginsLoaded(), i.tooltip.setAll(), new q({
selector: ".is-draggable"
})
}
}))
}
}), (function () {
console.log("Fail to load config")
})), new su, this.colorPicker = new rd({
lang: this.opts.lang,
colors: this.opts.colors
}), document.addEventListener("click", (function (e) {
for (var t = (e = e || window.event).target || e.srcElement, n = du.hasClass(t.parentNode, "is-builder"), o = du.hasClass(t, "is-builder"), a = !1, l = !1, s = !1, c = !1, d = !1, u = !1, p = !1, v = !1, h = !1, f = !1, g = !1, m = !1, y = !1, b = t; b && b.tagName && "BODY" !== b.tagName && "HTML" !== b.tagName;) {
if (du.hasClass(b, "is-builder") && (a = !0), du.hasClass(b, "is-modal") && (l = !0), du.hasClass(b, "is-side") && (s = !0), du.hasClass(b, "is-pop") && (c = !0), du.hasClass(b, "is-tool") && (d = !0), du.hasClass(b, "is-rte-tool") && (u = !0), du.hasClass(b, "is-rte-pop") && (p = !0), du.hasClass(b, "row-add-initial") && (v = !0), (du.hasClass(b, "sl-wrapper") || du.hasClass(b, "sl-overlay") || du.hasClass(b, "sl-close")) && (h = !0), (du.hasClass(b, "is-selectbox") || du.hasClass(b, "is-selectbox-options")) && (f = !0), i.opts.specialElementClasses)
for (var x = 0; x < i.opts.specialElementClasses.length; x++) du.hasClass(b, i.opts.specialElementClasses[x]) && (y = !0);
"divImageTool" === b.id && (g = !0), "divImageResizer" === b.id && (m = !0), b = b.parentNode
}
if (!f) {
var w = document.querySelectorAll(".is-selectbox-options");
Array.prototype.forEach.call(w, (function (e) {
e.style.display = "none"
}))
}
var S = !1,
C = document.querySelector("#divImageResizer");
if (C && "1" === C.getAttribute("data-resized") && (S = !0), !S) {
if (!(l || h || g || m || "img" === t.tagName.toLowerCase())) {
document.querySelector("#divImageTool").style.display = "", i.activeImage = null;
var E = document.querySelector("#divImageResizer");
E.style.display = "none", E.style.top = "-10px", E.style.left = "-10px", E.style.width = "1px", E.style.height = "1px", i.moveable.updateRect(), document.querySelector(".moveable-control-box").style.display = "none"
}
if ((!(a || l || s || c || d || u || p || v || h || y) || n && !v || o) && (r.clearActiveCell(), r.clearControls()), !c && !du.parentsHasId(t, "_cbhtml")) {
var k = document.querySelectorAll(".is-pop");
Array.prototype.forEach.call(k, (function (e) {
du.parentsHasId(e, "_cbhtml") || (e.style.display = "")
}))
}
}
})), document.addEventListener("mousedown", (function (e) {
var t = (e = e || window.event).target || e.srcElement;
du.parentsHasClass(t, "row-handle") && r.clearControls()
})), document.addEventListener("keydown", (function (e) {
90 === e.which && (event.ctrlKey || event.metaKey) && (e.shiftKey ? i.uo.doRedo() : e.altKey || i.uo.doUndo()), 89 === e.which && e.ctrlKey && (e.altKey || i.uo.doRedo())
})), document.body.addEventListener("mscontrolselect", (function (e) {
e.preventDefault()
})), window._cb = this, window.applyLargerImage = this.applyLargerImage, window.selectFile = this.selectFile, window.selectImage = this.selectImage, window.imageLoaded = this.imageLoaded.bind(this)
}
return n(e, [{
key: "applyBehavior",
value: function () {
var e = this,
t = this.util,
i = document.querySelectorAll(this.opts.container);
Array.prototype.forEach.call(i, (function (i) {
if (e.opts.absolutePath) {
var n = i.querySelectorAll("a");
Array.prototype.forEach.call(n, (function (e) {
var t = e.href;
e.setAttribute("href", t)
}));
var o = i.querySelectorAll("img");
Array.prototype.forEach.call(o, (function (e) {
var t = e.src;
e.setAttribute("src", t)
}))
}
if (du.addClass(i, "is-builder"), null !== localStorage.getItem("_toolstyle")) {
var r = localStorage.getItem("_toolstyle");
e.preferences.setToolStyle(r)
}
if (null !== localStorage.getItem("_outlinestyle")) {
var a = localStorage.getItem("_outlinestyle");
e.preferences.setOutlineStyle(a)
}
if (du.elementChildren(i).forEach((function (t) {
du.hasClass(t, "row-add-initial") || ((t.style.marginLeft || t.style.marginRight) && (t.style.border = "none"), e.rowtool = new mc(e), e.rowtool.render(t), new bc(e).render(t), du.elementChildren(t).forEach((function (t) {
if (!du.hasClass(t, "is-row-tool") && !du.hasClass(t, "is-rowadd-tool")) {
"readonly" === t.getAttribute("data-mode") && (t.setAttribute("data-noedit", ""), t.removeAttribute("data-mode")), "readonly-protected" === t.getAttribute("data-mode") && (t.setAttribute("data-protected", ""), t.removeAttribute("data-mode"));
var i = !1;
t.hasAttribute("data-noedit") && (i = !0);
var n = !1;
t.hasAttribute("data-protected") && (n = !0);
var o = !1;
if (t.hasAttribute("data-html") && (o = !0), !o && !i && !n) t.querySelectorAll("p,h1,h2,h3,h4,h5,h6,table,ul,ol,pre,blockquote,code,figcaption,label,legend,button,a").length > 0 && (t.contentEditable = !0);
e.element.applyBehavior(t), t.getAttribute("data-click") || (t.addEventListener("click", e.handleCellClick.bind(e, t)), t.addEventListener("keydown", e.handleCellKeypress.bind(e)), t.addEventListener("keydown", e.handleCellKeydown.bind(e, t)), t.addEventListener("keyup", e.handleCellKeyup.bind(e, t)), t.addEventListener("paste", e.handleCellPaste.bind(e, t)), t.setAttribute("data-click", !0))
}
})))
})), !i.getAttribute("data-sort") && !i.hasAttribute("nogrid")) {
var l = navigator.userAgent,
s = l.indexOf("Safari") > -1;
l.indexOf("Chrome") > -1 && s && (s = !1);
var c = new gt(i, {
forceFallback: s,
scroll: !0,
invertSwap: !0,
group: "shared",
direction: "dummy",
animation: 300,
handle: ".row-handle",
onStart: function () {
e.uo.saveForUndo(), e.colTool.hideColumnTool(), e.elmTool.hide()
},
onEnd: function () {
e.opts.emailMode || du.hasClass(e.activeCol.parentNode, "row-outline") && (e.colTool.refreshColumnTool(e.activeCol), e.colTool.showColumnTool(e.activeCol))
},
onAdd: function (i) {
var n = i.item;
if (n.getAttribute("data-id")) {
var o, r = n.getAttribute("data-id"),
a = e.opts.snippetJSON.snippets.filter((function (e) {
return e.id + "" === r && e
})),
l = a[0].html,
s = a[0].noedit;
o = -1 === l.indexOf("row clearfix"), e.opts.emailMode && (o = !1);
var c = e.opts.row,
d = e.opts.cols;
if ("" !== c && 12 === d.length && (l = (l = (l = (l = (l = (l = (l = (l = (l = (l = (l = l.replace(new RegExp("row clearfix", "g"), c)).replace(new RegExp("column full", "g"), d[11])).replace(new RegExp("column half", "g"), d[5])).replace(new RegExp("column third", "g"), d[3])).replace(new RegExp("column fourth", "g"), d[2])).replace(new RegExp("column fifth", "g"), d[1])).replace(new RegExp("column sixth", "g"), d[1])).replace(new RegExp("column two-third", "g"), d[7])).replace(new RegExp("column two-fourth", "g"), d[8])).replace(new RegExp("column two-fifth", "g"), d[9])).replace(new RegExp("column two-sixth", "g"), d[9])), l = l.replace(/{id}/g, t.makeId()), e.opts.onAdd && (l = e.opts.onAdd(l)), e.opts.snippetPathReplace.length > 0 && "" != e.opts.snippetPathReplace[0]) {
var u = new RegExp(e.opts.snippetPathReplace[0], "g");
l = l.replace(u, e.opts.snippetPathReplace[1]);
var p = e.opts.snippetPathReplace[0].replace(/\//g, "%2F"),
v = e.opts.snippetPathReplace[1].replace(/\//g, "%2F"),
h = new RegExp(p, "g");
l = l.replace(h, v)
}
if (o) l = '<div class="'.concat(e.opts.row, '"><div class="').concat(e.opts.cols[e.opts.cols.length - 1], '"').concat(s ? " data-noedit" : "", ">").concat(l, "</div></div>"), n.removeAttribute("draggable"), du.removeClass(n, "snippet-item"), n.outerHTML = l;
else {
var f = du.createElement("div");
f.innerHTML = l;
var g = f.querySelectorAll("[data-html]");
Array.prototype.forEach.call(g, (function (e) {
l = (l = decodeURIComponent(e.getAttribute("data-html"))).replace(/{id}/g, t.makeId());
for (var i = 1; i <= 20; i++) l = l.replace("[%HTML" + i + "%]", void 0 === e.getAttribute("data-html-" + i) ? "" : decodeURIComponent(e.getAttribute("data-html-" + i)));
e.innerHTML = l
})), l = f.innerHTML, n.removeAttribute("draggable"), du.removeClass(n, "snippet-item"), n.innerHTML = "";
var m = document.createRange();
m.setStart(n, 0), n.appendChild(m.createContextualFragment(l)), n.outerHTML = n.innerHTML
}
e.applyBehavior(), e.opts.onChange(), e.elmTool.hide()
}
}
});
e.sortableObjects.push(c), i.setAttribute("data-sort", !0)
}
}));
var n = document.querySelectorAll(".is-subblock");
Array.prototype.forEach.call(n, (function (e) {
e.contentEditable = !0
})), t.checkEmpty(), this.opts.onRender()
}
}, {
key: "html",
value: function (e) {
var t = this.util,
i = new g(this);
if (e);
else {
var n = document.querySelectorAll(this.opts.container);
if (n.length > 1) {
var o = t.cellSelected();
e = o ? o.parentNode.parentNode : n[0]
} else e = n[0];
if ("" !== this.opts.page) {
var r = document.querySelector(this.opts.page);
r && (e = r)
}
}
return i.readHtml(e)
}
}, {
key: "viewHtmlNormal",
value: function () {
new g(this).viewHtmlNormal()
}
}, {
key: "viewHtmlLarger",
value: function () {
new g(this).viewHtmlLarger()
}
}, {
key: "readHtml",
value: function (e, t, i) {
return new g(this).readHtml(e, t, i)
}
}, {
key: "fromViewToActual",
value: function (e) {
return new g(this).fromViewToActual(e)
}
}, {
key: "colorpicker",
value: function (e, t) {
return new rd({
onPick: e,
color: t,
colors: this.opts.colors,
animateModal: this.opts.animateModal,
elementToAnimate: this.opts.container,
lang: this.opts.lang
})
}
}, {
key: "gradientpicker",
value: function () {
return new yd({
gradientcolors: this.opts.gradientcolors,
colors: this.opts.colors,
animateModal: this.opts.animateModal,
elementToAnimate: this.opts.container,
lang: this.opts.lang
})
}
}, {
key: "dropdown",
value: function (e, t) {
new O(e, t)
}
}, {
key: "destroy",
value: function () {
if (this.util.clearControls(), this.util.builderStuff()) {
var e = new g(this),
t = document.querySelectorAll(this.opts.container);
Array.prototype.forEach.call(t, (function (t) {
t.innerHTML = e.readHtml(t, !0)
})), Array.prototype.forEach.call(t, (function (e) {
e.removeAttribute("data-sort"), du.removeClass(e, "is-builder")
})), Array.prototype.forEach.call(this.sortableObjects, (function (e) {
try {
e.destroy()
} catch (e) {}
})), this.builderStuff.parentNode.removeChild(this.builderStuff), this.builderStuff = null
}
}
}, {
key: "saveImages",
value: function (e, t) {
new nu({
page: this.opts.page,
container: this.opts.container,
customval: this.opts.customval,
handler: e,
onComplete: t
}).save()
}
}, {
key: "clearFont",
value: function () {
this.rte.clearFont()
}
}, {
key: "applyFont",
value: function (e, t, i) {
this.rte.applyFont(e, t, i)
}
}, {
key: "setFont",
value: function (e, t, i, n) {
this.rte.setFont(e, t, i, n)
}
}, {
key: "addIcon",
value: function (e) {
this.rte.addIcon(e)
}
}, {
key: "applyLargerImage",
value: function (e) {
var t = document.querySelectorAll(".form-upload-larger");
Array.prototype.forEach.call(t, (function (t) {
du.hasClass(t, "please-wait") && (du.removeClass(t, "please-wait"), t.parentNode.parentNode.querySelector('input[type="text"]').value = e, t.parentNode.parentNode.querySelector('input[type="file"]').value = "")
}))
}
}, {
key: "selectFile",
value: function (e) {
var t = document.querySelector(".is-modal.fileselect"),
i = document.querySelector(".is-modal.createlink .input-url");
i.value = e, i.focus(), du.removeClass(t, "active")
}
}, {
key: "selectImage",
value: function (e) {
var t, i = document.querySelector(".is-modal.imageselect");
du.hasClass(document.querySelector(".is-modal.imagelink"), "active") && (t = document.querySelector(".is-modal.imagelink .input-src")), du.hasClass(document.querySelector(".is-modal.insertimage"), "active") && (t = document.querySelector(".is-modal.insertimage .input-src")), t.value = e, t.focus(), du.removeClass(i, "active")
}
}, {
key: "LightenDarkenColor",
value: function (e, t) {
return this.util.LightenDarkenColor(e, t)
}
}, {
key: "pickColor",
value: function (e, t) {
new rd({
colors: this.opts.colors,
animateModal: !1,
lang: this.opts.lang
}).open(e, t)
}
}, {
key: "addSnippet",
value: function (e, t, i) {
this.util.addSnippet(e, t, i)
}
}, {
key: "viewSnippets",
value: function () {
this.rte.viewSnippets()
}
}, {
key: "saveForUndo",
value: function (e) {
this.uo.saveForUndo(e)
}
}, {
key: "imageLoaded",
value: function (e) {
e.removeAttribute("onload"), this.activeCol && this.colTool.refreshColumnTool(this.activeCol)
}
}, {
key: "getActiveModule",
value: function () {
return document.querySelector("[data-module-active]")
}
}, {
key: "getModuleSettings",
value: function () {
var e = document.querySelector("[data-module-active]");
return decodeURIComponent(e.getAttribute("data-settings"))
}
}, {
key: "setModuleHtml",
value: function (e) {
document.querySelector("#hidContentModuleCode").value = e
}
}, {
key: "setModuleSettings",
value: function (e) {
document.querySelector("#hidContentModuleSettings").value = e
}
}, {
key: "makeId",
value: function () {
return this.util.makeId()
}
}, {
key: "setTooltip",
value: function (e) {
this.tooltip.setAll(e)
}
}, {
key: "undo",
value: function () {
this.uo.doUndo()
}
}, {
key: "redo",
value: function () {
this.uo.doRedo()
}
}, {
key: "addHtml",
value: function (e) {
du.appendHtml(this.builderStuff, e)
}
}, {
key: "addCss",
value: function (e) {
du.appendHtml(document.head, e)
}
}, {
key: "addButton",
value: function (e, t, i, n) {
var o = this,
r = this.builderStuff.querySelector(".is-rte-tool"),
a = this.builderStuff.querySelector(".rte-more-options"),
l = !1;
if (r.querySelector('[data-plugin="' + e + '"]') ? r.querySelector('[data-plugin="' + e + '"]').outerHTML = t : a.querySelector('[data-plugin="' + e + '"]') ? (a.querySelector('[data-plugin="' + e + '"]').outerHTML = t, l = !0) : (a.querySelector("div").insertAdjacentHTML("afterbegin", t), l = !0), !r.querySelector(".rte-more") && l) {
r.insertAdjacentHTML("beforeend", '<button title="'.concat(this.util.out("More"), '" class="rte-more"><svg class="is-icon-flex" style="width:13px;height:13px;"><use xlink:href="#ion-more"></use></svg></button>'));
var s = this.rteTool.querySelector("button.rte-more");
s && du.addEventListener(s, "click", (function () {
o.rte.showRteMore()
}))
}
var c = r.querySelector(i);
(c = c || a.querySelector(i)) && (c.setAttribute("data-title", c.getAttribute("title")), du.addEventListener(c, "click", (function (e) {
n(e)
})))
}
}, {
key: "showModal",
value: function (e, t, i, n) {
this.util.showModal(e, t, i, n)
}
}, {
key: "hideModal",
value: function (e) {
this.util.hideModal(e)
}
}, {
key: "showSidePanel",
value: function (e) {
var t = this.builderStuff.querySelectorAll(".is-side");
Array.prototype.forEach.call(t, (function (e) {
du.removeClass(e, "active")
})), du.addClass(e, "active")
}
}, {
key: "hideSidePanel",
value: function (e) {
du.removeClass(e, "active")
}
}, {
key: "getScriptPath",
value: function () {
return this.opts.scriptPath
}
}, {
key: "getSnippetPath",
value: function () {
return this.opts.snippetData.substring(0, this.opts.snippetData.lastIndexOf("/") + 1)
}
}, {
key: "out",
value: function (e) {
return this.util.out(e)
}
}, {
key: "getScope",
value: function () {
var e, t = document.querySelectorAll(this.opts.container);
if (t.length > 1) {
var i = this.util.cellSelected();
e = i ? i.parentNode.parentNode : t[0]
} else e = t[0];
if ("" !== this.opts.page) {
var n = document.querySelector(this.opts.page);
n && (e = n)
}
return e
}
}, {
key: "pasteHtmlAtCaret",
value: function (e, t) {
this.util.pasteHtmlAtCaret(e, t)
}
}, {
key: "getScript",
value: function (e, t) {
this.loadScript(e).then((function () {
t && t()
}), (function () {
console.log("Fail to load config")
}))
}
}, {
key: "getScripts",
value: function (e, t) {
var i = this,
n = 0;
this.loadScript(e[n]).then((function () {
n = i._helper1(n, e, t)
}))
}
}, {
key: "_helper1",
value: function (e, t, i) {
var n = this;
if (++e < t.length) return this.loadScript(t[e]).then((function () {
e = n._helper1(e, t, i)
})), e;
i && i()
}
}, {
key: "includeJs",
value: function (e, t) {
-1 == this.filesAdded.indexOf("[" + e + "]") ? (this.getScript(e, t), this.filesAdded += "[" + e + "]") : t && t()
}
}, {
key: "includeCss",
value: function (e) {
if (-1 == this.filesAdded.indexOf("[" + e + "]")) {
var t = document.createElement("link");
t.setAttribute("rel", "stylesheet"), t.setAttribute("type", "text/css"), t.setAttribute("href", e), document.getElementsByTagName("head")[0].appendChild(t), this.filesAdded += "[" + e + "]"
}
}
}, {
key: "applyStyle",
value: function (e, t) {
if (-1 == this.filesAdded.indexOf("[" + e + "]")) {
var i = document.createElement("style");
i.innerHTML = t, document.getElementsByTagName("head")[0].appendChild(i), this.filesAdded += "[" + e + "]"
}
}
}, {
key: "viewHtml",
value: function (e) {
new g(this).view("full", e)
}
}, {
key: "viewPreferences",
value: function () {
this.preferences.view()
}
}, {
key: "viewConfig",
value: function () {
this.preferences.view()
}
}, {
key: "loadHtml",
value: function (e, t) {
var i = this.util;
if (t);
else {
var n = document.querySelectorAll(this.opts.container);
if (n.length > 1) {
var o = i.cellSelected();
t = o ? o.parentNode.parentNode : n[0]
} else t = n[0];
if ("" !== this.opts.page) {
var r = document.querySelector(this.opts.page);
r && (t = r)
}
}
t.innerHTML = e, this.applyBehavior(), this.opts.onChange(), this.opts.onRender()
}
}, {
key: "loadHTML",
value: function (e) {
this.loadHtml(e)
}
}, {
key: "handleCellClick",
value: function (e, t) {
this.util.clearActiveCell(), this.activeCol = e;
var i = t.target;
du.addClass(e, "cell-active");
var n = e.parentNode;
du.addClass(n, "row-active");
var o = document.querySelectorAll(this.opts.container);
if (Array.prototype.forEach.call(o, (function (e) {
du.removeClass(e, "builder-active")
})), du.addClass(n.parentNode, "builder-active"), n.childElementCount - 2 == 1 || du.addClass(n, "row-outline"), e.hasAttribute("data-html") || this.opts.onContentClick(t), this.element.click(e, t), this.colTool.click(e), this.elmTool.click(e, t), this.rte.click(e, t), "a" === i.tagName.toLowerCase() || du.parentsHasElement(i, "a")) return !1
}
}, {
key: "handleCellKeypress",
value: function (e) {
var t = this;
e.ctrlKey || e.metaKey || (null === this.uoTm ? (this.uo.saveForUndo(), this.uoTm = setTimeout((function () {
t.uoTm = null
}), 1e3)) : (clearTimeout(this.uoTm), this.uoTm = setTimeout((function () {
t.uoTm = null
}), 1e3)))
}
}, {
key: "handleCellKeydown",
value: function (e, t) {
var i, n, o;
if (((t.ctrlKey || t.metaKey) && 86 === t.which && this.handleCellPaste(e, t), this.opts.elementSelection && !this.emailMode) && ((t.ctrlKey || t.metaKey) && 65 === t.which)) try {
window.getSelection ? i = window.getSelection().getRangeAt(0).commonAncestorContainer.parentNode : document.selection && (i = document.selection.createRange().parentElement()), du.hasClass(i.parentNode.parentNode, "is-builder") || du.selectElementContents(i), t.preventDefault()
} catch (t) {}
if (46 === t.keyCode) try {
if (window.getSelection ? n = window.getSelection().getRangeAt(0).commonAncestorContainer : document.selection && (n = document.selection.createRange()), "<br>" === n.innerHTML) n.nextElementSibling && (n.parentNode.removeChild(n), t.preventDefault())
} catch (t) {}
if (8 === t.keyCode) try {
if (window.getSelection ? o = window.getSelection().getRangeAt(0).commonAncestorContainer : document.selection && (o = document.selection.createRange()), "" === o.textContent) o.previousElementSibling || t.preventDefault()
} catch (t) {}
}
}, {
key: "handleCellKeyup",
value: function (e, t) {
var i, n;
du.textSelection() && ("38" == t.keyCode ? this.util.saveSelection() : "40" == t.keyCode ? this.util.saveSelection() : "37" == t.keyCode ? this.util.saveSelection() : "39" == t.keyCode && this.util.saveSelection());
try {
window.getSelection ? (n = window.getSelection().getRangeAt(0).commonAncestorContainer, i = window.getSelection().getRangeAt(0).commonAncestorContainer.parentNode) : document.selection && (n = document.selection.createRange(), i = document.selection.createRange().parentElement())
} catch (t) {
return
}
if (13 === t.keyCode && !t.shiftKey) {
var o = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor),
r = window.opera,
a = navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
(o || r) && ("p" !== i.tagName.toLowerCase() && "div" !== i.tagName.toLowerCase() || document.execCommand("formatBlock", !1, "<p>")), a && n && document.execCommand("formatBlock", !1, "<p>");
var l = e.querySelectorAll("[data-keep]");
Array.prototype.forEach.call(l, (function (e) {
e.removeAttribute("data-keep")
}))
}
this.opts.onChange(), this.elmTool.hide()
}
}, {
key: "handleCellPaste",
value: function (e) {
var t = this;
this.uo.saveForUndo();
var i = this.util;
i.saveSelection();
var n, o, r = document.querySelector("#idContentWord");
r && r.parentNode.removeChild(r), window.getSelection ? n = 3 === (o = window.getSelection().getRangeAt(0).commonAncestorContainer).nodeType ? o.parentNode : o : document.selection && (o = document.selection.createRange(), n = document.selection.createRange().parentElement());
var a = '<div style="position:absolute;z-index:-1000;top:' + (n.getBoundingClientRect().top + window.pageYOffset) + 'px;left:-1000px;width:1px;height:1px;overflow:auto;" name="idContentWord" id="idContentWord" contenteditable="true"></div>';
du.appendHtml(this.builderStuff, a), (r = document.querySelector("#idContentWord")).focus(), setTimeout((function () {
try {
var n = "",
o = document.querySelector("#idContentWord"),
r = !1,
a = o.innerText,
l = /^http[s]?:\/\/(((www.youtube.com\/watch\?(feature=player_detailpage&)?)v=)|(youtu.be\/))([^#&?]*)/.exec(a),
s = /^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/)|(video\/))?([0-9]+)\/?/.exec(a);
if (null !== l || null !== s) {
if (null !== l && l.length >= 7) a = "//www.youtube.com/embed/" + l[6] + "?rel=0";
if (null !== s && s.length >= 7) a = "//player.vimeo.com/video/" + s[6];
n = '<div class="embed-responsive embed-responsive-16by9"><iframe width="560" height="315" src="' + a + '" frameborder="0" allowfullscreen=""></iframe></div>', r = !0
}
if (!r)
if ("text" === t.opts.paste) {
var c = o.querySelectorAll("p,h1,h2,h3,h4,h5,h6");
Array.prototype.forEach.call(c, (function (e) {
e.innerHTML = e.innerHTML + " "
})), n = o.innerText
} else n = o.innerHTML, n = "html" === t.opts.paste ? i.cleanHTML(n, !1) : i.cleanHTML(n, !0), o.innerHTML = n, n = o.innerHTML;
(o = document.querySelector("#idContentWord")) && o.parentNode.removeChild(o), i.restoreSelection();
var d = window.getSelection(),
u = d.getRangeAt(0);
u.extractContents(), u.collapse(!0);
var p = u.createContextualFragment(n),
v = p.lastChild;
u.insertNode(p);
var h = e.querySelectorAll("p,h1,h2,h3,h4,h5,h6");
Array.prototype.forEach.call(h, (function (e) {
var t = e.querySelectorAll("p,h1,h2,h3,h4,h5,h6");
Array.prototype.forEach.call(t, (function (e) {
e.outerHTML = e.innerHTML
}))
})), u.setStartAfter(v), u.setEndAfter(v), u.collapse(!1);
var f = u.commonAncestorContainer;
if (f && f.parentNode) try {
f.parentNode.normalize()
} catch (e) {}
d.removeAllRanges(), d.addRange(u), t.applyBehavior(), t.opts.onChange(), t.opts.onRender()
} catch (e) {
var g = document.querySelector("#idContentWord");
g && g.parentNode.removeChild(g)
}
}), 800)
}
}, {
key: "cellSelected",
value: function () {
return this.util.cellSelected()
}
}, {
key: "loadScript",
value: function (e, t) {
var i = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2],
n = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3];
return new Promise((function (o, r) {
var a = document.createElement("script"),
l = t || document.getElementsByTagName("script")[0];
function s(e, t) {
(t || !a.readyState || /loaded|complete/.test(a.readyState)) && (a.onload = null, a.onreadystatechange = null, a = void 0, t ? r() : o())
}
a.async = i, a.defer = n, a.onload = s, a.onreadystatechange = s, a.src = e, l.parentNode.insertBefore(a, l)
}))
}
}, {
key: "currentScriptPath",
value: function () {
for (var e, t, i = document.getElementsByTagName("script"), n = 0; n < i.length; n++) {
var o = i[n].src;
e = "contentbuilder.js", o.indexOf(e) > -1 && (t = o.substring(0, o.indexOf(e))), e = "contentbuilder.min.js", o.indexOf(e) > -1 && (t = o.substring(0, o.indexOf(e)))
}
return t
}
}], [{
key: "run",
value: function () {
var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
return new e(t)
}
}]), e
}();
return function (e) {
var t = e.jQuery;
t && (t.contentbuilder = function (e) {
return new uu(e)
})
}(window), uu
}();