text: /*!
   * License https://froala.com/wysiwyg-editor/terms/
   * Copyright 2014-2019 Froala Labs
   */
  
  !function (t, e) {
      "object" == typeof exports && "undefined" != typeof module ? e(require("froala-editor")) : "function" == typeof define && define.amd ? define(["froala-editor"], e) : e(t.FroalaEditor)
  }(this, function (t) {
      "use strict";
      t = t && t.hasOwnProperty("default") ? t["default"] : t, Object.assign(t.POPUP_TEMPLATES, {
          "forms.edit": "[_BUTTONS_]",
          "forms.update": "[_BUTTONS_][_TEXT_LAYER_]"
      }), Object.assign(t.DEFAULTS, {
          formEditButtons: ["inputStyle", "inputEdit"],
          formStyles: {"fr-rounded": "Rounded", "fr-large": "Large"},
          formMultipleStyles: !0,
          formUpdateButtons: ["inputBack", "|"]
      }), t.PLUGINS.forms = function (i) {
          var r, u = i.$;
  
          function e(t) {
              t.preventDefault(), i.selection.clear(), u(this).data("mousedown", !0)
          }
  
          function o(t) {
              u(this).data("mousedown") && (t.stopPropagation(), u(this).removeData("mousedown"), f(r = this)), t.preventDefault()
          }
  
          function n() {
              i.$el.find("input, textarea, button").removeData("mousedown")
          }
  
          function a() {
              u(this).removeData("mousedown")
          }
  
          function p() {
              return r || null
          }
  
          function f(t) {
              var e = i.popups.get("forms.edit");
              e || (e = function s() {
                  var t = "";
                  0 < i.opts.formEditButtons.length && (t = '<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formEditButtons), "</div>"));
                  var e = {buttons: t}, o = i.popups.create("forms.edit", e);
                  return i.$wp && i.events.$on(i.$wp, "scroll.link-edit", function () {
                      p() && i.popups.isVisible("forms.edit") && f(p())
                  }), o
              }());
              var o = u(r = t);
              i.popups.refresh("forms.edit"), i.popups.setContainer("forms.edit", i.$sc);
              var n = o.offset().left + o.outerWidth() / 2, a = o.offset().top + o.outerHeight();
              i.popups.show("forms.edit", n, a, o.outerHeight())
          }
  
          function s() {
              var t = i.popups.get("forms.update"), e = p();
              if (e) {
                  var o = u(e);
                  o.is("button") ? t.find('input[type="text"][name="text"]').val(o.text()) : t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))
              }
              t.find('input[type="text"][name="text"]').trigger("change")
          }
  
          function d() {
              r = null
          }
  
          function l(t) {
              if (t) return i.popups.onRefresh("forms.update", s), i.popups.onHide("forms.update", d), !0;
              var e = "";
              1 <= i.opts.formUpdateButtons.length && (e = '<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formUpdateButtons), "</div>"));
              var o = 0, n = {
                  buttons: e,
                  text_layer: '<div class="fr-forms-text-layer fr-layer fr-active"> \n    <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++o, ' "></div>\n    <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2, '" type="button">').concat(i.language.translate("Update"), "</button></div></div>")
              };
              return i.popups.create("forms.update", n)
          }
  
          return {
              _init: function c() {
                  !function t() {
                      i.events.$on(i.$el, i._mousedown, "input, textarea, button", e), i.events.$on(i.$el, i._mouseup, "input, textarea, button", o), i.events.$on(i.$el, "touchmove", "input, textarea, button", a), i.events.$on(i.$el, i._mouseup, n), i.events.$on(i.$win, i._mouseup, n), l(!0)
                  }(), i.events.$on(i.$el, "submit", "form", function (t) {
                      return t.preventDefault(), !1
                  })
              }, updateInput: function m() {
                  var t = i.popups.get("forms.update"), e = p();
                  if (e) {
                      var o = u(e), n = t.find('input[type="text"][name="text"]').val() || "";
                      n.length && (o.is("button") ? o.text(n) : o.attr("placeholder", n)), i.popups.hide("forms.update"), f(e)
                  }
              }, getInput: p, applyStyle: function v(t, e, o) {
                  void 0 === e && (e = i.opts.formStyles), void 0 === o && (o = i.opts.formMultipleStyles);
                  var n = p();
                  if (!n) return !1;
                  if (!o) {
                      var a = Object.keys(e);
                      a.splice(a.indexOf(t), 1), u(n).removeClass(a.join(" "))
                  }
                  u(n).toggleClass(t)
              }, showUpdatePopup: function h() {
                  var t = p();
                  if (t) {
                      var e = u(t), o = i.popups.get("forms.update");
                      o || (o = l()), i.popups.isVisible("forms.update") || i.popups.refresh("forms.update"), i.popups.setContainer("forms.update", i.$sc);
                      var n = e.offset().left + e.outerWidth() / 2, a = e.offset().top + e.outerHeight();
                      i.popups.show("forms.update", n, a, e.outerHeight())
                  }
              }, showEditPopup: f, back: function b() {
                  i.events.disableBlur(), i.selection.restore(), i.events.enableBlur();
                  var t = p();
                  t && i.$wp && ("BUTTON" === t.tagName && i.selection.restore(), f(t))
              }
          }
      }, t.RegisterCommand("updateInput", {
          undo: !1, focus: !1, title: "Update", callback: function () {
              this.forms.updateInput()
          }
      }), t.DefineIcon("inputStyle", {
          NAME: "magic",
          SVG_KEY: "inlineStyle"
      }), t.RegisterCommand("inputStyle", {
          title: "Style", type: "dropdown", html: function () {
              var t = '<ul class="fr-dropdown-list">', e = this.opts.formStyles;
              for (var o in e) e.hasOwnProperty(o) && (t += '<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(o, '">').concat(this.language.translate(e[o]), "</a></li>"));
              return t += "</ul>"
          }, callback: function (t, e) {
              var o = this.forms.getInput();
              o && (this.forms.applyStyle(e), this.forms.showEditPopup(o))
          }, refreshOnShow: function (t, e) {
              var o = this.$, n = this.forms.getInput();
              if (n) {
                  var a = o(n);
                  e.find(".fr-command").each(function () {
                      var t = o(this).data("param1");
                      o(this).toggleClass("fr-active", a.hasClass(t))
                  })
              }
          }
      }), t.DefineIcon("inputEdit", {NAME: "edit"}), t.RegisterCommand("inputEdit", {
          title: "Edit Button",
          undo: !1,
          refreshAfterCallback: !1,
          callback: function () {
              this.forms.showUpdatePopup()
          }
      }), t.DefineIcon("inputBack", {NAME: "arrow-left", SVG_KEY: "back"}), t.RegisterCommand("inputBack", {
          title: "Back",
          undo: !1,
          focus: !1,
          back: !0,
          refreshAfterCallback: !1,
          callback: function () {
              this.forms.back()
          }
      }), t.RegisterCommand("updateInput", {
          undo: !1, focus: !1, title: "Update", callback: function () {
              this.forms.updateInput()
          }
      })
  });