import { m8 as Xe, hL as Re, m9 as Ke, H as c, lV as T, cC as Je, a3 as H, le as X, iI as Qe, j4 as Ze, am as et, hS as tt, hj as Z, i0 as nt, ma as rt, mb as ot, i2 as it, hi as at, mc as me, md as st, me as ge, mf as ct, mg as lt, mh as ut, ad as w, mi as dt, I as D, mj as ft, mk as pt, as as ht, iJ as ee, ml as te, mm as mt, eh as Te, a4 as ye, mn as gt, mo as Tt, mp as He, mq as Ie, mr as yt, ms as vt, mt as Et } from "./56c67d3b.js";
import U, { lazy as E, useContext as ve, useState as k, useCallback as j, useMemo as Ee, useLayoutEffect as bt, Suspense as W } from "react";
import { i as wt } from "./1bf547ac.js";
import "react-dom";
const At = (t) => ({
  type: Xe.SET_EDITOR_EXTERNAL_STATE,
  payload: t
});
function St(t) {
  return t && typeof t == "object" && "default" in t ? t.default : t;
}
var Me = U, Ct = St(Me);
function be(t, e, r) {
  return e in t ? Object.defineProperty(t, e, {
    value: r,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[e] = r, t;
}
function Pt(t, e) {
  t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
}
var Ot = !!(typeof window < "u" && window.document && window.document.createElement);
function Lt(t, e, r) {
  if (typeof t != "function")
    throw new Error("Expected reducePropsToState to be a function.");
  if (typeof e != "function")
    throw new Error("Expected handleStateChangeOnClient to be a function.");
  if (typeof r < "u" && typeof r != "function")
    throw new Error("Expected mapStateOnServer to either be undefined or a function.");
  function n(o) {
    return o.displayName || o.name || "Component";
  }
  return function(u) {
    if (typeof u != "function")
      throw new Error("Expected WrappedComponent to be a React component.");
    var i = [], s;
    function a() {
      s = t(i.map(function(d) {
        return d.props;
      })), l.canUseDOM ? e(s) : r && (s = r(s));
    }
    var l = /* @__PURE__ */ function(d) {
      Pt(f, d);
      function f() {
        return d.apply(this, arguments) || this;
      }
      f.peek = function() {
        return s;
      }, f.rewind = function() {
        if (f.canUseDOM)
          throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");
        var v = s;
        return s = void 0, i = [], v;
      };
      var h = f.prototype;
      return h.UNSAFE_componentWillMount = function() {
        i.push(this), a();
      }, h.componentDidUpdate = function() {
        a();
      }, h.componentWillUnmount = function() {
        var v = i.indexOf(this);
        i.splice(v, 1), a();
      }, h.render = function() {
        return Ct.createElement(u, this.props);
      }, f;
    }(Me.PureComponent);
    return be(l, "displayName", "SideEffect(" + n(u) + ")"), be(l, "canUseDOM", Ot), l;
  };
}
var xt = Lt;
const Rt = /* @__PURE__ */ Re(xt);
var Ht = Ke();
const It = /* @__PURE__ */ Re(Ht);
var M = {
  BODY: "bodyAttributes",
  HTML: "htmlAttributes",
  TITLE: "titleAttributes"
}, p = {
  BASE: "base",
  BODY: "body",
  HEAD: "head",
  HTML: "html",
  LINK: "link",
  META: "meta",
  NOSCRIPT: "noscript",
  SCRIPT: "script",
  STYLE: "style",
  TITLE: "title"
}, we = Object.keys(p).map(function(t) {
  return p[t];
}), y = {
  CHARSET: "charset",
  CSS_TEXT: "cssText",
  HREF: "href",
  HTTPEQUIV: "http-equiv",
  INNER_HTML: "innerHTML",
  ITEM_PROP: "itemprop",
  NAME: "name",
  PROPERTY: "property",
  REL: "rel",
  SRC: "src",
  TARGET: "target"
}, K = {
  accesskey: "accessKey",
  charset: "charSet",
  class: "className",
  contenteditable: "contentEditable",
  contextmenu: "contextMenu",
  "http-equiv": "httpEquiv",
  itemprop: "itemProp",
  tabindex: "tabIndex"
}, $ = {
  DEFAULT_TITLE: "defaultTitle",
  DEFER: "defer",
  ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
  ON_CHANGE_CLIENT_STATE: "onChangeClientState",
  TITLE_TEMPLATE: "titleTemplate"
}, Mt = Object.keys(K).reduce(function(t, e) {
  return t[K[e]] = e, t;
}, {}), kt = [p.NOSCRIPT, p.SCRIPT, p.STYLE], L = "data-react-helmet", _t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
  return typeof t;
} : function(t) {
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, Nt = function(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}, Dt = function() {
  function t(e, r) {
    for (var n = 0; n < r.length; n++) {
      var o = r[n];
      o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);
    }
  }
  return function(e, r, n) {
    return r && t(e.prototype, r), n && t(e, n), e;
  };
}(), A = Object.assign || function(t) {
  for (var e = 1; e < arguments.length; e++) {
    var r = arguments[e];
    for (var n in r)
      Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
  }
  return t;
}, jt = function(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  t.prototype = Object.create(e && e.prototype, {
    constructor: {
      value: t,
      enumerable: !1,
      writable: !0,
      configurable: !0
    }
  }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e);
}, Ae = function(t, e) {
  var r = {};
  for (var n in t)
    e.indexOf(n) >= 0 || Object.prototype.hasOwnProperty.call(t, n) && (r[n] = t[n]);
  return r;
}, Ft = function(t, e) {
  if (!t)
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e && (typeof e == "object" || typeof e == "function") ? e : t;
}, re = function(e) {
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
  return r === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
}, Vt = function(e) {
  var r = N(e, p.TITLE), n = N(e, $.TITLE_TEMPLATE);
  if (n && r)
    return n.replace(/%s/g, function() {
      return Array.isArray(r) ? r.join("") : r;
    });
  var o = N(e, $.DEFAULT_TITLE);
  return r || o || void 0;
}, Ut = function(e) {
  return N(e, $.ON_CHANGE_CLIENT_STATE) || function() {
  };
}, ne = function(e, r) {
  return r.filter(function(n) {
    return typeof n[e] < "u";
  }).map(function(n) {
    return n[e];
  }).reduce(function(n, o) {
    return A({}, n, o);
  }, {});
}, $t = function(e, r) {
  return r.filter(function(n) {
    return typeof n[p.BASE] < "u";
  }).map(function(n) {
    return n[p.BASE];
  }).reverse().reduce(function(n, o) {
    if (!n.length)
      for (var u = Object.keys(o), i = 0; i < u.length; i++) {
        var s = u[i], a = s.toLowerCase();
        if (e.indexOf(a) !== -1 && o[a])
          return n.concat(o);
      }
    return n;
  }, []);
}, F = function(e, r, n) {
  var o = {};
  return n.filter(function(u) {
    return Array.isArray(u[e]) ? !0 : (typeof u[e] < "u" && ie("Helmet: " + e + ' should be of type "Array". Instead found type "' + _t(u[e]) + '"'), !1);
  }).map(function(u) {
    return u[e];
  }).reverse().reduce(function(u, i) {
    var s = {};
    i.filter(function(h) {
      for (var m = void 0, v = Object.keys(h), P = 0; P < v.length; P++) {
        var S = v[P], O = S.toLowerCase();
        r.indexOf(O) !== -1 && !(m === y.REL && h[m].toLowerCase() === "canonical") && !(O === y.REL && h[O].toLowerCase() === "stylesheet") && (m = O), r.indexOf(S) !== -1 && (S === y.INNER_HTML || S === y.CSS_TEXT || S === y.ITEM_PROP) && (m = S);
      }
      if (!m || !h[m])
        return !1;
      var I = h[m].toLowerCase();
      return o[m] || (o[m] = {}), s[m] || (s[m] = {}), o[m][I] ? !1 : (s[m][I] = !0, !0);
    }).reverse().forEach(function(h) {
      return u.push(h);
    });
    for (var a = Object.keys(s), l = 0; l < a.length; l++) {
      var d = a[l], f = It({}, o[d], s[d]);
      o[d] = f;
    }
    return u;
  }, []).reverse();
}, N = function(e, r) {
  for (var n = e.length - 1; n >= 0; n--) {
    var o = e[n];
    if (o.hasOwnProperty(r))
      return o[r];
  }
  return null;
}, Bt = function(e) {
  return {
    baseTag: $t([y.HREF, y.TARGET], e),
    bodyAttributes: ne(M.BODY, e),
    defer: N(e, $.DEFER),
    encode: N(e, $.ENCODE_SPECIAL_CHARACTERS),
    htmlAttributes: ne(M.HTML, e),
    linkTags: F(p.LINK, [y.REL, y.HREF], e),
    metaTags: F(p.META, [y.NAME, y.CHARSET, y.HTTPEQUIV, y.PROPERTY, y.ITEM_PROP], e),
    noscriptTags: F(p.NOSCRIPT, [y.INNER_HTML], e),
    onChangeClientState: Ut(e),
    scriptTags: F(p.SCRIPT, [y.SRC, y.INNER_HTML], e),
    styleTags: F(p.STYLE, [y.CSS_TEXT], e),
    title: Vt(e),
    titleAttributes: ne(M.TITLE, e)
  };
}, oe = function() {
  var t = Date.now();
  return function(e) {
    var r = Date.now();
    r - t > 16 ? (t = r, e(r)) : setTimeout(function() {
      oe(e);
    }, 0);
  };
}(), Se = function(e) {
  return clearTimeout(e);
}, Gt = typeof window < "u" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || oe : global.requestAnimationFrame || oe, Yt = typeof window < "u" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || Se : global.cancelAnimationFrame || Se, ie = function(e) {
  return console && typeof console.warn == "function" && console.warn(e);
}, V = null, qt = function(e) {
  V && Yt(V), e.defer ? V = Gt(function() {
    Ce(e, function() {
      V = null;
    });
  }) : (Ce(e), V = null);
}, Ce = function(e, r) {
  var n = e.baseTag, o = e.bodyAttributes, u = e.htmlAttributes, i = e.linkTags, s = e.metaTags, a = e.noscriptTags, l = e.onChangeClientState, d = e.scriptTags, f = e.styleTags, h = e.title, m = e.titleAttributes;
  ae(p.BODY, o), ae(p.HTML, u), zt(h, m);
  var v = {
    baseTag: _(p.BASE, n),
    linkTags: _(p.LINK, i),
    metaTags: _(p.META, s),
    noscriptTags: _(p.NOSCRIPT, a),
    scriptTags: _(p.SCRIPT, d),
    styleTags: _(p.STYLE, f)
  }, P = {}, S = {};
  Object.keys(v).forEach(function(O) {
    var I = v[O], b = I.newTags, B = I.oldTags;
    b.length && (P[O] = b), B.length && (S[O] = v[O].oldTags);
  }), r && r(), l(e, P, S);
}, ke = function(e) {
  return Array.isArray(e) ? e.join("") : e;
}, zt = function(e, r) {
  typeof e < "u" && document.title !== e && (document.title = ke(e)), ae(p.TITLE, r);
}, ae = function(e, r) {
  var n = document.getElementsByTagName(e)[0];
  if (n) {
    for (var o = n.getAttribute(L), u = o ? o.split(",") : [], i = [].concat(u), s = Object.keys(r), a = 0; a < s.length; a++) {
      var l = s[a], d = r[l] || "";
      n.getAttribute(l) !== d && n.setAttribute(l, d), u.indexOf(l) === -1 && u.push(l);
      var f = i.indexOf(l);
      f !== -1 && i.splice(f, 1);
    }
    for (var h = i.length - 1; h >= 0; h--)
      n.removeAttribute(i[h]);
    u.length === i.length ? n.removeAttribute(L) : n.getAttribute(L) !== s.join(",") && n.setAttribute(L, s.join(","));
  }
}, _ = function(e, r) {
  var n = document.head || document.querySelector(p.HEAD), o = n.querySelectorAll(e + "[" + L + "]"), u = Array.prototype.slice.call(o), i = [], s = void 0;
  return r && r.length && r.forEach(function(a) {
    var l = document.createElement(e);
    for (var d in a)
      if (a.hasOwnProperty(d))
        if (d === y.INNER_HTML)
          l.innerHTML = a.innerHTML;
        else if (d === y.CSS_TEXT)
          l.styleSheet ? l.styleSheet.cssText = a.cssText : l.appendChild(document.createTextNode(a.cssText));
        else {
          var f = typeof a[d] > "u" ? "" : a[d];
          l.setAttribute(d, f);
        }
    l.setAttribute(L, "true"), u.some(function(h, m) {
      return s = m, l.isEqualNode(h);
    }) ? u.splice(s, 1) : i.push(l);
  }), u.forEach(function(a) {
    return a.parentNode.removeChild(a);
  }), i.forEach(function(a) {
    return n.appendChild(a);
  }), {
    oldTags: u,
    newTags: i
  };
}, _e = function(e) {
  return Object.keys(e).reduce(function(r, n) {
    var o = typeof e[n] < "u" ? n + '="' + e[n] + '"' : "" + n;
    return r ? r + " " + o : o;
  }, "");
}, Wt = function(e, r, n, o) {
  var u = _e(n), i = ke(r);
  return u ? "<" + e + " " + L + '="true" ' + u + ">" + re(i, o) + "</" + e + ">" : "<" + e + " " + L + '="true">' + re(i, o) + "</" + e + ">";
}, Xt = function(e, r, n) {
  return r.reduce(function(o, u) {
    var i = Object.keys(u).filter(function(l) {
      return !(l === y.INNER_HTML || l === y.CSS_TEXT);
    }).reduce(function(l, d) {
      var f = typeof u[d] > "u" ? d : d + '="' + re(u[d], n) + '"';
      return l ? l + " " + f : f;
    }, ""), s = u.innerHTML || u.cssText || "", a = kt.indexOf(e) === -1;
    return o + "<" + e + " " + L + '="true" ' + i + (a ? "/>" : ">" + s + "</" + e + ">");
  }, "");
}, Ne = function(e) {
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return Object.keys(e).reduce(function(n, o) {
    return n[K[o] || o] = e[o], n;
  }, r);
}, Kt = function(e) {
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return Object.keys(e).reduce(function(n, o) {
    return n[Mt[o] || o] = e[o], n;
  }, r);
}, Jt = function(e, r, n) {
  var o, u = (o = {
    key: r
  }, o[L] = !0, o), i = Ne(n, u);
  return [/* @__PURE__ */ c(p.TITLE, {
    ...i,
    children: r
  })];
}, Qt = function(e, r) {
  return r.map(function(n, o) {
    var u, i = (u = {
      key: o
    }, u[L] = !0, u);
    return Object.keys(n).forEach(function(s) {
      var a = K[s] || s;
      if (a === y.INNER_HTML || a === y.CSS_TEXT) {
        var l = n.innerHTML || n.cssText;
        i.dangerouslySetInnerHTML = {
          __html: l
        };
      } else
        i[a] = n[s];
    }), U.createElement(e, i);
  });
}, R = function(e, r, n) {
  switch (e) {
    case p.TITLE:
      return {
        toComponent: function() {
          return Jt(e, r.title, r.titleAttributes);
        },
        toString: function() {
          return Wt(e, r.title, r.titleAttributes, n);
        }
      };
    case M.BODY:
    case M.HTML:
      return {
        toComponent: function() {
          return Ne(r);
        },
        toString: function() {
          return _e(r);
        }
      };
    default:
      return {
        toComponent: function() {
          return Qt(e, r);
        },
        toString: function() {
          return Xt(e, r, n);
        }
      };
  }
}, De = function(e) {
  var r = e.baseTag, n = e.bodyAttributes, o = e.encode, u = e.htmlAttributes, i = e.linkTags, s = e.metaTags, a = e.noscriptTags, l = e.scriptTags, d = e.styleTags, f = e.title, h = f === void 0 ? "" : f, m = e.titleAttributes;
  return {
    base: R(p.BASE, r, o),
    bodyAttributes: R(M.BODY, n, o),
    htmlAttributes: R(M.HTML, u, o),
    link: R(p.LINK, i, o),
    meta: R(p.META, s, o),
    noscript: R(p.NOSCRIPT, a, o),
    script: R(p.SCRIPT, l, o),
    style: R(p.STYLE, d, o),
    title: R(p.TITLE, {
      title: h,
      titleAttributes: m
    }, o)
  };
}, Zt = function(e) {
  var r, n;
  return n = r = function(o) {
    jt(u, o);
    function u() {
      return Nt(this, u), Ft(this, o.apply(this, arguments));
    }
    return u.prototype.shouldComponentUpdate = function(s) {
      return !wt(this.props, s);
    }, u.prototype.mapNestedChildrenToProps = function(s, a) {
      if (!a)
        return null;
      switch (s.type) {
        case p.SCRIPT:
        case p.NOSCRIPT:
          return {
            innerHTML: a
          };
        case p.STYLE:
          return {
            cssText: a
          };
      }
      throw new Error("<" + s.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
    }, u.prototype.flattenArrayTypeChildren = function(s) {
      var a, l = s.child, d = s.arrayTypeChildren, f = s.newChildProps, h = s.nestedChildren;
      return A({}, d, (a = {}, a[l.type] = [].concat(d[l.type] || [], [A({}, f, this.mapNestedChildrenToProps(l, h))]), a));
    }, u.prototype.mapObjectTypeChildren = function(s) {
      var a, l, d = s.child, f = s.newProps, h = s.newChildProps, m = s.nestedChildren;
      switch (d.type) {
        case p.TITLE:
          return A({}, f, (a = {}, a[d.type] = m, a.titleAttributes = A({}, h), a));
        case p.BODY:
          return A({}, f, {
            bodyAttributes: A({}, h)
          });
        case p.HTML:
          return A({}, f, {
            htmlAttributes: A({}, h)
          });
      }
      return A({}, f, (l = {}, l[d.type] = A({}, h), l));
    }, u.prototype.mapArrayTypeChildrenToProps = function(s, a) {
      var l = A({}, a);
      return Object.keys(s).forEach(function(d) {
        var f;
        l = A({}, l, (f = {}, f[d] = s[d], f));
      }), l;
    }, u.prototype.warnOnInvalidChildren = function(s, a) {
      if (process.env.NODE_ENV !== "production") {
        if (!we.some(function(l) {
          return s.type === l;
        }))
          return typeof s.type == "function" ? ie("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.") : ie("Only elements types " + we.join(", ") + " are allowed. Helmet does not support rendering <" + s.type + "> elements. Refer to our API for more information.");
        if (a && typeof a != "string" && (!Array.isArray(a) || a.some(function(l) {
          return typeof l != "string";
        })))
          throw new Error("Helmet expects a string as a child of <" + s.type + ">. Did you forget to wrap your children in braces? ( <" + s.type + ">{``}</" + s.type + "> ) Refer to our API for more information.");
      }
      return !0;
    }, u.prototype.mapChildrenToProps = function(s, a) {
      var l = this, d = {};
      return U.Children.forEach(s, function(f) {
        if (!(!f || !f.props)) {
          var h = f.props, m = h.children, v = Ae(h, ["children"]), P = Kt(v);
          switch (l.warnOnInvalidChildren(f, m), f.type) {
            case p.LINK:
            case p.META:
            case p.NOSCRIPT:
            case p.SCRIPT:
            case p.STYLE:
              d = l.flattenArrayTypeChildren({
                child: f,
                arrayTypeChildren: d,
                newChildProps: P,
                nestedChildren: m
              });
              break;
            default:
              a = l.mapObjectTypeChildren({
                child: f,
                newProps: a,
                newChildProps: P,
                nestedChildren: m
              });
              break;
          }
        }
      }), a = this.mapArrayTypeChildrenToProps(d, a), a;
    }, u.prototype.render = function() {
      var s = this.props, a = s.children, l = Ae(s, ["children"]), d = A({}, l);
      return a && (d = this.mapChildrenToProps(a, d)), /* @__PURE__ */ c(e, {
        ...d
      });
    }, Dt(u, null, [{
      key: "canUseDOM",
      // Component.peek comes from react-side-effect:
      // For testing, you may use a static peek() method available on the returned component.
      // It lets you get the current state without resetting the mounted instance stack.
      // Don’t use it for anything other than testing.
      /**
       * @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"}
       * @param {Object} bodyAttributes: {"className": "root"}
       * @param {String} defaultTitle: "Default Title"
       * @param {Boolean} defer: true
       * @param {Boolean} encodeSpecialCharacters: true
       * @param {Object} htmlAttributes: {"lang": "en", "amp": undefined}
       * @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}]
       * @param {Array} meta: [{"name": "description", "content": "Test description"}]
       * @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}]
       * @param {Function} onChangeClientState: "(newState) => console.log(newState)"
       * @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}]
       * @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}]
       * @param {String} title: "Title"
       * @param {Object} titleAttributes: {"itemprop": "name"}
       * @param {String} titleTemplate: "MySite.com - %s"
       */
      set: function(s) {
        e.canUseDOM = s;
      }
    }]), u;
  }(U.Component), r.propTypes = {
    base: T.object,
    bodyAttributes: T.object,
    children: T.oneOfType([T.arrayOf(T.node), T.node]),
    defaultTitle: T.string,
    defer: T.bool,
    encodeSpecialCharacters: T.bool,
    htmlAttributes: T.object,
    link: T.arrayOf(T.object),
    meta: T.arrayOf(T.object),
    noscript: T.arrayOf(T.object),
    onChangeClientState: T.func,
    script: T.arrayOf(T.object),
    style: T.arrayOf(T.object),
    title: T.string,
    titleAttributes: T.object,
    titleTemplate: T.string
  }, r.defaultProps = {
    defer: !0,
    encodeSpecialCharacters: !0
  }, r.peek = e.peek, r.rewind = function() {
    var o = e.rewind();
    return o || (o = De({
      baseTag: [],
      bodyAttributes: {},
      encodeSpecialCharacters: !0,
      htmlAttributes: {},
      linkTags: [],
      metaTags: [],
      noscriptTags: [],
      scriptTags: [],
      styleTags: [],
      title: "",
      titleAttributes: {}
    })), o;
  }, n;
}, en = function() {
  return null;
}, tn = Rt(Bt, qt, De)(en), J = Zt(tn);
J.renderStatic = J.rewind;
const nn = E(() => import("./687e0649.js").then((t) => ({
  default: t.default
}))), rn = E(() => import("./9f3e881b.js").then((t) => ({
  default: t.BottomSkeleton
}))), on = E(() => import("./3b3b096e.js").then((t) => ({
  default: t.LeftContent
}))), an = E(() => import("./996b5229.js").then((t) => ({
  default: t.LeftLayersContent
}))), sn = E(() => import("./b3dd5a89.js")), cn = E(() => import("./85cba875.js")), ln = E(() => import("./c823a4e9.js")), Pe = E(() => import("./b3a3c937.js").then((t) => ({
  default: t.CustomShortcutWrapper
}))), un = E(() => import("./b3a3c937.js").then((t) => ({
  default: t.EditorGlobalHotKeys
}))), dn = E(() => import("./b3a3c937.js").then((t) => ({
  default: t.EditorHotKeys
}))), fn = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.Body
}))), pn = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.EditorContainer
}))), Oe = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.EditorContainerWithViewMode
}))), hn = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.Height100Div
}))), mn = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.LeftPanel
}))), gn = E(() => import("./56c67d3b.js").then((t) => t.G7).then((t) => ({
  default: t.MiddlePanel
}))), Tn = E(() => import("./a5033755.js").then((t) => ({
  default: t.HelpDropdown
}))), yn = E(() => import("./3dbb093e.js").then((t) => ({
  default: t.PreviewHeader
}))), vn = H.div`
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  contain: paint;
  z-index: ${X.hooksCompContainer};
`, Le = H.div`
  height: ${(t) => `calc(${t.$height ? t.$height + "px" : "100vh"} - env(safe-area-inset-bottom) -
      ${t.$hideBodyHeader ? "0px" : Qe}
  )`};
`, En = H.div`
  .ant-menu {
    background-color: #393b47;
    height: calc(100vh - 48px);

    .ant-menu-item {
      padding: 0 7px !important;
      width: 40px;
      height: 26px;
      margin: 12px 0 0 0;

      svg {
        height: 26px;
        width: 26px;
        padding: 5px;
      }

      &.ant-menu-item-selected,
      &:hover,
      &:active {
        background-color: #393b47;

        svg {
          background: #8b8fa37f;
          border-radius: 4px;
        }
      }
    }
  }

  z-index: ${X.leftToolbar};
`, bn = H.div`
  > div {
    left: 6px;
    right: auto;
    height: 28px;
    bottom: 36px;

    > div.shortcutList {
      left: 42px;
      bottom: 2px;
    }
  }
`;
H.div`
  > div {
    left: 6px;
    right: auto;
    height: 28px;
    top: 15px;
  }
`;
const xe = H.div`
  display: flex;
  flex-direction: column;
  height: 100%;

  .ant-divider {
    margin: 16px 0;
    border-color: #e1e3eb;
  }
`, wn = H.div`
  font-weight: 500;
  font-size: 14px;
  color: #8b8fa3;
  line-height: 14px;
  margin: 16px;
`, An = H.div`
  margin: 16px 8px;
  height: 33px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 7px;
  color: #333;
  cursor: pointer;

  svg {
    margin-right: 8px;

    path {
      fill: #222222;
    }
  }

  &:hover,
  &:active {
    background: #f2f7fc;
    border-radius: 4px;

    svg path {
      fill: #315efb;
    }
  }
`, Sn = H.div`
  overflow: auto;
  position: relative;
  flex: 1 1 0;
`, Cn = [{
  key: "state",
  icon: /* @__PURE__ */ c(He, {})
}, {
  key: "setting",
  icon: /* @__PURE__ */ c(Ie, {})
}, {
  key: "canvas",
  icon: /* @__PURE__ */ c(yt, {})
}, {
  key: "js",
  icon: /* @__PURE__ */ c(vt, {})
}, {
  key: "layout",
  icon: /* @__PURE__ */ c(Et, {})
}], Pn = [{
  key: "state",
  icon: /* @__PURE__ */ c(He, {})
}, {
  key: "setting",
  icon: /* @__PURE__ */ c(Ie, {})
}];
function On(t) {
  var de, q, fe, pe, z, he;
  const {
    uiComp: e
  } = t, r = Ze(), n = ve(et), {
    readOnly: o,
    hideHeader: u
  } = ve(tt), i = Z(nt), s = Z(rt), a = ot().state, l = a == null ? void 0 : a.showNewUserGuide, d = Z(it), [f, h] = k(!1), m = j(() => h(!f), [f]), [v, P] = k(
    "state"
    /* State */
  ), [S, O] = k(), I = at(), [b, B] = k(() => l ? me : st()), [se, je] = k(me), Fe = r.viewMode === "view", x = n.getAppSettingsComp(), {
    showHeaderInPublic: Ve
  } = x.getView(), ce = j((g) => {
    let C;
    g ? (C = Object.assign({}, b), C[g] = !b[g]) : Object.values(b).some((We) => We) ? (je(b), C = {
      left: !1,
      bottom: !1,
      right: !1
    }) : C = se, B(C), ge(C);
  }, [b, se]), [G, Ue] = k(() => ct()), $e = j((g) => {
    Ue(g || "both"), lt(g || "both");
  }, [G]), Be = j((g) => {
    n.setDraggingCompType(g);
  }, [n]), Ge = j((g) => {
    n.setShowPropertyPane(g === "property");
  }, [n]), Q = Ee(() => Object.keys(n.getHooksComp().children).map((g) => (
    // use appId as key, remount hook comp when app change. fix hookStateComp empty value
    /* @__PURE__ */ c("div", {
      children: n.getHooksComp().children[g].getView()
    }, g + "-" + (i == null ? void 0 : i.applicationId))
  )), [n]);
  bt(() => {
    function g() {
      O(window.innerHeight);
    }
    const C = "orientationchange" in window ? "orientationchange" : "resize";
    return window.addEventListener(C, g), g(), () => window.removeEventListener(C, g);
  }, []);
  const Y = ut() || Fe && (!Ve || !s.showHeaderInPublicApps), Ye = Ee(() => d ? /* @__PURE__ */ c(Le, {
    $hideBodyHeader: Y,
    $height: S,
    children: /* @__PURE__ */ c(pn, {
      children: e.getView()
    })
  }) : e.getView(), [d, Y, S, e]), le = window.location.hostname === "app.lowcoder.cloud", ue = window.location.hostname === "localhost";
  if (o && u)
    return /* @__PURE__ */ w(Pe, {
      children: [e.getView(), /* @__PURE__ */ c("div", {
        style: {
          zIndex: X.hooksCompContainer
        },
        children: Q
      })]
    });
  if (o && !d)
    return /* @__PURE__ */ w(Pe, {
      children: [/* @__PURE__ */ w(J, {
        children: [i && /* @__PURE__ */ c("title", {
          children: ((fe = (q = (de = x == null ? void 0 : x.children) == null ? void 0 : de.title) == null ? void 0 : q.getView) == null ? void 0 : fe.call(q)) || (i == null ? void 0 : i.name)
        }), le || ue && [
          // Adding Support for iframely to be able to embedd apps as iframes
          i != null && i.name ? [/* @__PURE__ */ c("meta", {
            property: "iframely:title",
            content: i.name
          }, "iframely:title"), /* @__PURE__ */ c("meta", {
            property: "iframely:description",
            content: i.description
          }, "iframely:description")] : [/* @__PURE__ */ c("meta", {
            property: "iframely:title",
            content: "Lowcoder 3"
          }, "iframely:title"), /* @__PURE__ */ c("meta", {
            property: "iframely:description",
            content: "Lowcoder | rapid App & VideoMeeting builder for everyone."
          }, "iframely:description")],
          /* @__PURE__ */ c("link", {
            rel: "iframely",
            type: "text/html",
            href: window.location.href,
            media: "(aspect-ratio: 1280/720)"
          }),
          /* @__PURE__ */ c("link", {
            rel: "preconnect",
            href: "https://fonts.googleapis.com"
          }, "preconnect-googleapis"),
          /* @__PURE__ */ c("link", {
            rel: "preconnect",
            href: "https://fonts.gstatic.com",
            crossOrigin: "anonymous"
          }, "preconnect-gstatic"),
          /* @__PURE__ */ c("link", {
            href: "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap",
            rel: "stylesheet"
          }, "font-ubuntu"),
          // adding Clearbit Support for Analytics
          /* @__PURE__ */ c("script", {
            src: "https://tag.clearbitscripts.com/v1/pk_dfbc0aeefb28dc63475b67134facf127/tags.js",
            referrerPolicy: "strict-origin-when-cross-origin",
            type: "text/javascript"
          }, "clearbit-script")
        ]]
      }), /* @__PURE__ */ w(W, {
        fallback: /* @__PURE__ */ c(dt, {}),
        children: [!Y && /* @__PURE__ */ c(yn, {}), /* @__PURE__ */ w(Oe, {
          children: [/* @__PURE__ */ c(Le, {
            $hideBodyHeader: Y,
            $height: S,
            children: e.getView()
          }), /* @__PURE__ */ c("div", {
            style: {
              zIndex: X.hooksCompContainer
            },
            children: Q
          })]
        })]
      })]
    });
  const qe = b.right || d, ze = (g) => {
    let C = !0;
    b.left && g.key === v && (C = !1), B({
      ...b,
      left: C
    }), ge({
      ...b,
      left: C
    }), P(g.key);
  };
  return /* @__PURE__ */ w(D, {
    children: [/* @__PURE__ */ w(J, {
      children: [i && /* @__PURE__ */ c("title", {
        children: ((he = (z = (pe = x == null ? void 0 : x.children) == null ? void 0 : pe.title) == null ? void 0 : z.getView) == null ? void 0 : he.call(z)) || (i == null ? void 0 : i.name)
      }), le || ue && [
        // Adding Support for iframely to be able to embedd apps as iframes
        i != null && i.name ? [/* @__PURE__ */ c("meta", {
          property: "iframely:title",
          content: i.name
        }, "iframely:title"), /* @__PURE__ */ c("meta", {
          property: "iframely:description",
          content: i.description
        }, "iframely:description")] : [/* @__PURE__ */ c("meta", {
          property: "iframely:title",
          content: "Lowcoder 3"
        }, "iframely:title"), /* @__PURE__ */ c("meta", {
          property: "iframely:description",
          content: "Lowcoder | rapid App & VideoMeeting builder for everyone."
        }, "iframely:description")],
        /* @__PURE__ */ c("link", {
          rel: "iframely",
          type: "text/html",
          href: window.location.href,
          media: "(aspect-ratio: 1280/720)"
        }, "iframely"),
        /* @__PURE__ */ c("link", {
          rel: "preconnect",
          href: "https://fonts.googleapis.com"
        }, "preconnect-googleapis"),
        /* @__PURE__ */ c("link", {
          rel: "preconnect",
          href: "https://fonts.gstatic.com",
          crossOrigin: "anonymous"
        }, "preconnect-gstatic"),
        /* @__PURE__ */ c("link", {
          href: "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap",
          rel: "stylesheet"
        }, "font-ubuntu"),
        // adding Clearbit Support for Analytics
        /* @__PURE__ */ c("script", {
          src: "https://tag.clearbitscripts.com/v1/pk_dfbc0aeefb28dc63475b67134facf127/tags.js",
          referrerPolicy: "strict-origin-when-cross-origin",
          type: "text/javascript"
        }, "clearbit-script")
      ]]
    }), /* @__PURE__ */ w(hn, {
      onDragEnd: (g) => {
        n.setDragging(!1), ft.clearData();
      },
      children: [/* @__PURE__ */ c(nn, {
        togglePanel: ce,
        panelStatus: b,
        toggleEditorModeStatus: $e,
        editorModeStatus: G
      }), l && /* @__PURE__ */ c(cn, {}), /* @__PURE__ */ c(un, {
        disabled: o,
        togglePanel: ce,
        panelStatus: b,
        toggleShortcutList: m,
        children: /* @__PURE__ */ w(fn, {
          children: [/* @__PURE__ */ c(En, {
            children: /* @__PURE__ */ w(pt, {
              width: 40,
              children: [/* @__PURE__ */ c(ht, {
                theme: "dark",
                mode: "inline",
                defaultSelectedKeys: [
                  "state"
                  /* State */
                ],
                selectedKeys: b.left ? [v] : [""],
                items: i && !ee(te[i.applicationType]) ? Cn : Pn,
                disabled: d,
                onClick: (g) => ze(g)
              }), !d && /* @__PURE__ */ c(bn, {
                children: /* @__PURE__ */ c(Tn, {
                  showShortcutList: f,
                  setShowShortcutList: h,
                  isEdit: !0
                })
              })]
            })
          }), /* @__PURE__ */ c(W, {
            fallback: null,
            children: b.left && G !== "layout" && /* @__PURE__ */ w(mn, {
              children: [v === "state" && /* @__PURE__ */ c(on, {
                uiComp: e
              }), /* @__PURE__ */ c(mt.Provider, {
                value: {
                  settingType: v
                },
                children: /* @__PURE__ */ w(D, {
                  children: [v === "setting" && /* @__PURE__ */ c(xe, {
                    children: /* @__PURE__ */ c(Te, {
                      children: i && !ee(te[i.applicationType]) && /* @__PURE__ */ c(D, {
                        children: x.getPropertyView()
                      })
                    })
                  }), v === "canvas" && /* @__PURE__ */ c(xe, {
                    children: /* @__PURE__ */ c(Te, {
                      children: i && !ee(te[i.applicationType]) && /* @__PURE__ */ c(D, {
                        children: x.getPropertyView()
                      })
                    })
                  })]
                })
              }), v === "js" && /* @__PURE__ */ w(D, {
                children: [/* @__PURE__ */ c(wn, {
                  children: ye("leftPanel.toolbarTitle")
                }), t.preloadComp.getPropertyView(), /* @__PURE__ */ w(An, {
                  onClick: () => I(At({
                    showScriptsAndStyleModal: !0
                  })),
                  children: [/* @__PURE__ */ c(gt, {}), ye("leftPanel.toolbarPreload")]
                }), t.preloadComp.getJSLibraryPropertyView()]
              }), v === "layout" && /* @__PURE__ */ c(an, {
                uiComp: e
              })]
            })
          }), /* @__PURE__ */ w(gn, {
            children: [/* @__PURE__ */ c(Sn, {
              className: Tt,
              children: /* @__PURE__ */ c(dn, {
                disabled: o,
                children: /* @__PURE__ */ w(Oe, {
                  children: [Ye, /* @__PURE__ */ c(vn, {
                    children: Q
                  })]
                })
              })
            }), /* @__PURE__ */ c(W, {
              fallback: /* @__PURE__ */ c(rn, {}),
              children: b.bottom && G !== "layout" && /* @__PURE__ */ c(ln, {})
            })]
          }), /* @__PURE__ */ c(W, {
            fallback: null,
            children: qe && /* @__PURE__ */ c(sn, {
              uiComp: e,
              onCompDrag: Be,
              showPropertyPane: n.showPropertyPane,
              onTabChange: Ge
            })
          })]
        })
      })]
    })]
  });
}
const In = U.memo(On, (t, e) => Je.isEqual(t, e));
export {
  Sn as EditorWrapper,
  In as default
};
