import { N as e, O as t, M as r, F as n } from "./antd-04a23d13.js";
import { j9 as o, iP as i, g2 as a, cr as s, fk as l, dW as c, fs as p, ft as d, ja as u, fv as f, dV as h, jb as m, jc as y, jd as g, je as b, jf as v, jg as w, jh as T, ji as j, g3 as C, jj as A, g5 as x, av as k, jk as O, gi as S, jl as E, jm as P, jn as L, jo as I, jp as H, jq as M } from "./index-f50c05c4.js";
import { f as $ } from "./lodash-f1e42446.js";
import N, { lazy as D, useContext as R, useState as F, useCallback as B, useMemo as V, useLayoutEffect as _, useEffect as q, Suspense as K } from "react";
import { lA as Y, lR as U, lS as z } from "./ant-design-icons-b1480d8d.js";
import { r as Q, P as W } from "./fontawesome-2445f580.js";
import { g as G } from "./alasql-0ff6dabf.js";
import { d as J } from "./styled-components-1e696d6b.js";
import { g as X } from "./enterpriseSelectors-1897ddd8.js";
import { b as Z, d as ee } from "./react-router-a1807b5b.js";
import "react-dom";
import "./dayjs-844325ae.js";
import "./axios-84bb1c75.js";
import "./redux-devtools-d38e5b33.js";
import "./dnd-kit-56a2f36f.js";
import "./numbro-c1edb412.js";
import "./papaparse-1bac8e5f.js";
import "./uuid-82f303b2.js";
import "./supabase-c27c62e3.js";
import "./fetch-a3c8ad94.js";
import "./react-draggable-60f59f09.js";
import "./remark-gfm-f2973785.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-41b6145f.js";
import "./parse5-6476676e.js";
import "./rehype-sanitize-deb53e9a.js";
import "./simplebar-react-e1b123a3.js";
import "./react-best-gradient-color-picker-4dd60dac.js";
import "./ua-parser-js-094f59ba.js";
import "./clsx-469c2c43.js";
import "./loglevel-6fb66d22.js";
import "./crypto-js-d5eac8ba.js";
import "./codemirror-73d8c217.js";
import "./really-relaxed-json-49b6a70d.js";
import "./immer-c0428a8d.js";
import "./redux-saga-5514e228.js";
import "./hotkeys-js-0dddb21a.js";
import "./cnchar-5678e6bc.js";
import "./react-documents-eb6de859.js";
import "./sql-formatter-69e8df59.js";
import "./rc-trigger-5125aafe.js";
import "./react-json-view-9403d8a1.js";
import "./qrcode-react-cb73d2b6.js";
import "./katex-a34f0265.js";
import "./ecogis-maps-bb0d63f9.js";
import "./devextreme-2fa5bb9a.js";
var te, re = N, ne = (te = re) && "object" == typeof te && "default" in te ? te.default : te;
function oe(e2, t2, r2) {
  return t2 in e2 ? Object.defineProperty(e2, t2, { value: r2, enumerable: true, configurable: true, writable: true }) : e2[t2] = r2, e2;
}
var ie = !("undefined" == typeof window || !window.document || !window.document.createElement);
var ae = function(e2, t2, r2) {
  if ("function" != typeof e2)
    throw new Error("Expected reducePropsToState to be a function.");
  if ("function" != typeof t2)
    throw new Error("Expected handleStateChangeOnClient to be a function.");
  if (void 0 !== r2 && "function" != typeof r2)
    throw new Error("Expected mapStateOnServer to either be undefined or a function.");
  return function(n2) {
    if ("function" != typeof n2)
      throw new Error("Expected WrappedComponent to be a React component.");
    var o2, i2 = [];
    function a2() {
      o2 = e2(i2.map(function(e3) {
        return e3.props;
      })), s2.canUseDOM ? t2(o2) : r2 && (o2 = r2(o2));
    }
    var s2 = function(e3) {
      var t3, r3;
      function s3() {
        return e3.apply(this, arguments) || this;
      }
      r3 = e3, (t3 = s3).prototype = Object.create(r3.prototype), t3.prototype.constructor = t3, t3.__proto__ = r3, s3.peek = function() {
        return o2;
      }, s3.rewind = function() {
        if (s3.canUseDOM)
          throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");
        var e4 = o2;
        return o2 = void 0, i2 = [], e4;
      };
      var l2 = s3.prototype;
      return l2.UNSAFE_componentWillMount = function() {
        i2.push(this), a2();
      }, l2.componentDidUpdate = function() {
        a2();
      }, l2.componentWillUnmount = function() {
        var e4 = i2.indexOf(this);
        i2.splice(e4, 1), a2();
      }, l2.render = function() {
        return ne.createElement(n2, this.props);
      }, s3;
    }(re.PureComponent);
    return oe(s2, "displayName", "SideEffect(" + function(e3) {
      return e3.displayName || e3.name || "Component";
    }(n2) + ")"), oe(s2, "canUseDOM", ie), s2;
  };
};
const se = G(ae);
const le = G(Q());
var ce, pe, de, ue, fe = "bodyAttributes", he = "htmlAttributes", me = "titleAttributes", ye = { BASE: "base", BODY: "body", HEAD: "head", HTML: "html", LINK: "link", META: "meta", NOSCRIPT: "noscript", SCRIPT: "script", STYLE: "style", TITLE: "title" }, ge = Object.keys(ye).map(function(e2) {
  return ye[e2];
}), be = "charset", ve = "cssText", we = "href", Te = "http-equiv", je = "innerHTML", Ce = "itemprop", Ae = "name", xe = "property", ke = "rel", Oe = "src", Se = "target", Ee = { accesskey: "accessKey", charset: "charSet", class: "className", contenteditable: "contentEditable", contextmenu: "contextMenu", "http-equiv": "httpEquiv", itemprop: "itemProp", tabindex: "tabIndex" }, Pe = "defaultTitle", Le = "defer", Ie = "encodeSpecialCharacters", He = "onChangeClientState", Me = "titleTemplate", $e = Object.keys(Ee).reduce(function(e2, t2) {
  return e2[Ee[t2]] = t2, e2;
}, {}), Ne = [ye.NOSCRIPT, ye.SCRIPT, ye.STYLE], De = "data-react-helmet", Re = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e2) {
  return typeof e2;
} : function(e2) {
  return e2 && "function" == typeof Symbol && e2.constructor === Symbol && e2 !== Symbol.prototype ? "symbol" : typeof e2;
}, Fe = function() {
  function e2(e3, t2) {
    for (var r2 = 0; r2 < t2.length; r2++) {
      var n2 = t2[r2];
      n2.enumerable = n2.enumerable || false, n2.configurable = true, "value" in n2 && (n2.writable = true), Object.defineProperty(e3, n2.key, n2);
    }
  }
  return function(t2, r2, n2) {
    return r2 && e2(t2.prototype, r2), n2 && e2(t2, n2), t2;
  };
}(), Be = Object.assign || function(e2) {
  for (var t2 = 1; t2 < arguments.length; t2++) {
    var r2 = arguments[t2];
    for (var n2 in r2)
      Object.prototype.hasOwnProperty.call(r2, n2) && (e2[n2] = r2[n2]);
  }
  return e2;
}, Ve = function(e2, t2) {
  var r2 = {};
  for (var n2 in e2)
    t2.indexOf(n2) >= 0 || Object.prototype.hasOwnProperty.call(e2, n2) && (r2[n2] = e2[n2]);
  return r2;
}, _e = function(e2) {
  return false === (!(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]) ? String(e2) : String(e2).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
}, qe = function(e2) {
  var t2 = Qe(e2, ye.TITLE), r2 = Qe(e2, Me);
  if (r2 && t2)
    return r2.replace(/%s/g, function() {
      return Array.isArray(t2) ? t2.join("") : t2;
    });
  var n2 = Qe(e2, Pe);
  return t2 || n2 || void 0;
}, Ke = function(e2) {
  return Qe(e2, He) || function() {
  };
}, Ye = function(e2, t2) {
  return t2.filter(function(t3) {
    return void 0 !== t3[e2];
  }).map(function(t3) {
    return t3[e2];
  }).reduce(function(e3, t3) {
    return Be({}, e3, t3);
  }, {});
}, Ue = function(e2, t2) {
  return t2.filter(function(e3) {
    return void 0 !== e3[ye.BASE];
  }).map(function(e3) {
    return e3[ye.BASE];
  }).reverse().reduce(function(t3, r2) {
    if (!t3.length)
      for (var n2 = Object.keys(r2), o2 = 0; o2 < n2.length; o2++) {
        var i2 = n2[o2].toLowerCase();
        if (-1 !== e2.indexOf(i2) && r2[i2])
          return t3.concat(r2);
      }
    return t3;
  }, []);
}, ze = function(e2, t2, r2) {
  var n2 = {};
  return r2.filter(function(t3) {
    return !!Array.isArray(t3[e2]) || (void 0 !== t3[e2] && Ze("Helmet: " + e2 + ' should be of type "Array". Instead found type "' + Re(t3[e2]) + '"'), false);
  }).map(function(t3) {
    return t3[e2];
  }).reverse().reduce(function(e3, r3) {
    var o2 = {};
    r3.filter(function(e4) {
      for (var r4 = void 0, i3 = Object.keys(e4), a3 = 0; a3 < i3.length; a3++) {
        var s3 = i3[a3], l3 = s3.toLowerCase();
        -1 === t2.indexOf(l3) || r4 === ke && "canonical" === e4[r4].toLowerCase() || l3 === ke && "stylesheet" === e4[l3].toLowerCase() || (r4 = l3), -1 === t2.indexOf(s3) || s3 !== je && s3 !== ve && s3 !== Ce || (r4 = s3);
      }
      if (!r4 || !e4[r4])
        return false;
      var c2 = e4[r4].toLowerCase();
      return n2[r4] || (n2[r4] = {}), o2[r4] || (o2[r4] = {}), !n2[r4][c2] && (o2[r4][c2] = true, true);
    }).reverse().forEach(function(t3) {
      return e3.push(t3);
    });
    for (var i2 = Object.keys(o2), a2 = 0; a2 < i2.length; a2++) {
      var s2 = i2[a2], l2 = le({}, n2[s2], o2[s2]);
      n2[s2] = l2;
    }
    return e3;
  }, []).reverse();
}, Qe = function(e2, t2) {
  for (var r2 = e2.length - 1; r2 >= 0; r2--) {
    var n2 = e2[r2];
    if (n2.hasOwnProperty(t2))
      return n2[t2];
  }
  return null;
}, We = (ce = Date.now(), function(e2) {
  var t2 = Date.now();
  t2 - ce > 16 ? (ce = t2, e2(t2)) : setTimeout(function() {
    We(e2);
  }, 0);
}), Ge = function(e2) {
  return clearTimeout(e2);
}, Je = "undefined" != typeof window ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || We : global.requestAnimationFrame || We, Xe = "undefined" != typeof window ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || Ge : global.cancelAnimationFrame || Ge, Ze = function(e2) {
  return console && "function" == typeof console.warn && void 0;
}, et = null, tt = function(e2, t2) {
  var r2 = e2.baseTag, n2 = e2.bodyAttributes, o2 = e2.htmlAttributes, i2 = e2.linkTags, a2 = e2.metaTags, s2 = e2.noscriptTags, l2 = e2.onChangeClientState, c2 = e2.scriptTags, p2 = e2.styleTags, d2 = e2.title, u2 = e2.titleAttributes;
  ot(ye.BODY, n2), ot(ye.HTML, o2), nt(d2, u2);
  var f2 = { baseTag: it(ye.BASE, r2), linkTags: it(ye.LINK, i2), metaTags: it(ye.META, a2), noscriptTags: it(ye.NOSCRIPT, s2), scriptTags: it(ye.SCRIPT, c2), styleTags: it(ye.STYLE, p2) }, h2 = {}, m2 = {};
  Object.keys(f2).forEach(function(e3) {
    var t3 = f2[e3], r3 = t3.newTags, n3 = t3.oldTags;
    r3.length && (h2[e3] = r3), n3.length && (m2[e3] = f2[e3].oldTags);
  }), t2 && t2(), l2(e2, h2, m2);
}, rt = function(e2) {
  return Array.isArray(e2) ? e2.join("") : e2;
}, nt = function(e2, t2) {
  void 0 !== e2 && document.title !== e2 && (document.title = rt(e2)), ot(ye.TITLE, t2);
}, ot = function(e2, t2) {
  var r2 = document.getElementsByTagName(e2)[0];
  if (r2) {
    for (var n2 = r2.getAttribute(De), o2 = n2 ? n2.split(",") : [], i2 = [].concat(o2), a2 = Object.keys(t2), s2 = 0; s2 < a2.length; s2++) {
      var l2 = a2[s2], c2 = t2[l2] || "";
      r2.getAttribute(l2) !== c2 && r2.setAttribute(l2, c2), -1 === o2.indexOf(l2) && o2.push(l2);
      var p2 = i2.indexOf(l2);
      -1 !== p2 && i2.splice(p2, 1);
    }
    for (var d2 = i2.length - 1; d2 >= 0; d2--)
      r2.removeAttribute(i2[d2]);
    o2.length === i2.length ? r2.removeAttribute(De) : r2.getAttribute(De) !== a2.join(",") && r2.setAttribute(De, a2.join(","));
  }
}, it = function(e2, t2) {
  var r2 = document.head || document.querySelector(ye.HEAD), n2 = r2.querySelectorAll(e2 + "[" + De + "]"), o2 = Array.prototype.slice.call(n2), i2 = [], a2 = void 0;
  return t2 && t2.length && t2.forEach(function(t3) {
    var r3 = document.createElement(e2);
    for (var n3 in t3)
      if (t3.hasOwnProperty(n3))
        if (n3 === je)
          r3.innerHTML = t3.innerHTML;
        else if (n3 === ve)
          r3.styleSheet ? r3.styleSheet.cssText = t3.cssText : r3.appendChild(document.createTextNode(t3.cssText));
        else {
          var s2 = void 0 === t3[n3] ? "" : t3[n3];
          r3.setAttribute(n3, s2);
        }
    r3.setAttribute(De, "true"), o2.some(function(e3, t4) {
      return a2 = t4, r3.isEqualNode(e3);
    }) ? o2.splice(a2, 1) : i2.push(r3);
  }), o2.forEach(function(e3) {
    return e3.parentNode.removeChild(e3);
  }), i2.forEach(function(e3) {
    return r2.appendChild(e3);
  }), { oldTags: o2, newTags: i2 };
}, at = function(e2) {
  return Object.keys(e2).reduce(function(t2, r2) {
    var n2 = void 0 !== e2[r2] ? r2 + '="' + e2[r2] + '"' : "" + r2;
    return t2 ? t2 + " " + n2 : n2;
  }, "");
}, st = function(e2) {
  var t2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
  return Object.keys(e2).reduce(function(t3, r2) {
    return t3[Ee[r2] || r2] = e2[r2], t3;
  }, t2);
}, lt = function(e2, t2, r2) {
  switch (e2) {
    case ye.TITLE:
      return { toComponent: function() {
        return e3 = t2.title, r3 = t2.titleAttributes, (n2 = { key: e3 })[De] = true, o2 = st(r3, n2), [Y(ye.TITLE, { ...o2, children: e3 })];
        var e3, r3, n2, o2;
      }, toString: function() {
        return function(e3, t3, r3, n2) {
          var o2 = at(r3), i2 = rt(t3);
          return o2 ? "<" + e3 + " " + De + '="true" ' + o2 + ">" + _e(i2, n2) + "</" + e3 + ">" : "<" + e3 + " " + De + '="true">' + _e(i2, n2) + "</" + e3 + ">";
        }(e2, t2.title, t2.titleAttributes, r2);
      } };
    case fe:
    case he:
      return { toComponent: function() {
        return st(t2);
      }, toString: function() {
        return at(t2);
      } };
    default:
      return { toComponent: function() {
        return function(e3, t3) {
          return t3.map(function(t4, r3) {
            var n2, o2 = ((n2 = { key: r3 })[De] = true, n2);
            return Object.keys(t4).forEach(function(e4) {
              var r4 = Ee[e4] || e4;
              if (r4 === je || r4 === ve) {
                var n3 = t4.innerHTML || t4.cssText;
                o2.dangerouslySetInnerHTML = { __html: n3 };
              } else
                o2[r4] = t4[e4];
            }), N.createElement(e3, o2);
          });
        }(e2, t2);
      }, toString: function() {
        return function(e3, t3, r3) {
          return t3.reduce(function(t4, n2) {
            var o2 = Object.keys(n2).filter(function(e4) {
              return !(e4 === je || e4 === ve);
            }).reduce(function(e4, t5) {
              var o3 = void 0 === n2[t5] ? t5 : t5 + '="' + _e(n2[t5], r3) + '"';
              return e4 ? e4 + " " + o3 : o3;
            }, ""), i2 = n2.innerHTML || n2.cssText || "", a2 = -1 === Ne.indexOf(e3);
            return t4 + "<" + e3 + " " + De + '="true" ' + o2 + (a2 ? "/>" : ">" + i2 + "</" + e3 + ">");
          }, "");
        }(e2, t2, r2);
      } };
  }
}, ct = function(e2) {
  var t2 = e2.baseTag, r2 = e2.bodyAttributes, n2 = e2.encode, o2 = e2.htmlAttributes, i2 = e2.linkTags, a2 = e2.metaTags, s2 = e2.noscriptTags, l2 = e2.scriptTags, c2 = e2.styleTags, p2 = e2.title, d2 = void 0 === p2 ? "" : p2, u2 = e2.titleAttributes;
  return { base: lt(ye.BASE, t2, n2), bodyAttributes: lt(fe, r2, n2), htmlAttributes: lt(he, o2, n2), link: lt(ye.LINK, i2, n2), meta: lt(ye.META, a2, n2), noscript: lt(ye.NOSCRIPT, s2, n2), script: lt(ye.SCRIPT, l2, n2), style: lt(ye.STYLE, c2, n2), title: lt(ye.TITLE, { title: d2, titleAttributes: u2 }, n2) };
}, pt = se(function(e2) {
  return { baseTag: Ue([we, Se], e2), bodyAttributes: Ye(fe, e2), defer: Qe(e2, Le), encode: Qe(e2, Ie), htmlAttributes: Ye(he, e2), linkTags: ze(ye.LINK, [ke, we], e2), metaTags: ze(ye.META, [Ae, be, Te, xe, Ce], e2), noscriptTags: ze(ye.NOSCRIPT, [je], e2), onChangeClientState: Ke(e2), scriptTags: ze(ye.SCRIPT, [Oe, je], e2), styleTags: ze(ye.STYLE, [ve], e2), title: qe(e2), titleAttributes: Ye(me, e2) };
}, function(e2) {
  et && Xe(et), e2.defer ? et = Je(function() {
    tt(e2, function() {
      et = null;
    });
  }) : (tt(e2), et = null);
}, ct)(function() {
  return null;
}), dt = (pe = pt, ue = de = function(t2) {
  function r2() {
    return function(e2, t3) {
      if (!(e2 instanceof t3))
        throw new TypeError("Cannot call a class as a function");
    }(this, r2), function(e2, t3) {
      if (!e2)
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      return !t3 || "object" != typeof t3 && "function" != typeof t3 ? e2 : t3;
    }(this, t2.apply(this, arguments));
  }
  return function(e2, t3) {
    if ("function" != typeof t3 && null !== t3)
      throw new TypeError("Super expression must either be null or a function, not " + typeof t3);
    e2.prototype = Object.create(t3 && t3.prototype, { constructor: { value: e2, enumerable: false, writable: true, configurable: true } }), t3 && (Object.setPrototypeOf ? Object.setPrototypeOf(e2, t3) : e2.__proto__ = t3);
  }(r2, t2), r2.prototype.shouldComponentUpdate = function(t3) {
    return !e(this.props, t3);
  }, r2.prototype.mapNestedChildrenToProps = function(e2, t3) {
    if (!t3)
      return null;
    switch (e2.type) {
      case ye.SCRIPT:
      case ye.NOSCRIPT:
        return { innerHTML: t3 };
      case ye.STYLE:
        return { cssText: t3 };
    }
    throw new Error("<" + e2.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
  }, r2.prototype.flattenArrayTypeChildren = function(e2) {
    var t3, r3 = e2.child, n2 = e2.arrayTypeChildren, o2 = e2.newChildProps, i2 = e2.nestedChildren;
    return Be({}, n2, ((t3 = {})[r3.type] = [].concat(n2[r3.type] || [], [Be({}, o2, this.mapNestedChildrenToProps(r3, i2))]), t3));
  }, r2.prototype.mapObjectTypeChildren = function(e2) {
    var t3, r3, n2 = e2.child, o2 = e2.newProps, i2 = e2.newChildProps, a2 = e2.nestedChildren;
    switch (n2.type) {
      case ye.TITLE:
        return Be({}, o2, ((t3 = {})[n2.type] = a2, t3.titleAttributes = Be({}, i2), t3));
      case ye.BODY:
        return Be({}, o2, { bodyAttributes: Be({}, i2) });
      case ye.HTML:
        return Be({}, o2, { htmlAttributes: Be({}, i2) });
    }
    return Be({}, o2, ((r3 = {})[n2.type] = Be({}, i2), r3));
  }, r2.prototype.mapArrayTypeChildrenToProps = function(e2, t3) {
    var r3 = Be({}, t3);
    return Object.keys(e2).forEach(function(t4) {
      var n2;
      r3 = Be({}, r3, ((n2 = {})[t4] = e2[t4], n2));
    }), r3;
  }, r2.prototype.warnOnInvalidChildren = function(e2, t3) {
    if ("production" !== process.env.NODE_ENV) {
      if (!ge.some(function(t4) {
        return e2.type === t4;
      }))
        return "function" == typeof e2.type ? Ze("You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.") : Ze("Only elements types " + ge.join(", ") + " are allowed. Helmet does not support rendering <" + e2.type + "> elements. Refer to our API for more information.");
      if (t3 && "string" != typeof t3 && (!Array.isArray(t3) || t3.some(function(e3) {
        return "string" != typeof e3;
      })))
        throw new Error("Helmet expects a string as a child of <" + e2.type + ">. Did you forget to wrap your children in braces? ( <" + e2.type + ">{``}</" + e2.type + "> ) Refer to our API for more information.");
    }
    return true;
  }, r2.prototype.mapChildrenToProps = function(e2, t3) {
    var r3 = this, n2 = {};
    return N.Children.forEach(e2, function(e3) {
      if (e3 && e3.props) {
        var o2 = e3.props, i2 = o2.children, a2 = function(e4) {
          var t4 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
          return Object.keys(e4).reduce(function(t5, r4) {
            return t5[$e[r4] || r4] = e4[r4], t5;
          }, t4);
        }(Ve(o2, ["children"]));
        switch (r3.warnOnInvalidChildren(e3, i2), e3.type) {
          case ye.LINK:
          case ye.META:
          case ye.NOSCRIPT:
          case ye.SCRIPT:
          case ye.STYLE:
            n2 = r3.flattenArrayTypeChildren({ child: e3, arrayTypeChildren: n2, newChildProps: a2, nestedChildren: i2 });
            break;
          default:
            t3 = r3.mapObjectTypeChildren({ child: e3, newProps: t3, newChildProps: a2, nestedChildren: i2 });
        }
      }
    }), t3 = this.mapArrayTypeChildrenToProps(n2, t3);
  }, r2.prototype.render = function() {
    var e2 = this.props, t3 = e2.children, r3 = Ve(e2, ["children"]), n2 = Be({}, r3);
    return t3 && (n2 = this.mapChildrenToProps(t3, n2)), Y(pe, { ...n2 });
  }, Fe(r2, null, [{ key: "canUseDOM", set: function(e2) {
    pe.canUseDOM = e2;
  } }]), r2;
}(N.Component), de.propTypes = { base: W.object, bodyAttributes: W.object, children: W.oneOfType([W.arrayOf(W.node), W.node]), defaultTitle: W.string, defer: W.bool, encodeSpecialCharacters: W.bool, htmlAttributes: W.object, link: W.arrayOf(W.object), meta: W.arrayOf(W.object), noscript: W.arrayOf(W.object), onChangeClientState: W.func, script: W.arrayOf(W.object), style: W.arrayOf(W.object), title: W.string, titleAttributes: W.object, titleTemplate: W.string }, de.defaultProps = { defer: true, encodeSpecialCharacters: true }, de.peek = pe.peek, de.rewind = function() {
  var e2 = pe.rewind();
  return e2 || (e2 = ct({ baseTag: [], bodyAttributes: {}, encodeSpecialCharacters: true, htmlAttributes: {}, linkTags: [], metaTags: [], noscriptTags: [], scriptTags: [], styleTags: [], title: "", titleAttributes: {} })), e2;
}, ue);
dt.renderStatic = dt.rewind;
const ut = D(() => import("./header-a86cacab.js").then((e2) => ({ default: e2.default }))), ft = D(() => import("./BottomContent-c7db21dd.js").then((e2) => ({ default: e2.BottomSkeleton }))), ht = D(() => import("./LeftContent-606772c7.js").then((e2) => ({ default: e2.LeftContent }))), mt = D(() => import("./LeftLayersContent-9dcadf15.js").then((e2) => ({ default: e2.LeftLayersContent }))), yt = D(() => import("./RightPanel-5a1ae15d.js")), gt = D(() => import("./editorTutorials-1b5f7b03.js")), bt = D(() => import("./BottomPanel-62250f25.js")), vt = D(() => import("./editorHotKeys-311e8d92.js").then((e2) => ({ default: e2.CustomShortcutWrapper }))), wt = D(() => import("./editorHotKeys-311e8d92.js").then((e2) => ({ default: e2.EditorGlobalHotKeys }))), Tt = D(() => import("./editorHotKeys-311e8d92.js").then((e2) => ({ default: e2.EditorHotKeys }))), jt = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.Body }))), Ct = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.EditorContainer }))), At = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.EditorContainerWithViewMode }))), xt = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.Height100Div }))), kt = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.LeftPanel }))), Ot = D(() => import("./index-f50c05c4.js").then((e2) => e2.AO).then((e2) => ({ default: e2.MiddlePanel }))), St = D(() => import("./help-852ce557.js").then((e2) => ({ default: e2.HelpDropdown }))), Et = D(() => import("./previewHeader-200ac34c.js").then((e2) => ({ default: e2.PreviewHeader }))), Pt = J.div`
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  contain: paint;
  z-index: ${i.hooksCompContainer};
`, Lt = J.div`
  height: ${(e2) => `calc(${e2.$height ? e2.$height + "px" : "100vh"} - env(safe-area-inset-bottom) -
      ${e2.$hideBodyHeader ? "0px" : a}
  )`};
`, It = J.div`
  .ant-menu {
    background-color: ${(e2) => e2.$bgColor ? e2.$bgColor : "#FCFCFD"};
    height: calc(100vh - 48px);
    border-right: 1px solid #e6e8eb;

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

      &.ant-menu-item-only-child {
        color: #1677ff;
      }

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

      &.ant-menu-item-selected,
      &:hover,
      &:active {
        background-color: ${(e2) => e2.$bgColor ? e2.$bgColor : "#FCFCFD"} !important;
        svg {
          background: ${(e2) => e2.$activeBgColor ? e2.$activeBgColor : "#e6edfe"};
          color: ${(e2) => e2.$activeFontColor ? e2.$activeFontColor : "#1677ff"};
          border-radius: 4px;
        }
      }
    }
  }

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

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

  .ant-divider {
    margin: 16px 0;
    border-color: #e1e3eb;
  }
`, $t = J.div`
  font-weight: 500;
  font-size: 14px;
  color: #8b8fa3;
  line-height: 14px;
  margin: 16px;
`, Nt = J.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;
    }
  }
`, Dt = J.div`
  overflow: auto;
  position: relative;
  flex: 1 1 0;
`, Rt = J(n)`
  margin: 2% 0 0 0;
  .device-mockup.portrait {
    > div:first-child {
      > div:first-child {
        > div:first-child {
          > div:nth-child(2) {
            display: block !important;
            overflow: hidden auto !important;
          }
        }
      }
    }
  }
  .device-mockup.landscape {
    > div:first-child {
      > div:first-child {
        > div:first-child {
          > div:nth-child(2) {
            > div:first-child {
              display: block !important;
              overflow: hidden auto !important;
            }
          }
        }
      }
    }
  }
`, Ft = [{ key: "state", icon: Y(E, {}) }, { key: "setting", icon: Y(P, {}) }, { key: "canvas", icon: Y(L, {}) }, { key: "js", icon: Y(I, {}) }, { key: "layout", icon: Y(H, {}) }], Bt = [{ key: "state", icon: Y(E, {}) }, { key: "setting", icon: Y(P, {}) }, { key: "js", icon: Y(I, {}) }], Vt = ({ deviceType: e2, deviceOrientation: t2, children: r2 }) => {
  const [n2, o2] = F(null);
  q(() => {
    (async () => {
      if ("tablet" === e2) {
        const { IPadMockup: e3 } = await import("./index-355d5525.js");
        o2(() => e3);
      } else if ("mobile" === e2) {
        const { IPhoneMockup: e3 } = await import("./index-355d5525.js");
        o2(() => e3);
      } else
        o2(() => null);
    })();
  }, [e2]);
  const i2 = V(() => "tablet" === e2 && "portrait" === t2 ? 850 : "tablet" === e2 && "landscape" === t2 ? 1100 : "mobile" === e2 && "portrait" === t2 ? 450 : "mobile" === e2 && "landscape" === t2 ? 1200 : void 0, [e2, t2]);
  return n2 ? Y(Rt, { justify: "center", children: Y(n2, { isLandscape: "landscape" === t2, screenWidth: i2, className: `device-mockup ${"landscape" === t2 && "mobile" === e2 ? "landscape" : "portrait"} `, frameColor: "background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%)", children: r2 }) }) : Y(z, { children: r2 });
};
const _t = N.memo(function(e2) {
  var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j;
  const { uiComp: n2 } = e2, a2 = Z(), E2 = R(s), { readOnly: P2, hideHeader: L2 } = R(l), I2 = c(p), H2 = c(d), $2 = c(u), N2 = ee().state, D2 = N2 == null ? void 0 : N2.showNewUserGuide, Q2 = c(f), W2 = c(X), [G2, J2] = F(false), te2 = B(() => J2(!G2), [G2]), [re2, ne2] = F("state"), [oe2, ie2] = F(), ae2 = h(), [se2, le2] = F(() => D2 ? m : y()), [ce2, pe2] = F(m), de2 = "view" === a2.viewMode, ue2 = E2.getAppSettingsComp(), { showHeaderInPublic: fe2 } = ue2.getView(), he2 = B((e3) => {
    let t2;
    e3 ? (t2 = Object.assign({}, se2), t2[e3] = !se2[e3]) : Object.values(se2).some((e4) => e4) ? (pe2(se2), t2 = { left: false, bottom: false, right: false }) : t2 = ce2, le2(t2), g(t2);
  }, [se2, ce2]), [me2, ye2] = F(() => b()), ge2 = B((e3) => {
    ye2(e3 || "both"), v(e3 || "both");
  }, [me2]), be2 = B((e3) => {
    E2.setDraggingCompType(e3);
  }, [E2]), ve2 = B((e3) => {
    E2.setShowPropertyPane("property" === e3);
  }, [E2]), we2 = V(() => Object.keys(E2.getHooksComp().children).map((e3) => Y("div", { children: E2.getHooksComp().children[e3].getView() }, e3 + "-" + (I2 == null ? void 0 : I2.applicationId))), [E2]);
  _(() => {
    function e3() {
      ie2(window.innerHeight);
    }
    const t2 = "orientationchange" in window ? "orientationchange" : "resize";
    return window.addEventListener(t2, e3), e3(), () => {
      window.removeEventListener(t2, e3);
    };
  }, [se2, me2]);
  const Te2 = w() || de2 && (!fe2 || !$2.showHeaderInPublicApps);
  V(() => Q2 ? Y(Lt, { $hideBodyHeader: Te2, $height: oe2, children: Y(Ct, { children: n2.getView() }) }) : n2.getView(), [Q2, Te2, oe2, n2]);
  const je2 = V(() => de2 ? n2.getView() : "mobile" === E2.deviceType || "tablet" === E2.deviceType ? Y(Vt, { deviceType: E2.deviceType, deviceOrientation: E2.deviceOrientation, children: n2.getView() }) : Y("div", { children: n2.getView() }), [n2, de2, E2.deviceType, E2.deviceOrientation]);
  q(() => () => {
    le2(m), ye2("both"), J2(false), ne2("state"), ie2(void 0), g(se2), v(me2);
  }, []);
  const Ce2 = "app-acp.vnpt.vn" === window.location.hostname, Ae2 = "localhost" === window.location.hostname;
  if (P2 && L2)
    return U(vt, { children: [n2.getView(), Y("div", { style: { zIndex: i.hooksCompContainer }, children: we2 })] });
  if (P2 && !Q2)
    return U(vt, { children: [U(dt, { children: [I2 && Y("title", { children: ((_c = (_b = (_a = ue2 == null ? void 0 : ue2.children) == null ? void 0 : _a.title) == null ? void 0 : _b.getView) == null ? void 0 : _c.call(_b)) || (I2 == null ? void 0 : I2.name) }), Ce2 || Ae2 && [(I2 == null ? void 0 : I2.name) ? [Y("meta", { property: "iframely:title", content: I2.name }, "iframely:title"), Y("meta", { property: "iframely:description", content: I2.description }, "iframely:description")] : [Y("meta", { property: "iframely:title", content: "Composable Platform" }, "iframely:title"), Y("meta", { property: "iframely:description", content: "Composable Platform | rapid App & VideoMeeting builder for everyone." }, "iframely:description")], Y("link", { rel: "iframely", type: "text/html", href: window.location.href, media: "(aspect-ratio: 1280/720)" }, "iframely-link"), Y("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }, "preconnect-googleapis"), Y("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")]] }), U(K, { fallback: Y(T, {}), children: [!Te2 && Y(Et, {}), U(At, { children: [Y(Lt, { $hideBodyHeader: Te2, $height: oe2, children: je2 }), Y("div", { style: { zIndex: i.hooksCompContainer }, children: we2 })] })] })] });
  const xe2 = se2.right || Q2;
  return U(z, { children: [U(dt, { children: [I2 && Y("title", { children: ((_f = (_e2 = (_d = ue2 == null ? void 0 : ue2.children) == null ? void 0 : _d.title) == null ? void 0 : _e2.getView) == null ? void 0 : _f.call(_e2)) || (I2 == null ? void 0 : I2.name) }), Ce2 || Ae2 && [(I2 == null ? void 0 : I2.name) ? [Y("meta", { property: "iframely:title", content: I2.name }, "iframely:title"), Y("meta", { property: "iframely:description", content: I2.description }, "iframely:description")] : [Y("meta", { property: "iframely:title", content: "Composable Platform" }, "iframely:title"), Y("meta", { property: "iframely:description", content: "Composable Platform | rapid App & VideoMeeting builder for everyone." }, "iframely:description")], Y("link", { rel: "iframely", type: "text/html", href: window.location.href, media: "(aspect-ratio: 1280/720)" }, "iframely"), Y("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }, "preconnect-googleapis"), Y("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")]] }), U(xt, { onDragEnd: (e3) => {
    E2.setDragging(false), j.clearData();
  }, children: [H2 ? Y(Et, {}) : Y(ut, { togglePanel: he2, panelStatus: se2, toggleEditorModeStatus: ge2, editorModeStatus: me2 }), D2 && Y(gt, {}), Y(wt, { disabled: P2, togglePanel: he2, panelStatus: se2, toggleShortcutList: te2, children: U(jt, { children: [Y(It, { $bgColor: (_g = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _g.editorSidebarColor, $fontColor: (_h = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _h.editorSidebarFontColor, $activeBgColor: (_i = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _i.editorSidebarActiveBgColor, $activeFontColor: (_j = W2 == null ? void 0 : W2.config_set) == null ? void 0 : _j.editorSidebarActiveFontColor, children: U(t, { width: 40, children: [Y(r, { theme: "light", mode: "inline", defaultSelectedKeys: ["state"], selectedKeys: se2.left ? [re2] : [""], items: I2 && !C(M[I2.applicationType]) ? Ft : Bt, disabled: Q2, onClick: (e3) => ((e4) => {
    let t2 = true;
    se2.left && e4.key === re2 && (t2 = false), le2({ ...se2, left: t2 }), g({ ...se2, left: t2 }), ne2(e4.key);
  })(e3) }), !Q2 && Y(Ht, { children: Y(St, { showShortcutList: G2, setShowShortcutList: J2, isEdit: true }) })] }) }), Y(K, { fallback: null, children: se2.left && "layout" !== me2 && U(kt, { children: ["state" === re2 && Y(ht, { uiComp: n2 }), Y(A.Provider, { value: { settingType: re2 }, children: U(z, { children: ["setting" === re2 && Y(Mt, { children: Y(x, { children: I2 && !C(M[I2.applicationType]) && Y(z, { children: ue2.getPropertyView() }) }) }), "canvas" === re2 && Y(Mt, { children: Y(x, { children: I2 && !C(M[I2.applicationType]) && Y(z, { children: ue2.getPropertyView() }) }) })] }) }), "js" === re2 && U(z, { children: [Y($t, { children: k("leftPanel.toolbarTitle") }), e2.preloadComp.getPropertyView(), U(Nt, { onClick: () => {
    return ae2((e3 = { showScriptsAndStyleModal: true }, { type: o.SET_EDITOR_EXTERNAL_STATE, payload: e3 }));
    var e3;
  }, children: [Y(O, {}), k("leftPanel.toolbarPreload")] }), e2.preloadComp.getJSLibraryPropertyView()] }), "layout" === re2 && Y(mt, { uiComp: n2 })] }) }), U(Ot, { children: [Y(Dt, { className: S, children: Y(Tt, { disabled: P2, children: U(At, { children: [je2, Y(Pt, { children: we2 })] }) }) }), Y(K, { fallback: Y(ft, {}), children: se2.bottom && "layout" !== me2 && Y(bt, {}) })] }), Y(K, { fallback: null, children: xe2 && Y(yt, { uiComp: n2, onCompDrag: be2, showPropertyPane: E2.showPropertyPane, onTabChange: ve2 }) })] }) })] })] });
}, (e2, t2) => $.isEqual(e2, t2));
export {
  Dt as EditorWrapper,
  _t as default
};
