"use strict";
(() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty, __defProps = Object.defineProperties, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropDescs = Object.getOwnPropertyDescriptors, __getOwnPropNames = Object.getOwnPropertyNames, __getOwnPropSymbols = Object.getOwnPropertySymbols, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable;
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value, __spreadValues = (a, b) => {
    for (var prop in b || (b = {}))
      __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
    if (__getOwnPropSymbols)
      for (var prop of __getOwnPropSymbols(b))
        __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
    return a;
  }, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
  var __objRest = (source, exclude) => {
    var target = {};
    for (var prop in source)
      __hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
    if (source != null && __getOwnPropSymbols)
      for (var prop of __getOwnPropSymbols(source))
        exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop) && (target[prop] = source[prop]);
    return target;
  }, __esm = (fn, res) => function() {
    return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
  };
  var __commonJS = (cb, mod2) => function() {
    return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
  };
  var __copyProps = (to, from, except, desc) => {
    if (from && typeof from == "object" || typeof from == "function")
      for (let key of __getOwnPropNames(from))
        !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
    return to;
  };
  var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
    // If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: !0 }) : target,
    mod2
  ));
  var __async = (__this, __arguments, generator) => new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    }, rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    }, step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });

  // <define:SVG_ICONS_FONTAWESOME>
  var init_define_SVG_ICONS_FONTAWESOME = __esm({
    "<define:SVG_ICONS_FONTAWESOME>"() {
    }
  });

  // node_modules/react/cjs/react.production.min.js
  var require_react_production_min = __commonJS({
    "node_modules/react/cjs/react.production.min.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
      function A(a) {
        return a === null || typeof a != "object" ? null : (a = z && a[z] || a["@@iterator"], typeof a == "function" ? a : null);
      }
      var B = { isMounted: function() {
        return !1;
      }, enqueueForceUpdate: function() {
      }, enqueueReplaceState: function() {
      }, enqueueSetState: function() {
      } }, C = Object.assign, D = {};
      function E(a, b, e) {
        this.props = a, this.context = b, this.refs = D, this.updater = e || B;
      }
      E.prototype.isReactComponent = {};
      E.prototype.setState = function(a, b) {
        if (typeof a != "object" && typeof a != "function" && a != null)
          throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
        this.updater.enqueueSetState(this, a, b, "setState");
      };
      E.prototype.forceUpdate = function(a) {
        this.updater.enqueueForceUpdate(this, a, "forceUpdate");
      };
      function F() {
      }
      F.prototype = E.prototype;
      function G(a, b, e) {
        this.props = a, this.context = b, this.refs = D, this.updater = e || B;
      }
      var H = G.prototype = new F();
      H.constructor = G;
      C(H, E.prototype);
      H.isPureReactComponent = !0;
      var I = Array.isArray, J = Object.prototype.hasOwnProperty, K = { current: null }, L = { key: !0, ref: !0, __self: !0, __source: !0 };
      function M(a, b, e) {
        var d, c = {}, k = null, h = null;
        if (b != null)
          for (d in b.ref !== void 0 && (h = b.ref), b.key !== void 0 && (k = "" + b.key), b)
            J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);
        var g = arguments.length - 2;
        if (g === 1)
          c.children = e;
        else if (1 < g) {
          for (var f = Array(g), m = 0; m < g; m++)
            f[m] = arguments[m + 2];
          c.children = f;
        }
        if (a && a.defaultProps)
          for (d in g = a.defaultProps, g)
            c[d] === void 0 && (c[d] = g[d]);
        return { $$typeof: l, type: a, key: k, ref: h, props: c, _owner: K.current };
      }
      function N(a, b) {
        return { $$typeof: l, type: a.type, key: b, ref: a.ref, props: a.props, _owner: a._owner };
      }
      function O(a) {
        return typeof a == "object" && a !== null && a.$$typeof === l;
      }
      function escape(a) {
        var b = { "=": "=0", ":": "=2" };
        return "$" + a.replace(/[=:]/g, function(a2) {
          return b[a2];
        });
      }
      var P = /\/+/g;
      function Q(a, b) {
        return typeof a == "object" && a !== null && a.key != null ? escape("" + a.key) : b.toString(36);
      }
      function R(a, b, e, d, c) {
        var k = typeof a;
        (k === "undefined" || k === "boolean") && (a = null);
        var h = !1;
        if (a === null)
          h = !0;
        else
          switch (k) {
            case "string":
            case "number":
              h = !0;
              break;
            case "object":
              switch (a.$$typeof) {
                case l:
                case n:
                  h = !0;
              }
          }
        if (h)
          return h = a, c = c(h), a = d === "" ? "." + Q(h, 0) : d, I(c) ? (e = "", a != null && (e = a.replace(P, "$&/") + "/"), R(c, b, e, "", function(a2) {
            return a2;
          })) : c != null && (O(c) && (c = N(c, e + (!c.key || h && h.key === c.key ? "" : ("" + c.key).replace(P, "$&/") + "/") + a)), b.push(c)), 1;
        if (h = 0, d = d === "" ? "." : d + ":", I(a))
          for (var g = 0; g < a.length; g++) {
            k = a[g];
            var f = d + Q(k, g);
            h += R(k, b, e, f, c);
          }
        else if (f = A(a), typeof f == "function")
          for (a = f.call(a), g = 0; !(k = a.next()).done; )
            k = k.value, f = d + Q(k, g++), h += R(k, b, e, f, c);
        else if (k === "object")
          throw b = String(a), Error("Objects are not valid as a React child (found: " + (b === "[object Object]" ? "object with keys {" + Object.keys(a).join(", ") + "}" : b) + "). If you meant to render a collection of children, use an array instead.");
        return h;
      }
      function S(a, b, e) {
        if (a == null)
          return a;
        var d = [], c = 0;
        return R(a, d, "", "", function(a2) {
          return b.call(e, a2, c++);
        }), d;
      }
      function T(a) {
        if (a._status === -1) {
          var b = a._result;
          b = b(), b.then(function(b2) {
            (a._status === 0 || a._status === -1) && (a._status = 1, a._result = b2);
          }, function(b2) {
            (a._status === 0 || a._status === -1) && (a._status = 2, a._result = b2);
          }), a._status === -1 && (a._status = 0, a._result = b);
        }
        if (a._status === 1)
          return a._result.default;
        throw a._result;
      }
      var U = { current: null }, V = { transition: null }, W = { ReactCurrentDispatcher: U, ReactCurrentBatchConfig: V, ReactCurrentOwner: K };
      exports.Children = { map: S, forEach: function(a, b, e) {
        S(a, function() {
          b.apply(this, arguments);
        }, e);
      }, count: function(a) {
        var b = 0;
        return S(a, function() {
          b++;
        }), b;
      }, toArray: function(a) {
        return S(a, function(a2) {
          return a2;
        }) || [];
      }, only: function(a) {
        if (!O(a))
          throw Error("React.Children.only expected to receive a single React element child.");
        return a;
      } };
      exports.Component = E;
      exports.Fragment = p;
      exports.Profiler = r;
      exports.PureComponent = G;
      exports.StrictMode = q;
      exports.Suspense = w;
      exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
      exports.cloneElement = function(a, b, e) {
        if (a == null)
          throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a + ".");
        var d = C({}, a.props), c = a.key, k = a.ref, h = a._owner;
        if (b != null) {
          if (b.ref !== void 0 && (k = b.ref, h = K.current), b.key !== void 0 && (c = "" + b.key), a.type && a.type.defaultProps)
            var g = a.type.defaultProps;
          for (f in b)
            J.call(b, f) && !L.hasOwnProperty(f) && (d[f] = b[f] === void 0 && g !== void 0 ? g[f] : b[f]);
        }
        var f = arguments.length - 2;
        if (f === 1)
          d.children = e;
        else if (1 < f) {
          g = Array(f);
          for (var m = 0; m < f; m++)
            g[m] = arguments[m + 2];
          d.children = g;
        }
        return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h };
      };
      exports.createContext = function(a) {
        return a = { $$typeof: u, _currentValue: a, _currentValue2: a, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, a.Provider = { $$typeof: t, _context: a }, a.Consumer = a;
      };
      exports.createElement = M;
      exports.createFactory = function(a) {
        var b = M.bind(null, a);
        return b.type = a, b;
      };
      exports.createRef = function() {
        return { current: null };
      };
      exports.forwardRef = function(a) {
        return { $$typeof: v, render: a };
      };
      exports.isValidElement = O;
      exports.lazy = function(a) {
        return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T };
      };
      exports.memo = function(a, b) {
        return { $$typeof: x, type: a, compare: b === void 0 ? null : b };
      };
      exports.startTransition = function(a) {
        var b = V.transition;
        V.transition = {};
        try {
          a();
        } finally {
          V.transition = b;
        }
      };
      exports.unstable_act = function() {
        throw Error("act(...) is not supported in production builds of React.");
      };
      exports.useCallback = function(a, b) {
        return U.current.useCallback(a, b);
      };
      exports.useContext = function(a) {
        return U.current.useContext(a);
      };
      exports.useDebugValue = function() {
      };
      exports.useDeferredValue = function(a) {
        return U.current.useDeferredValue(a);
      };
      exports.useEffect = function(a, b) {
        return U.current.useEffect(a, b);
      };
      exports.useId = function() {
        return U.current.useId();
      };
      exports.useImperativeHandle = function(a, b, e) {
        return U.current.useImperativeHandle(a, b, e);
      };
      exports.useInsertionEffect = function(a, b) {
        return U.current.useInsertionEffect(a, b);
      };
      exports.useLayoutEffect = function(a, b) {
        return U.current.useLayoutEffect(a, b);
      };
      exports.useMemo = function(a, b) {
        return U.current.useMemo(a, b);
      };
      exports.useReducer = function(a, b, e) {
        return U.current.useReducer(a, b, e);
      };
      exports.useRef = function(a) {
        return U.current.useRef(a);
      };
      exports.useState = function(a) {
        return U.current.useState(a);
      };
      exports.useSyncExternalStore = function(a, b, e) {
        return U.current.useSyncExternalStore(a, b, e);
      };
      exports.useTransition = function() {
        return U.current.useTransition();
      };
      exports.version = "18.2.0";
    }
  });

  // node_modules/react/index.js
  var require_react = __commonJS({
    "node_modules/react/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      module.exports = require_react_production_min();
    }
  });

  // node_modules/scheduler/cjs/scheduler.production.min.js
  var require_scheduler_production_min = __commonJS({
    "node_modules/scheduler/cjs/scheduler.production.min.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      function f(a, b) {
        var c = a.length;
        a.push(b);
        a:
          for (; 0 < c; ) {
            var d = c - 1 >>> 1, e = a[d];
            if (0 < g(e, b))
              a[d] = b, a[c] = e, c = d;
            else
              break a;
          }
      }
      function h(a) {
        return a.length === 0 ? null : a[0];
      }
      function k(a) {
        if (a.length === 0)
          return null;
        var b = a[0], c = a.pop();
        if (c !== b) {
          a[0] = c;
          a:
            for (var d = 0, e = a.length, w = e >>> 1; d < w; ) {
              var m = 2 * (d + 1) - 1, C = a[m], n = m + 1, x = a[n];
              if (0 > g(C, c))
                n < e && 0 > g(x, C) ? (a[d] = x, a[n] = c, d = n) : (a[d] = C, a[m] = c, d = m);
              else if (n < e && 0 > g(x, c))
                a[d] = x, a[n] = c, d = n;
              else
                break a;
            }
        }
        return b;
      }
      function g(a, b) {
        var c = a.sortIndex - b.sortIndex;
        return c !== 0 ? c : a.id - b.id;
      }
      typeof performance == "object" && typeof performance.now == "function" ? (l = performance, exports.unstable_now = function() {
        return l.now();
      }) : (p = Date, q = p.now(), exports.unstable_now = function() {
        return p.now() - q;
      });
      var l, p, q, r = [], t = [], u = 1, v = null, y = 3, z = !1, A = !1, B = !1, D = typeof setTimeout == "function" ? setTimeout : null, E = typeof clearTimeout == "function" ? clearTimeout : null, F = typeof setImmediate != "undefined" ? setImmediate : null;
      typeof navigator != "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
      function G(a) {
        for (var b = h(t); b !== null; ) {
          if (b.callback === null)
            k(t);
          else if (b.startTime <= a)
            k(t), b.sortIndex = b.expirationTime, f(r, b);
          else
            break;
          b = h(t);
        }
      }
      function H(a) {
        if (B = !1, G(a), !A)
          if (h(r) !== null)
            A = !0, I(J);
          else {
            var b = h(t);
            b !== null && K(H, b.startTime - a);
          }
      }
      function J(a, b) {
        A = !1, B && (B = !1, E(L), L = -1), z = !0;
        var c = y;
        try {
          for (G(b), v = h(r); v !== null && (!(v.expirationTime > b) || a && !M()); ) {
            var d = v.callback;
            if (typeof d == "function") {
              v.callback = null, y = v.priorityLevel;
              var e = d(v.expirationTime <= b);
              b = exports.unstable_now(), typeof e == "function" ? v.callback = e : v === h(r) && k(r), G(b);
            } else
              k(r);
            v = h(r);
          }
          if (v !== null)
            var w = !0;
          else {
            var m = h(t);
            m !== null && K(H, m.startTime - b), w = !1;
          }
          return w;
        } finally {
          v = null, y = c, z = !1;
        }
      }
      var N = !1, O = null, L = -1, P = 5, Q = -1;
      function M() {
        return !(exports.unstable_now() - Q < P);
      }
      function R() {
        if (O !== null) {
          var a = exports.unstable_now();
          Q = a;
          var b = !0;
          try {
            b = O(!0, a);
          } finally {
            b ? S() : (N = !1, O = null);
          }
        } else
          N = !1;
      }
      var S;
      typeof F == "function" ? S = function() {
        F(R);
      } : typeof MessageChannel != "undefined" ? (T = new MessageChannel(), U = T.port2, T.port1.onmessage = R, S = function() {
        U.postMessage(null);
      }) : S = function() {
        D(R, 0);
      };
      var T, U;
      function I(a) {
        O = a, N || (N = !0, S());
      }
      function K(a, b) {
        L = D(function() {
          a(exports.unstable_now());
        }, b);
      }
      exports.unstable_IdlePriority = 5;
      exports.unstable_ImmediatePriority = 1;
      exports.unstable_LowPriority = 4;
      exports.unstable_NormalPriority = 3;
      exports.unstable_Profiling = null;
      exports.unstable_UserBlockingPriority = 2;
      exports.unstable_cancelCallback = function(a) {
        a.callback = null;
      };
      exports.unstable_continueExecution = function() {
        A || z || (A = !0, I(J));
      };
      exports.unstable_forceFrameRate = function(a) {
        0 > a || 125 < a ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P = 0 < a ? Math.floor(1e3 / a) : 5;
      };
      exports.unstable_getCurrentPriorityLevel = function() {
        return y;
      };
      exports.unstable_getFirstCallbackNode = function() {
        return h(r);
      };
      exports.unstable_next = function(a) {
        switch (y) {
          case 1:
          case 2:
          case 3:
            var b = 3;
            break;
          default:
            b = y;
        }
        var c = y;
        y = b;
        try {
          return a();
        } finally {
          y = c;
        }
      };
      exports.unstable_pauseExecution = function() {
      };
      exports.unstable_requestPaint = function() {
      };
      exports.unstable_runWithPriority = function(a, b) {
        switch (a) {
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
            break;
          default:
            a = 3;
        }
        var c = y;
        y = a;
        try {
          return b();
        } finally {
          y = c;
        }
      };
      exports.unstable_scheduleCallback = function(a, b, c) {
        var d = exports.unstable_now();
        switch (typeof c == "object" && c !== null ? (c = c.delay, c = typeof c == "number" && 0 < c ? d + c : d) : c = d, a) {
          case 1:
            var e = -1;
            break;
          case 2:
            e = 250;
            break;
          case 5:
            e = 1073741823;
            break;
          case 4:
            e = 1e4;
            break;
          default:
            e = 5e3;
        }
        return e = c + e, a = { id: u++, callback: b, priorityLevel: a, startTime: c, expirationTime: e, sortIndex: -1 }, c > d ? (a.sortIndex = c, f(t, a), h(r) === null && a === h(t) && (B ? (E(L), L = -1) : B = !0, K(H, c - d))) : (a.sortIndex = e, f(r, a), A || z || (A = !0, I(J))), a;
      };
      exports.unstable_shouldYield = M;
      exports.unstable_wrapCallback = function(a) {
        var b = y;
        return function() {
          var c = y;
          y = b;
          try {
            return a.apply(this, arguments);
          } finally {
            y = c;
          }
        };
      };
    }
  });

  // node_modules/scheduler/index.js
  var require_scheduler = __commonJS({
    "node_modules/scheduler/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      module.exports = require_scheduler_production_min();
    }
  });

  // node_modules/react-dom/cjs/react-dom.production.min.js
  var require_react_dom_production_min = __commonJS({
    "node_modules/react-dom/cjs/react-dom.production.min.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var aa = require_react(), ca = require_scheduler();
      function p(a) {
        for (var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++)
          b += "&args[]=" + encodeURIComponent(arguments[c]);
        return "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
      }
      var da = /* @__PURE__ */ new Set(), ea = {};
      function fa(a, b) {
        ha(a, b), ha(a + "Capture", b);
      }
      function ha(a, b) {
        for (ea[a] = b, a = 0; a < b.length; a++)
          da.add(b[a]);
      }
      var ia = !(typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined"), ja = Object.prototype.hasOwnProperty, ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, la = {}, ma = {};
      function oa(a) {
        return ja.call(ma, a) ? !0 : ja.call(la, a) ? !1 : ka.test(a) ? ma[a] = !0 : (la[a] = !0, !1);
      }
      function pa(a, b, c, d) {
        if (c !== null && c.type === 0)
          return !1;
        switch (typeof b) {
          case "function":
          case "symbol":
            return !0;
          case "boolean":
            return d ? !1 : c !== null ? !c.acceptsBooleans : (a = a.toLowerCase().slice(0, 5), a !== "data-" && a !== "aria-");
          default:
            return !1;
        }
      }
      function qa(a, b, c, d) {
        if (b === null || typeof b == "undefined" || pa(a, b, c, d))
          return !0;
        if (d)
          return !1;
        if (c !== null)
          switch (c.type) {
            case 3:
              return !b;
            case 4:
              return b === !1;
            case 5:
              return isNaN(b);
            case 6:
              return isNaN(b) || 1 > b;
          }
        return !1;
      }
      function v(a, b, c, d, e, f, g) {
        this.acceptsBooleans = b === 2 || b === 3 || b === 4, this.attributeName = d, this.attributeNamespace = e, this.mustUseProperty = c, this.propertyName = a, this.type = b, this.sanitizeURL = f, this.removeEmptyString = g;
      }
      var z = {};
      "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a) {
        z[a] = new v(a, 0, !1, a, null, !1, !1);
      });
      [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a) {
        var b = a[0];
        z[b] = new v(b, 1, !1, a[1], null, !1, !1);
      });
      ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a) {
        z[a] = new v(a, 2, !1, a.toLowerCase(), null, !1, !1);
      });
      ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a) {
        z[a] = new v(a, 2, !1, a, null, !1, !1);
      });
      "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a) {
        z[a] = new v(a, 3, !1, a.toLowerCase(), null, !1, !1);
      });
      ["checked", "multiple", "muted", "selected"].forEach(function(a) {
        z[a] = new v(a, 3, !0, a, null, !1, !1);
      });
      ["capture", "download"].forEach(function(a) {
        z[a] = new v(a, 4, !1, a, null, !1, !1);
      });
      ["cols", "rows", "size", "span"].forEach(function(a) {
        z[a] = new v(a, 6, !1, a, null, !1, !1);
      });
      ["rowSpan", "start"].forEach(function(a) {
        z[a] = new v(a, 5, !1, a.toLowerCase(), null, !1, !1);
      });
      var ra = /[\-:]([a-z])/g;
      function sa(a) {
        return a[1].toUpperCase();
      }
      "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a) {
        var b = a.replace(
          ra,
          sa
        );
        z[b] = new v(b, 1, !1, a, null, !1, !1);
      });
      "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a) {
        var b = a.replace(ra, sa);
        z[b] = new v(b, 1, !1, a, "http://www.w3.org/1999/xlink", !1, !1);
      });
      ["xml:base", "xml:lang", "xml:space"].forEach(function(a) {
        var b = a.replace(ra, sa);
        z[b] = new v(b, 1, !1, a, "http://www.w3.org/XML/1998/namespace", !1, !1);
      });
      ["tabIndex", "crossOrigin"].forEach(function(a) {
        z[a] = new v(a, 1, !1, a.toLowerCase(), null, !1, !1);
      });
      z.xlinkHref = new v("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
      ["src", "href", "action", "formAction"].forEach(function(a) {
        z[a] = new v(a, 1, !1, a.toLowerCase(), null, !0, !0);
      });
      function ta(a, b, c, d) {
        var e = z.hasOwnProperty(b) ? z[b] : null;
        (e !== null ? e.type !== 0 : d || !(2 < b.length) || b[0] !== "o" && b[0] !== "O" || b[1] !== "n" && b[1] !== "N") && (qa(b, c, e, d) && (c = null), d || e === null ? oa(b) && (c === null ? a.removeAttribute(b) : a.setAttribute(b, "" + c)) : e.mustUseProperty ? a[e.propertyName] = c === null ? e.type === 3 ? !1 : "" : c : (b = e.attributeName, d = e.attributeNamespace, c === null ? a.removeAttribute(b) : (e = e.type, c = e === 3 || e === 4 && c === !0 ? "" : "" + c, d ? a.setAttributeNS(d, b, c) : a.setAttribute(b, c))));
      }
      var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, va = Symbol.for("react.element"), wa = Symbol.for("react.portal"), ya = Symbol.for("react.fragment"), za = Symbol.for("react.strict_mode"), Aa = Symbol.for("react.profiler"), Ba = Symbol.for("react.provider"), Ca = Symbol.for("react.context"), Da = Symbol.for("react.forward_ref"), Ea = Symbol.for("react.suspense"), Fa = Symbol.for("react.suspense_list"), Ga = Symbol.for("react.memo"), Ha = Symbol.for("react.lazy");
      Symbol.for("react.scope");
      Symbol.for("react.debug_trace_mode");
      var Ia = Symbol.for("react.offscreen");
      Symbol.for("react.legacy_hidden");
      Symbol.for("react.cache");
      Symbol.for("react.tracing_marker");
      var Ja = Symbol.iterator;
      function Ka(a) {
        return a === null || typeof a != "object" ? null : (a = Ja && a[Ja] || a["@@iterator"], typeof a == "function" ? a : null);
      }
      var A = Object.assign, La;
      function Ma(a) {
        if (La === void 0)
          try {
            throw Error();
          } catch (c) {
            var b = c.stack.trim().match(/\n( *(at )?)/);
            La = b && b[1] || "";
          }
        return `
` + La + a;
      }
      var Na = !1;
      function Oa(a, b) {
        if (!a || Na)
          return "";
        Na = !0;
        var c = Error.prepareStackTrace;
        Error.prepareStackTrace = void 0;
        try {
          if (b)
            if (b = function() {
              throw Error();
            }, Object.defineProperty(b.prototype, "props", { set: function() {
              throw Error();
            } }), typeof Reflect == "object" && Reflect.construct) {
              try {
                Reflect.construct(b, []);
              } catch (l) {
                var d = l;
              }
              Reflect.construct(a, [], b);
            } else {
              try {
                b.call();
              } catch (l) {
                d = l;
              }
              a.call(b.prototype);
            }
          else {
            try {
              throw Error();
            } catch (l) {
              d = l;
            }
            a();
          }
        } catch (l) {
          if (l && d && typeof l.stack == "string") {
            for (var e = l.stack.split(`
`), f = d.stack.split(`
`), g = e.length - 1, h = f.length - 1; 1 <= g && 0 <= h && e[g] !== f[h]; )
              h--;
            for (; 1 <= g && 0 <= h; g--, h--)
              if (e[g] !== f[h]) {
                if (g !== 1 || h !== 1)
                  do
                    if (g--, h--, 0 > h || e[g] !== f[h]) {
                      var k = `
` + e[g].replace(" at new ", " at ");
                      return a.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", a.displayName)), k;
                    }
                  while (1 <= g && 0 <= h);
                break;
              }
          }
        } finally {
          Na = !1, Error.prepareStackTrace = c;
        }
        return (a = a ? a.displayName || a.name : "") ? Ma(a) : "";
      }
      function Pa(a) {
        switch (a.tag) {
          case 5:
            return Ma(a.type);
          case 16:
            return Ma("Lazy");
          case 13:
            return Ma("Suspense");
          case 19:
            return Ma("SuspenseList");
          case 0:
          case 2:
          case 15:
            return a = Oa(a.type, !1), a;
          case 11:
            return a = Oa(a.type.render, !1), a;
          case 1:
            return a = Oa(a.type, !0), a;
          default:
            return "";
        }
      }
      function Qa(a) {
        if (a == null)
          return null;
        if (typeof a == "function")
          return a.displayName || a.name || null;
        if (typeof a == "string")
          return a;
        switch (a) {
          case ya:
            return "Fragment";
          case wa:
            return "Portal";
          case Aa:
            return "Profiler";
          case za:
            return "StrictMode";
          case Ea:
            return "Suspense";
          case Fa:
            return "SuspenseList";
        }
        if (typeof a == "object")
          switch (a.$$typeof) {
            case Ca:
              return (a.displayName || "Context") + ".Consumer";
            case Ba:
              return (a._context.displayName || "Context") + ".Provider";
            case Da:
              var b = a.render;
              return a = a.displayName, a || (a = b.displayName || b.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
            case Ga:
              return b = a.displayName || null, b !== null ? b : Qa(a.type) || "Memo";
            case Ha:
              b = a._payload, a = a._init;
              try {
                return Qa(a(b));
              } catch (c) {
              }
          }
        return null;
      }
      function Ra(a) {
        var b = a.type;
        switch (a.tag) {
          case 24:
            return "Cache";
          case 9:
            return (b.displayName || "Context") + ".Consumer";
          case 10:
            return (b._context.displayName || "Context") + ".Provider";
          case 18:
            return "DehydratedFragment";
          case 11:
            return a = b.render, a = a.displayName || a.name || "", b.displayName || (a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef");
          case 7:
            return "Fragment";
          case 5:
            return b;
          case 4:
            return "Portal";
          case 3:
            return "Root";
          case 6:
            return "Text";
          case 16:
            return Qa(b);
          case 8:
            return b === za ? "StrictMode" : "Mode";
          case 22:
            return "Offscreen";
          case 12:
            return "Profiler";
          case 21:
            return "Scope";
          case 13:
            return "Suspense";
          case 19:
            return "SuspenseList";
          case 25:
            return "TracingMarker";
          case 1:
          case 0:
          case 17:
          case 2:
          case 14:
          case 15:
            if (typeof b == "function")
              return b.displayName || b.name || null;
            if (typeof b == "string")
              return b;
        }
        return null;
      }
      function Sa(a) {
        switch (typeof a) {
          case "boolean":
          case "number":
          case "string":
          case "undefined":
            return a;
          case "object":
            return a;
          default:
            return "";
        }
      }
      function Ta(a) {
        var b = a.type;
        return (a = a.nodeName) && a.toLowerCase() === "input" && (b === "checkbox" || b === "radio");
      }
      function Ua(a) {
        var b = Ta(a) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a.constructor.prototype, b), d = "" + a[b];
        if (!a.hasOwnProperty(b) && typeof c != "undefined" && typeof c.get == "function" && typeof c.set == "function") {
          var e = c.get, f = c.set;
          return Object.defineProperty(a, b, { configurable: !0, get: function() {
            return e.call(this);
          }, set: function(a2) {
            d = "" + a2, f.call(this, a2);
          } }), Object.defineProperty(a, b, { enumerable: c.enumerable }), { getValue: function() {
            return d;
          }, setValue: function(a2) {
            d = "" + a2;
          }, stopTracking: function() {
            a._valueTracker = null, delete a[b];
          } };
        }
      }
      function Va(a) {
        a._valueTracker || (a._valueTracker = Ua(a));
      }
      function Wa(a) {
        if (!a)
          return !1;
        var b = a._valueTracker;
        if (!b)
          return !0;
        var c = b.getValue(), d = "";
        return a && (d = Ta(a) ? a.checked ? "true" : "false" : a.value), a = d, a !== c ? (b.setValue(a), !0) : !1;
      }
      function Xa(a) {
        if (a = a || (typeof document != "undefined" ? document : void 0), typeof a == "undefined")
          return null;
        try {
          return a.activeElement || a.body;
        } catch (b) {
          return a.body;
        }
      }
      function Ya(a, b) {
        var c = b.checked;
        return A({}, b, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: c != null ? c : a._wrapperState.initialChecked });
      }
      function Za(a, b) {
        var c = b.defaultValue == null ? "" : b.defaultValue, d = b.checked != null ? b.checked : b.defaultChecked;
        c = Sa(b.value != null ? b.value : c), a._wrapperState = { initialChecked: d, initialValue: c, controlled: b.type === "checkbox" || b.type === "radio" ? b.checked != null : b.value != null };
      }
      function ab(a, b) {
        b = b.checked, b != null && ta(a, "checked", b, !1);
      }
      function bb(a, b) {
        ab(a, b);
        var c = Sa(b.value), d = b.type;
        if (c != null)
          d === "number" ? (c === 0 && a.value === "" || a.value != c) && (a.value = "" + c) : a.value !== "" + c && (a.value = "" + c);
        else if (d === "submit" || d === "reset") {
          a.removeAttribute("value");
          return;
        }
        b.hasOwnProperty("value") ? cb(a, b.type, c) : b.hasOwnProperty("defaultValue") && cb(a, b.type, Sa(b.defaultValue)), b.checked == null && b.defaultChecked != null && (a.defaultChecked = !!b.defaultChecked);
      }
      function db(a, b, c) {
        if (b.hasOwnProperty("value") || b.hasOwnProperty("defaultValue")) {
          var d = b.type;
          if (!(d !== "submit" && d !== "reset" || b.value !== void 0 && b.value !== null))
            return;
          b = "" + a._wrapperState.initialValue, c || b === a.value || (a.value = b), a.defaultValue = b;
        }
        c = a.name, c !== "" && (a.name = ""), a.defaultChecked = !!a._wrapperState.initialChecked, c !== "" && (a.name = c);
      }
      function cb(a, b, c) {
        (b !== "number" || Xa(a.ownerDocument) !== a) && (c == null ? a.defaultValue = "" + a._wrapperState.initialValue : a.defaultValue !== "" + c && (a.defaultValue = "" + c));
      }
      var eb = Array.isArray;
      function fb(a, b, c, d) {
        if (a = a.options, b) {
          b = {};
          for (var e = 0; e < c.length; e++)
            b["$" + c[e]] = !0;
          for (c = 0; c < a.length; c++)
            e = b.hasOwnProperty("$" + a[c].value), a[c].selected !== e && (a[c].selected = e), e && d && (a[c].defaultSelected = !0);
        } else {
          for (c = "" + Sa(c), b = null, e = 0; e < a.length; e++) {
            if (a[e].value === c) {
              a[e].selected = !0, d && (a[e].defaultSelected = !0);
              return;
            }
            b !== null || a[e].disabled || (b = a[e]);
          }
          b !== null && (b.selected = !0);
        }
      }
      function gb(a, b) {
        if (b.dangerouslySetInnerHTML != null)
          throw Error(p(91));
        return A({}, b, { value: void 0, defaultValue: void 0, children: "" + a._wrapperState.initialValue });
      }
      function hb(a, b) {
        var c = b.value;
        if (c == null) {
          if (c = b.children, b = b.defaultValue, c != null) {
            if (b != null)
              throw Error(p(92));
            if (eb(c)) {
              if (1 < c.length)
                throw Error(p(93));
              c = c[0];
            }
            b = c;
          }
          b == null && (b = ""), c = b;
        }
        a._wrapperState = { initialValue: Sa(c) };
      }
      function ib(a, b) {
        var c = Sa(b.value), d = Sa(b.defaultValue);
        c != null && (c = "" + c, c !== a.value && (a.value = c), b.defaultValue == null && a.defaultValue !== c && (a.defaultValue = c)), d != null && (a.defaultValue = "" + d);
      }
      function jb(a) {
        var b = a.textContent;
        b === a._wrapperState.initialValue && b !== "" && b !== null && (a.value = b);
      }
      function kb(a) {
        switch (a) {
          case "svg":
            return "http://www.w3.org/2000/svg";
          case "math":
            return "http://www.w3.org/1998/Math/MathML";
          default:
            return "http://www.w3.org/1999/xhtml";
        }
      }
      function lb(a, b) {
        return a == null || a === "http://www.w3.org/1999/xhtml" ? kb(b) : a === "http://www.w3.org/2000/svg" && b === "foreignObject" ? "http://www.w3.org/1999/xhtml" : a;
      }
      var mb, nb = function(a) {
        return typeof MSApp != "undefined" && MSApp.execUnsafeLocalFunction ? function(b, c, d, e) {
          MSApp.execUnsafeLocalFunction(function() {
            return a(b, c, d, e);
          });
        } : a;
      }(function(a, b) {
        if (a.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in a)
          a.innerHTML = b;
        else {
          for (mb = mb || document.createElement("div"), mb.innerHTML = "<svg>" + b.valueOf().toString() + "</svg>", b = mb.firstChild; a.firstChild; )
            a.removeChild(a.firstChild);
          for (; b.firstChild; )
            a.appendChild(b.firstChild);
        }
      });
      function ob(a, b) {
        if (b) {
          var c = a.firstChild;
          if (c && c === a.lastChild && c.nodeType === 3) {
            c.nodeValue = b;
            return;
          }
        }
        a.textContent = b;
      }
      var pb = {
        animationIterationCount: !0,
        aspectRatio: !0,
        borderImageOutset: !0,
        borderImageSlice: !0,
        borderImageWidth: !0,
        boxFlex: !0,
        boxFlexGroup: !0,
        boxOrdinalGroup: !0,
        columnCount: !0,
        columns: !0,
        flex: !0,
        flexGrow: !0,
        flexPositive: !0,
        flexShrink: !0,
        flexNegative: !0,
        flexOrder: !0,
        gridArea: !0,
        gridRow: !0,
        gridRowEnd: !0,
        gridRowSpan: !0,
        gridRowStart: !0,
        gridColumn: !0,
        gridColumnEnd: !0,
        gridColumnSpan: !0,
        gridColumnStart: !0,
        fontWeight: !0,
        lineClamp: !0,
        lineHeight: !0,
        opacity: !0,
        order: !0,
        orphans: !0,
        tabSize: !0,
        widows: !0,
        zIndex: !0,
        zoom: !0,
        fillOpacity: !0,
        floodOpacity: !0,
        stopOpacity: !0,
        strokeDasharray: !0,
        strokeDashoffset: !0,
        strokeMiterlimit: !0,
        strokeOpacity: !0,
        strokeWidth: !0
      }, qb = ["Webkit", "ms", "Moz", "O"];
      Object.keys(pb).forEach(function(a) {
        qb.forEach(function(b) {
          b = b + a.charAt(0).toUpperCase() + a.substring(1), pb[b] = pb[a];
        });
      });
      function rb(a, b, c) {
        return b == null || typeof b == "boolean" || b === "" ? "" : c || typeof b != "number" || b === 0 || pb.hasOwnProperty(a) && pb[a] ? ("" + b).trim() : b + "px";
      }
      function sb(a, b) {
        a = a.style;
        for (var c in b)
          if (b.hasOwnProperty(c)) {
            var d = c.indexOf("--") === 0, e = rb(c, b[c], d);
            c === "float" && (c = "cssFloat"), d ? a.setProperty(c, e) : a[c] = e;
          }
      }
      var tb = A({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 });
      function ub(a, b) {
        if (b) {
          if (tb[a] && (b.children != null || b.dangerouslySetInnerHTML != null))
            throw Error(p(137, a));
          if (b.dangerouslySetInnerHTML != null) {
            if (b.children != null)
              throw Error(p(60));
            if (typeof b.dangerouslySetInnerHTML != "object" || !("__html" in b.dangerouslySetInnerHTML))
              throw Error(p(61));
          }
          if (b.style != null && typeof b.style != "object")
            throw Error(p(62));
        }
      }
      function vb(a, b) {
        if (a.indexOf("-") === -1)
          return typeof b.is == "string";
        switch (a) {
          case "annotation-xml":
          case "color-profile":
          case "font-face":
          case "font-face-src":
          case "font-face-uri":
          case "font-face-format":
          case "font-face-name":
          case "missing-glyph":
            return !1;
          default:
            return !0;
        }
      }
      var wb = null;
      function xb(a) {
        return a = a.target || a.srcElement || window, a.correspondingUseElement && (a = a.correspondingUseElement), a.nodeType === 3 ? a.parentNode : a;
      }
      var yb = null, zb = null, Ab = null;
      function Bb(a) {
        if (a = Cb(a)) {
          if (typeof yb != "function")
            throw Error(p(280));
          var b = a.stateNode;
          b && (b = Db(b), yb(a.stateNode, a.type, b));
        }
      }
      function Eb(a) {
        zb ? Ab ? Ab.push(a) : Ab = [a] : zb = a;
      }
      function Fb() {
        if (zb) {
          var a = zb, b = Ab;
          if (Ab = zb = null, Bb(a), b)
            for (a = 0; a < b.length; a++)
              Bb(b[a]);
        }
      }
      function Gb(a, b) {
        return a(b);
      }
      function Hb() {
      }
      var Ib = !1;
      function Jb(a, b, c) {
        if (Ib)
          return a(b, c);
        Ib = !0;
        try {
          return Gb(a, b, c);
        } finally {
          Ib = !1, (zb !== null || Ab !== null) && (Hb(), Fb());
        }
      }
      function Kb(a, b) {
        var c = a.stateNode;
        if (c === null)
          return null;
        var d = Db(c);
        if (d === null)
          return null;
        c = d[b];
        a:
          switch (b) {
            case "onClick":
            case "onClickCapture":
            case "onDoubleClick":
            case "onDoubleClickCapture":
            case "onMouseDown":
            case "onMouseDownCapture":
            case "onMouseMove":
            case "onMouseMoveCapture":
            case "onMouseUp":
            case "onMouseUpCapture":
            case "onMouseEnter":
              (d = !d.disabled) || (a = a.type, d = !(a === "button" || a === "input" || a === "select" || a === "textarea")), a = !d;
              break a;
            default:
              a = !1;
          }
        if (a)
          return null;
        if (c && typeof c != "function")
          throw Error(p(231, b, typeof c));
        return c;
      }
      var Lb = !1;
      if (ia)
        try {
          Mb = {}, Object.defineProperty(Mb, "passive", { get: function() {
            Lb = !0;
          } }), window.addEventListener("test", Mb, Mb), window.removeEventListener("test", Mb, Mb);
        } catch (a) {
          Lb = !1;
        }
      var Mb;
      function Nb(a, b, c, d, e, f, g, h, k) {
        var l = Array.prototype.slice.call(arguments, 3);
        try {
          b.apply(c, l);
        } catch (m) {
          this.onError(m);
        }
      }
      var Ob = !1, Pb = null, Qb = !1, Rb = null, Sb = { onError: function(a) {
        Ob = !0, Pb = a;
      } };
      function Tb(a, b, c, d, e, f, g, h, k) {
        Ob = !1, Pb = null, Nb.apply(Sb, arguments);
      }
      function Ub(a, b, c, d, e, f, g, h, k) {
        if (Tb.apply(this, arguments), Ob) {
          if (Ob) {
            var l = Pb;
            Ob = !1, Pb = null;
          } else
            throw Error(p(198));
          Qb || (Qb = !0, Rb = l);
        }
      }
      function Vb(a) {
        var b = a, c = a;
        if (a.alternate)
          for (; b.return; )
            b = b.return;
        else {
          a = b;
          do
            b = a, b.flags & 4098 && (c = b.return), a = b.return;
          while (a);
        }
        return b.tag === 3 ? c : null;
      }
      function Wb(a) {
        if (a.tag === 13) {
          var b = a.memoizedState;
          if (b === null && (a = a.alternate, a !== null && (b = a.memoizedState)), b !== null)
            return b.dehydrated;
        }
        return null;
      }
      function Xb(a) {
        if (Vb(a) !== a)
          throw Error(p(188));
      }
      function Yb(a) {
        var b = a.alternate;
        if (!b) {
          if (b = Vb(a), b === null)
            throw Error(p(188));
          return b !== a ? null : a;
        }
        for (var c = a, d = b; ; ) {
          var e = c.return;
          if (e === null)
            break;
          var f = e.alternate;
          if (f === null) {
            if (d = e.return, d !== null) {
              c = d;
              continue;
            }
            break;
          }
          if (e.child === f.child) {
            for (f = e.child; f; ) {
              if (f === c)
                return Xb(e), a;
              if (f === d)
                return Xb(e), b;
              f = f.sibling;
            }
            throw Error(p(188));
          }
          if (c.return !== d.return)
            c = e, d = f;
          else {
            for (var g = !1, h = e.child; h; ) {
              if (h === c) {
                g = !0, c = e, d = f;
                break;
              }
              if (h === d) {
                g = !0, d = e, c = f;
                break;
              }
              h = h.sibling;
            }
            if (!g) {
              for (h = f.child; h; ) {
                if (h === c) {
                  g = !0, c = f, d = e;
                  break;
                }
                if (h === d) {
                  g = !0, d = f, c = e;
                  break;
                }
                h = h.sibling;
              }
              if (!g)
                throw Error(p(189));
            }
          }
          if (c.alternate !== d)
            throw Error(p(190));
        }
        if (c.tag !== 3)
          throw Error(p(188));
        return c.stateNode.current === c ? a : b;
      }
      function Zb(a) {
        return a = Yb(a), a !== null ? $b(a) : null;
      }
      function $b(a) {
        if (a.tag === 5 || a.tag === 6)
          return a;
        for (a = a.child; a !== null; ) {
          var b = $b(a);
          if (b !== null)
            return b;
          a = a.sibling;
        }
        return null;
      }
      var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null;
      function mc(a) {
        if (lc && typeof lc.onCommitFiberRoot == "function")
          try {
            lc.onCommitFiberRoot(kc, a, void 0, (a.current.flags & 128) === 128);
          } catch (b) {
          }
      }
      var oc = Math.clz32 ? Math.clz32 : nc, pc = Math.log, qc = Math.LN2;
      function nc(a) {
        return a >>>= 0, a === 0 ? 32 : 31 - (pc(a) / qc | 0) | 0;
      }
      var rc = 64, sc = 4194304;
      function tc(a) {
        switch (a & -a) {
          case 1:
            return 1;
          case 2:
            return 2;
          case 4:
            return 4;
          case 8:
            return 8;
          case 16:
            return 16;
          case 32:
            return 32;
          case 64:
          case 128:
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
            return a & 4194240;
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
          case 67108864:
            return a & 130023424;
          case 134217728:
            return 134217728;
          case 268435456:
            return 268435456;
          case 536870912:
            return 536870912;
          case 1073741824:
            return 1073741824;
          default:
            return a;
        }
      }
      function uc(a, b) {
        var c = a.pendingLanes;
        if (c === 0)
          return 0;
        var d = 0, e = a.suspendedLanes, f = a.pingedLanes, g = c & 268435455;
        if (g !== 0) {
          var h = g & ~e;
          h !== 0 ? d = tc(h) : (f &= g, f !== 0 && (d = tc(f)));
        } else
          g = c & ~e, g !== 0 ? d = tc(g) : f !== 0 && (d = tc(f));
        if (d === 0)
          return 0;
        if (b !== 0 && b !== d && !(b & e) && (e = d & -d, f = b & -b, e >= f || e === 16 && (f & 4194240) !== 0))
          return b;
        if (d & 4 && (d |= c & 16), b = a.entangledLanes, b !== 0)
          for (a = a.entanglements, b &= d; 0 < b; )
            c = 31 - oc(b), e = 1 << c, d |= a[c], b &= ~e;
        return d;
      }
      function vc(a, b) {
        switch (a) {
          case 1:
          case 2:
          case 4:
            return b + 250;
          case 8:
          case 16:
          case 32:
          case 64:
          case 128:
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
            return b + 5e3;
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
          case 67108864:
            return -1;
          case 134217728:
          case 268435456:
          case 536870912:
          case 1073741824:
            return -1;
          default:
            return -1;
        }
      }
      function wc(a, b) {
        for (var c = a.suspendedLanes, d = a.pingedLanes, e = a.expirationTimes, f = a.pendingLanes; 0 < f; ) {
          var g = 31 - oc(f), h = 1 << g, k = e[g];
          k === -1 ? (!(h & c) || h & d) && (e[g] = vc(h, b)) : k <= b && (a.expiredLanes |= h), f &= ~h;
        }
      }
      function xc(a) {
        return a = a.pendingLanes & -1073741825, a !== 0 ? a : a & 1073741824 ? 1073741824 : 0;
      }
      function yc() {
        var a = rc;
        return rc <<= 1, !(rc & 4194240) && (rc = 64), a;
      }
      function zc(a) {
        for (var b = [], c = 0; 31 > c; c++)
          b.push(a);
        return b;
      }
      function Ac(a, b, c) {
        a.pendingLanes |= b, b !== 536870912 && (a.suspendedLanes = 0, a.pingedLanes = 0), a = a.eventTimes, b = 31 - oc(b), a[b] = c;
      }
      function Bc(a, b) {
        var c = a.pendingLanes & ~b;
        a.pendingLanes = b, a.suspendedLanes = 0, a.pingedLanes = 0, a.expiredLanes &= b, a.mutableReadLanes &= b, a.entangledLanes &= b, b = a.entanglements;
        var d = a.eventTimes;
        for (a = a.expirationTimes; 0 < c; ) {
          var e = 31 - oc(c), f = 1 << e;
          b[e] = 0, d[e] = -1, a[e] = -1, c &= ~f;
        }
      }
      function Cc(a, b) {
        var c = a.entangledLanes |= b;
        for (a = a.entanglements; c; ) {
          var d = 31 - oc(c), e = 1 << d;
          e & b | a[d] & b && (a[d] |= b), c &= ~e;
        }
      }
      var C = 0;
      function Dc(a) {
        return a &= -a, 1 < a ? 4 < a ? a & 268435455 ? 16 : 536870912 : 4 : 1;
      }
      var Ec, Fc, Gc, Hc, Ic, Jc = !1, Kc = [], Lc = null, Mc = null, Nc = null, Oc = /* @__PURE__ */ new Map(), Pc = /* @__PURE__ */ new Map(), Qc = [], Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
      function Sc(a, b) {
        switch (a) {
          case "focusin":
          case "focusout":
            Lc = null;
            break;
          case "dragenter":
          case "dragleave":
            Mc = null;
            break;
          case "mouseover":
          case "mouseout":
            Nc = null;
            break;
          case "pointerover":
          case "pointerout":
            Oc.delete(b.pointerId);
            break;
          case "gotpointercapture":
          case "lostpointercapture":
            Pc.delete(b.pointerId);
        }
      }
      function Tc(a, b, c, d, e, f) {
        return a === null || a.nativeEvent !== f ? (a = { blockedOn: b, domEventName: c, eventSystemFlags: d, nativeEvent: f, targetContainers: [e] }, b !== null && (b = Cb(b), b !== null && Fc(b)), a) : (a.eventSystemFlags |= d, b = a.targetContainers, e !== null && b.indexOf(e) === -1 && b.push(e), a);
      }
      function Uc(a, b, c, d, e) {
        switch (b) {
          case "focusin":
            return Lc = Tc(Lc, a, b, c, d, e), !0;
          case "dragenter":
            return Mc = Tc(Mc, a, b, c, d, e), !0;
          case "mouseover":
            return Nc = Tc(Nc, a, b, c, d, e), !0;
          case "pointerover":
            var f = e.pointerId;
            return Oc.set(f, Tc(Oc.get(f) || null, a, b, c, d, e)), !0;
          case "gotpointercapture":
            return f = e.pointerId, Pc.set(f, Tc(Pc.get(f) || null, a, b, c, d, e)), !0;
        }
        return !1;
      }
      function Vc(a) {
        var b = Wc(a.target);
        if (b !== null) {
          var c = Vb(b);
          if (c !== null) {
            if (b = c.tag, b === 13) {
              if (b = Wb(c), b !== null) {
                a.blockedOn = b, Ic(a.priority, function() {
                  Gc(c);
                });
                return;
              }
            } else if (b === 3 && c.stateNode.current.memoizedState.isDehydrated) {
              a.blockedOn = c.tag === 3 ? c.stateNode.containerInfo : null;
              return;
            }
          }
        }
        a.blockedOn = null;
      }
      function Xc(a) {
        if (a.blockedOn !== null)
          return !1;
        for (var b = a.targetContainers; 0 < b.length; ) {
          var c = Yc(a.domEventName, a.eventSystemFlags, b[0], a.nativeEvent);
          if (c === null) {
            c = a.nativeEvent;
            var d = new c.constructor(c.type, c);
            wb = d, c.target.dispatchEvent(d), wb = null;
          } else
            return b = Cb(c), b !== null && Fc(b), a.blockedOn = c, !1;
          b.shift();
        }
        return !0;
      }
      function Zc(a, b, c) {
        Xc(a) && c.delete(b);
      }
      function $c() {
        Jc = !1, Lc !== null && Xc(Lc) && (Lc = null), Mc !== null && Xc(Mc) && (Mc = null), Nc !== null && Xc(Nc) && (Nc = null), Oc.forEach(Zc), Pc.forEach(Zc);
      }
      function ad(a, b) {
        a.blockedOn === b && (a.blockedOn = null, Jc || (Jc = !0, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c)));
      }
      function bd(a) {
        function b(b2) {
          return ad(b2, a);
        }
        if (0 < Kc.length) {
          ad(Kc[0], a);
          for (var c = 1; c < Kc.length; c++) {
            var d = Kc[c];
            d.blockedOn === a && (d.blockedOn = null);
          }
        }
        for (Lc !== null && ad(Lc, a), Mc !== null && ad(Mc, a), Nc !== null && ad(Nc, a), Oc.forEach(b), Pc.forEach(b), c = 0; c < Qc.length; c++)
          d = Qc[c], d.blockedOn === a && (d.blockedOn = null);
        for (; 0 < Qc.length && (c = Qc[0], c.blockedOn === null); )
          Vc(c), c.blockedOn === null && Qc.shift();
      }
      var cd = ua.ReactCurrentBatchConfig, dd = !0;
      function ed(a, b, c, d) {
        var e = C, f = cd.transition;
        cd.transition = null;
        try {
          C = 1, fd(a, b, c, d);
        } finally {
          C = e, cd.transition = f;
        }
      }
      function gd(a, b, c, d) {
        var e = C, f = cd.transition;
        cd.transition = null;
        try {
          C = 4, fd(a, b, c, d);
        } finally {
          C = e, cd.transition = f;
        }
      }
      function fd(a, b, c, d) {
        if (dd) {
          var e = Yc(a, b, c, d);
          if (e === null)
            hd(a, b, d, id, c), Sc(a, d);
          else if (Uc(e, a, b, c, d))
            d.stopPropagation();
          else if (Sc(a, d), b & 4 && -1 < Rc.indexOf(a)) {
            for (; e !== null; ) {
              var f = Cb(e);
              if (f !== null && Ec(f), f = Yc(a, b, c, d), f === null && hd(a, b, d, id, c), f === e)
                break;
              e = f;
            }
            e !== null && d.stopPropagation();
          } else
            hd(a, b, d, null, c);
        }
      }
      var id = null;
      function Yc(a, b, c, d) {
        if (id = null, a = xb(d), a = Wc(a), a !== null)
          if (b = Vb(a), b === null)
            a = null;
          else if (c = b.tag, c === 13) {
            if (a = Wb(b), a !== null)
              return a;
            a = null;
          } else if (c === 3) {
            if (b.stateNode.current.memoizedState.isDehydrated)
              return b.tag === 3 ? b.stateNode.containerInfo : null;
            a = null;
          } else
            b !== a && (a = null);
        return id = a, null;
      }
      function jd(a) {
        switch (a) {
          case "cancel":
          case "click":
          case "close":
          case "contextmenu":
          case "copy":
          case "cut":
          case "auxclick":
          case "dblclick":
          case "dragend":
          case "dragstart":
          case "drop":
          case "focusin":
          case "focusout":
          case "input":
          case "invalid":
          case "keydown":
          case "keypress":
          case "keyup":
          case "mousedown":
          case "mouseup":
          case "paste":
          case "pause":
          case "play":
          case "pointercancel":
          case "pointerdown":
          case "pointerup":
          case "ratechange":
          case "reset":
          case "resize":
          case "seeked":
          case "submit":
          case "touchcancel":
          case "touchend":
          case "touchstart":
          case "volumechange":
          case "change":
          case "selectionchange":
          case "textInput":
          case "compositionstart":
          case "compositionend":
          case "compositionupdate":
          case "beforeblur":
          case "afterblur":
          case "beforeinput":
          case "blur":
          case "fullscreenchange":
          case "focus":
          case "hashchange":
          case "popstate":
          case "select":
          case "selectstart":
            return 1;
          case "drag":
          case "dragenter":
          case "dragexit":
          case "dragleave":
          case "dragover":
          case "mousemove":
          case "mouseout":
          case "mouseover":
          case "pointermove":
          case "pointerout":
          case "pointerover":
          case "scroll":
          case "toggle":
          case "touchmove":
          case "wheel":
          case "mouseenter":
          case "mouseleave":
          case "pointerenter":
          case "pointerleave":
            return 4;
          case "message":
            switch (ec()) {
              case fc:
                return 1;
              case gc:
                return 4;
              case hc:
              case ic:
                return 16;
              case jc:
                return 536870912;
              default:
                return 16;
            }
          default:
            return 16;
        }
      }
      var kd = null, ld = null, md = null;
      function nd() {
        if (md)
          return md;
        var a, b = ld, c = b.length, d, e = "value" in kd ? kd.value : kd.textContent, f = e.length;
        for (a = 0; a < c && b[a] === e[a]; a++)
          ;
        var g = c - a;
        for (d = 1; d <= g && b[c - d] === e[f - d]; d++)
          ;
        return md = e.slice(a, 1 < d ? 1 - d : void 0);
      }
      function od(a) {
        var b = a.keyCode;
        return "charCode" in a ? (a = a.charCode, a === 0 && b === 13 && (a = 13)) : a = b, a === 10 && (a = 13), 32 <= a || a === 13 ? a : 0;
      }
      function pd() {
        return !0;
      }
      function qd() {
        return !1;
      }
      function rd(a) {
        function b(b2, d, e, f, g) {
          this._reactName = b2, this._targetInst = e, this.type = d, this.nativeEvent = f, this.target = g, this.currentTarget = null;
          for (var c in a)
            a.hasOwnProperty(c) && (b2 = a[c], this[c] = b2 ? b2(f) : f[c]);
          return this.isDefaultPrevented = (f.defaultPrevented != null ? f.defaultPrevented : f.returnValue === !1) ? pd : qd, this.isPropagationStopped = qd, this;
        }
        return A(b.prototype, { preventDefault: function() {
          this.defaultPrevented = !0;
          var a2 = this.nativeEvent;
          a2 && (a2.preventDefault ? a2.preventDefault() : typeof a2.returnValue != "unknown" && (a2.returnValue = !1), this.isDefaultPrevented = pd);
        }, stopPropagation: function() {
          var a2 = this.nativeEvent;
          a2 && (a2.stopPropagation ? a2.stopPropagation() : typeof a2.cancelBubble != "unknown" && (a2.cancelBubble = !0), this.isPropagationStopped = pd);
        }, persist: function() {
        }, isPersistent: pd }), b;
      }
      var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a) {
        return a.timeStamp || Date.now();
      }, defaultPrevented: 0, isTrusted: 0 }, td = rd(sd), ud = A({}, sd, { view: 0, detail: 0 }), vd = rd(ud), wd, xd, yd, Ad = A({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a) {
        return a.relatedTarget === void 0 ? a.fromElement === a.srcElement ? a.toElement : a.fromElement : a.relatedTarget;
      }, movementX: function(a) {
        return "movementX" in a ? a.movementX : (a !== yd && (yd && a.type === "mousemove" ? (wd = a.screenX - yd.screenX, xd = a.screenY - yd.screenY) : xd = wd = 0, yd = a), wd);
      }, movementY: function(a) {
        return "movementY" in a ? a.movementY : xd;
      } }), Bd = rd(Ad), Cd = A({}, Ad, { dataTransfer: 0 }), Dd = rd(Cd), Ed = A({}, ud, { relatedTarget: 0 }), Fd = rd(Ed), Gd = A({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Hd = rd(Gd), Id = A({}, sd, { clipboardData: function(a) {
        return "clipboardData" in a ? a.clipboardData : window.clipboardData;
      } }), Jd = rd(Id), Kd = A({}, sd, { data: 0 }), Ld = rd(Kd), Md = {
        Esc: "Escape",
        Spacebar: " ",
        Left: "ArrowLeft",
        Up: "ArrowUp",
        Right: "ArrowRight",
        Down: "ArrowDown",
        Del: "Delete",
        Win: "OS",
        Menu: "ContextMenu",
        Apps: "ContextMenu",
        Scroll: "ScrollLock",
        MozPrintableKey: "Unidentified"
      }, Nd = {
        8: "Backspace",
        9: "Tab",
        12: "Clear",
        13: "Enter",
        16: "Shift",
        17: "Control",
        18: "Alt",
        19: "Pause",
        20: "CapsLock",
        27: "Escape",
        32: " ",
        33: "PageUp",
        34: "PageDown",
        35: "End",
        36: "Home",
        37: "ArrowLeft",
        38: "ArrowUp",
        39: "ArrowRight",
        40: "ArrowDown",
        45: "Insert",
        46: "Delete",
        112: "F1",
        113: "F2",
        114: "F3",
        115: "F4",
        116: "F5",
        117: "F6",
        118: "F7",
        119: "F8",
        120: "F9",
        121: "F10",
        122: "F11",
        123: "F12",
        144: "NumLock",
        145: "ScrollLock",
        224: "Meta"
      }, Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
      function Pd(a) {
        var b = this.nativeEvent;
        return b.getModifierState ? b.getModifierState(a) : (a = Od[a]) ? !!b[a] : !1;
      }
      function zd() {
        return Pd;
      }
      var Qd = A({}, ud, { key: function(a) {
        if (a.key) {
          var b = Md[a.key] || a.key;
          if (b !== "Unidentified")
            return b;
        }
        return a.type === "keypress" ? (a = od(a), a === 13 ? "Enter" : String.fromCharCode(a)) : a.type === "keydown" || a.type === "keyup" ? Nd[a.keyCode] || "Unidentified" : "";
      }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a) {
        return a.type === "keypress" ? od(a) : 0;
      }, keyCode: function(a) {
        return a.type === "keydown" || a.type === "keyup" ? a.keyCode : 0;
      }, which: function(a) {
        return a.type === "keypress" ? od(a) : a.type === "keydown" || a.type === "keyup" ? a.keyCode : 0;
      } }), Rd = rd(Qd), Sd = A({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Td = rd(Sd), Ud = A({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }), Vd = rd(Ud), Wd = A({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Xd = rd(Wd), Yd = A({}, Ad, {
        deltaX: function(a) {
          return "deltaX" in a ? a.deltaX : "wheelDeltaX" in a ? -a.wheelDeltaX : 0;
        },
        deltaY: function(a) {
          return "deltaY" in a ? a.deltaY : "wheelDeltaY" in a ? -a.wheelDeltaY : "wheelDelta" in a ? -a.wheelDelta : 0;
        },
        deltaZ: 0,
        deltaMode: 0
      }), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be = null;
      ia && "documentMode" in document && (be = document.documentMode);
      var ce = ia && "TextEvent" in window && !be, de = ia && (!ae || be && 8 < be && 11 >= be), ee = String.fromCharCode(32), fe = !1;
      function ge(a, b) {
        switch (a) {
          case "keyup":
            return $d.indexOf(b.keyCode) !== -1;
          case "keydown":
            return b.keyCode !== 229;
          case "keypress":
          case "mousedown":
          case "focusout":
            return !0;
          default:
            return !1;
        }
      }
      function he(a) {
        return a = a.detail, typeof a == "object" && "data" in a ? a.data : null;
      }
      var ie = !1;
      function je(a, b) {
        switch (a) {
          case "compositionend":
            return he(b);
          case "keypress":
            return b.which !== 32 ? null : (fe = !0, ee);
          case "textInput":
            return a = b.data, a === ee && fe ? null : a;
          default:
            return null;
        }
      }
      function ke(a, b) {
        if (ie)
          return a === "compositionend" || !ae && ge(a, b) ? (a = nd(), md = ld = kd = null, ie = !1, a) : null;
        switch (a) {
          case "paste":
            return null;
          case "keypress":
            if (!(b.ctrlKey || b.altKey || b.metaKey) || b.ctrlKey && b.altKey) {
              if (b.char && 1 < b.char.length)
                return b.char;
              if (b.which)
                return String.fromCharCode(b.which);
            }
            return null;
          case "compositionend":
            return de && b.locale !== "ko" ? null : b.data;
          default:
            return null;
        }
      }
      var le = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 };
      function me(a) {
        var b = a && a.nodeName && a.nodeName.toLowerCase();
        return b === "input" ? !!le[a.type] : b === "textarea";
      }
      function ne(a, b, c, d) {
        Eb(d), b = oe(b, "onChange"), 0 < b.length && (c = new td("onChange", "change", null, c, d), a.push({ event: c, listeners: b }));
      }
      var pe = null, qe = null;
      function re(a) {
        se(a, 0);
      }
      function te(a) {
        var b = ue(a);
        if (Wa(b))
          return a;
      }
      function ve(a, b) {
        if (a === "change")
          return b;
      }
      var we = !1;
      ia && (ia ? (ye = "oninput" in document, ye || (ze = document.createElement("div"), ze.setAttribute("oninput", "return;"), ye = typeof ze.oninput == "function"), xe = ye) : xe = !1, we = xe && (!document.documentMode || 9 < document.documentMode));
      var xe, ye, ze;
      function Ae() {
        pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null);
      }
      function Be(a) {
        if (a.propertyName === "value" && te(qe)) {
          var b = [];
          ne(b, qe, a, xb(a)), Jb(re, b);
        }
      }
      function Ce(a, b, c) {
        a === "focusin" ? (Ae(), pe = b, qe = c, pe.attachEvent("onpropertychange", Be)) : a === "focusout" && Ae();
      }
      function De(a) {
        if (a === "selectionchange" || a === "keyup" || a === "keydown")
          return te(qe);
      }
      function Ee(a, b) {
        if (a === "click")
          return te(b);
      }
      function Fe(a, b) {
        if (a === "input" || a === "change")
          return te(b);
      }
      function Ge(a, b) {
        return a === b && (a !== 0 || 1 / a === 1 / b) || a !== a && b !== b;
      }
      var He = typeof Object.is == "function" ? Object.is : Ge;
      function Ie(a, b) {
        if (He(a, b))
          return !0;
        if (typeof a != "object" || a === null || typeof b != "object" || b === null)
          return !1;
        var c = Object.keys(a), d = Object.keys(b);
        if (c.length !== d.length)
          return !1;
        for (d = 0; d < c.length; d++) {
          var e = c[d];
          if (!ja.call(b, e) || !He(a[e], b[e]))
            return !1;
        }
        return !0;
      }
      function Je(a) {
        for (; a && a.firstChild; )
          a = a.firstChild;
        return a;
      }
      function Ke(a, b) {
        var c = Je(a);
        a = 0;
        for (var d; c; ) {
          if (c.nodeType === 3) {
            if (d = a + c.textContent.length, a <= b && d >= b)
              return { node: c, offset: b - a };
            a = d;
          }
          a: {
            for (; c; ) {
              if (c.nextSibling) {
                c = c.nextSibling;
                break a;
              }
              c = c.parentNode;
            }
            c = void 0;
          }
          c = Je(c);
        }
      }
      function Le(a, b) {
        return a && b ? a === b ? !0 : a && a.nodeType === 3 ? !1 : b && b.nodeType === 3 ? Le(a, b.parentNode) : "contains" in a ? a.contains(b) : a.compareDocumentPosition ? !!(a.compareDocumentPosition(b) & 16) : !1 : !1;
      }
      function Me() {
        for (var a = window, b = Xa(); b instanceof a.HTMLIFrameElement; ) {
          try {
            var c = typeof b.contentWindow.location.href == "string";
          } catch (d) {
            c = !1;
          }
          if (c)
            a = b.contentWindow;
          else
            break;
          b = Xa(a.document);
        }
        return b;
      }
      function Ne(a) {
        var b = a && a.nodeName && a.nodeName.toLowerCase();
        return b && (b === "input" && (a.type === "text" || a.type === "search" || a.type === "tel" || a.type === "url" || a.type === "password") || b === "textarea" || a.contentEditable === "true");
      }
      function Oe(a) {
        var b = Me(), c = a.focusedElem, d = a.selectionRange;
        if (b !== c && c && c.ownerDocument && Le(c.ownerDocument.documentElement, c)) {
          if (d !== null && Ne(c)) {
            if (b = d.start, a = d.end, a === void 0 && (a = b), "selectionStart" in c)
              c.selectionStart = b, c.selectionEnd = Math.min(a, c.value.length);
            else if (a = (b = c.ownerDocument || document) && b.defaultView || window, a.getSelection) {
              a = a.getSelection();
              var e = c.textContent.length, f = Math.min(d.start, e);
              d = d.end === void 0 ? f : Math.min(d.end, e), !a.extend && f > d && (e = d, d = f, f = e), e = Ke(c, f);
              var g = Ke(
                c,
                d
              );
              e && g && (a.rangeCount !== 1 || a.anchorNode !== e.node || a.anchorOffset !== e.offset || a.focusNode !== g.node || a.focusOffset !== g.offset) && (b = b.createRange(), b.setStart(e.node, e.offset), a.removeAllRanges(), f > d ? (a.addRange(b), a.extend(g.node, g.offset)) : (b.setEnd(g.node, g.offset), a.addRange(b)));
            }
          }
          for (b = [], a = c; a = a.parentNode; )
            a.nodeType === 1 && b.push({ element: a, left: a.scrollLeft, top: a.scrollTop });
          for (typeof c.focus == "function" && c.focus(), c = 0; c < b.length; c++)
            a = b[c], a.element.scrollLeft = a.left, a.element.scrollTop = a.top;
        }
      }
      var Pe = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se = null, Te = !1;
      function Ue(a, b, c) {
        var d = c.window === c ? c.document : c.nodeType === 9 ? c : c.ownerDocument;
        Te || Qe == null || Qe !== Xa(d) || (d = Qe, "selectionStart" in d && Ne(d) ? d = { start: d.selectionStart, end: d.selectionEnd } : (d = (d.ownerDocument && d.ownerDocument.defaultView || window).getSelection(), d = { anchorNode: d.anchorNode, anchorOffset: d.anchorOffset, focusNode: d.focusNode, focusOffset: d.focusOffset }), Se && Ie(Se, d) || (Se = d, d = oe(Re, "onSelect"), 0 < d.length && (b = new td("onSelect", "select", null, b, c), a.push({ event: b, listeners: d }), b.target = Qe)));
      }
      function Ve(a, b) {
        var c = {};
        return c[a.toLowerCase()] = b.toLowerCase(), c["Webkit" + a] = "webkit" + b, c["Moz" + a] = "moz" + b, c;
      }
      var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {};
      ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition);
      function Ze(a) {
        if (Xe[a])
          return Xe[a];
        if (!We[a])
          return a;
        var b = We[a], c;
        for (c in b)
          if (b.hasOwnProperty(c) && c in Ye)
            return Xe[a] = b[c];
        return a;
      }
      var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
      function ff(a, b) {
        df.set(a, b), fa(b, [a]);
      }
      for (gf = 0; gf < ef.length; gf++)
        hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1), ff(jf, "on" + kf);
      var hf, jf, kf, gf;
      ff($e, "onAnimationEnd");
      ff(af, "onAnimationIteration");
      ff(bf, "onAnimationStart");
      ff("dblclick", "onDoubleClick");
      ff("focusin", "onFocus");
      ff("focusout", "onBlur");
      ff(cf, "onTransitionEnd");
      ha("onMouseEnter", ["mouseout", "mouseover"]);
      ha("onMouseLeave", ["mouseout", "mouseover"]);
      ha("onPointerEnter", ["pointerout", "pointerover"]);
      ha("onPointerLeave", ["pointerout", "pointerover"]);
      fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
      fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
      fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
      fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
      fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
      fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
      var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));
      function nf(a, b, c) {
        var d = a.type || "unknown-event";
        a.currentTarget = c, Ub(d, b, void 0, a), a.currentTarget = null;
      }
      function se(a, b) {
        b = (b & 4) !== 0;
        for (var c = 0; c < a.length; c++) {
          var d = a[c], e = d.event;
          d = d.listeners;
          a: {
            var f = void 0;
            if (b)
              for (var g = d.length - 1; 0 <= g; g--) {
                var h = d[g], k = h.instance, l = h.currentTarget;
                if (h = h.listener, k !== f && e.isPropagationStopped())
                  break a;
                nf(e, h, l), f = k;
              }
            else
              for (g = 0; g < d.length; g++) {
                if (h = d[g], k = h.instance, l = h.currentTarget, h = h.listener, k !== f && e.isPropagationStopped())
                  break a;
                nf(e, h, l), f = k;
              }
          }
        }
        if (Qb)
          throw a = Rb, Qb = !1, Rb = null, a;
      }
      function D(a, b) {
        var c = b[of];
        c === void 0 && (c = b[of] = /* @__PURE__ */ new Set());
        var d = a + "__bubble";
        c.has(d) || (pf(b, a, 2, !1), c.add(d));
      }
      function qf(a, b, c) {
        var d = 0;
        b && (d |= 4), pf(c, a, d, b);
      }
      var rf = "_reactListening" + Math.random().toString(36).slice(2);
      function sf(a) {
        if (!a[rf]) {
          a[rf] = !0, da.forEach(function(b2) {
            b2 !== "selectionchange" && (mf.has(b2) || qf(b2, !1, a), qf(b2, !0, a));
          });
          var b = a.nodeType === 9 ? a : a.ownerDocument;
          b === null || b[rf] || (b[rf] = !0, qf("selectionchange", !1, b));
        }
      }
      function pf(a, b, c, d) {
        switch (jd(b)) {
          case 1:
            var e = ed;
            break;
          case 4:
            e = gd;
            break;
          default:
            e = fd;
        }
        c = e.bind(null, b, c, a), e = void 0, !Lb || b !== "touchstart" && b !== "touchmove" && b !== "wheel" || (e = !0), d ? e !== void 0 ? a.addEventListener(b, c, { capture: !0, passive: e }) : a.addEventListener(b, c, !0) : e !== void 0 ? a.addEventListener(b, c, { passive: e }) : a.addEventListener(b, c, !1);
      }
      function hd(a, b, c, d, e) {
        var f = d;
        if (!(b & 1) && !(b & 2) && d !== null)
          a:
            for (; ; ) {
              if (d === null)
                return;
              var g = d.tag;
              if (g === 3 || g === 4) {
                var h = d.stateNode.containerInfo;
                if (h === e || h.nodeType === 8 && h.parentNode === e)
                  break;
                if (g === 4)
                  for (g = d.return; g !== null; ) {
                    var k = g.tag;
                    if ((k === 3 || k === 4) && (k = g.stateNode.containerInfo, k === e || k.nodeType === 8 && k.parentNode === e))
                      return;
                    g = g.return;
                  }
                for (; h !== null; ) {
                  if (g = Wc(h), g === null)
                    return;
                  if (k = g.tag, k === 5 || k === 6) {
                    d = f = g;
                    continue a;
                  }
                  h = h.parentNode;
                }
              }
              d = d.return;
            }
        Jb(function() {
          var d2 = f, e2 = xb(c), g2 = [];
          a: {
            var h2 = df.get(a);
            if (h2 !== void 0) {
              var k2 = td, n = a;
              switch (a) {
                case "keypress":
                  if (od(c) === 0)
                    break a;
                case "keydown":
                case "keyup":
                  k2 = Rd;
                  break;
                case "focusin":
                  n = "focus", k2 = Fd;
                  break;
                case "focusout":
                  n = "blur", k2 = Fd;
                  break;
                case "beforeblur":
                case "afterblur":
                  k2 = Fd;
                  break;
                case "click":
                  if (c.button === 2)
                    break a;
                case "auxclick":
                case "dblclick":
                case "mousedown":
                case "mousemove":
                case "mouseup":
                case "mouseout":
                case "mouseover":
                case "contextmenu":
                  k2 = Bd;
                  break;
                case "drag":
                case "dragend":
                case "dragenter":
                case "dragexit":
                case "dragleave":
                case "dragover":
                case "dragstart":
                case "drop":
                  k2 = Dd;
                  break;
                case "touchcancel":
                case "touchend":
                case "touchmove":
                case "touchstart":
                  k2 = Vd;
                  break;
                case $e:
                case af:
                case bf:
                  k2 = Hd;
                  break;
                case cf:
                  k2 = Xd;
                  break;
                case "scroll":
                  k2 = vd;
                  break;
                case "wheel":
                  k2 = Zd;
                  break;
                case "copy":
                case "cut":
                case "paste":
                  k2 = Jd;
                  break;
                case "gotpointercapture":
                case "lostpointercapture":
                case "pointercancel":
                case "pointerdown":
                case "pointermove":
                case "pointerout":
                case "pointerover":
                case "pointerup":
                  k2 = Td;
              }
              var t = (b & 4) !== 0, J = !t && a === "scroll", x = t ? h2 !== null ? h2 + "Capture" : null : h2;
              t = [];
              for (var w = d2, u; w !== null; ) {
                u = w;
                var F = u.stateNode;
                if (u.tag === 5 && F !== null && (u = F, x !== null && (F = Kb(w, x), F != null && t.push(tf(w, F, u)))), J)
                  break;
                w = w.return;
              }
              0 < t.length && (h2 = new k2(h2, n, null, c, e2), g2.push({ event: h2, listeners: t }));
            }
          }
          if (!(b & 7)) {
            a: {
              if (h2 = a === "mouseover" || a === "pointerover", k2 = a === "mouseout" || a === "pointerout", h2 && c !== wb && (n = c.relatedTarget || c.fromElement) && (Wc(n) || n[uf]))
                break a;
              if ((k2 || h2) && (h2 = e2.window === e2 ? e2 : (h2 = e2.ownerDocument) ? h2.defaultView || h2.parentWindow : window, k2 ? (n = c.relatedTarget || c.toElement, k2 = d2, n = n ? Wc(n) : null, n !== null && (J = Vb(n), n !== J || n.tag !== 5 && n.tag !== 6) && (n = null)) : (k2 = null, n = d2), k2 !== n)) {
                if (t = Bd, F = "onMouseLeave", x = "onMouseEnter", w = "mouse", (a === "pointerout" || a === "pointerover") && (t = Td, F = "onPointerLeave", x = "onPointerEnter", w = "pointer"), J = k2 == null ? h2 : ue(k2), u = n == null ? h2 : ue(n), h2 = new t(F, w + "leave", k2, c, e2), h2.target = J, h2.relatedTarget = u, F = null, Wc(e2) === d2 && (t = new t(x, w + "enter", n, c, e2), t.target = u, t.relatedTarget = J, F = t), J = F, k2 && n)
                  b: {
                    for (t = k2, x = n, w = 0, u = t; u; u = vf(u))
                      w++;
                    for (u = 0, F = x; F; F = vf(F))
                      u++;
                    for (; 0 < w - u; )
                      t = vf(t), w--;
                    for (; 0 < u - w; )
                      x = vf(x), u--;
                    for (; w--; ) {
                      if (t === x || x !== null && t === x.alternate)
                        break b;
                      t = vf(t), x = vf(x);
                    }
                    t = null;
                  }
                else
                  t = null;
                k2 !== null && wf(g2, h2, k2, t, !1), n !== null && J !== null && wf(g2, J, n, t, !0);
              }
            }
            a: {
              if (h2 = d2 ? ue(d2) : window, k2 = h2.nodeName && h2.nodeName.toLowerCase(), k2 === "select" || k2 === "input" && h2.type === "file")
                var na = ve;
              else if (me(h2))
                if (we)
                  na = Fe;
                else {
                  na = De;
                  var xa = Ce;
                }
              else
                (k2 = h2.nodeName) && k2.toLowerCase() === "input" && (h2.type === "checkbox" || h2.type === "radio") && (na = Ee);
              if (na && (na = na(a, d2))) {
                ne(g2, na, c, e2);
                break a;
              }
              xa && xa(a, h2, d2), a === "focusout" && (xa = h2._wrapperState) && xa.controlled && h2.type === "number" && cb(h2, "number", h2.value);
            }
            switch (xa = d2 ? ue(d2) : window, a) {
              case "focusin":
                (me(xa) || xa.contentEditable === "true") && (Qe = xa, Re = d2, Se = null);
                break;
              case "focusout":
                Se = Re = Qe = null;
                break;
              case "mousedown":
                Te = !0;
                break;
              case "contextmenu":
              case "mouseup":
              case "dragend":
                Te = !1, Ue(g2, c, e2);
                break;
              case "selectionchange":
                if (Pe)
                  break;
              case "keydown":
              case "keyup":
                Ue(g2, c, e2);
            }
            var $a;
            if (ae)
              b: {
                switch (a) {
                  case "compositionstart":
                    var ba = "onCompositionStart";
                    break b;
                  case "compositionend":
                    ba = "onCompositionEnd";
                    break b;
                  case "compositionupdate":
                    ba = "onCompositionUpdate";
                    break b;
                }
                ba = void 0;
              }
            else
              ie ? ge(a, c) && (ba = "onCompositionEnd") : a === "keydown" && c.keyCode === 229 && (ba = "onCompositionStart");
            ba && (de && c.locale !== "ko" && (ie || ba !== "onCompositionStart" ? ba === "onCompositionEnd" && ie && ($a = nd()) : (kd = e2, ld = "value" in kd ? kd.value : kd.textContent, ie = !0)), xa = oe(d2, ba), 0 < xa.length && (ba = new Ld(ba, a, null, c, e2), g2.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c), $a !== null && (ba.data = $a)))), ($a = ce ? je(a, c) : ke(a, c)) && (d2 = oe(d2, "onBeforeInput"), 0 < d2.length && (e2 = new Ld("onBeforeInput", "beforeinput", null, c, e2), g2.push({ event: e2, listeners: d2 }), e2.data = $a));
          }
          se(g2, b);
        });
      }
      function tf(a, b, c) {
        return { instance: a, listener: b, currentTarget: c };
      }
      function oe(a, b) {
        for (var c = b + "Capture", d = []; a !== null; ) {
          var e = a, f = e.stateNode;
          e.tag === 5 && f !== null && (e = f, f = Kb(a, c), f != null && d.unshift(tf(a, f, e)), f = Kb(a, b), f != null && d.push(tf(a, f, e))), a = a.return;
        }
        return d;
      }
      function vf(a) {
        if (a === null)
          return null;
        do
          a = a.return;
        while (a && a.tag !== 5);
        return a || null;
      }
      function wf(a, b, c, d, e) {
        for (var f = b._reactName, g = []; c !== null && c !== d; ) {
          var h = c, k = h.alternate, l = h.stateNode;
          if (k !== null && k === d)
            break;
          h.tag === 5 && l !== null && (h = l, e ? (k = Kb(c, f), k != null && g.unshift(tf(c, k, h))) : e || (k = Kb(c, f), k != null && g.push(tf(c, k, h)))), c = c.return;
        }
        g.length !== 0 && a.push({ event: b, listeners: g });
      }
      var xf = /\r\n?/g, yf = /\u0000|\uFFFD/g;
      function zf(a) {
        return (typeof a == "string" ? a : "" + a).replace(xf, `
`).replace(yf, "");
      }
      function Af(a, b, c) {
        if (b = zf(b), zf(a) !== b && c)
          throw Error(p(425));
      }
      function Bf() {
      }
      var Cf = null, Df = null;
      function Ef(a, b) {
        return a === "textarea" || a === "noscript" || typeof b.children == "string" || typeof b.children == "number" || typeof b.dangerouslySetInnerHTML == "object" && b.dangerouslySetInnerHTML !== null && b.dangerouslySetInnerHTML.__html != null;
      }
      var Ff = typeof setTimeout == "function" ? setTimeout : void 0, Gf = typeof clearTimeout == "function" ? clearTimeout : void 0, Hf = typeof Promise == "function" ? Promise : void 0, Jf = typeof queueMicrotask == "function" ? queueMicrotask : typeof Hf != "undefined" ? function(a) {
        return Hf.resolve(null).then(a).catch(If);
      } : Ff;
      function If(a) {
        setTimeout(function() {
          throw a;
        });
      }
      function Kf(a, b) {
        var c = b, d = 0;
        do {
          var e = c.nextSibling;
          if (a.removeChild(c), e && e.nodeType === 8)
            if (c = e.data, c === "/$") {
              if (d === 0) {
                a.removeChild(e), bd(b);
                return;
              }
              d--;
            } else
              c !== "$" && c !== "$?" && c !== "$!" || d++;
          c = e;
        } while (c);
        bd(b);
      }
      function Lf(a) {
        for (; a != null; a = a.nextSibling) {
          var b = a.nodeType;
          if (b === 1 || b === 3)
            break;
          if (b === 8) {
            if (b = a.data, b === "$" || b === "$!" || b === "$?")
              break;
            if (b === "/$")
              return null;
          }
        }
        return a;
      }
      function Mf(a) {
        a = a.previousSibling;
        for (var b = 0; a; ) {
          if (a.nodeType === 8) {
            var c = a.data;
            if (c === "$" || c === "$!" || c === "$?") {
              if (b === 0)
                return a;
              b--;
            } else
              c === "/$" && b++;
          }
          a = a.previousSibling;
        }
        return null;
      }
      var Nf = Math.random().toString(36).slice(2), Of = "__reactFiber$" + Nf, Pf = "__reactProps$" + Nf, uf = "__reactContainer$" + Nf, of = "__reactEvents$" + Nf, Qf = "__reactListeners$" + Nf, Rf = "__reactHandles$" + Nf;
      function Wc(a) {
        var b = a[Of];
        if (b)
          return b;
        for (var c = a.parentNode; c; ) {
          if (b = c[uf] || c[Of]) {
            if (c = b.alternate, b.child !== null || c !== null && c.child !== null)
              for (a = Mf(a); a !== null; ) {
                if (c = a[Of])
                  return c;
                a = Mf(a);
              }
            return b;
          }
          a = c, c = a.parentNode;
        }
        return null;
      }
      function Cb(a) {
        return a = a[Of] || a[uf], !a || a.tag !== 5 && a.tag !== 6 && a.tag !== 13 && a.tag !== 3 ? null : a;
      }
      function ue(a) {
        if (a.tag === 5 || a.tag === 6)
          return a.stateNode;
        throw Error(p(33));
      }
      function Db(a) {
        return a[Pf] || null;
      }
      var Sf = [], Tf = -1;
      function Uf(a) {
        return { current: a };
      }
      function E(a) {
        0 > Tf || (a.current = Sf[Tf], Sf[Tf] = null, Tf--);
      }
      function G(a, b) {
        Tf++, Sf[Tf] = a.current, a.current = b;
      }
      var Vf = {}, H = Uf(Vf), Wf = Uf(!1), Xf = Vf;
      function Yf(a, b) {
        var c = a.type.contextTypes;
        if (!c)
          return Vf;
        var d = a.stateNode;
        if (d && d.__reactInternalMemoizedUnmaskedChildContext === b)
          return d.__reactInternalMemoizedMaskedChildContext;
        var e = {}, f;
        for (f in c)
          e[f] = b[f];
        return d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = b, a.__reactInternalMemoizedMaskedChildContext = e), e;
      }
      function Zf(a) {
        return a = a.childContextTypes, a != null;
      }
      function $f() {
        E(Wf), E(H);
      }
      function ag(a, b, c) {
        if (H.current !== Vf)
          throw Error(p(168));
        G(H, b), G(Wf, c);
      }
      function bg(a, b, c) {
        var d = a.stateNode;
        if (b = b.childContextTypes, typeof d.getChildContext != "function")
          return c;
        d = d.getChildContext();
        for (var e in d)
          if (!(e in b))
            throw Error(p(108, Ra(a) || "Unknown", e));
        return A({}, c, d);
      }
      function cg(a) {
        return a = (a = a.stateNode) && a.__reactInternalMemoizedMergedChildContext || Vf, Xf = H.current, G(H, a), G(Wf, Wf.current), !0;
      }
      function dg(a, b, c) {
        var d = a.stateNode;
        if (!d)
          throw Error(p(169));
        c ? (a = bg(a, b, Xf), d.__reactInternalMemoizedMergedChildContext = a, E(Wf), E(H), G(H, a)) : E(Wf), G(Wf, c);
      }
      var eg = null, fg = !1, gg = !1;
      function hg(a) {
        eg === null ? eg = [a] : eg.push(a);
      }
      function ig(a) {
        fg = !0, hg(a);
      }
      function jg() {
        if (!gg && eg !== null) {
          gg = !0;
          var a = 0, b = C;
          try {
            var c = eg;
            for (C = 1; a < c.length; a++) {
              var d = c[a];
              do
                d = d(!0);
              while (d !== null);
            }
            eg = null, fg = !1;
          } catch (e) {
            throw eg !== null && (eg = eg.slice(a + 1)), ac(fc, jg), e;
          } finally {
            C = b, gg = !1;
          }
        }
        return null;
      }
      var kg = [], lg = 0, mg = null, ng = 0, og = [], pg = 0, qg = null, rg = 1, sg = "";
      function tg(a, b) {
        kg[lg++] = ng, kg[lg++] = mg, mg = a, ng = b;
      }
      function ug(a, b, c) {
        og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, qg = a;
        var d = rg;
        a = sg;
        var e = 32 - oc(d) - 1;
        d &= ~(1 << e), c += 1;
        var f = 32 - oc(b) + e;
        if (30 < f) {
          var g = e - e % 5;
          f = (d & (1 << g) - 1).toString(32), d >>= g, e -= g, rg = 1 << 32 - oc(b) + e | c << e | d, sg = f + a;
        } else
          rg = 1 << f | c << e | d, sg = a;
      }
      function vg(a) {
        a.return !== null && (tg(a, 1), ug(a, 1, 0));
      }
      function wg(a) {
        for (; a === mg; )
          mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;
        for (; a === qg; )
          qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;
      }
      var xg = null, yg = null, I = !1, zg = null;
      function Ag(a, b) {
        var c = Bg(5, null, null, 0);
        c.elementType = "DELETED", c.stateNode = b, c.return = a, b = a.deletions, b === null ? (a.deletions = [c], a.flags |= 16) : b.push(c);
      }
      function Cg(a, b) {
        switch (a.tag) {
          case 5:
            var c = a.type;
            return b = b.nodeType !== 1 || c.toLowerCase() !== b.nodeName.toLowerCase() ? null : b, b !== null ? (a.stateNode = b, xg = a, yg = Lf(b.firstChild), !0) : !1;
          case 6:
            return b = a.pendingProps === "" || b.nodeType !== 3 ? null : b, b !== null ? (a.stateNode = b, xg = a, yg = null, !0) : !1;
          case 13:
            return b = b.nodeType !== 8 ? null : b, b !== null ? (c = qg !== null ? { id: rg, overflow: sg } : null, a.memoizedState = { dehydrated: b, treeContext: c, retryLane: 1073741824 }, c = Bg(18, null, null, 0), c.stateNode = b, c.return = a, a.child = c, xg = a, yg = null, !0) : !1;
          default:
            return !1;
        }
      }
      function Dg(a) {
        return (a.mode & 1) !== 0 && (a.flags & 128) === 0;
      }
      function Eg(a) {
        if (I) {
          var b = yg;
          if (b) {
            var c = b;
            if (!Cg(a, b)) {
              if (Dg(a))
                throw Error(p(418));
              b = Lf(c.nextSibling);
              var d = xg;
              b && Cg(a, b) ? Ag(d, c) : (a.flags = a.flags & -4097 | 2, I = !1, xg = a);
            }
          } else {
            if (Dg(a))
              throw Error(p(418));
            a.flags = a.flags & -4097 | 2, I = !1, xg = a;
          }
        }
      }
      function Fg(a) {
        for (a = a.return; a !== null && a.tag !== 5 && a.tag !== 3 && a.tag !== 13; )
          a = a.return;
        xg = a;
      }
      function Gg(a) {
        if (a !== xg)
          return !1;
        if (!I)
          return Fg(a), I = !0, !1;
        var b;
        if ((b = a.tag !== 3) && !(b = a.tag !== 5) && (b = a.type, b = b !== "head" && b !== "body" && !Ef(a.type, a.memoizedProps)), b && (b = yg)) {
          if (Dg(a))
            throw Hg(), Error(p(418));
          for (; b; )
            Ag(a, b), b = Lf(b.nextSibling);
        }
        if (Fg(a), a.tag === 13) {
          if (a = a.memoizedState, a = a !== null ? a.dehydrated : null, !a)
            throw Error(p(317));
          a: {
            for (a = a.nextSibling, b = 0; a; ) {
              if (a.nodeType === 8) {
                var c = a.data;
                if (c === "/$") {
                  if (b === 0) {
                    yg = Lf(a.nextSibling);
                    break a;
                  }
                  b--;
                } else
                  c !== "$" && c !== "$!" && c !== "$?" || b++;
              }
              a = a.nextSibling;
            }
            yg = null;
          }
        } else
          yg = xg ? Lf(a.stateNode.nextSibling) : null;
        return !0;
      }
      function Hg() {
        for (var a = yg; a; )
          a = Lf(a.nextSibling);
      }
      function Ig() {
        yg = xg = null, I = !1;
      }
      function Jg(a) {
        zg === null ? zg = [a] : zg.push(a);
      }
      var Kg = ua.ReactCurrentBatchConfig;
      function Lg(a, b) {
        if (a && a.defaultProps) {
          b = A({}, b), a = a.defaultProps;
          for (var c in a)
            b[c] === void 0 && (b[c] = a[c]);
          return b;
        }
        return b;
      }
      var Mg = Uf(null), Ng = null, Og = null, Pg = null;
      function Qg() {
        Pg = Og = Ng = null;
      }
      function Rg(a) {
        var b = Mg.current;
        E(Mg), a._currentValue = b;
      }
      function Sg(a, b, c) {
        for (; a !== null; ) {
          var d = a.alternate;
          if ((a.childLanes & b) !== b ? (a.childLanes |= b, d !== null && (d.childLanes |= b)) : d !== null && (d.childLanes & b) !== b && (d.childLanes |= b), a === c)
            break;
          a = a.return;
        }
      }
      function Tg(a, b) {
        Ng = a, Pg = Og = null, a = a.dependencies, a !== null && a.firstContext !== null && (a.lanes & b && (Ug = !0), a.firstContext = null);
      }
      function Vg(a) {
        var b = a._currentValue;
        if (Pg !== a)
          if (a = { context: a, memoizedValue: b, next: null }, Og === null) {
            if (Ng === null)
              throw Error(p(308));
            Og = a, Ng.dependencies = { lanes: 0, firstContext: a };
          } else
            Og = Og.next = a;
        return b;
      }
      var Wg = null;
      function Xg(a) {
        Wg === null ? Wg = [a] : Wg.push(a);
      }
      function Yg(a, b, c, d) {
        var e = b.interleaved;
        return e === null ? (c.next = c, Xg(b)) : (c.next = e.next, e.next = c), b.interleaved = c, Zg(a, d);
      }
      function Zg(a, b) {
        a.lanes |= b;
        var c = a.alternate;
        for (c !== null && (c.lanes |= b), c = a, a = a.return; a !== null; )
          a.childLanes |= b, c = a.alternate, c !== null && (c.childLanes |= b), c = a, a = a.return;
        return c.tag === 3 ? c.stateNode : null;
      }
      var $g = !1;
      function ah(a) {
        a.updateQueue = { baseState: a.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
      }
      function bh(a, b) {
        a = a.updateQueue, b.updateQueue === a && (b.updateQueue = { baseState: a.baseState, firstBaseUpdate: a.firstBaseUpdate, lastBaseUpdate: a.lastBaseUpdate, shared: a.shared, effects: a.effects });
      }
      function ch(a, b) {
        return { eventTime: a, lane: b, tag: 0, payload: null, callback: null, next: null };
      }
      function dh(a, b, c) {
        var d = a.updateQueue;
        if (d === null)
          return null;
        if (d = d.shared, K & 2) {
          var e = d.pending;
          return e === null ? b.next = b : (b.next = e.next, e.next = b), d.pending = b, Zg(a, c);
        }
        return e = d.interleaved, e === null ? (b.next = b, Xg(d)) : (b.next = e.next, e.next = b), d.interleaved = b, Zg(a, c);
      }
      function eh(a, b, c) {
        if (b = b.updateQueue, b !== null && (b = b.shared, (c & 4194240) !== 0)) {
          var d = b.lanes;
          d &= a.pendingLanes, c |= d, b.lanes = c, Cc(a, c);
        }
      }
      function fh(a, b) {
        var c = a.updateQueue, d = a.alternate;
        if (d !== null && (d = d.updateQueue, c === d)) {
          var e = null, f = null;
          if (c = c.firstBaseUpdate, c !== null) {
            do {
              var g = { eventTime: c.eventTime, lane: c.lane, tag: c.tag, payload: c.payload, callback: c.callback, next: null };
              f === null ? e = f = g : f = f.next = g, c = c.next;
            } while (c !== null);
            f === null ? e = f = b : f = f.next = b;
          } else
            e = f = b;
          c = { baseState: d.baseState, firstBaseUpdate: e, lastBaseUpdate: f, shared: d.shared, effects: d.effects }, a.updateQueue = c;
          return;
        }
        a = c.lastBaseUpdate, a === null ? c.firstBaseUpdate = b : a.next = b, c.lastBaseUpdate = b;
      }
      function gh(a, b, c, d) {
        var e = a.updateQueue;
        $g = !1;
        var f = e.firstBaseUpdate, g = e.lastBaseUpdate, h = e.shared.pending;
        if (h !== null) {
          e.shared.pending = null;
          var k = h, l = k.next;
          k.next = null, g === null ? f = l : g.next = l, g = k;
          var m = a.alternate;
          m !== null && (m = m.updateQueue, h = m.lastBaseUpdate, h !== g && (h === null ? m.firstBaseUpdate = l : h.next = l, m.lastBaseUpdate = k));
        }
        if (f !== null) {
          var q = e.baseState;
          g = 0, m = l = k = null, h = f;
          do {
            var r = h.lane, y = h.eventTime;
            if ((d & r) === r) {
              m !== null && (m = m.next = {
                eventTime: y,
                lane: 0,
                tag: h.tag,
                payload: h.payload,
                callback: h.callback,
                next: null
              });
              a: {
                var n = a, t = h;
                switch (r = b, y = c, t.tag) {
                  case 1:
                    if (n = t.payload, typeof n == "function") {
                      q = n.call(y, q, r);
                      break a;
                    }
                    q = n;
                    break a;
                  case 3:
                    n.flags = n.flags & -65537 | 128;
                  case 0:
                    if (n = t.payload, r = typeof n == "function" ? n.call(y, q, r) : n, r == null)
                      break a;
                    q = A({}, q, r);
                    break a;
                  case 2:
                    $g = !0;
                }
              }
              h.callback !== null && h.lane !== 0 && (a.flags |= 64, r = e.effects, r === null ? e.effects = [h] : r.push(h));
            } else
              y = { eventTime: y, lane: r, tag: h.tag, payload: h.payload, callback: h.callback, next: null }, m === null ? (l = m = y, k = q) : m = m.next = y, g |= r;
            if (h = h.next, h === null) {
              if (h = e.shared.pending, h === null)
                break;
              r = h, h = r.next, r.next = null, e.lastBaseUpdate = r, e.shared.pending = null;
            }
          } while (1);
          if (m === null && (k = q), e.baseState = k, e.firstBaseUpdate = l, e.lastBaseUpdate = m, b = e.shared.interleaved, b !== null) {
            e = b;
            do
              g |= e.lane, e = e.next;
            while (e !== b);
          } else
            f === null && (e.shared.lanes = 0);
          hh |= g, a.lanes = g, a.memoizedState = q;
        }
      }
      function ih(a, b, c) {
        if (a = b.effects, b.effects = null, a !== null)
          for (b = 0; b < a.length; b++) {
            var d = a[b], e = d.callback;
            if (e !== null) {
              if (d.callback = null, d = c, typeof e != "function")
                throw Error(p(191, e));
              e.call(d);
            }
          }
      }
      var jh = new aa.Component().refs;
      function kh(a, b, c, d) {
        b = a.memoizedState, c = c(d, b), c = c == null ? b : A({}, b, c), a.memoizedState = c, a.lanes === 0 && (a.updateQueue.baseState = c);
      }
      var nh = { isMounted: function(a) {
        return (a = a._reactInternals) ? Vb(a) === a : !1;
      }, enqueueSetState: function(a, b, c) {
        a = a._reactInternals;
        var d = L(), e = lh(a), f = ch(d, e);
        f.payload = b, c != null && (f.callback = c), b = dh(a, f, e), b !== null && (mh(b, a, e, d), eh(b, a, e));
      }, enqueueReplaceState: function(a, b, c) {
        a = a._reactInternals;
        var d = L(), e = lh(a), f = ch(d, e);
        f.tag = 1, f.payload = b, c != null && (f.callback = c), b = dh(a, f, e), b !== null && (mh(b, a, e, d), eh(b, a, e));
      }, enqueueForceUpdate: function(a, b) {
        a = a._reactInternals;
        var c = L(), d = lh(a), e = ch(c, d);
        e.tag = 2, b != null && (e.callback = b), b = dh(a, e, d), b !== null && (mh(b, a, d, c), eh(b, a, d));
      } };
      function oh(a, b, c, d, e, f, g) {
        return a = a.stateNode, typeof a.shouldComponentUpdate == "function" ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !Ie(c, d) || !Ie(e, f) : !0;
      }
      function ph(a, b, c) {
        var d = !1, e = Vf, f = b.contextType;
        return typeof f == "object" && f !== null ? f = Vg(f) : (e = Zf(b) ? Xf : H.current, d = b.contextTypes, f = (d = d != null) ? Yf(a, e) : Vf), b = new b(c, f), a.memoizedState = b.state !== null && b.state !== void 0 ? b.state : null, b.updater = nh, a.stateNode = b, b._reactInternals = a, d && (a = a.stateNode, a.__reactInternalMemoizedUnmaskedChildContext = e, a.__reactInternalMemoizedMaskedChildContext = f), b;
      }
      function qh(a, b, c, d) {
        a = b.state, typeof b.componentWillReceiveProps == "function" && b.componentWillReceiveProps(c, d), typeof b.UNSAFE_componentWillReceiveProps == "function" && b.UNSAFE_componentWillReceiveProps(c, d), b.state !== a && nh.enqueueReplaceState(b, b.state, null);
      }
      function rh(a, b, c, d) {
        var e = a.stateNode;
        e.props = c, e.state = a.memoizedState, e.refs = jh, ah(a);
        var f = b.contextType;
        typeof f == "object" && f !== null ? e.context = Vg(f) : (f = Zf(b) ? Xf : H.current, e.context = Yf(a, f)), e.state = a.memoizedState, f = b.getDerivedStateFromProps, typeof f == "function" && (kh(a, b, f, c), e.state = a.memoizedState), typeof b.getDerivedStateFromProps == "function" || typeof e.getSnapshotBeforeUpdate == "function" || typeof e.UNSAFE_componentWillMount != "function" && typeof e.componentWillMount != "function" || (b = e.state, typeof e.componentWillMount == "function" && e.componentWillMount(), typeof e.UNSAFE_componentWillMount == "function" && e.UNSAFE_componentWillMount(), b !== e.state && nh.enqueueReplaceState(e, e.state, null), gh(a, c, e, d), e.state = a.memoizedState), typeof e.componentDidMount == "function" && (a.flags |= 4194308);
      }
      function sh(a, b, c) {
        if (a = c.ref, a !== null && typeof a != "function" && typeof a != "object") {
          if (c._owner) {
            if (c = c._owner, c) {
              if (c.tag !== 1)
                throw Error(p(309));
              var d = c.stateNode;
            }
            if (!d)
              throw Error(p(147, a));
            var e = d, f = "" + a;
            return b !== null && b.ref !== null && typeof b.ref == "function" && b.ref._stringRef === f ? b.ref : (b = function(a2) {
              var b2 = e.refs;
              b2 === jh && (b2 = e.refs = {}), a2 === null ? delete b2[f] : b2[f] = a2;
            }, b._stringRef = f, b);
          }
          if (typeof a != "string")
            throw Error(p(284));
          if (!c._owner)
            throw Error(p(290, a));
        }
        return a;
      }
      function th(a, b) {
        throw a = Object.prototype.toString.call(b), Error(p(31, a === "[object Object]" ? "object with keys {" + Object.keys(b).join(", ") + "}" : a));
      }
      function uh(a) {
        var b = a._init;
        return b(a._payload);
      }
      function vh(a) {
        function b(b2, c2) {
          if (a) {
            var d2 = b2.deletions;
            d2 === null ? (b2.deletions = [c2], b2.flags |= 16) : d2.push(c2);
          }
        }
        function c(c2, d2) {
          if (!a)
            return null;
          for (; d2 !== null; )
            b(c2, d2), d2 = d2.sibling;
          return null;
        }
        function d(a2, b2) {
          for (a2 = /* @__PURE__ */ new Map(); b2 !== null; )
            b2.key !== null ? a2.set(b2.key, b2) : a2.set(b2.index, b2), b2 = b2.sibling;
          return a2;
        }
        function e(a2, b2) {
          return a2 = wh(a2, b2), a2.index = 0, a2.sibling = null, a2;
        }
        function f(b2, c2, d2) {
          return b2.index = d2, a ? (d2 = b2.alternate, d2 !== null ? (d2 = d2.index, d2 < c2 ? (b2.flags |= 2, c2) : d2) : (b2.flags |= 2, c2)) : (b2.flags |= 1048576, c2);
        }
        function g(b2) {
          return a && b2.alternate === null && (b2.flags |= 2), b2;
        }
        function h(a2, b2, c2, d2) {
          return b2 === null || b2.tag !== 6 ? (b2 = xh(c2, a2.mode, d2), b2.return = a2, b2) : (b2 = e(b2, c2), b2.return = a2, b2);
        }
        function k(a2, b2, c2, d2) {
          var f2 = c2.type;
          return f2 === ya ? m(a2, b2, c2.props.children, d2, c2.key) : b2 !== null && (b2.elementType === f2 || typeof f2 == "object" && f2 !== null && f2.$$typeof === Ha && uh(f2) === b2.type) ? (d2 = e(b2, c2.props), d2.ref = sh(a2, b2, c2), d2.return = a2, d2) : (d2 = yh(c2.type, c2.key, c2.props, null, a2.mode, d2), d2.ref = sh(a2, b2, c2), d2.return = a2, d2);
        }
        function l(a2, b2, c2, d2) {
          return b2 === null || b2.tag !== 4 || b2.stateNode.containerInfo !== c2.containerInfo || b2.stateNode.implementation !== c2.implementation ? (b2 = zh(c2, a2.mode, d2), b2.return = a2, b2) : (b2 = e(b2, c2.children || []), b2.return = a2, b2);
        }
        function m(a2, b2, c2, d2, f2) {
          return b2 === null || b2.tag !== 7 ? (b2 = Ah(c2, a2.mode, d2, f2), b2.return = a2, b2) : (b2 = e(b2, c2), b2.return = a2, b2);
        }
        function q(a2, b2, c2) {
          if (typeof b2 == "string" && b2 !== "" || typeof b2 == "number")
            return b2 = xh("" + b2, a2.mode, c2), b2.return = a2, b2;
          if (typeof b2 == "object" && b2 !== null) {
            switch (b2.$$typeof) {
              case va:
                return c2 = yh(b2.type, b2.key, b2.props, null, a2.mode, c2), c2.ref = sh(a2, null, b2), c2.return = a2, c2;
              case wa:
                return b2 = zh(b2, a2.mode, c2), b2.return = a2, b2;
              case Ha:
                var d2 = b2._init;
                return q(a2, d2(b2._payload), c2);
            }
            if (eb(b2) || Ka(b2))
              return b2 = Ah(b2, a2.mode, c2, null), b2.return = a2, b2;
            th(a2, b2);
          }
          return null;
        }
        function r(a2, b2, c2, d2) {
          var e2 = b2 !== null ? b2.key : null;
          if (typeof c2 == "string" && c2 !== "" || typeof c2 == "number")
            return e2 !== null ? null : h(a2, b2, "" + c2, d2);
          if (typeof c2 == "object" && c2 !== null) {
            switch (c2.$$typeof) {
              case va:
                return c2.key === e2 ? k(a2, b2, c2, d2) : null;
              case wa:
                return c2.key === e2 ? l(a2, b2, c2, d2) : null;
              case Ha:
                return e2 = c2._init, r(
                  a2,
                  b2,
                  e2(c2._payload),
                  d2
                );
            }
            if (eb(c2) || Ka(c2))
              return e2 !== null ? null : m(a2, b2, c2, d2, null);
            th(a2, c2);
          }
          return null;
        }
        function y(a2, b2, c2, d2, e2) {
          if (typeof d2 == "string" && d2 !== "" || typeof d2 == "number")
            return a2 = a2.get(c2) || null, h(b2, a2, "" + d2, e2);
          if (typeof d2 == "object" && d2 !== null) {
            switch (d2.$$typeof) {
              case va:
                return a2 = a2.get(d2.key === null ? c2 : d2.key) || null, k(b2, a2, d2, e2);
              case wa:
                return a2 = a2.get(d2.key === null ? c2 : d2.key) || null, l(b2, a2, d2, e2);
              case Ha:
                var f2 = d2._init;
                return y(a2, b2, c2, f2(d2._payload), e2);
            }
            if (eb(d2) || Ka(d2))
              return a2 = a2.get(c2) || null, m(b2, a2, d2, e2, null);
            th(b2, d2);
          }
          return null;
        }
        function n(e2, g2, h2, k2) {
          for (var l2 = null, m2 = null, u = g2, w = g2 = 0, x = null; u !== null && w < h2.length; w++) {
            u.index > w ? (x = u, u = null) : x = u.sibling;
            var n2 = r(e2, u, h2[w], k2);
            if (n2 === null) {
              u === null && (u = x);
              break;
            }
            a && u && n2.alternate === null && b(e2, u), g2 = f(n2, g2, w), m2 === null ? l2 = n2 : m2.sibling = n2, m2 = n2, u = x;
          }
          if (w === h2.length)
            return c(e2, u), I && tg(e2, w), l2;
          if (u === null) {
            for (; w < h2.length; w++)
              u = q(e2, h2[w], k2), u !== null && (g2 = f(u, g2, w), m2 === null ? l2 = u : m2.sibling = u, m2 = u);
            return I && tg(e2, w), l2;
          }
          for (u = d(e2, u); w < h2.length; w++)
            x = y(u, e2, w, h2[w], k2), x !== null && (a && x.alternate !== null && u.delete(x.key === null ? w : x.key), g2 = f(x, g2, w), m2 === null ? l2 = x : m2.sibling = x, m2 = x);
          return a && u.forEach(function(a2) {
            return b(e2, a2);
          }), I && tg(e2, w), l2;
        }
        function t(e2, g2, h2, k2) {
          var l2 = Ka(h2);
          if (typeof l2 != "function")
            throw Error(p(150));
          if (h2 = l2.call(h2), h2 == null)
            throw Error(p(151));
          for (var u = l2 = null, m2 = g2, w = g2 = 0, x = null, n2 = h2.next(); m2 !== null && !n2.done; w++, n2 = h2.next()) {
            m2.index > w ? (x = m2, m2 = null) : x = m2.sibling;
            var t2 = r(e2, m2, n2.value, k2);
            if (t2 === null) {
              m2 === null && (m2 = x);
              break;
            }
            a && m2 && t2.alternate === null && b(e2, m2), g2 = f(t2, g2, w), u === null ? l2 = t2 : u.sibling = t2, u = t2, m2 = x;
          }
          if (n2.done)
            return c(
              e2,
              m2
            ), I && tg(e2, w), l2;
          if (m2 === null) {
            for (; !n2.done; w++, n2 = h2.next())
              n2 = q(e2, n2.value, k2), n2 !== null && (g2 = f(n2, g2, w), u === null ? l2 = n2 : u.sibling = n2, u = n2);
            return I && tg(e2, w), l2;
          }
          for (m2 = d(e2, m2); !n2.done; w++, n2 = h2.next())
            n2 = y(m2, e2, w, n2.value, k2), n2 !== null && (a && n2.alternate !== null && m2.delete(n2.key === null ? w : n2.key), g2 = f(n2, g2, w), u === null ? l2 = n2 : u.sibling = n2, u = n2);
          return a && m2.forEach(function(a2) {
            return b(e2, a2);
          }), I && tg(e2, w), l2;
        }
        function J(a2, d2, f2, h2) {
          if (typeof f2 == "object" && f2 !== null && f2.type === ya && f2.key === null && (f2 = f2.props.children), typeof f2 == "object" && f2 !== null) {
            switch (f2.$$typeof) {
              case va:
                a: {
                  for (var k2 = f2.key, l2 = d2; l2 !== null; ) {
                    if (l2.key === k2) {
                      if (k2 = f2.type, k2 === ya) {
                        if (l2.tag === 7) {
                          c(a2, l2.sibling), d2 = e(l2, f2.props.children), d2.return = a2, a2 = d2;
                          break a;
                        }
                      } else if (l2.elementType === k2 || typeof k2 == "object" && k2 !== null && k2.$$typeof === Ha && uh(k2) === l2.type) {
                        c(a2, l2.sibling), d2 = e(l2, f2.props), d2.ref = sh(a2, l2, f2), d2.return = a2, a2 = d2;
                        break a;
                      }
                      c(a2, l2);
                      break;
                    } else
                      b(a2, l2);
                    l2 = l2.sibling;
                  }
                  f2.type === ya ? (d2 = Ah(f2.props.children, a2.mode, h2, f2.key), d2.return = a2, a2 = d2) : (h2 = yh(f2.type, f2.key, f2.props, null, a2.mode, h2), h2.ref = sh(a2, d2, f2), h2.return = a2, a2 = h2);
                }
                return g(a2);
              case wa:
                a: {
                  for (l2 = f2.key; d2 !== null; ) {
                    if (d2.key === l2)
                      if (d2.tag === 4 && d2.stateNode.containerInfo === f2.containerInfo && d2.stateNode.implementation === f2.implementation) {
                        c(a2, d2.sibling), d2 = e(d2, f2.children || []), d2.return = a2, a2 = d2;
                        break a;
                      } else {
                        c(a2, d2);
                        break;
                      }
                    else
                      b(a2, d2);
                    d2 = d2.sibling;
                  }
                  d2 = zh(f2, a2.mode, h2), d2.return = a2, a2 = d2;
                }
                return g(a2);
              case Ha:
                return l2 = f2._init, J(a2, d2, l2(f2._payload), h2);
            }
            if (eb(f2))
              return n(a2, d2, f2, h2);
            if (Ka(f2))
              return t(a2, d2, f2, h2);
            th(a2, f2);
          }
          return typeof f2 == "string" && f2 !== "" || typeof f2 == "number" ? (f2 = "" + f2, d2 !== null && d2.tag === 6 ? (c(a2, d2.sibling), d2 = e(d2, f2), d2.return = a2, a2 = d2) : (c(a2, d2), d2 = xh(f2, a2.mode, h2), d2.return = a2, a2 = d2), g(a2)) : c(a2, d2);
        }
        return J;
      }
      var Bh = vh(!0), Ch = vh(!1), Dh = {}, Eh = Uf(Dh), Fh = Uf(Dh), Gh = Uf(Dh);
      function Hh(a) {
        if (a === Dh)
          throw Error(p(174));
        return a;
      }
      function Ih(a, b) {
        switch (G(Gh, b), G(Fh, a), G(Eh, Dh), a = b.nodeType, a) {
          case 9:
          case 11:
            b = (b = b.documentElement) ? b.namespaceURI : lb(null, "");
            break;
          default:
            a = a === 8 ? b.parentNode : b, b = a.namespaceURI || null, a = a.tagName, b = lb(b, a);
        }
        E(Eh), G(Eh, b);
      }
      function Jh() {
        E(Eh), E(Fh), E(Gh);
      }
      function Kh(a) {
        Hh(Gh.current);
        var b = Hh(Eh.current), c = lb(b, a.type);
        b !== c && (G(Fh, a), G(Eh, c));
      }
      function Lh(a) {
        Fh.current === a && (E(Eh), E(Fh));
      }
      var M = Uf(0);
      function Mh(a) {
        for (var b = a; b !== null; ) {
          if (b.tag === 13) {
            var c = b.memoizedState;
            if (c !== null && (c = c.dehydrated, c === null || c.data === "$?" || c.data === "$!"))
              return b;
          } else if (b.tag === 19 && b.memoizedProps.revealOrder !== void 0) {
            if (b.flags & 128)
              return b;
          } else if (b.child !== null) {
            b.child.return = b, b = b.child;
            continue;
          }
          if (b === a)
            break;
          for (; b.sibling === null; ) {
            if (b.return === null || b.return === a)
              return null;
            b = b.return;
          }
          b.sibling.return = b.return, b = b.sibling;
        }
        return null;
      }
      var Nh = [];
      function Oh() {
        for (var a = 0; a < Nh.length; a++)
          Nh[a]._workInProgressVersionPrimary = null;
        Nh.length = 0;
      }
      var Ph = ua.ReactCurrentDispatcher, Qh = ua.ReactCurrentBatchConfig, Rh = 0, N = null, O = null, P = null, Sh = !1, Th = !1, Uh = 0, Vh = 0;
      function Q() {
        throw Error(p(321));
      }
      function Wh(a, b) {
        if (b === null)
          return !1;
        for (var c = 0; c < b.length && c < a.length; c++)
          if (!He(a[c], b[c]))
            return !1;
        return !0;
      }
      function Xh(a, b, c, d, e, f) {
        if (Rh = f, N = b, b.memoizedState = null, b.updateQueue = null, b.lanes = 0, Ph.current = a === null || a.memoizedState === null ? Yh : Zh, a = c(d, e), Th) {
          f = 0;
          do {
            if (Th = !1, Uh = 0, 25 <= f)
              throw Error(p(301));
            f += 1, P = O = null, b.updateQueue = null, Ph.current = $h, a = c(d, e);
          } while (Th);
        }
        if (Ph.current = ai, b = O !== null && O.next !== null, Rh = 0, P = O = N = null, Sh = !1, b)
          throw Error(p(300));
        return a;
      }
      function bi() {
        var a = Uh !== 0;
        return Uh = 0, a;
      }
      function ci() {
        var a = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
        return P === null ? N.memoizedState = P = a : P = P.next = a, P;
      }
      function di() {
        if (O === null) {
          var a = N.alternate;
          a = a !== null ? a.memoizedState : null;
        } else
          a = O.next;
        var b = P === null ? N.memoizedState : P.next;
        if (b !== null)
          P = b, O = a;
        else {
          if (a === null)
            throw Error(p(310));
          O = a, a = { memoizedState: O.memoizedState, baseState: O.baseState, baseQueue: O.baseQueue, queue: O.queue, next: null }, P === null ? N.memoizedState = P = a : P = P.next = a;
        }
        return P;
      }
      function ei(a, b) {
        return typeof b == "function" ? b(a) : b;
      }
      function fi(a) {
        var b = di(), c = b.queue;
        if (c === null)
          throw Error(p(311));
        c.lastRenderedReducer = a;
        var d = O, e = d.baseQueue, f = c.pending;
        if (f !== null) {
          if (e !== null) {
            var g = e.next;
            e.next = f.next, f.next = g;
          }
          d.baseQueue = e = f, c.pending = null;
        }
        if (e !== null) {
          f = e.next, d = d.baseState;
          var h = g = null, k = null, l = f;
          do {
            var m = l.lane;
            if ((Rh & m) === m)
              k !== null && (k = k.next = { lane: 0, action: l.action, hasEagerState: l.hasEagerState, eagerState: l.eagerState, next: null }), d = l.hasEagerState ? l.eagerState : a(d, l.action);
            else {
              var q = {
                lane: m,
                action: l.action,
                hasEagerState: l.hasEagerState,
                eagerState: l.eagerState,
                next: null
              };
              k === null ? (h = k = q, g = d) : k = k.next = q, N.lanes |= m, hh |= m;
            }
            l = l.next;
          } while (l !== null && l !== f);
          k === null ? g = d : k.next = h, He(d, b.memoizedState) || (Ug = !0), b.memoizedState = d, b.baseState = g, b.baseQueue = k, c.lastRenderedState = d;
        }
        if (a = c.interleaved, a !== null) {
          e = a;
          do
            f = e.lane, N.lanes |= f, hh |= f, e = e.next;
          while (e !== a);
        } else
          e === null && (c.lanes = 0);
        return [b.memoizedState, c.dispatch];
      }
      function gi(a) {
        var b = di(), c = b.queue;
        if (c === null)
          throw Error(p(311));
        c.lastRenderedReducer = a;
        var d = c.dispatch, e = c.pending, f = b.memoizedState;
        if (e !== null) {
          c.pending = null;
          var g = e = e.next;
          do
            f = a(f, g.action), g = g.next;
          while (g !== e);
          He(f, b.memoizedState) || (Ug = !0), b.memoizedState = f, b.baseQueue === null && (b.baseState = f), c.lastRenderedState = f;
        }
        return [f, d];
      }
      function hi() {
      }
      function ii(a, b) {
        var c = N, d = di(), e = b(), f = !He(d.memoizedState, e);
        if (f && (d.memoizedState = e, Ug = !0), d = d.queue, ji(ki.bind(null, c, d, a), [a]), d.getSnapshot !== b || f || P !== null && P.memoizedState.tag & 1) {
          if (c.flags |= 2048, li(9, mi.bind(null, c, d, e, b), void 0, null), R === null)
            throw Error(p(349));
          Rh & 30 || ni(c, b, e);
        }
        return e;
      }
      function ni(a, b, c) {
        a.flags |= 16384, a = { getSnapshot: b, value: c }, b = N.updateQueue, b === null ? (b = { lastEffect: null, stores: null }, N.updateQueue = b, b.stores = [a]) : (c = b.stores, c === null ? b.stores = [a] : c.push(a));
      }
      function mi(a, b, c, d) {
        b.value = c, b.getSnapshot = d, oi(b) && pi(a);
      }
      function ki(a, b, c) {
        return c(function() {
          oi(b) && pi(a);
        });
      }
      function oi(a) {
        var b = a.getSnapshot;
        a = a.value;
        try {
          var c = b();
          return !He(a, c);
        } catch (d) {
          return !0;
        }
      }
      function pi(a) {
        var b = Zg(a, 1);
        b !== null && mh(b, a, 1, -1);
      }
      function qi(a) {
        var b = ci();
        return typeof a == "function" && (a = a()), b.memoizedState = b.baseState = a, a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: ei, lastRenderedState: a }, b.queue = a, a = a.dispatch = ri.bind(null, N, a), [b.memoizedState, a];
      }
      function li(a, b, c, d) {
        return a = { tag: a, create: b, destroy: c, deps: d, next: null }, b = N.updateQueue, b === null ? (b = { lastEffect: null, stores: null }, N.updateQueue = b, b.lastEffect = a.next = a) : (c = b.lastEffect, c === null ? b.lastEffect = a.next = a : (d = c.next, c.next = a, a.next = d, b.lastEffect = a)), a;
      }
      function si() {
        return di().memoizedState;
      }
      function ti(a, b, c, d) {
        var e = ci();
        N.flags |= a, e.memoizedState = li(1 | b, c, void 0, d === void 0 ? null : d);
      }
      function ui(a, b, c, d) {
        var e = di();
        d = d === void 0 ? null : d;
        var f = void 0;
        if (O !== null) {
          var g = O.memoizedState;
          if (f = g.destroy, d !== null && Wh(d, g.deps)) {
            e.memoizedState = li(b, c, f, d);
            return;
          }
        }
        N.flags |= a, e.memoizedState = li(1 | b, c, f, d);
      }
      function vi(a, b) {
        return ti(8390656, 8, a, b);
      }
      function ji(a, b) {
        return ui(2048, 8, a, b);
      }
      function wi(a, b) {
        return ui(4, 2, a, b);
      }
      function xi(a, b) {
        return ui(4, 4, a, b);
      }
      function yi(a, b) {
        if (typeof b == "function")
          return a = a(), b(a), function() {
            b(null);
          };
        if (b != null)
          return a = a(), b.current = a, function() {
            b.current = null;
          };
      }
      function zi(a, b, c) {
        return c = c != null ? c.concat([a]) : null, ui(4, 4, yi.bind(null, b, a), c);
      }
      function Ai() {
      }
      function Bi(a, b) {
        var c = di();
        b = b === void 0 ? null : b;
        var d = c.memoizedState;
        return d !== null && b !== null && Wh(b, d[1]) ? d[0] : (c.memoizedState = [a, b], a);
      }
      function Ci(a, b) {
        var c = di();
        b = b === void 0 ? null : b;
        var d = c.memoizedState;
        return d !== null && b !== null && Wh(b, d[1]) ? d[0] : (a = a(), c.memoizedState = [a, b], a);
      }
      function Di(a, b, c) {
        return Rh & 21 ? (He(c, b) || (c = yc(), N.lanes |= c, hh |= c, a.baseState = !0), b) : (a.baseState && (a.baseState = !1, Ug = !0), a.memoizedState = c);
      }
      function Ei(a, b) {
        var c = C;
        C = c !== 0 && 4 > c ? c : 4, a(!0);
        var d = Qh.transition;
        Qh.transition = {};
        try {
          a(!1), b();
        } finally {
          C = c, Qh.transition = d;
        }
      }
      function Fi() {
        return di().memoizedState;
      }
      function Gi(a, b, c) {
        var d = lh(a);
        if (c = { lane: d, action: c, hasEagerState: !1, eagerState: null, next: null }, Hi(a))
          Ii(b, c);
        else if (c = Yg(a, b, c, d), c !== null) {
          var e = L();
          mh(c, a, d, e), Ji(c, b, d);
        }
      }
      function ri(a, b, c) {
        var d = lh(a), e = { lane: d, action: c, hasEagerState: !1, eagerState: null, next: null };
        if (Hi(a))
          Ii(b, e);
        else {
          var f = a.alternate;
          if (a.lanes === 0 && (f === null || f.lanes === 0) && (f = b.lastRenderedReducer, f !== null))
            try {
              var g = b.lastRenderedState, h = f(g, c);
              if (e.hasEagerState = !0, e.eagerState = h, He(h, g)) {
                var k = b.interleaved;
                k === null ? (e.next = e, Xg(b)) : (e.next = k.next, k.next = e), b.interleaved = e;
                return;
              }
            } catch (l) {
            } finally {
            }
          c = Yg(a, b, e, d), c !== null && (e = L(), mh(c, a, d, e), Ji(c, b, d));
        }
      }
      function Hi(a) {
        var b = a.alternate;
        return a === N || b !== null && b === N;
      }
      function Ii(a, b) {
        Th = Sh = !0;
        var c = a.pending;
        c === null ? b.next = b : (b.next = c.next, c.next = b), a.pending = b;
      }
      function Ji(a, b, c) {
        if (c & 4194240) {
          var d = b.lanes;
          d &= a.pendingLanes, c |= d, b.lanes = c, Cc(a, c);
        }
      }
      var ai = { readContext: Vg, useCallback: Q, useContext: Q, useEffect: Q, useImperativeHandle: Q, useInsertionEffect: Q, useLayoutEffect: Q, useMemo: Q, useReducer: Q, useRef: Q, useState: Q, useDebugValue: Q, useDeferredValue: Q, useTransition: Q, useMutableSource: Q, useSyncExternalStore: Q, useId: Q, unstable_isNewReconciler: !1 }, Yh = { readContext: Vg, useCallback: function(a, b) {
        return ci().memoizedState = [a, b === void 0 ? null : b], a;
      }, useContext: Vg, useEffect: vi, useImperativeHandle: function(a, b, c) {
        return c = c != null ? c.concat([a]) : null, ti(
          4194308,
          4,
          yi.bind(null, b, a),
          c
        );
      }, useLayoutEffect: function(a, b) {
        return ti(4194308, 4, a, b);
      }, useInsertionEffect: function(a, b) {
        return ti(4, 2, a, b);
      }, useMemo: function(a, b) {
        var c = ci();
        return b = b === void 0 ? null : b, a = a(), c.memoizedState = [a, b], a;
      }, useReducer: function(a, b, c) {
        var d = ci();
        return b = c !== void 0 ? c(b) : b, d.memoizedState = d.baseState = b, a = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a, lastRenderedState: b }, d.queue = a, a = a.dispatch = Gi.bind(null, N, a), [d.memoizedState, a];
      }, useRef: function(a) {
        var b = ci();
        return a = { current: a }, b.memoizedState = a;
      }, useState: qi, useDebugValue: Ai, useDeferredValue: function(a) {
        return ci().memoizedState = a;
      }, useTransition: function() {
        var a = qi(!1), b = a[0];
        return a = Ei.bind(null, a[1]), ci().memoizedState = a, [b, a];
      }, useMutableSource: function() {
      }, useSyncExternalStore: function(a, b, c) {
        var d = N, e = ci();
        if (I) {
          if (c === void 0)
            throw Error(p(407));
          c = c();
        } else {
          if (c = b(), R === null)
            throw Error(p(349));
          Rh & 30 || ni(d, b, c);
        }
        e.memoizedState = c;
        var f = { value: c, getSnapshot: b };
        return e.queue = f, vi(ki.bind(
          null,
          d,
          f,
          a
        ), [a]), d.flags |= 2048, li(9, mi.bind(null, d, f, c, b), void 0, null), c;
      }, useId: function() {
        var a = ci(), b = R.identifierPrefix;
        if (I) {
          var c = sg, d = rg;
          c = (d & ~(1 << 32 - oc(d) - 1)).toString(32) + c, b = ":" + b + "R" + c, c = Uh++, 0 < c && (b += "H" + c.toString(32)), b += ":";
        } else
          c = Vh++, b = ":" + b + "r" + c.toString(32) + ":";
        return a.memoizedState = b;
      }, unstable_isNewReconciler: !1 }, Zh = {
        readContext: Vg,
        useCallback: Bi,
        useContext: Vg,
        useEffect: ji,
        useImperativeHandle: zi,
        useInsertionEffect: wi,
        useLayoutEffect: xi,
        useMemo: Ci,
        useReducer: fi,
        useRef: si,
        useState: function() {
          return fi(ei);
        },
        useDebugValue: Ai,
        useDeferredValue: function(a) {
          var b = di();
          return Di(b, O.memoizedState, a);
        },
        useTransition: function() {
          var a = fi(ei)[0], b = di().memoizedState;
          return [a, b];
        },
        useMutableSource: hi,
        useSyncExternalStore: ii,
        useId: Fi,
        unstable_isNewReconciler: !1
      }, $h = { readContext: Vg, useCallback: Bi, useContext: Vg, useEffect: ji, useImperativeHandle: zi, useInsertionEffect: wi, useLayoutEffect: xi, useMemo: Ci, useReducer: gi, useRef: si, useState: function() {
        return gi(ei);
      }, useDebugValue: Ai, useDeferredValue: function(a) {
        var b = di();
        return O === null ? b.memoizedState = a : Di(b, O.memoizedState, a);
      }, useTransition: function() {
        var a = gi(ei)[0], b = di().memoizedState;
        return [a, b];
      }, useMutableSource: hi, useSyncExternalStore: ii, useId: Fi, unstable_isNewReconciler: !1 };
      function Ki(a, b) {
        try {
          var c = "", d = b;
          do
            c += Pa(d), d = d.return;
          while (d);
          var e = c;
        } catch (f) {
          e = `
Error generating stack: ` + f.message + `
` + f.stack;
        }
        return { value: a, source: b, stack: e, digest: null };
      }
      function Li(a, b, c) {
        return { value: a, source: null, stack: c != null ? c : null, digest: b != null ? b : null };
      }
      function Mi(a, b) {
        try {
          console.error(b.value);
        } catch (c) {
          setTimeout(function() {
            throw c;
          });
        }
      }
      var Ni = typeof WeakMap == "function" ? WeakMap : Map;
      function Oi(a, b, c) {
        c = ch(-1, c), c.tag = 3, c.payload = { element: null };
        var d = b.value;
        return c.callback = function() {
          Pi || (Pi = !0, Qi = d), Mi(a, b);
        }, c;
      }
      function Ri(a, b, c) {
        c = ch(-1, c), c.tag = 3;
        var d = a.type.getDerivedStateFromError;
        if (typeof d == "function") {
          var e = b.value;
          c.payload = function() {
            return d(e);
          }, c.callback = function() {
            Mi(a, b);
          };
        }
        var f = a.stateNode;
        return f !== null && typeof f.componentDidCatch == "function" && (c.callback = function() {
          Mi(a, b), typeof d != "function" && (Si === null ? Si = /* @__PURE__ */ new Set([this]) : Si.add(this));
          var c2 = b.stack;
          this.componentDidCatch(b.value, { componentStack: c2 !== null ? c2 : "" });
        }), c;
      }
      function Ti(a, b, c) {
        var d = a.pingCache;
        if (d === null) {
          d = a.pingCache = new Ni();
          var e = /* @__PURE__ */ new Set();
          d.set(b, e);
        } else
          e = d.get(b), e === void 0 && (e = /* @__PURE__ */ new Set(), d.set(b, e));
        e.has(c) || (e.add(c), a = Ui.bind(null, a, b, c), b.then(a, a));
      }
      function Vi(a) {
        do {
          var b;
          if ((b = a.tag === 13) && (b = a.memoizedState, b = b !== null ? b.dehydrated !== null : !0), b)
            return a;
          a = a.return;
        } while (a !== null);
        return null;
      }
      function Wi(a, b, c, d, e) {
        return a.mode & 1 ? (a.flags |= 65536, a.lanes = e, a) : (a === b ? a.flags |= 65536 : (a.flags |= 128, c.flags |= 131072, c.flags &= -52805, c.tag === 1 && (c.alternate === null ? c.tag = 17 : (b = ch(-1, 1), b.tag = 2, dh(c, b, 1))), c.lanes |= 1), a);
      }
      var Xi = ua.ReactCurrentOwner, Ug = !1;
      function Yi(a, b, c, d) {
        b.child = a === null ? Ch(b, null, c, d) : Bh(b, a.child, c, d);
      }
      function Zi(a, b, c, d, e) {
        c = c.render;
        var f = b.ref;
        return Tg(b, e), d = Xh(a, b, c, d, f, e), c = bi(), a !== null && !Ug ? (b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, $i(a, b, e)) : (I && c && vg(b), b.flags |= 1, Yi(a, b, d, e), b.child);
      }
      function aj(a, b, c, d, e) {
        if (a === null) {
          var f = c.type;
          return typeof f == "function" && !bj(f) && f.defaultProps === void 0 && c.compare === null && c.defaultProps === void 0 ? (b.tag = 15, b.type = f, cj(a, b, f, d, e)) : (a = yh(c.type, null, d, b, b.mode, e), a.ref = b.ref, a.return = b, b.child = a);
        }
        if (f = a.child, !(a.lanes & e)) {
          var g = f.memoizedProps;
          if (c = c.compare, c = c !== null ? c : Ie, c(g, d) && a.ref === b.ref)
            return $i(a, b, e);
        }
        return b.flags |= 1, a = wh(f, d), a.ref = b.ref, a.return = b, b.child = a;
      }
      function cj(a, b, c, d, e) {
        if (a !== null) {
          var f = a.memoizedProps;
          if (Ie(f, d) && a.ref === b.ref)
            if (Ug = !1, b.pendingProps = d = f, (a.lanes & e) !== 0)
              a.flags & 131072 && (Ug = !0);
            else
              return b.lanes = a.lanes, $i(a, b, e);
        }
        return dj(a, b, c, d, e);
      }
      function ej(a, b, c) {
        var d = b.pendingProps, e = d.children, f = a !== null ? a.memoizedState : null;
        if (d.mode === "hidden")
          if (!(b.mode & 1))
            b.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(fj, gj), gj |= c;
          else {
            if (!(c & 1073741824))
              return a = f !== null ? f.baseLanes | c : c, b.lanes = b.childLanes = 1073741824, b.memoizedState = { baseLanes: a, cachePool: null, transitions: null }, b.updateQueue = null, G(fj, gj), gj |= a, null;
            b.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, d = f !== null ? f.baseLanes : c, G(fj, gj), gj |= d;
          }
        else
          f !== null ? (d = f.baseLanes | c, b.memoizedState = null) : d = c, G(fj, gj), gj |= d;
        return Yi(a, b, e, c), b.child;
      }
      function hj(a, b) {
        var c = b.ref;
        (a === null && c !== null || a !== null && a.ref !== c) && (b.flags |= 512, b.flags |= 2097152);
      }
      function dj(a, b, c, d, e) {
        var f = Zf(c) ? Xf : H.current;
        return f = Yf(b, f), Tg(b, e), c = Xh(a, b, c, d, f, e), d = bi(), a !== null && !Ug ? (b.updateQueue = a.updateQueue, b.flags &= -2053, a.lanes &= ~e, $i(a, b, e)) : (I && d && vg(b), b.flags |= 1, Yi(a, b, c, e), b.child);
      }
      function ij(a, b, c, d, e) {
        if (Zf(c)) {
          var f = !0;
          cg(b);
        } else
          f = !1;
        if (Tg(b, e), b.stateNode === null)
          jj(a, b), ph(b, c, d), rh(b, c, d, e), d = !0;
        else if (a === null) {
          var g = b.stateNode, h = b.memoizedProps;
          g.props = h;
          var k = g.context, l = c.contextType;
          typeof l == "object" && l !== null ? l = Vg(l) : (l = Zf(c) ? Xf : H.current, l = Yf(b, l));
          var m = c.getDerivedStateFromProps, q = typeof m == "function" || typeof g.getSnapshotBeforeUpdate == "function";
          q || typeof g.UNSAFE_componentWillReceiveProps != "function" && typeof g.componentWillReceiveProps != "function" || (h !== d || k !== l) && qh(b, g, d, l), $g = !1;
          var r = b.memoizedState;
          g.state = r, gh(b, d, g, e), k = b.memoizedState, h !== d || r !== k || Wf.current || $g ? (typeof m == "function" && (kh(b, c, m, d), k = b.memoizedState), (h = $g || oh(b, c, h, d, r, k, l)) ? (q || typeof g.UNSAFE_componentWillMount != "function" && typeof g.componentWillMount != "function" || (typeof g.componentWillMount == "function" && g.componentWillMount(), typeof g.UNSAFE_componentWillMount == "function" && g.UNSAFE_componentWillMount()), typeof g.componentDidMount == "function" && (b.flags |= 4194308)) : (typeof g.componentDidMount == "function" && (b.flags |= 4194308), b.memoizedProps = d, b.memoizedState = k), g.props = d, g.state = k, g.context = l, d = h) : (typeof g.componentDidMount == "function" && (b.flags |= 4194308), d = !1);
        } else {
          g = b.stateNode, bh(a, b), h = b.memoizedProps, l = b.type === b.elementType ? h : Lg(b.type, h), g.props = l, q = b.pendingProps, r = g.context, k = c.contextType, typeof k == "object" && k !== null ? k = Vg(k) : (k = Zf(c) ? Xf : H.current, k = Yf(b, k));
          var y = c.getDerivedStateFromProps;
          (m = typeof y == "function" || typeof g.getSnapshotBeforeUpdate == "function") || typeof g.UNSAFE_componentWillReceiveProps != "function" && typeof g.componentWillReceiveProps != "function" || (h !== q || r !== k) && qh(b, g, d, k), $g = !1, r = b.memoizedState, g.state = r, gh(b, d, g, e);
          var n = b.memoizedState;
          h !== q || r !== n || Wf.current || $g ? (typeof y == "function" && (kh(b, c, y, d), n = b.memoizedState), (l = $g || oh(b, c, l, d, r, n, k) || !1) ? (m || typeof g.UNSAFE_componentWillUpdate != "function" && typeof g.componentWillUpdate != "function" || (typeof g.componentWillUpdate == "function" && g.componentWillUpdate(d, n, k), typeof g.UNSAFE_componentWillUpdate == "function" && g.UNSAFE_componentWillUpdate(d, n, k)), typeof g.componentDidUpdate == "function" && (b.flags |= 4), typeof g.getSnapshotBeforeUpdate == "function" && (b.flags |= 1024)) : (typeof g.componentDidUpdate != "function" || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), typeof g.getSnapshotBeforeUpdate != "function" || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), b.memoizedProps = d, b.memoizedState = n), g.props = d, g.state = n, g.context = k, d = l) : (typeof g.componentDidUpdate != "function" || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 4), typeof g.getSnapshotBeforeUpdate != "function" || h === a.memoizedProps && r === a.memoizedState || (b.flags |= 1024), d = !1);
        }
        return kj(a, b, c, d, f, e);
      }
      function kj(a, b, c, d, e, f) {
        hj(a, b);
        var g = (b.flags & 128) !== 0;
        if (!d && !g)
          return e && dg(b, c, !1), $i(a, b, f);
        d = b.stateNode, Xi.current = b;
        var h = g && typeof c.getDerivedStateFromError != "function" ? null : d.render();
        return b.flags |= 1, a !== null && g ? (b.child = Bh(b, a.child, null, f), b.child = Bh(b, null, h, f)) : Yi(a, b, h, f), b.memoizedState = d.state, e && dg(b, c, !0), b.child;
      }
      function lj(a) {
        var b = a.stateNode;
        b.pendingContext ? ag(a, b.pendingContext, b.pendingContext !== b.context) : b.context && ag(a, b.context, !1), Ih(a, b.containerInfo);
      }
      function mj(a, b, c, d, e) {
        return Ig(), Jg(e), b.flags |= 256, Yi(a, b, c, d), b.child;
      }
      var nj = { dehydrated: null, treeContext: null, retryLane: 0 };
      function oj(a) {
        return { baseLanes: a, cachePool: null, transitions: null };
      }
      function pj(a, b, c) {
        var d = b.pendingProps, e = M.current, f = !1, g = (b.flags & 128) !== 0, h;
        if ((h = g) || (h = a !== null && a.memoizedState === null ? !1 : (e & 2) !== 0), h ? (f = !0, b.flags &= -129) : (a === null || a.memoizedState !== null) && (e |= 1), G(M, e & 1), a === null)
          return Eg(b), a = b.memoizedState, a !== null && (a = a.dehydrated, a !== null) ? (b.mode & 1 ? a.data === "$!" ? b.lanes = 8 : b.lanes = 1073741824 : b.lanes = 1, null) : (g = d.children, a = d.fallback, f ? (d = b.mode, f = b.child, g = { mode: "hidden", children: g }, !(d & 1) && f !== null ? (f.childLanes = 0, f.pendingProps = g) : f = qj(g, d, 0, null), a = Ah(a, d, c, null), f.return = b, a.return = b, f.sibling = a, b.child = f, b.child.memoizedState = oj(c), b.memoizedState = nj, a) : rj(b, g));
        if (e = a.memoizedState, e !== null && (h = e.dehydrated, h !== null))
          return sj(a, b, g, d, h, e, c);
        if (f) {
          f = d.fallback, g = b.mode, e = a.child, h = e.sibling;
          var k = { mode: "hidden", children: d.children };
          return !(g & 1) && b.child !== e ? (d = b.child, d.childLanes = 0, d.pendingProps = k, b.deletions = null) : (d = wh(e, k), d.subtreeFlags = e.subtreeFlags & 14680064), h !== null ? f = wh(h, f) : (f = Ah(f, g, c, null), f.flags |= 2), f.return = b, d.return = b, d.sibling = f, b.child = d, d = f, f = b.child, g = a.child.memoizedState, g = g === null ? oj(c) : { baseLanes: g.baseLanes | c, cachePool: null, transitions: g.transitions }, f.memoizedState = g, f.childLanes = a.childLanes & ~c, b.memoizedState = nj, d;
        }
        return f = a.child, a = f.sibling, d = wh(f, { mode: "visible", children: d.children }), !(b.mode & 1) && (d.lanes = c), d.return = b, d.sibling = null, a !== null && (c = b.deletions, c === null ? (b.deletions = [a], b.flags |= 16) : c.push(a)), b.child = d, b.memoizedState = null, d;
      }
      function rj(a, b) {
        return b = qj({ mode: "visible", children: b }, a.mode, 0, null), b.return = a, a.child = b;
      }
      function tj(a, b, c, d) {
        return d !== null && Jg(d), Bh(b, a.child, null, c), a = rj(b, b.pendingProps.children), a.flags |= 2, b.memoizedState = null, a;
      }
      function sj(a, b, c, d, e, f, g) {
        if (c)
          return b.flags & 256 ? (b.flags &= -257, d = Li(Error(p(422))), tj(a, b, g, d)) : b.memoizedState !== null ? (b.child = a.child, b.flags |= 128, null) : (f = d.fallback, e = b.mode, d = qj({ mode: "visible", children: d.children }, e, 0, null), f = Ah(f, e, g, null), f.flags |= 2, d.return = b, f.return = b, d.sibling = f, b.child = d, b.mode & 1 && Bh(b, a.child, null, g), b.child.memoizedState = oj(g), b.memoizedState = nj, f);
        if (!(b.mode & 1))
          return tj(a, b, g, null);
        if (e.data === "$!") {
          if (d = e.nextSibling && e.nextSibling.dataset, d)
            var h = d.dgst;
          return d = h, f = Error(p(419)), d = Li(f, d, void 0), tj(a, b, g, d);
        }
        if (h = (g & a.childLanes) !== 0, Ug || h) {
          if (d = R, d !== null) {
            switch (g & -g) {
              case 4:
                e = 2;
                break;
              case 16:
                e = 8;
                break;
              case 64:
              case 128:
              case 256:
              case 512:
              case 1024:
              case 2048:
              case 4096:
              case 8192:
              case 16384:
              case 32768:
              case 65536:
              case 131072:
              case 262144:
              case 524288:
              case 1048576:
              case 2097152:
              case 4194304:
              case 8388608:
              case 16777216:
              case 33554432:
              case 67108864:
                e = 32;
                break;
              case 536870912:
                e = 268435456;
                break;
              default:
                e = 0;
            }
            e = e & (d.suspendedLanes | g) ? 0 : e, e !== 0 && e !== f.retryLane && (f.retryLane = e, Zg(a, e), mh(d, a, e, -1));
          }
          return uj(), d = Li(Error(p(421))), tj(a, b, g, d);
        }
        return e.data === "$?" ? (b.flags |= 128, b.child = a.child, b = vj.bind(null, a), e._reactRetry = b, null) : (a = f.treeContext, yg = Lf(e.nextSibling), xg = b, I = !0, zg = null, a !== null && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a.id, sg = a.overflow, qg = b), b = rj(b, d.children), b.flags |= 4096, b);
      }
      function wj(a, b, c) {
        a.lanes |= b;
        var d = a.alternate;
        d !== null && (d.lanes |= b), Sg(a.return, b, c);
      }
      function xj(a, b, c, d, e) {
        var f = a.memoizedState;
        f === null ? a.memoizedState = { isBackwards: b, rendering: null, renderingStartTime: 0, last: d, tail: c, tailMode: e } : (f.isBackwards = b, f.rendering = null, f.renderingStartTime = 0, f.last = d, f.tail = c, f.tailMode = e);
      }
      function yj(a, b, c) {
        var d = b.pendingProps, e = d.revealOrder, f = d.tail;
        if (Yi(a, b, d.children, c), d = M.current, d & 2)
          d = d & 1 | 2, b.flags |= 128;
        else {
          if (a !== null && a.flags & 128)
            a:
              for (a = b.child; a !== null; ) {
                if (a.tag === 13)
                  a.memoizedState !== null && wj(a, c, b);
                else if (a.tag === 19)
                  wj(a, c, b);
                else if (a.child !== null) {
                  a.child.return = a, a = a.child;
                  continue;
                }
                if (a === b)
                  break a;
                for (; a.sibling === null; ) {
                  if (a.return === null || a.return === b)
                    break a;
                  a = a.return;
                }
                a.sibling.return = a.return, a = a.sibling;
              }
          d &= 1;
        }
        if (G(M, d), !(b.mode & 1))
          b.memoizedState = null;
        else
          switch (e) {
            case "forwards":
              for (c = b.child, e = null; c !== null; )
                a = c.alternate, a !== null && Mh(a) === null && (e = c), c = c.sibling;
              c = e, c === null ? (e = b.child, b.child = null) : (e = c.sibling, c.sibling = null), xj(b, !1, e, c, f);
              break;
            case "backwards":
              for (c = null, e = b.child, b.child = null; e !== null; ) {
                if (a = e.alternate, a !== null && Mh(a) === null) {
                  b.child = e;
                  break;
                }
                a = e.sibling, e.sibling = c, c = e, e = a;
              }
              xj(b, !0, c, null, f);
              break;
            case "together":
              xj(b, !1, null, null, void 0);
              break;
            default:
              b.memoizedState = null;
          }
        return b.child;
      }
      function jj(a, b) {
        !(b.mode & 1) && a !== null && (a.alternate = null, b.alternate = null, b.flags |= 2);
      }
      function $i(a, b, c) {
        if (a !== null && (b.dependencies = a.dependencies), hh |= b.lanes, !(c & b.childLanes))
          return null;
        if (a !== null && b.child !== a.child)
          throw Error(p(153));
        if (b.child !== null) {
          for (a = b.child, c = wh(a, a.pendingProps), b.child = c, c.return = b; a.sibling !== null; )
            a = a.sibling, c = c.sibling = wh(a, a.pendingProps), c.return = b;
          c.sibling = null;
        }
        return b.child;
      }
      function zj(a, b, c) {
        switch (b.tag) {
          case 3:
            lj(b), Ig();
            break;
          case 5:
            Kh(b);
            break;
          case 1:
            Zf(b.type) && cg(b);
            break;
          case 4:
            Ih(b, b.stateNode.containerInfo);
            break;
          case 10:
            var d = b.type._context, e = b.memoizedProps.value;
            G(Mg, d._currentValue), d._currentValue = e;
            break;
          case 13:
            if (d = b.memoizedState, d !== null)
              return d.dehydrated !== null ? (G(M, M.current & 1), b.flags |= 128, null) : c & b.child.childLanes ? pj(a, b, c) : (G(M, M.current & 1), a = $i(a, b, c), a !== null ? a.sibling : null);
            G(M, M.current & 1);
            break;
          case 19:
            if (d = (c & b.childLanes) !== 0, a.flags & 128) {
              if (d)
                return yj(a, b, c);
              b.flags |= 128;
            }
            if (e = b.memoizedState, e !== null && (e.rendering = null, e.tail = null, e.lastEffect = null), G(M, M.current), d)
              break;
            return null;
          case 22:
          case 23:
            return b.lanes = 0, ej(a, b, c);
        }
        return $i(a, b, c);
      }
      var Aj, Bj, Cj, Dj;
      Aj = function(a, b) {
        for (var c = b.child; c !== null; ) {
          if (c.tag === 5 || c.tag === 6)
            a.appendChild(c.stateNode);
          else if (c.tag !== 4 && c.child !== null) {
            c.child.return = c, c = c.child;
            continue;
          }
          if (c === b)
            break;
          for (; c.sibling === null; ) {
            if (c.return === null || c.return === b)
              return;
            c = c.return;
          }
          c.sibling.return = c.return, c = c.sibling;
        }
      };
      Bj = function() {
      };
      Cj = function(a, b, c, d) {
        var e = a.memoizedProps;
        if (e !== d) {
          a = b.stateNode, Hh(Eh.current);
          var f = null;
          switch (c) {
            case "input":
              e = Ya(a, e), d = Ya(a, d), f = [];
              break;
            case "select":
              e = A({}, e, { value: void 0 }), d = A({}, d, { value: void 0 }), f = [];
              break;
            case "textarea":
              e = gb(a, e), d = gb(a, d), f = [];
              break;
            default:
              typeof e.onClick != "function" && typeof d.onClick == "function" && (a.onclick = Bf);
          }
          ub(c, d);
          var g;
          c = null;
          for (l in e)
            if (!d.hasOwnProperty(l) && e.hasOwnProperty(l) && e[l] != null)
              if (l === "style") {
                var h = e[l];
                for (g in h)
                  h.hasOwnProperty(g) && (c || (c = {}), c[g] = "");
              } else
                l !== "dangerouslySetInnerHTML" && l !== "children" && l !== "suppressContentEditableWarning" && l !== "suppressHydrationWarning" && l !== "autoFocus" && (ea.hasOwnProperty(l) ? f || (f = []) : (f = f || []).push(l, null));
          for (l in d) {
            var k = d[l];
            if (h = e != null ? e[l] : void 0, d.hasOwnProperty(l) && k !== h && (k != null || h != null))
              if (l === "style")
                if (h) {
                  for (g in h)
                    !h.hasOwnProperty(g) || k && k.hasOwnProperty(g) || (c || (c = {}), c[g] = "");
                  for (g in k)
                    k.hasOwnProperty(g) && h[g] !== k[g] && (c || (c = {}), c[g] = k[g]);
                } else
                  c || (f || (f = []), f.push(
                    l,
                    c
                  )), c = k;
              else
                l === "dangerouslySetInnerHTML" ? (k = k ? k.__html : void 0, h = h ? h.__html : void 0, k != null && h !== k && (f = f || []).push(l, k)) : l === "children" ? typeof k != "string" && typeof k != "number" || (f = f || []).push(l, "" + k) : l !== "suppressContentEditableWarning" && l !== "suppressHydrationWarning" && (ea.hasOwnProperty(l) ? (k != null && l === "onScroll" && D("scroll", a), f || h === k || (f = [])) : (f = f || []).push(l, k));
          }
          c && (f = f || []).push("style", c);
          var l = f;
          (b.updateQueue = l) && (b.flags |= 4);
        }
      };
      Dj = function(a, b, c, d) {
        c !== d && (b.flags |= 4);
      };
      function Ej(a, b) {
        if (!I)
          switch (a.tailMode) {
            case "hidden":
              b = a.tail;
              for (var c = null; b !== null; )
                b.alternate !== null && (c = b), b = b.sibling;
              c === null ? a.tail = null : c.sibling = null;
              break;
            case "collapsed":
              c = a.tail;
              for (var d = null; c !== null; )
                c.alternate !== null && (d = c), c = c.sibling;
              d === null ? b || a.tail === null ? a.tail = null : a.tail.sibling = null : d.sibling = null;
          }
      }
      function S(a) {
        var b = a.alternate !== null && a.alternate.child === a.child, c = 0, d = 0;
        if (b)
          for (var e = a.child; e !== null; )
            c |= e.lanes | e.childLanes, d |= e.subtreeFlags & 14680064, d |= e.flags & 14680064, e.return = a, e = e.sibling;
        else
          for (e = a.child; e !== null; )
            c |= e.lanes | e.childLanes, d |= e.subtreeFlags, d |= e.flags, e.return = a, e = e.sibling;
        return a.subtreeFlags |= d, a.childLanes = c, b;
      }
      function Fj(a, b, c) {
        var d = b.pendingProps;
        switch (wg(b), b.tag) {
          case 2:
          case 16:
          case 15:
          case 0:
          case 11:
          case 7:
          case 8:
          case 12:
          case 9:
          case 14:
            return S(b), null;
          case 1:
            return Zf(b.type) && $f(), S(b), null;
          case 3:
            return d = b.stateNode, Jh(), E(Wf), E(H), Oh(), d.pendingContext && (d.context = d.pendingContext, d.pendingContext = null), (a === null || a.child === null) && (Gg(b) ? b.flags |= 4 : a === null || a.memoizedState.isDehydrated && !(b.flags & 256) || (b.flags |= 1024, zg !== null && (Gj(zg), zg = null))), Bj(a, b), S(b), null;
          case 5:
            Lh(b);
            var e = Hh(Gh.current);
            if (c = b.type, a !== null && b.stateNode != null)
              Cj(a, b, c, d, e), a.ref !== b.ref && (b.flags |= 512, b.flags |= 2097152);
            else {
              if (!d) {
                if (b.stateNode === null)
                  throw Error(p(166));
                return S(b), null;
              }
              if (a = Hh(Eh.current), Gg(b)) {
                d = b.stateNode, c = b.type;
                var f = b.memoizedProps;
                switch (d[Of] = b, d[Pf] = f, a = (b.mode & 1) !== 0, c) {
                  case "dialog":
                    D("cancel", d), D("close", d);
                    break;
                  case "iframe":
                  case "object":
                  case "embed":
                    D("load", d);
                    break;
                  case "video":
                  case "audio":
                    for (e = 0; e < lf.length; e++)
                      D(lf[e], d);
                    break;
                  case "source":
                    D("error", d);
                    break;
                  case "img":
                  case "image":
                  case "link":
                    D(
                      "error",
                      d
                    ), D("load", d);
                    break;
                  case "details":
                    D("toggle", d);
                    break;
                  case "input":
                    Za(d, f), D("invalid", d);
                    break;
                  case "select":
                    d._wrapperState = { wasMultiple: !!f.multiple }, D("invalid", d);
                    break;
                  case "textarea":
                    hb(d, f), D("invalid", d);
                }
                ub(c, f), e = null;
                for (var g in f)
                  if (f.hasOwnProperty(g)) {
                    var h = f[g];
                    g === "children" ? typeof h == "string" ? d.textContent !== h && (f.suppressHydrationWarning !== !0 && Af(d.textContent, h, a), e = ["children", h]) : typeof h == "number" && d.textContent !== "" + h && (f.suppressHydrationWarning !== !0 && Af(
                      d.textContent,
                      h,
                      a
                    ), e = ["children", "" + h]) : ea.hasOwnProperty(g) && h != null && g === "onScroll" && D("scroll", d);
                  }
                switch (c) {
                  case "input":
                    Va(d), db(d, f, !0);
                    break;
                  case "textarea":
                    Va(d), jb(d);
                    break;
                  case "select":
                  case "option":
                    break;
                  default:
                    typeof f.onClick == "function" && (d.onclick = Bf);
                }
                d = e, b.updateQueue = d, d !== null && (b.flags |= 4);
              } else {
                g = e.nodeType === 9 ? e : e.ownerDocument, a === "http://www.w3.org/1999/xhtml" && (a = kb(c)), a === "http://www.w3.org/1999/xhtml" ? c === "script" ? (a = g.createElement("div"), a.innerHTML = "<script><\/script>", a = a.removeChild(a.firstChild)) : typeof d.is == "string" ? a = g.createElement(c, { is: d.is }) : (a = g.createElement(c), c === "select" && (g = a, d.multiple ? g.multiple = !0 : d.size && (g.size = d.size))) : a = g.createElementNS(a, c), a[Of] = b, a[Pf] = d, Aj(a, b, !1, !1), b.stateNode = a;
                a: {
                  switch (g = vb(c, d), c) {
                    case "dialog":
                      D("cancel", a), D("close", a), e = d;
                      break;
                    case "iframe":
                    case "object":
                    case "embed":
                      D("load", a), e = d;
                      break;
                    case "video":
                    case "audio":
                      for (e = 0; e < lf.length; e++)
                        D(lf[e], a);
                      e = d;
                      break;
                    case "source":
                      D("error", a), e = d;
                      break;
                    case "img":
                    case "image":
                    case "link":
                      D(
                        "error",
                        a
                      ), D("load", a), e = d;
                      break;
                    case "details":
                      D("toggle", a), e = d;
                      break;
                    case "input":
                      Za(a, d), e = Ya(a, d), D("invalid", a);
                      break;
                    case "option":
                      e = d;
                      break;
                    case "select":
                      a._wrapperState = { wasMultiple: !!d.multiple }, e = A({}, d, { value: void 0 }), D("invalid", a);
                      break;
                    case "textarea":
                      hb(a, d), e = gb(a, d), D("invalid", a);
                      break;
                    default:
                      e = d;
                  }
                  ub(c, e), h = e;
                  for (f in h)
                    if (h.hasOwnProperty(f)) {
                      var k = h[f];
                      f === "style" ? sb(a, k) : f === "dangerouslySetInnerHTML" ? (k = k ? k.__html : void 0, k != null && nb(a, k)) : f === "children" ? typeof k == "string" ? (c !== "textarea" || k !== "") && ob(a, k) : typeof k == "number" && ob(a, "" + k) : f !== "suppressContentEditableWarning" && f !== "suppressHydrationWarning" && f !== "autoFocus" && (ea.hasOwnProperty(f) ? k != null && f === "onScroll" && D("scroll", a) : k != null && ta(a, f, k, g));
                    }
                  switch (c) {
                    case "input":
                      Va(a), db(a, d, !1);
                      break;
                    case "textarea":
                      Va(a), jb(a);
                      break;
                    case "option":
                      d.value != null && a.setAttribute("value", "" + Sa(d.value));
                      break;
                    case "select":
                      a.multiple = !!d.multiple, f = d.value, f != null ? fb(a, !!d.multiple, f, !1) : d.defaultValue != null && fb(
                        a,
                        !!d.multiple,
                        d.defaultValue,
                        !0
                      );
                      break;
                    default:
                      typeof e.onClick == "function" && (a.onclick = Bf);
                  }
                  switch (c) {
                    case "button":
                    case "input":
                    case "select":
                    case "textarea":
                      d = !!d.autoFocus;
                      break a;
                    case "img":
                      d = !0;
                      break a;
                    default:
                      d = !1;
                  }
                }
                d && (b.flags |= 4);
              }
              b.ref !== null && (b.flags |= 512, b.flags |= 2097152);
            }
            return S(b), null;
          case 6:
            if (a && b.stateNode != null)
              Dj(a, b, a.memoizedProps, d);
            else {
              if (typeof d != "string" && b.stateNode === null)
                throw Error(p(166));
              if (c = Hh(Gh.current), Hh(Eh.current), Gg(b)) {
                if (d = b.stateNode, c = b.memoizedProps, d[Of] = b, (f = d.nodeValue !== c) && (a = xg, a !== null))
                  switch (a.tag) {
                    case 3:
                      Af(d.nodeValue, c, (a.mode & 1) !== 0);
                      break;
                    case 5:
                      a.memoizedProps.suppressHydrationWarning !== !0 && Af(d.nodeValue, c, (a.mode & 1) !== 0);
                  }
                f && (b.flags |= 4);
              } else
                d = (c.nodeType === 9 ? c : c.ownerDocument).createTextNode(d), d[Of] = b, b.stateNode = d;
            }
            return S(b), null;
          case 13:
            if (E(M), d = b.memoizedState, a === null || a.memoizedState !== null && a.memoizedState.dehydrated !== null) {
              if (I && yg !== null && b.mode & 1 && !(b.flags & 128))
                Hg(), Ig(), b.flags |= 98560, f = !1;
              else if (f = Gg(b), d !== null && d.dehydrated !== null) {
                if (a === null) {
                  if (!f)
                    throw Error(p(318));
                  if (f = b.memoizedState, f = f !== null ? f.dehydrated : null, !f)
                    throw Error(p(317));
                  f[Of] = b;
                } else
                  Ig(), !(b.flags & 128) && (b.memoizedState = null), b.flags |= 4;
                S(b), f = !1;
              } else
                zg !== null && (Gj(zg), zg = null), f = !0;
              if (!f)
                return b.flags & 65536 ? b : null;
            }
            return b.flags & 128 ? (b.lanes = c, b) : (d = d !== null, d !== (a !== null && a.memoizedState !== null) && d && (b.child.flags |= 8192, b.mode & 1 && (a === null || M.current & 1 ? T === 0 && (T = 3) : uj())), b.updateQueue !== null && (b.flags |= 4), S(b), null);
          case 4:
            return Jh(), Bj(a, b), a === null && sf(b.stateNode.containerInfo), S(b), null;
          case 10:
            return Rg(b.type._context), S(b), null;
          case 17:
            return Zf(b.type) && $f(), S(b), null;
          case 19:
            if (E(M), f = b.memoizedState, f === null)
              return S(b), null;
            if (d = (b.flags & 128) !== 0, g = f.rendering, g === null)
              if (d)
                Ej(f, !1);
              else {
                if (T !== 0 || a !== null && a.flags & 128)
                  for (a = b.child; a !== null; ) {
                    if (g = Mh(a), g !== null) {
                      for (b.flags |= 128, Ej(f, !1), d = g.updateQueue, d !== null && (b.updateQueue = d, b.flags |= 4), b.subtreeFlags = 0, d = c, c = b.child; c !== null; )
                        f = c, a = d, f.flags &= 14680066, g = f.alternate, g === null ? (f.childLanes = 0, f.lanes = a, f.child = null, f.subtreeFlags = 0, f.memoizedProps = null, f.memoizedState = null, f.updateQueue = null, f.dependencies = null, f.stateNode = null) : (f.childLanes = g.childLanes, f.lanes = g.lanes, f.child = g.child, f.subtreeFlags = 0, f.deletions = null, f.memoizedProps = g.memoizedProps, f.memoizedState = g.memoizedState, f.updateQueue = g.updateQueue, f.type = g.type, a = g.dependencies, f.dependencies = a === null ? null : { lanes: a.lanes, firstContext: a.firstContext }), c = c.sibling;
                      return G(M, M.current & 1 | 2), b.child;
                    }
                    a = a.sibling;
                  }
                f.tail !== null && B() > Hj && (b.flags |= 128, d = !0, Ej(f, !1), b.lanes = 4194304);
              }
            else {
              if (!d)
                if (a = Mh(g), a !== null) {
                  if (b.flags |= 128, d = !0, c = a.updateQueue, c !== null && (b.updateQueue = c, b.flags |= 4), Ej(f, !0), f.tail === null && f.tailMode === "hidden" && !g.alternate && !I)
                    return S(b), null;
                } else
                  2 * B() - f.renderingStartTime > Hj && c !== 1073741824 && (b.flags |= 128, d = !0, Ej(f, !1), b.lanes = 4194304);
              f.isBackwards ? (g.sibling = b.child, b.child = g) : (c = f.last, c !== null ? c.sibling = g : b.child = g, f.last = g);
            }
            return f.tail !== null ? (b = f.tail, f.rendering = b, f.tail = b.sibling, f.renderingStartTime = B(), b.sibling = null, c = M.current, G(M, d ? c & 1 | 2 : c & 1), b) : (S(b), null);
          case 22:
          case 23:
            return Ij(), d = b.memoizedState !== null, a !== null && a.memoizedState !== null !== d && (b.flags |= 8192), d && b.mode & 1 ? gj & 1073741824 && (S(b), b.subtreeFlags & 6 && (b.flags |= 8192)) : S(b), null;
          case 24:
            return null;
          case 25:
            return null;
        }
        throw Error(p(156, b.tag));
      }
      function Jj(a, b) {
        switch (wg(b), b.tag) {
          case 1:
            return Zf(b.type) && $f(), a = b.flags, a & 65536 ? (b.flags = a & -65537 | 128, b) : null;
          case 3:
            return Jh(), E(Wf), E(H), Oh(), a = b.flags, a & 65536 && !(a & 128) ? (b.flags = a & -65537 | 128, b) : null;
          case 5:
            return Lh(b), null;
          case 13:
            if (E(M), a = b.memoizedState, a !== null && a.dehydrated !== null) {
              if (b.alternate === null)
                throw Error(p(340));
              Ig();
            }
            return a = b.flags, a & 65536 ? (b.flags = a & -65537 | 128, b) : null;
          case 19:
            return E(M), null;
          case 4:
            return Jh(), null;
          case 10:
            return Rg(b.type._context), null;
          case 22:
          case 23:
            return Ij(), null;
          case 24:
            return null;
          default:
            return null;
        }
      }
      var Kj = !1, U = !1, Lj = typeof WeakSet == "function" ? WeakSet : Set, V = null;
      function Mj(a, b) {
        var c = a.ref;
        if (c !== null)
          if (typeof c == "function")
            try {
              c(null);
            } catch (d) {
              W(a, b, d);
            }
          else
            c.current = null;
      }
      function Nj(a, b, c) {
        try {
          c();
        } catch (d) {
          W(a, b, d);
        }
      }
      var Oj = !1;
      function Pj(a, b) {
        if (Cf = dd, a = Me(), Ne(a)) {
          if ("selectionStart" in a)
            var c = { start: a.selectionStart, end: a.selectionEnd };
          else
            a: {
              c = (c = a.ownerDocument) && c.defaultView || window;
              var d = c.getSelection && c.getSelection();
              if (d && d.rangeCount !== 0) {
                c = d.anchorNode;
                var e = d.anchorOffset, f = d.focusNode;
                d = d.focusOffset;
                try {
                  c.nodeType, f.nodeType;
                } catch (F) {
                  c = null;
                  break a;
                }
                var g = 0, h = -1, k = -1, l = 0, m = 0, q = a, r = null;
                b:
                  for (; ; ) {
                    for (var y; q !== c || e !== 0 && q.nodeType !== 3 || (h = g + e), q !== f || d !== 0 && q.nodeType !== 3 || (k = g + d), q.nodeType === 3 && (g += q.nodeValue.length), (y = q.firstChild) !== null; )
                      r = q, q = y;
                    for (; ; ) {
                      if (q === a)
                        break b;
                      if (r === c && ++l === e && (h = g), r === f && ++m === d && (k = g), (y = q.nextSibling) !== null)
                        break;
                      q = r, r = q.parentNode;
                    }
                    q = y;
                  }
                c = h === -1 || k === -1 ? null : { start: h, end: k };
              } else
                c = null;
            }
          c = c || { start: 0, end: 0 };
        } else
          c = null;
        for (Df = { focusedElem: a, selectionRange: c }, dd = !1, V = b; V !== null; )
          if (b = V, a = b.child, (b.subtreeFlags & 1028) !== 0 && a !== null)
            a.return = b, V = a;
          else
            for (; V !== null; ) {
              b = V;
              try {
                var n = b.alternate;
                if (b.flags & 1024)
                  switch (b.tag) {
                    case 0:
                    case 11:
                    case 15:
                      break;
                    case 1:
                      if (n !== null) {
                        var t = n.memoizedProps, J = n.memoizedState, x = b.stateNode, w = x.getSnapshotBeforeUpdate(b.elementType === b.type ? t : Lg(b.type, t), J);
                        x.__reactInternalSnapshotBeforeUpdate = w;
                      }
                      break;
                    case 3:
                      var u = b.stateNode.containerInfo;
                      u.nodeType === 1 ? u.textContent = "" : u.nodeType === 9 && u.documentElement && u.removeChild(u.documentElement);
                      break;
                    case 5:
                    case 6:
                    case 4:
                    case 17:
                      break;
                    default:
                      throw Error(p(163));
                  }
              } catch (F) {
                W(b, b.return, F);
              }
              if (a = b.sibling, a !== null) {
                a.return = b.return, V = a;
                break;
              }
              V = b.return;
            }
        return n = Oj, Oj = !1, n;
      }
      function Qj(a, b, c) {
        var d = b.updateQueue;
        if (d = d !== null ? d.lastEffect : null, d !== null) {
          var e = d = d.next;
          do {
            if ((e.tag & a) === a) {
              var f = e.destroy;
              e.destroy = void 0, f !== void 0 && Nj(b, c, f);
            }
            e = e.next;
          } while (e !== d);
        }
      }
      function Rj(a, b) {
        if (b = b.updateQueue, b = b !== null ? b.lastEffect : null, b !== null) {
          var c = b = b.next;
          do {
            if ((c.tag & a) === a) {
              var d = c.create;
              c.destroy = d();
            }
            c = c.next;
          } while (c !== b);
        }
      }
      function Sj(a) {
        var b = a.ref;
        if (b !== null) {
          var c = a.stateNode;
          switch (a.tag) {
            case 5:
              a = c;
              break;
            default:
              a = c;
          }
          typeof b == "function" ? b(a) : b.current = a;
        }
      }
      function Tj(a) {
        var b = a.alternate;
        b !== null && (a.alternate = null, Tj(b)), a.child = null, a.deletions = null, a.sibling = null, a.tag === 5 && (b = a.stateNode, b !== null && (delete b[Of], delete b[Pf], delete b[of], delete b[Qf], delete b[Rf])), a.stateNode = null, a.return = null, a.dependencies = null, a.memoizedProps = null, a.memoizedState = null, a.pendingProps = null, a.stateNode = null, a.updateQueue = null;
      }
      function Uj(a) {
        return a.tag === 5 || a.tag === 3 || a.tag === 4;
      }
      function Vj(a) {
        a:
          for (; ; ) {
            for (; a.sibling === null; ) {
              if (a.return === null || Uj(a.return))
                return null;
              a = a.return;
            }
            for (a.sibling.return = a.return, a = a.sibling; a.tag !== 5 && a.tag !== 6 && a.tag !== 18; ) {
              if (a.flags & 2 || a.child === null || a.tag === 4)
                continue a;
              a.child.return = a, a = a.child;
            }
            if (!(a.flags & 2))
              return a.stateNode;
          }
      }
      function Wj(a, b, c) {
        var d = a.tag;
        if (d === 5 || d === 6)
          a = a.stateNode, b ? c.nodeType === 8 ? c.parentNode.insertBefore(a, b) : c.insertBefore(a, b) : (c.nodeType === 8 ? (b = c.parentNode, b.insertBefore(a, c)) : (b = c, b.appendChild(a)), c = c._reactRootContainer, c != null || b.onclick !== null || (b.onclick = Bf));
        else if (d !== 4 && (a = a.child, a !== null))
          for (Wj(a, b, c), a = a.sibling; a !== null; )
            Wj(a, b, c), a = a.sibling;
      }
      function Xj(a, b, c) {
        var d = a.tag;
        if (d === 5 || d === 6)
          a = a.stateNode, b ? c.insertBefore(a, b) : c.appendChild(a);
        else if (d !== 4 && (a = a.child, a !== null))
          for (Xj(a, b, c), a = a.sibling; a !== null; )
            Xj(a, b, c), a = a.sibling;
      }
      var X = null, Yj = !1;
      function Zj(a, b, c) {
        for (c = c.child; c !== null; )
          ak(a, b, c), c = c.sibling;
      }
      function ak(a, b, c) {
        if (lc && typeof lc.onCommitFiberUnmount == "function")
          try {
            lc.onCommitFiberUnmount(kc, c);
          } catch (h) {
          }
        switch (c.tag) {
          case 5:
            U || Mj(c, b);
          case 6:
            var d = X, e = Yj;
            X = null, Zj(a, b, c), X = d, Yj = e, X !== null && (Yj ? (a = X, c = c.stateNode, a.nodeType === 8 ? a.parentNode.removeChild(c) : a.removeChild(c)) : X.removeChild(c.stateNode));
            break;
          case 18:
            X !== null && (Yj ? (a = X, c = c.stateNode, a.nodeType === 8 ? Kf(a.parentNode, c) : a.nodeType === 1 && Kf(a, c), bd(a)) : Kf(X, c.stateNode));
            break;
          case 4:
            d = X, e = Yj, X = c.stateNode.containerInfo, Yj = !0, Zj(a, b, c), X = d, Yj = e;
            break;
          case 0:
          case 11:
          case 14:
          case 15:
            if (!U && (d = c.updateQueue, d !== null && (d = d.lastEffect, d !== null))) {
              e = d = d.next;
              do {
                var f = e, g = f.destroy;
                f = f.tag, g !== void 0 && (f & 2 || f & 4) && Nj(c, b, g), e = e.next;
              } while (e !== d);
            }
            Zj(a, b, c);
            break;
          case 1:
            if (!U && (Mj(c, b), d = c.stateNode, typeof d.componentWillUnmount == "function"))
              try {
                d.props = c.memoizedProps, d.state = c.memoizedState, d.componentWillUnmount();
              } catch (h) {
                W(c, b, h);
              }
            Zj(a, b, c);
            break;
          case 21:
            Zj(a, b, c);
            break;
          case 22:
            c.mode & 1 ? (U = (d = U) || c.memoizedState !== null, Zj(a, b, c), U = d) : Zj(a, b, c);
            break;
          default:
            Zj(a, b, c);
        }
      }
      function bk(a) {
        var b = a.updateQueue;
        if (b !== null) {
          a.updateQueue = null;
          var c = a.stateNode;
          c === null && (c = a.stateNode = new Lj()), b.forEach(function(b2) {
            var d = ck.bind(null, a, b2);
            c.has(b2) || (c.add(b2), b2.then(d, d));
          });
        }
      }
      function dk(a, b) {
        var c = b.deletions;
        if (c !== null)
          for (var d = 0; d < c.length; d++) {
            var e = c[d];
            try {
              var f = a, g = b, h = g;
              a:
                for (; h !== null; ) {
                  switch (h.tag) {
                    case 5:
                      X = h.stateNode, Yj = !1;
                      break a;
                    case 3:
                      X = h.stateNode.containerInfo, Yj = !0;
                      break a;
                    case 4:
                      X = h.stateNode.containerInfo, Yj = !0;
                      break a;
                  }
                  h = h.return;
                }
              if (X === null)
                throw Error(p(160));
              ak(f, g, e), X = null, Yj = !1;
              var k = e.alternate;
              k !== null && (k.return = null), e.return = null;
            } catch (l) {
              W(e, b, l);
            }
          }
        if (b.subtreeFlags & 12854)
          for (b = b.child; b !== null; )
            ek(b, a), b = b.sibling;
      }
      function ek(a, b) {
        var c = a.alternate, d = a.flags;
        switch (a.tag) {
          case 0:
          case 11:
          case 14:
          case 15:
            if (dk(b, a), fk(a), d & 4) {
              try {
                Qj(3, a, a.return), Rj(3, a);
              } catch (t) {
                W(a, a.return, t);
              }
              try {
                Qj(5, a, a.return);
              } catch (t) {
                W(a, a.return, t);
              }
            }
            break;
          case 1:
            dk(b, a), fk(a), d & 512 && c !== null && Mj(c, c.return);
            break;
          case 5:
            if (dk(b, a), fk(a), d & 512 && c !== null && Mj(c, c.return), a.flags & 32) {
              var e = a.stateNode;
              try {
                ob(e, "");
              } catch (t) {
                W(a, a.return, t);
              }
            }
            if (d & 4 && (e = a.stateNode, e != null)) {
              var f = a.memoizedProps, g = c !== null ? c.memoizedProps : f, h = a.type, k = a.updateQueue;
              if (a.updateQueue = null, k !== null)
                try {
                  h === "input" && f.type === "radio" && f.name != null && ab(e, f), vb(h, g);
                  var l = vb(h, f);
                  for (g = 0; g < k.length; g += 2) {
                    var m = k[g], q = k[g + 1];
                    m === "style" ? sb(e, q) : m === "dangerouslySetInnerHTML" ? nb(e, q) : m === "children" ? ob(e, q) : ta(e, m, q, l);
                  }
                  switch (h) {
                    case "input":
                      bb(e, f);
                      break;
                    case "textarea":
                      ib(e, f);
                      break;
                    case "select":
                      var r = e._wrapperState.wasMultiple;
                      e._wrapperState.wasMultiple = !!f.multiple;
                      var y = f.value;
                      y != null ? fb(e, !!f.multiple, y, !1) : r !== !!f.multiple && (f.defaultValue != null ? fb(
                        e,
                        !!f.multiple,
                        f.defaultValue,
                        !0
                      ) : fb(e, !!f.multiple, f.multiple ? [] : "", !1));
                  }
                  e[Pf] = f;
                } catch (t) {
                  W(a, a.return, t);
                }
            }
            break;
          case 6:
            if (dk(b, a), fk(a), d & 4) {
              if (a.stateNode === null)
                throw Error(p(162));
              e = a.stateNode, f = a.memoizedProps;
              try {
                e.nodeValue = f;
              } catch (t) {
                W(a, a.return, t);
              }
            }
            break;
          case 3:
            if (dk(b, a), fk(a), d & 4 && c !== null && c.memoizedState.isDehydrated)
              try {
                bd(b.containerInfo);
              } catch (t) {
                W(a, a.return, t);
              }
            break;
          case 4:
            dk(b, a), fk(a);
            break;
          case 13:
            dk(b, a), fk(a), e = a.child, e.flags & 8192 && (f = e.memoizedState !== null, e.stateNode.isHidden = f, !f || e.alternate !== null && e.alternate.memoizedState !== null || (gk = B())), d & 4 && bk(a);
            break;
          case 22:
            if (m = c !== null && c.memoizedState !== null, a.mode & 1 ? (U = (l = U) || m, dk(b, a), U = l) : dk(b, a), fk(a), d & 8192) {
              if (l = a.memoizedState !== null, (a.stateNode.isHidden = l) && !m && a.mode & 1)
                for (V = a, m = a.child; m !== null; ) {
                  for (q = V = m; V !== null; ) {
                    switch (r = V, y = r.child, r.tag) {
                      case 0:
                      case 11:
                      case 14:
                      case 15:
                        Qj(4, r, r.return);
                        break;
                      case 1:
                        Mj(r, r.return);
                        var n = r.stateNode;
                        if (typeof n.componentWillUnmount == "function") {
                          d = r, c = r.return;
                          try {
                            b = d, n.props = b.memoizedProps, n.state = b.memoizedState, n.componentWillUnmount();
                          } catch (t) {
                            W(d, c, t);
                          }
                        }
                        break;
                      case 5:
                        Mj(r, r.return);
                        break;
                      case 22:
                        if (r.memoizedState !== null) {
                          hk(q);
                          continue;
                        }
                    }
                    y !== null ? (y.return = r, V = y) : hk(q);
                  }
                  m = m.sibling;
                }
              a:
                for (m = null, q = a; ; ) {
                  if (q.tag === 5) {
                    if (m === null) {
                      m = q;
                      try {
                        e = q.stateNode, l ? (f = e.style, typeof f.setProperty == "function" ? f.setProperty("display", "none", "important") : f.display = "none") : (h = q.stateNode, k = q.memoizedProps.style, g = k != null && k.hasOwnProperty("display") ? k.display : null, h.style.display = rb("display", g));
                      } catch (t) {
                        W(a, a.return, t);
                      }
                    }
                  } else if (q.tag === 6) {
                    if (m === null)
                      try {
                        q.stateNode.nodeValue = l ? "" : q.memoizedProps;
                      } catch (t) {
                        W(a, a.return, t);
                      }
                  } else if ((q.tag !== 22 && q.tag !== 23 || q.memoizedState === null || q === a) && q.child !== null) {
                    q.child.return = q, q = q.child;
                    continue;
                  }
                  if (q === a)
                    break a;
                  for (; q.sibling === null; ) {
                    if (q.return === null || q.return === a)
                      break a;
                    m === q && (m = null), q = q.return;
                  }
                  m === q && (m = null), q.sibling.return = q.return, q = q.sibling;
                }
            }
            break;
          case 19:
            dk(b, a), fk(a), d & 4 && bk(a);
            break;
          case 21:
            break;
          default:
            dk(
              b,
              a
            ), fk(a);
        }
      }
      function fk(a) {
        var b = a.flags;
        if (b & 2) {
          try {
            a: {
              for (var c = a.return; c !== null; ) {
                if (Uj(c)) {
                  var d = c;
                  break a;
                }
                c = c.return;
              }
              throw Error(p(160));
            }
            switch (d.tag) {
              case 5:
                var e = d.stateNode;
                d.flags & 32 && (ob(e, ""), d.flags &= -33);
                var f = Vj(a);
                Xj(a, f, e);
                break;
              case 3:
              case 4:
                var g = d.stateNode.containerInfo, h = Vj(a);
                Wj(a, h, g);
                break;
              default:
                throw Error(p(161));
            }
          } catch (k) {
            W(a, a.return, k);
          }
          a.flags &= -3;
        }
        b & 4096 && (a.flags &= -4097);
      }
      function ik(a, b, c) {
        V = a, jk(a, b, c);
      }
      function jk(a, b, c) {
        for (var d = (a.mode & 1) !== 0; V !== null; ) {
          var e = V, f = e.child;
          if (e.tag === 22 && d) {
            var g = e.memoizedState !== null || Kj;
            if (!g) {
              var h = e.alternate, k = h !== null && h.memoizedState !== null || U;
              h = Kj;
              var l = U;
              if (Kj = g, (U = k) && !l)
                for (V = e; V !== null; )
                  g = V, k = g.child, g.tag === 22 && g.memoizedState !== null ? kk(e) : k !== null ? (k.return = g, V = k) : kk(e);
              for (; f !== null; )
                V = f, jk(f, b, c), f = f.sibling;
              V = e, Kj = h, U = l;
            }
            lk(a, b, c);
          } else
            e.subtreeFlags & 8772 && f !== null ? (f.return = e, V = f) : lk(a, b, c);
        }
      }
      function lk(a) {
        for (; V !== null; ) {
          var b = V;
          if (b.flags & 8772) {
            var c = b.alternate;
            try {
              if (b.flags & 8772)
                switch (b.tag) {
                  case 0:
                  case 11:
                  case 15:
                    U || Rj(5, b);
                    break;
                  case 1:
                    var d = b.stateNode;
                    if (b.flags & 4 && !U)
                      if (c === null)
                        d.componentDidMount();
                      else {
                        var e = b.elementType === b.type ? c.memoizedProps : Lg(b.type, c.memoizedProps);
                        d.componentDidUpdate(e, c.memoizedState, d.__reactInternalSnapshotBeforeUpdate);
                      }
                    var f = b.updateQueue;
                    f !== null && ih(b, f, d);
                    break;
                  case 3:
                    var g = b.updateQueue;
                    if (g !== null) {
                      if (c = null, b.child !== null)
                        switch (b.child.tag) {
                          case 5:
                            c = b.child.stateNode;
                            break;
                          case 1:
                            c = b.child.stateNode;
                        }
                      ih(b, g, c);
                    }
                    break;
                  case 5:
                    var h = b.stateNode;
                    if (c === null && b.flags & 4) {
                      c = h;
                      var k = b.memoizedProps;
                      switch (b.type) {
                        case "button":
                        case "input":
                        case "select":
                        case "textarea":
                          k.autoFocus && c.focus();
                          break;
                        case "img":
                          k.src && (c.src = k.src);
                      }
                    }
                    break;
                  case 6:
                    break;
                  case 4:
                    break;
                  case 12:
                    break;
                  case 13:
                    if (b.memoizedState === null) {
                      var l = b.alternate;
                      if (l !== null) {
                        var m = l.memoizedState;
                        if (m !== null) {
                          var q = m.dehydrated;
                          q !== null && bd(q);
                        }
                      }
                    }
                    break;
                  case 19:
                  case 17:
                  case 21:
                  case 22:
                  case 23:
                  case 25:
                    break;
                  default:
                    throw Error(p(163));
                }
              U || b.flags & 512 && Sj(b);
            } catch (r) {
              W(b, b.return, r);
            }
          }
          if (b === a) {
            V = null;
            break;
          }
          if (c = b.sibling, c !== null) {
            c.return = b.return, V = c;
            break;
          }
          V = b.return;
        }
      }
      function hk(a) {
        for (; V !== null; ) {
          var b = V;
          if (b === a) {
            V = null;
            break;
          }
          var c = b.sibling;
          if (c !== null) {
            c.return = b.return, V = c;
            break;
          }
          V = b.return;
        }
      }
      function kk(a) {
        for (; V !== null; ) {
          var b = V;
          try {
            switch (b.tag) {
              case 0:
              case 11:
              case 15:
                var c = b.return;
                try {
                  Rj(4, b);
                } catch (k) {
                  W(b, c, k);
                }
                break;
              case 1:
                var d = b.stateNode;
                if (typeof d.componentDidMount == "function") {
                  var e = b.return;
                  try {
                    d.componentDidMount();
                  } catch (k) {
                    W(b, e, k);
                  }
                }
                var f = b.return;
                try {
                  Sj(b);
                } catch (k) {
                  W(b, f, k);
                }
                break;
              case 5:
                var g = b.return;
                try {
                  Sj(b);
                } catch (k) {
                  W(b, g, k);
                }
            }
          } catch (k) {
            W(b, b.return, k);
          }
          if (b === a) {
            V = null;
            break;
          }
          var h = b.sibling;
          if (h !== null) {
            h.return = b.return, V = h;
            break;
          }
          V = b.return;
        }
      }
      var mk = Math.ceil, nk = ua.ReactCurrentDispatcher, ok = ua.ReactCurrentOwner, pk = ua.ReactCurrentBatchConfig, K = 0, R = null, Y = null, Z = 0, gj = 0, fj = Uf(0), T = 0, qk = null, hh = 0, rk = 0, sk = 0, tk = null, uk = null, gk = 0, Hj = 1 / 0, vk = null, Pi = !1, Qi = null, Si = null, wk = !1, xk = null, yk = 0, zk = 0, Ak = null, Bk = -1, Ck = 0;
      function L() {
        return K & 6 ? B() : Bk !== -1 ? Bk : Bk = B();
      }
      function lh(a) {
        return a.mode & 1 ? K & 2 && Z !== 0 ? Z & -Z : Kg.transition !== null ? (Ck === 0 && (Ck = yc()), Ck) : (a = C, a !== 0 || (a = window.event, a = a === void 0 ? 16 : jd(a.type)), a) : 1;
      }
      function mh(a, b, c, d) {
        if (50 < zk)
          throw zk = 0, Ak = null, Error(p(185));
        Ac(a, c, d), (!(K & 2) || a !== R) && (a === R && (!(K & 2) && (rk |= c), T === 4 && Dk(a, Z)), Ek(a, d), c === 1 && K === 0 && !(b.mode & 1) && (Hj = B() + 500, fg && jg()));
      }
      function Ek(a, b) {
        var c = a.callbackNode;
        wc(a, b);
        var d = uc(a, a === R ? Z : 0);
        if (d === 0)
          c !== null && bc(c), a.callbackNode = null, a.callbackPriority = 0;
        else if (b = d & -d, a.callbackPriority !== b) {
          if (c != null && bc(c), b === 1)
            a.tag === 0 ? ig(Fk.bind(null, a)) : hg(Fk.bind(null, a)), Jf(function() {
              !(K & 6) && jg();
            }), c = null;
          else {
            switch (Dc(d)) {
              case 1:
                c = fc;
                break;
              case 4:
                c = gc;
                break;
              case 16:
                c = hc;
                break;
              case 536870912:
                c = jc;
                break;
              default:
                c = hc;
            }
            c = Gk(c, Hk.bind(null, a));
          }
          a.callbackPriority = b, a.callbackNode = c;
        }
      }
      function Hk(a, b) {
        if (Bk = -1, Ck = 0, K & 6)
          throw Error(p(327));
        var c = a.callbackNode;
        if (Ik() && a.callbackNode !== c)
          return null;
        var d = uc(a, a === R ? Z : 0);
        if (d === 0)
          return null;
        if (d & 30 || d & a.expiredLanes || b)
          b = Jk(a, d);
        else {
          b = d;
          var e = K;
          K |= 2;
          var f = Kk();
          (R !== a || Z !== b) && (vk = null, Hj = B() + 500, Lk(a, b));
          do
            try {
              Mk();
              break;
            } catch (h) {
              Nk(a, h);
            }
          while (1);
          Qg(), nk.current = f, K = e, Y !== null ? b = 0 : (R = null, Z = 0, b = T);
        }
        if (b !== 0) {
          if (b === 2 && (e = xc(a), e !== 0 && (d = e, b = Ok(a, e))), b === 1)
            throw c = qk, Lk(a, 0), Dk(a, d), Ek(a, B()), c;
          if (b === 6)
            Dk(a, d);
          else {
            if (e = a.current.alternate, !(d & 30) && !Pk(e) && (b = Jk(a, d), b === 2 && (f = xc(a), f !== 0 && (d = f, b = Ok(a, f))), b === 1))
              throw c = qk, Lk(a, 0), Dk(a, d), Ek(a, B()), c;
            switch (a.finishedWork = e, a.finishedLanes = d, b) {
              case 0:
              case 1:
                throw Error(p(345));
              case 2:
                Qk(a, uk, vk);
                break;
              case 3:
                if (Dk(a, d), (d & 130023424) === d && (b = gk + 500 - B(), 10 < b)) {
                  if (uc(a, 0) !== 0)
                    break;
                  if (e = a.suspendedLanes, (e & d) !== d) {
                    L(), a.pingedLanes |= a.suspendedLanes & e;
                    break;
                  }
                  a.timeoutHandle = Ff(Qk.bind(null, a, uk, vk), b);
                  break;
                }
                Qk(a, uk, vk);
                break;
              case 4:
                if (Dk(a, d), (d & 4194240) === d)
                  break;
                for (b = a.eventTimes, e = -1; 0 < d; ) {
                  var g = 31 - oc(d);
                  f = 1 << g, g = b[g], g > e && (e = g), d &= ~f;
                }
                if (d = e, d = B() - d, d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3e3 > d ? 3e3 : 4320 > d ? 4320 : 1960 * mk(d / 1960)) - d, 10 < d) {
                  a.timeoutHandle = Ff(Qk.bind(null, a, uk, vk), d);
                  break;
                }
                Qk(a, uk, vk);
                break;
              case 5:
                Qk(a, uk, vk);
                break;
              default:
                throw Error(p(329));
            }
          }
        }
        return Ek(a, B()), a.callbackNode === c ? Hk.bind(null, a) : null;
      }
      function Ok(a, b) {
        var c = tk;
        return a.current.memoizedState.isDehydrated && (Lk(a, b).flags |= 256), a = Jk(a, b), a !== 2 && (b = uk, uk = c, b !== null && Gj(b)), a;
      }
      function Gj(a) {
        uk === null ? uk = a : uk.push.apply(uk, a);
      }
      function Pk(a) {
        for (var b = a; ; ) {
          if (b.flags & 16384) {
            var c = b.updateQueue;
            if (c !== null && (c = c.stores, c !== null))
              for (var d = 0; d < c.length; d++) {
                var e = c[d], f = e.getSnapshot;
                e = e.value;
                try {
                  if (!He(f(), e))
                    return !1;
                } catch (g) {
                  return !1;
                }
              }
          }
          if (c = b.child, b.subtreeFlags & 16384 && c !== null)
            c.return = b, b = c;
          else {
            if (b === a)
              break;
            for (; b.sibling === null; ) {
              if (b.return === null || b.return === a)
                return !0;
              b = b.return;
            }
            b.sibling.return = b.return, b = b.sibling;
          }
        }
        return !0;
      }
      function Dk(a, b) {
        for (b &= ~sk, b &= ~rk, a.suspendedLanes |= b, a.pingedLanes &= ~b, a = a.expirationTimes; 0 < b; ) {
          var c = 31 - oc(b), d = 1 << c;
          a[c] = -1, b &= ~d;
        }
      }
      function Fk(a) {
        if (K & 6)
          throw Error(p(327));
        Ik();
        var b = uc(a, 0);
        if (!(b & 1))
          return Ek(a, B()), null;
        var c = Jk(a, b);
        if (a.tag !== 0 && c === 2) {
          var d = xc(a);
          d !== 0 && (b = d, c = Ok(a, d));
        }
        if (c === 1)
          throw c = qk, Lk(a, 0), Dk(a, b), Ek(a, B()), c;
        if (c === 6)
          throw Error(p(345));
        return a.finishedWork = a.current.alternate, a.finishedLanes = b, Qk(a, uk, vk), Ek(a, B()), null;
      }
      function Rk(a, b) {
        var c = K;
        K |= 1;
        try {
          return a(b);
        } finally {
          K = c, K === 0 && (Hj = B() + 500, fg && jg());
        }
      }
      function Sk(a) {
        xk !== null && xk.tag === 0 && !(K & 6) && Ik();
        var b = K;
        K |= 1;
        var c = pk.transition, d = C;
        try {
          if (pk.transition = null, C = 1, a)
            return a();
        } finally {
          C = d, pk.transition = c, K = b, !(K & 6) && jg();
        }
      }
      function Ij() {
        gj = fj.current, E(fj);
      }
      function Lk(a, b) {
        a.finishedWork = null, a.finishedLanes = 0;
        var c = a.timeoutHandle;
        if (c !== -1 && (a.timeoutHandle = -1, Gf(c)), Y !== null)
          for (c = Y.return; c !== null; ) {
            var d = c;
            switch (wg(d), d.tag) {
              case 1:
                d = d.type.childContextTypes, d != null && $f();
                break;
              case 3:
                Jh(), E(Wf), E(H), Oh();
                break;
              case 5:
                Lh(d);
                break;
              case 4:
                Jh();
                break;
              case 13:
                E(M);
                break;
              case 19:
                E(M);
                break;
              case 10:
                Rg(d.type._context);
                break;
              case 22:
              case 23:
                Ij();
            }
            c = c.return;
          }
        if (R = a, Y = a = wh(a.current, null), Z = gj = b, T = 0, qk = null, sk = rk = hh = 0, uk = tk = null, Wg !== null) {
          for (b = 0; b < Wg.length; b++)
            if (c = Wg[b], d = c.interleaved, d !== null) {
              c.interleaved = null;
              var e = d.next, f = c.pending;
              if (f !== null) {
                var g = f.next;
                f.next = e, d.next = g;
              }
              c.pending = d;
            }
          Wg = null;
        }
        return a;
      }
      function Nk(a, b) {
        do {
          var c = Y;
          try {
            if (Qg(), Ph.current = ai, Sh) {
              for (var d = N.memoizedState; d !== null; ) {
                var e = d.queue;
                e !== null && (e.pending = null), d = d.next;
              }
              Sh = !1;
            }
            if (Rh = 0, P = O = N = null, Th = !1, Uh = 0, ok.current = null, c === null || c.return === null) {
              T = 1, qk = b, Y = null;
              break;
            }
            a: {
              var f = a, g = c.return, h = c, k = b;
              if (b = Z, h.flags |= 32768, k !== null && typeof k == "object" && typeof k.then == "function") {
                var l = k, m = h, q = m.tag;
                if (!(m.mode & 1) && (q === 0 || q === 11 || q === 15)) {
                  var r = m.alternate;
                  r ? (m.updateQueue = r.updateQueue, m.memoizedState = r.memoizedState, m.lanes = r.lanes) : (m.updateQueue = null, m.memoizedState = null);
                }
                var y = Vi(g);
                if (y !== null) {
                  y.flags &= -257, Wi(y, g, h, f, b), y.mode & 1 && Ti(f, l, b), b = y, k = l;
                  var n = b.updateQueue;
                  if (n === null) {
                    var t = /* @__PURE__ */ new Set();
                    t.add(k), b.updateQueue = t;
                  } else
                    n.add(k);
                  break a;
                } else {
                  if (!(b & 1)) {
                    Ti(f, l, b), uj();
                    break a;
                  }
                  k = Error(p(426));
                }
              } else if (I && h.mode & 1) {
                var J = Vi(g);
                if (J !== null) {
                  !(J.flags & 65536) && (J.flags |= 256), Wi(J, g, h, f, b), Jg(Ki(k, h));
                  break a;
                }
              }
              f = k = Ki(k, h), T !== 4 && (T = 2), tk === null ? tk = [f] : tk.push(f), f = g;
              do {
                switch (f.tag) {
                  case 3:
                    f.flags |= 65536, b &= -b, f.lanes |= b;
                    var x = Oi(f, k, b);
                    fh(f, x);
                    break a;
                  case 1:
                    h = k;
                    var w = f.type, u = f.stateNode;
                    if (!(f.flags & 128) && (typeof w.getDerivedStateFromError == "function" || u !== null && typeof u.componentDidCatch == "function" && (Si === null || !Si.has(u)))) {
                      f.flags |= 65536, b &= -b, f.lanes |= b;
                      var F = Ri(f, h, b);
                      fh(f, F);
                      break a;
                    }
                }
                f = f.return;
              } while (f !== null);
            }
            Tk(c);
          } catch (na) {
            b = na, Y === c && c !== null && (Y = c = c.return);
            continue;
          }
          break;
        } while (1);
      }
      function Kk() {
        var a = nk.current;
        return nk.current = ai, a === null ? ai : a;
      }
      function uj() {
        (T === 0 || T === 3 || T === 2) && (T = 4), R === null || !(hh & 268435455) && !(rk & 268435455) || Dk(R, Z);
      }
      function Jk(a, b) {
        var c = K;
        K |= 2;
        var d = Kk();
        (R !== a || Z !== b) && (vk = null, Lk(a, b));
        do
          try {
            Uk();
            break;
          } catch (e) {
            Nk(a, e);
          }
        while (1);
        if (Qg(), K = c, nk.current = d, Y !== null)
          throw Error(p(261));
        return R = null, Z = 0, T;
      }
      function Uk() {
        for (; Y !== null; )
          Vk(Y);
      }
      function Mk() {
        for (; Y !== null && !cc(); )
          Vk(Y);
      }
      function Vk(a) {
        var b = Wk(a.alternate, a, gj);
        a.memoizedProps = a.pendingProps, b === null ? Tk(a) : Y = b, ok.current = null;
      }
      function Tk(a) {
        var b = a;
        do {
          var c = b.alternate;
          if (a = b.return, b.flags & 32768) {
            if (c = Jj(c, b), c !== null) {
              c.flags &= 32767, Y = c;
              return;
            }
            if (a !== null)
              a.flags |= 32768, a.subtreeFlags = 0, a.deletions = null;
            else {
              T = 6, Y = null;
              return;
            }
          } else if (c = Fj(c, b, gj), c !== null) {
            Y = c;
            return;
          }
          if (b = b.sibling, b !== null) {
            Y = b;
            return;
          }
          Y = b = a;
        } while (b !== null);
        T === 0 && (T = 5);
      }
      function Qk(a, b, c) {
        var d = C, e = pk.transition;
        try {
          pk.transition = null, C = 1, Xk(a, b, c, d);
        } finally {
          pk.transition = e, C = d;
        }
        return null;
      }
      function Xk(a, b, c, d) {
        do
          Ik();
        while (xk !== null);
        if (K & 6)
          throw Error(p(327));
        c = a.finishedWork;
        var e = a.finishedLanes;
        if (c === null)
          return null;
        if (a.finishedWork = null, a.finishedLanes = 0, c === a.current)
          throw Error(p(177));
        a.callbackNode = null, a.callbackPriority = 0;
        var f = c.lanes | c.childLanes;
        if (Bc(a, f), a === R && (Y = R = null, Z = 0), !(c.subtreeFlags & 2064) && !(c.flags & 2064) || wk || (wk = !0, Gk(hc, function() {
          return Ik(), null;
        })), f = (c.flags & 15990) !== 0, c.subtreeFlags & 15990 || f) {
          f = pk.transition, pk.transition = null;
          var g = C;
          C = 1;
          var h = K;
          K |= 4, ok.current = null, Pj(a, c), ek(c, a), Oe(Df), dd = !!Cf, Df = Cf = null, a.current = c, ik(c, a, e), dc(), K = h, C = g, pk.transition = f;
        } else
          a.current = c;
        if (wk && (wk = !1, xk = a, yk = e), f = a.pendingLanes, f === 0 && (Si = null), mc(c.stateNode, d), Ek(a, B()), b !== null)
          for (d = a.onRecoverableError, c = 0; c < b.length; c++)
            e = b[c], d(e.value, { componentStack: e.stack, digest: e.digest });
        if (Pi)
          throw Pi = !1, a = Qi, Qi = null, a;
        return yk & 1 && a.tag !== 0 && Ik(), f = a.pendingLanes, f & 1 ? a === Ak ? zk++ : (zk = 0, Ak = a) : zk = 0, jg(), null;
      }
      function Ik() {
        if (xk !== null) {
          var a = Dc(yk), b = pk.transition, c = C;
          try {
            if (pk.transition = null, C = 16 > a ? 16 : a, xk === null)
              var d = !1;
            else {
              if (a = xk, xk = null, yk = 0, K & 6)
                throw Error(p(331));
              var e = K;
              for (K |= 4, V = a.current; V !== null; ) {
                var f = V, g = f.child;
                if (V.flags & 16) {
                  var h = f.deletions;
                  if (h !== null) {
                    for (var k = 0; k < h.length; k++) {
                      var l = h[k];
                      for (V = l; V !== null; ) {
                        var m = V;
                        switch (m.tag) {
                          case 0:
                          case 11:
                          case 15:
                            Qj(8, m, f);
                        }
                        var q = m.child;
                        if (q !== null)
                          q.return = m, V = q;
                        else
                          for (; V !== null; ) {
                            m = V;
                            var r = m.sibling, y = m.return;
                            if (Tj(m), m === l) {
                              V = null;
                              break;
                            }
                            if (r !== null) {
                              r.return = y, V = r;
                              break;
                            }
                            V = y;
                          }
                      }
                    }
                    var n = f.alternate;
                    if (n !== null) {
                      var t = n.child;
                      if (t !== null) {
                        n.child = null;
                        do {
                          var J = t.sibling;
                          t.sibling = null, t = J;
                        } while (t !== null);
                      }
                    }
                    V = f;
                  }
                }
                if (f.subtreeFlags & 2064 && g !== null)
                  g.return = f, V = g;
                else
                  b:
                    for (; V !== null; ) {
                      if (f = V, f.flags & 2048)
                        switch (f.tag) {
                          case 0:
                          case 11:
                          case 15:
                            Qj(9, f, f.return);
                        }
                      var x = f.sibling;
                      if (x !== null) {
                        x.return = f.return, V = x;
                        break b;
                      }
                      V = f.return;
                    }
              }
              var w = a.current;
              for (V = w; V !== null; ) {
                g = V;
                var u = g.child;
                if (g.subtreeFlags & 2064 && u !== null)
                  u.return = g, V = u;
                else
                  b:
                    for (g = w; V !== null; ) {
                      if (h = V, h.flags & 2048)
                        try {
                          switch (h.tag) {
                            case 0:
                            case 11:
                            case 15:
                              Rj(9, h);
                          }
                        } catch (na) {
                          W(h, h.return, na);
                        }
                      if (h === g) {
                        V = null;
                        break b;
                      }
                      var F = h.sibling;
                      if (F !== null) {
                        F.return = h.return, V = F;
                        break b;
                      }
                      V = h.return;
                    }
              }
              if (K = e, jg(), lc && typeof lc.onPostCommitFiberRoot == "function")
                try {
                  lc.onPostCommitFiberRoot(kc, a);
                } catch (na) {
                }
              d = !0;
            }
            return d;
          } finally {
            C = c, pk.transition = b;
          }
        }
        return !1;
      }
      function Yk(a, b, c) {
        b = Ki(c, b), b = Oi(a, b, 1), a = dh(a, b, 1), b = L(), a !== null && (Ac(a, 1, b), Ek(a, b));
      }
      function W(a, b, c) {
        if (a.tag === 3)
          Yk(a, a, c);
        else
          for (; b !== null; ) {
            if (b.tag === 3) {
              Yk(b, a, c);
              break;
            } else if (b.tag === 1) {
              var d = b.stateNode;
              if (typeof b.type.getDerivedStateFromError == "function" || typeof d.componentDidCatch == "function" && (Si === null || !Si.has(d))) {
                a = Ki(c, a), a = Ri(b, a, 1), b = dh(b, a, 1), a = L(), b !== null && (Ac(b, 1, a), Ek(b, a));
                break;
              }
            }
            b = b.return;
          }
      }
      function Ui(a, b, c) {
        var d = a.pingCache;
        d !== null && d.delete(b), b = L(), a.pingedLanes |= a.suspendedLanes & c, R === a && (Z & c) === c && (T === 4 || T === 3 && (Z & 130023424) === Z && 500 > B() - gk ? Lk(a, 0) : sk |= c), Ek(a, b);
      }
      function Zk(a, b) {
        b === 0 && (a.mode & 1 ? (b = sc, sc <<= 1, !(sc & 130023424) && (sc = 4194304)) : b = 1);
        var c = L();
        a = Zg(a, b), a !== null && (Ac(a, b, c), Ek(a, c));
      }
      function vj(a) {
        var b = a.memoizedState, c = 0;
        b !== null && (c = b.retryLane), Zk(a, c);
      }
      function ck(a, b) {
        var c = 0;
        switch (a.tag) {
          case 13:
            var d = a.stateNode, e = a.memoizedState;
            e !== null && (c = e.retryLane);
            break;
          case 19:
            d = a.stateNode;
            break;
          default:
            throw Error(p(314));
        }
        d !== null && d.delete(b), Zk(a, c);
      }
      var Wk;
      Wk = function(a, b, c) {
        if (a !== null)
          if (a.memoizedProps !== b.pendingProps || Wf.current)
            Ug = !0;
          else {
            if (!(a.lanes & c) && !(b.flags & 128))
              return Ug = !1, zj(a, b, c);
            Ug = !!(a.flags & 131072);
          }
        else
          Ug = !1, I && b.flags & 1048576 && ug(b, ng, b.index);
        switch (b.lanes = 0, b.tag) {
          case 2:
            var d = b.type;
            jj(a, b), a = b.pendingProps;
            var e = Yf(b, H.current);
            Tg(b, c), e = Xh(null, b, d, a, e, c);
            var f = bi();
            return b.flags |= 1, typeof e == "object" && e !== null && typeof e.render == "function" && e.$$typeof === void 0 ? (b.tag = 1, b.memoizedState = null, b.updateQueue = null, Zf(d) ? (f = !0, cg(b)) : f = !1, b.memoizedState = e.state !== null && e.state !== void 0 ? e.state : null, ah(b), e.updater = nh, b.stateNode = e, e._reactInternals = b, rh(b, d, a, c), b = kj(null, b, d, !0, f, c)) : (b.tag = 0, I && f && vg(b), Yi(null, b, e, c), b = b.child), b;
          case 16:
            d = b.elementType;
            a: {
              switch (jj(a, b), a = b.pendingProps, e = d._init, d = e(d._payload), b.type = d, e = b.tag = $k(d), a = Lg(d, a), e) {
                case 0:
                  b = dj(null, b, d, a, c);
                  break a;
                case 1:
                  b = ij(null, b, d, a, c);
                  break a;
                case 11:
                  b = Zi(null, b, d, a, c);
                  break a;
                case 14:
                  b = aj(null, b, d, Lg(d.type, a), c);
                  break a;
              }
              throw Error(p(
                306,
                d,
                ""
              ));
            }
            return b;
          case 0:
            return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Lg(d, e), dj(a, b, d, e, c);
          case 1:
            return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Lg(d, e), ij(a, b, d, e, c);
          case 3:
            a: {
              if (lj(b), a === null)
                throw Error(p(387));
              d = b.pendingProps, f = b.memoizedState, e = f.element, bh(a, b), gh(b, d, null, c);
              var g = b.memoizedState;
              if (d = g.element, f.isDehydrated)
                if (f = { element: d, isDehydrated: !1, cache: g.cache, pendingSuspenseBoundaries: g.pendingSuspenseBoundaries, transitions: g.transitions }, b.updateQueue.baseState = f, b.memoizedState = f, b.flags & 256) {
                  e = Ki(Error(p(423)), b), b = mj(a, b, d, c, e);
                  break a;
                } else if (d !== e) {
                  e = Ki(Error(p(424)), b), b = mj(a, b, d, c, e);
                  break a;
                } else
                  for (yg = Lf(b.stateNode.containerInfo.firstChild), xg = b, I = !0, zg = null, c = Ch(b, null, d, c), b.child = c; c; )
                    c.flags = c.flags & -3 | 4096, c = c.sibling;
              else {
                if (Ig(), d === e) {
                  b = $i(a, b, c);
                  break a;
                }
                Yi(a, b, d, c);
              }
              b = b.child;
            }
            return b;
          case 5:
            return Kh(b), a === null && Eg(b), d = b.type, e = b.pendingProps, f = a !== null ? a.memoizedProps : null, g = e.children, Ef(d, e) ? g = null : f !== null && Ef(d, f) && (b.flags |= 32), hj(a, b), Yi(a, b, g, c), b.child;
          case 6:
            return a === null && Eg(b), null;
          case 13:
            return pj(a, b, c);
          case 4:
            return Ih(b, b.stateNode.containerInfo), d = b.pendingProps, a === null ? b.child = Bh(b, null, d, c) : Yi(a, b, d, c), b.child;
          case 11:
            return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Lg(d, e), Zi(a, b, d, e, c);
          case 7:
            return Yi(a, b, b.pendingProps, c), b.child;
          case 8:
            return Yi(a, b, b.pendingProps.children, c), b.child;
          case 12:
            return Yi(a, b, b.pendingProps.children, c), b.child;
          case 10:
            a: {
              if (d = b.type._context, e = b.pendingProps, f = b.memoizedProps, g = e.value, G(Mg, d._currentValue), d._currentValue = g, f !== null)
                if (He(f.value, g)) {
                  if (f.children === e.children && !Wf.current) {
                    b = $i(a, b, c);
                    break a;
                  }
                } else
                  for (f = b.child, f !== null && (f.return = b); f !== null; ) {
                    var h = f.dependencies;
                    if (h !== null) {
                      g = f.child;
                      for (var k = h.firstContext; k !== null; ) {
                        if (k.context === d) {
                          if (f.tag === 1) {
                            k = ch(-1, c & -c), k.tag = 2;
                            var l = f.updateQueue;
                            if (l !== null) {
                              l = l.shared;
                              var m = l.pending;
                              m === null ? k.next = k : (k.next = m.next, m.next = k), l.pending = k;
                            }
                          }
                          f.lanes |= c, k = f.alternate, k !== null && (k.lanes |= c), Sg(
                            f.return,
                            c,
                            b
                          ), h.lanes |= c;
                          break;
                        }
                        k = k.next;
                      }
                    } else if (f.tag === 10)
                      g = f.type === b.type ? null : f.child;
                    else if (f.tag === 18) {
                      if (g = f.return, g === null)
                        throw Error(p(341));
                      g.lanes |= c, h = g.alternate, h !== null && (h.lanes |= c), Sg(g, c, b), g = f.sibling;
                    } else
                      g = f.child;
                    if (g !== null)
                      g.return = f;
                    else
                      for (g = f; g !== null; ) {
                        if (g === b) {
                          g = null;
                          break;
                        }
                        if (f = g.sibling, f !== null) {
                          f.return = g.return, g = f;
                          break;
                        }
                        g = g.return;
                      }
                    f = g;
                  }
              Yi(a, b, e.children, c), b = b.child;
            }
            return b;
          case 9:
            return e = b.type, d = b.pendingProps.children, Tg(b, c), e = Vg(e), d = d(e), b.flags |= 1, Yi(a, b, d, c), b.child;
          case 14:
            return d = b.type, e = Lg(d, b.pendingProps), e = Lg(d.type, e), aj(a, b, d, e, c);
          case 15:
            return cj(a, b, b.type, b.pendingProps, c);
          case 17:
            return d = b.type, e = b.pendingProps, e = b.elementType === d ? e : Lg(d, e), jj(a, b), b.tag = 1, Zf(d) ? (a = !0, cg(b)) : a = !1, Tg(b, c), ph(b, d, e), rh(b, d, e, c), kj(null, b, d, !0, a, c);
          case 19:
            return yj(a, b, c);
          case 22:
            return ej(a, b, c);
        }
        throw Error(p(156, b.tag));
      };
      function Gk(a, b) {
        return ac(a, b);
      }
      function al(a, b, c, d) {
        this.tag = a, this.key = c, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = b, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = d, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
      }
      function Bg(a, b, c, d) {
        return new al(a, b, c, d);
      }
      function bj(a) {
        return a = a.prototype, !(!a || !a.isReactComponent);
      }
      function $k(a) {
        if (typeof a == "function")
          return bj(a) ? 1 : 0;
        if (a != null) {
          if (a = a.$$typeof, a === Da)
            return 11;
          if (a === Ga)
            return 14;
        }
        return 2;
      }
      function wh(a, b) {
        var c = a.alternate;
        return c === null ? (c = Bg(a.tag, b, a.key, a.mode), c.elementType = a.elementType, c.type = a.type, c.stateNode = a.stateNode, c.alternate = a, a.alternate = c) : (c.pendingProps = b, c.type = a.type, c.flags = 0, c.subtreeFlags = 0, c.deletions = null), c.flags = a.flags & 14680064, c.childLanes = a.childLanes, c.lanes = a.lanes, c.child = a.child, c.memoizedProps = a.memoizedProps, c.memoizedState = a.memoizedState, c.updateQueue = a.updateQueue, b = a.dependencies, c.dependencies = b === null ? null : { lanes: b.lanes, firstContext: b.firstContext }, c.sibling = a.sibling, c.index = a.index, c.ref = a.ref, c;
      }
      function yh(a, b, c, d, e, f) {
        var g = 2;
        if (d = a, typeof a == "function")
          bj(a) && (g = 1);
        else if (typeof a == "string")
          g = 5;
        else
          a:
            switch (a) {
              case ya:
                return Ah(c.children, e, f, b);
              case za:
                g = 8, e |= 8;
                break;
              case Aa:
                return a = Bg(12, c, b, e | 2), a.elementType = Aa, a.lanes = f, a;
              case Ea:
                return a = Bg(13, c, b, e), a.elementType = Ea, a.lanes = f, a;
              case Fa:
                return a = Bg(19, c, b, e), a.elementType = Fa, a.lanes = f, a;
              case Ia:
                return qj(c, e, f, b);
              default:
                if (typeof a == "object" && a !== null)
                  switch (a.$$typeof) {
                    case Ba:
                      g = 10;
                      break a;
                    case Ca:
                      g = 9;
                      break a;
                    case Da:
                      g = 11;
                      break a;
                    case Ga:
                      g = 14;
                      break a;
                    case Ha:
                      g = 16, d = null;
                      break a;
                  }
                throw Error(p(130, a == null ? a : typeof a, ""));
            }
        return b = Bg(g, c, b, e), b.elementType = a, b.type = d, b.lanes = f, b;
      }
      function Ah(a, b, c, d) {
        return a = Bg(7, a, d, b), a.lanes = c, a;
      }
      function qj(a, b, c, d) {
        return a = Bg(22, a, d, b), a.elementType = Ia, a.lanes = c, a.stateNode = { isHidden: !1 }, a;
      }
      function xh(a, b, c) {
        return a = Bg(6, a, null, b), a.lanes = c, a;
      }
      function zh(a, b, c) {
        return b = Bg(4, a.children !== null ? a.children : [], a.key, b), b.lanes = c, b.stateNode = { containerInfo: a.containerInfo, pendingChildren: null, implementation: a.implementation }, b;
      }
      function bl(a, b, c, d, e) {
        this.tag = b, this.containerInfo = a, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = zc(0), this.expirationTimes = zc(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = zc(0), this.identifierPrefix = d, this.onRecoverableError = e, this.mutableSourceEagerHydrationData = null;
      }
      function cl(a, b, c, d, e, f, g, h, k) {
        return a = new bl(a, b, c, h, k), b === 1 ? (b = 1, f === !0 && (b |= 8)) : b = 0, f = Bg(3, null, null, b), a.current = f, f.stateNode = a, f.memoizedState = { element: d, isDehydrated: c, cache: null, transitions: null, pendingSuspenseBoundaries: null }, ah(f), a;
      }
      function dl(a, b, c) {
        var d = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
        return { $$typeof: wa, key: d == null ? null : "" + d, children: a, containerInfo: b, implementation: c };
      }
      function el(a) {
        if (!a)
          return Vf;
        a = a._reactInternals;
        a: {
          if (Vb(a) !== a || a.tag !== 1)
            throw Error(p(170));
          var b = a;
          do {
            switch (b.tag) {
              case 3:
                b = b.stateNode.context;
                break a;
              case 1:
                if (Zf(b.type)) {
                  b = b.stateNode.__reactInternalMemoizedMergedChildContext;
                  break a;
                }
            }
            b = b.return;
          } while (b !== null);
          throw Error(p(171));
        }
        if (a.tag === 1) {
          var c = a.type;
          if (Zf(c))
            return bg(a, c, b);
        }
        return b;
      }
      function fl(a, b, c, d, e, f, g, h, k) {
        return a = cl(c, d, !0, a, e, f, g, h, k), a.context = el(null), c = a.current, d = L(), e = lh(c), f = ch(d, e), f.callback = b != null ? b : null, dh(c, f, e), a.current.lanes = e, Ac(a, e, d), Ek(a, d), a;
      }
      function gl(a, b, c, d) {
        var e = b.current, f = L(), g = lh(e);
        return c = el(c), b.context === null ? b.context = c : b.pendingContext = c, b = ch(f, g), b.payload = { element: a }, d = d === void 0 ? null : d, d !== null && (b.callback = d), a = dh(e, b, g), a !== null && (mh(a, e, g, f), eh(a, e, g)), g;
      }
      function hl(a) {
        if (a = a.current, !a.child)
          return null;
        switch (a.child.tag) {
          case 5:
            return a.child.stateNode;
          default:
            return a.child.stateNode;
        }
      }
      function il(a, b) {
        if (a = a.memoizedState, a !== null && a.dehydrated !== null) {
          var c = a.retryLane;
          a.retryLane = c !== 0 && c < b ? c : b;
        }
      }
      function jl(a, b) {
        il(a, b), (a = a.alternate) && il(a, b);
      }
      function kl() {
        return null;
      }
      var ll = typeof reportError == "function" ? reportError : function(a) {
        console.error(a);
      };
      function ml(a) {
        this._internalRoot = a;
      }
      nl.prototype.render = ml.prototype.render = function(a) {
        var b = this._internalRoot;
        if (b === null)
          throw Error(p(409));
        gl(a, b, null, null);
      };
      nl.prototype.unmount = ml.prototype.unmount = function() {
        var a = this._internalRoot;
        if (a !== null) {
          this._internalRoot = null;
          var b = a.containerInfo;
          Sk(function() {
            gl(null, a, null, null);
          }), b[uf] = null;
        }
      };
      function nl(a) {
        this._internalRoot = a;
      }
      nl.prototype.unstable_scheduleHydration = function(a) {
        if (a) {
          var b = Hc();
          a = { blockedOn: null, target: a, priority: b };
          for (var c = 0; c < Qc.length && b !== 0 && b < Qc[c].priority; c++)
            ;
          Qc.splice(c, 0, a), c === 0 && Vc(a);
        }
      };
      function ol(a) {
        return !(!a || a.nodeType !== 1 && a.nodeType !== 9 && a.nodeType !== 11);
      }
      function pl(a) {
        return !(!a || a.nodeType !== 1 && a.nodeType !== 9 && a.nodeType !== 11 && (a.nodeType !== 8 || a.nodeValue !== " react-mount-point-unstable "));
      }
      function ql() {
      }
      function rl(a, b, c, d, e) {
        if (e) {
          if (typeof d == "function") {
            var f = d;
            d = function() {
              var a2 = hl(g);
              f.call(a2);
            };
          }
          var g = fl(b, d, a, 0, null, !1, !1, "", ql);
          return a._reactRootContainer = g, a[uf] = g.current, sf(a.nodeType === 8 ? a.parentNode : a), Sk(), g;
        }
        for (; e = a.lastChild; )
          a.removeChild(e);
        if (typeof d == "function") {
          var h = d;
          d = function() {
            var a2 = hl(k);
            h.call(a2);
          };
        }
        var k = cl(a, 0, !1, null, null, !1, !1, "", ql);
        return a._reactRootContainer = k, a[uf] = k.current, sf(a.nodeType === 8 ? a.parentNode : a), Sk(function() {
          gl(b, k, c, d);
        }), k;
      }
      function sl(a, b, c, d, e) {
        var f = c._reactRootContainer;
        if (f) {
          var g = f;
          if (typeof e == "function") {
            var h = e;
            e = function() {
              var a2 = hl(g);
              h.call(a2);
            };
          }
          gl(b, g, a, e);
        } else
          g = rl(c, b, a, e, d);
        return hl(g);
      }
      Ec = function(a) {
        switch (a.tag) {
          case 3:
            var b = a.stateNode;
            if (b.current.memoizedState.isDehydrated) {
              var c = tc(b.pendingLanes);
              c !== 0 && (Cc(b, c | 1), Ek(b, B()), !(K & 6) && (Hj = B() + 500, jg()));
            }
            break;
          case 13:
            Sk(function() {
              var b2 = Zg(a, 1);
              if (b2 !== null) {
                var c2 = L();
                mh(b2, a, 1, c2);
              }
            }), jl(a, 1);
        }
      };
      Fc = function(a) {
        if (a.tag === 13) {
          var b = Zg(a, 134217728);
          if (b !== null) {
            var c = L();
            mh(b, a, 134217728, c);
          }
          jl(a, 134217728);
        }
      };
      Gc = function(a) {
        if (a.tag === 13) {
          var b = lh(a), c = Zg(a, b);
          if (c !== null) {
            var d = L();
            mh(c, a, b, d);
          }
          jl(a, b);
        }
      };
      Hc = function() {
        return C;
      };
      Ic = function(a, b) {
        var c = C;
        try {
          return C = a, b();
        } finally {
          C = c;
        }
      };
      yb = function(a, b, c) {
        switch (b) {
          case "input":
            if (bb(a, c), b = c.name, c.type === "radio" && b != null) {
              for (c = a; c.parentNode; )
                c = c.parentNode;
              for (c = c.querySelectorAll("input[name=" + JSON.stringify("" + b) + '][type="radio"]'), b = 0; b < c.length; b++) {
                var d = c[b];
                if (d !== a && d.form === a.form) {
                  var e = Db(d);
                  if (!e)
                    throw Error(p(90));
                  Wa(d), bb(d, e);
                }
              }
            }
            break;
          case "textarea":
            ib(a, c);
            break;
          case "select":
            b = c.value, b != null && fb(a, !!c.multiple, b, !1);
        }
      };
      Gb = Rk;
      Hb = Sk;
      var tl = { usingClientEntryPoint: !1, Events: [Cb, ue, Db, Eb, Fb, Rk] }, ul = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.2.0", rendererPackageName: "react-dom" }, vl = { bundleType: ul.bundleType, version: ul.version, rendererPackageName: ul.rendererPackageName, rendererConfig: ul.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: ua.ReactCurrentDispatcher, findHostInstanceByFiber: function(a) {
        return a = Zb(a), a === null ? null : a.stateNode;
      }, findFiberByHostInstance: ul.findFiberByHostInstance || kl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.2.0-next-9e3b772b8-20220608" };
      if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ != "undefined" && (wl = __REACT_DEVTOOLS_GLOBAL_HOOK__, !wl.isDisabled && wl.supportsFiber))
        try {
          kc = wl.inject(vl), lc = wl;
        } catch (a) {
        }
      var wl;
      exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tl;
      exports.createPortal = function(a, b) {
        var c = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
        if (!ol(b))
          throw Error(p(200));
        return dl(a, b, null, c);
      };
      exports.createRoot = function(a, b) {
        if (!ol(a))
          throw Error(p(299));
        var c = !1, d = "", e = ll;
        return b != null && (b.unstable_strictMode === !0 && (c = !0), b.identifierPrefix !== void 0 && (d = b.identifierPrefix), b.onRecoverableError !== void 0 && (e = b.onRecoverableError)), b = cl(a, 1, !1, null, null, c, !1, d, e), a[uf] = b.current, sf(a.nodeType === 8 ? a.parentNode : a), new ml(b);
      };
      exports.findDOMNode = function(a) {
        if (a == null)
          return null;
        if (a.nodeType === 1)
          return a;
        var b = a._reactInternals;
        if (b === void 0)
          throw typeof a.render == "function" ? Error(p(188)) : (a = Object.keys(a).join(","), Error(p(268, a)));
        return a = Zb(b), a = a === null ? null : a.stateNode, a;
      };
      exports.flushSync = function(a) {
        return Sk(a);
      };
      exports.hydrate = function(a, b, c) {
        if (!pl(b))
          throw Error(p(200));
        return sl(null, a, b, !0, c);
      };
      exports.hydrateRoot = function(a, b, c) {
        if (!ol(a))
          throw Error(p(405));
        var d = c != null && c.hydratedSources || null, e = !1, f = "", g = ll;
        if (c != null && (c.unstable_strictMode === !0 && (e = !0), c.identifierPrefix !== void 0 && (f = c.identifierPrefix), c.onRecoverableError !== void 0 && (g = c.onRecoverableError)), b = fl(b, null, a, 1, c != null ? c : null, e, !1, f, g), a[uf] = b.current, sf(a), d)
          for (a = 0; a < d.length; a++)
            c = d[a], e = c._getVersion, e = e(c._source), b.mutableSourceEagerHydrationData == null ? b.mutableSourceEagerHydrationData = [c, e] : b.mutableSourceEagerHydrationData.push(
              c,
              e
            );
        return new nl(b);
      };
      exports.render = function(a, b, c) {
        if (!pl(b))
          throw Error(p(200));
        return sl(null, a, b, !1, c);
      };
      exports.unmountComponentAtNode = function(a) {
        if (!pl(a))
          throw Error(p(40));
        return a._reactRootContainer ? (Sk(function() {
          sl(null, null, a, !1, function() {
            a._reactRootContainer = null, a[uf] = null;
          });
        }), !0) : !1;
      };
      exports.unstable_batchedUpdates = Rk;
      exports.unstable_renderSubtreeIntoContainer = function(a, b, c, d) {
        if (!pl(c))
          throw Error(p(200));
        if (a == null || a._reactInternals === void 0)
          throw Error(p(38));
        return sl(a, b, c, !1, d);
      };
      exports.version = "18.2.0-next-9e3b772b8-20220608";
    }
  });

  // node_modules/react-dom/index.js
  var require_react_dom = __commonJS({
    "node_modules/react-dom/index.js"(exports, module) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      function checkDCE() {
        if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ == "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
          try {
            __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
          } catch (err) {
            console.error(err);
          }
      }
      checkDCE(), module.exports = require_react_dom_production_min();
    }
  });

  // node_modules/react-dom/client.js
  var require_client = __commonJS({
    "node_modules/react-dom/client.js"(exports) {
      "use strict";
      init_define_SVG_ICONS_FONTAWESOME();
      var m = require_react_dom();
      exports.createRoot = m.createRoot, exports.hydrateRoot = m.hydrateRoot;
      var i;
    }
  });

  // js/main.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react59 = __toESM(require_react()), import_client = __toESM(require_client());

  // node_modules/react-router-dom/dist/index.js
  init_define_SVG_ICONS_FONTAWESOME();
  var React2 = __toESM(require_react());

  // node_modules/react-router/dist/index.js
  init_define_SVG_ICONS_FONTAWESOME();
  var React = __toESM(require_react());

  // node_modules/@remix-run/router/dist/router.js
  init_define_SVG_ICONS_FONTAWESOME();
  function _extends() {
    return _extends = Object.assign ? Object.assign.bind() : function(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        for (var key in source)
          Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
      }
      return target;
    }, _extends.apply(this, arguments);
  }
  var Action;
  (function(Action2) {
    Action2.Pop = "POP", Action2.Push = "PUSH", Action2.Replace = "REPLACE";
  })(Action || (Action = {}));
  var PopStateEventType = "popstate";
  function createBrowserHistory(options) {
    options === void 0 && (options = {});
    function createBrowserLocation(window2, globalHistory) {
      let {
        pathname,
        search,
        hash
      } = window2.location;
      return createLocation(
        "",
        {
          pathname,
          search,
          hash
        },
        // state defaults to `null` because `window.history.state` does
        globalHistory.state && globalHistory.state.usr || null,
        globalHistory.state && globalHistory.state.key || "default"
      );
    }
    function createBrowserHref(window2, to) {
      return typeof to == "string" ? to : createPath(to);
    }
    return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
  }
  function invariant(value, message) {
    if (value === !1 || value === null || typeof value == "undefined")
      throw new Error(message);
  }
  function warning(cond, message) {
    if (!cond) {
      typeof console != "undefined" && console.warn(message);
      try {
        throw new Error(message);
      } catch (e) {
      }
    }
  }
  function createKey() {
    return Math.random().toString(36).substr(2, 8);
  }
  function getHistoryState(location, index) {
    return {
      usr: location.state,
      key: location.key,
      idx: index
    };
  }
  function createLocation(current, to, state, key) {
    return state === void 0 && (state = null), _extends({
      pathname: typeof current == "string" ? current : current.pathname,
      search: "",
      hash: ""
    }, typeof to == "string" ? parsePath(to) : to, {
      state,
      // TODO: This could be cleaned up.  push/replace should probably just take
      // full Locations now and avoid the need to run through this flow at all
      // But that's a pretty big refactor to the current test suite so going to
      // keep as is for the time being and just let any incoming keys take precedence
      key: to && to.key || key || createKey()
    });
  }
  function createPath(_ref) {
    let {
      pathname = "/",
      search = "",
      hash = ""
    } = _ref;
    return search && search !== "?" && (pathname += search.charAt(0) === "?" ? search : "?" + search), hash && hash !== "#" && (pathname += hash.charAt(0) === "#" ? hash : "#" + hash), pathname;
  }
  function parsePath(path) {
    let parsedPath = {};
    if (path) {
      let hashIndex = path.indexOf("#");
      hashIndex >= 0 && (parsedPath.hash = path.substr(hashIndex), path = path.substr(0, hashIndex));
      let searchIndex = path.indexOf("?");
      searchIndex >= 0 && (parsedPath.search = path.substr(searchIndex), path = path.substr(0, searchIndex)), path && (parsedPath.pathname = path);
    }
    return parsedPath;
  }
  function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
    options === void 0 && (options = {});
    let {
      window: window2 = document.defaultView,
      v5Compat = !1
    } = options, globalHistory = window2.history, action = Action.Pop, listener = null, index = getIndex();
    index == null && (index = 0, globalHistory.replaceState(_extends({}, globalHistory.state, {
      idx: index
    }), ""));
    function getIndex() {
      return (globalHistory.state || {
        idx: null
      }).idx;
    }
    function handlePop() {
      action = Action.Pop;
      let nextIndex = getIndex(), delta = nextIndex == null ? null : nextIndex - index;
      index = nextIndex, listener && listener({
        action,
        location: history.location,
        delta
      });
    }
    function push(to, state) {
      action = Action.Push;
      let location = createLocation(history.location, to, state);
      validateLocation && validateLocation(location, to), index = getIndex() + 1;
      let historyState = getHistoryState(location, index), url = history.createHref(location);
      try {
        globalHistory.pushState(historyState, "", url);
      } catch (error) {
        if (error instanceof DOMException && error.name === "DataCloneError")
          throw error;
        window2.location.assign(url);
      }
      v5Compat && listener && listener({
        action,
        location: history.location,
        delta: 1
      });
    }
    function replace(to, state) {
      action = Action.Replace;
      let location = createLocation(history.location, to, state);
      validateLocation && validateLocation(location, to), index = getIndex();
      let historyState = getHistoryState(location, index), url = history.createHref(location);
      globalHistory.replaceState(historyState, "", url), v5Compat && listener && listener({
        action,
        location: history.location,
        delta: 0
      });
    }
    function createURL(to) {
      let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href, href = typeof to == "string" ? to : createPath(to);
      return invariant(base, "No window.location.(origin|href) available to create URL for href: " + href), new URL(href, base);
    }
    let history = {
      get action() {
        return action;
      },
      get location() {
        return getLocation(window2, globalHistory);
      },
      listen(fn) {
        if (listener)
          throw new Error("A history only accepts one active listener");
        return window2.addEventListener(PopStateEventType, handlePop), listener = fn, () => {
          window2.removeEventListener(PopStateEventType, handlePop), listener = null;
        };
      },
      createHref(to) {
        return createHref(window2, to);
      },
      createURL,
      encodeLocation(to) {
        let url = createURL(to);
        return {
          pathname: url.pathname,
          search: url.search,
          hash: url.hash
        };
      },
      push,
      replace,
      go(n) {
        return globalHistory.go(n);
      }
    };
    return history;
  }
  var ResultType;
  (function(ResultType2) {
    ResultType2.data = "data", ResultType2.deferred = "deferred", ResultType2.redirect = "redirect", ResultType2.error = "error";
  })(ResultType || (ResultType = {}));
  var immutableRouteKeys = /* @__PURE__ */ new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
  function isIndexRoute(route) {
    return route.index === !0;
  }
  function convertRoutesToDataRoutes(routes, mapRouteProperties2, parentPath, manifest) {
    return parentPath === void 0 && (parentPath = []), manifest === void 0 && (manifest = {}), routes.map((route, index) => {
      let treePath = [...parentPath, index], id = typeof route.id == "string" ? route.id : treePath.join("-");
      if (invariant(route.index !== !0 || !route.children, "Cannot specify children on an index route"), invariant(!manifest[id], 'Found a route id collision on id "' + id + `".  Route id's must be globally unique within Data Router usages`), isIndexRoute(route)) {
        let indexRoute = _extends({}, route, mapRouteProperties2(route), {
          id
        });
        return manifest[id] = indexRoute, indexRoute;
      } else {
        let pathOrLayoutRoute = _extends({}, route, mapRouteProperties2(route), {
          id,
          children: void 0
        });
        return manifest[id] = pathOrLayoutRoute, route.children && (pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties2, treePath, manifest)), pathOrLayoutRoute;
      }
    });
  }
  function matchRoutes(routes, locationArg, basename) {
    basename === void 0 && (basename = "/");
    let location = typeof locationArg == "string" ? parsePath(locationArg) : locationArg, pathname = stripBasename(location.pathname || "/", basename);
    if (pathname == null)
      return null;
    let branches = flattenRoutes(routes);
    rankRouteBranches(branches);
    let matches = null;
    for (let i = 0; matches == null && i < branches.length; ++i)
      matches = matchRouteBranch(
        branches[i],
        // Incoming pathnames are generally encoded from either window.location
        // or from router.navigate, but we want to match against the unencoded
        // paths in the route definitions.  Memory router locations won't be
        // encoded here but there also shouldn't be anything to decode so this
        // should be a safe operation.  This avoids needing matchRoutes to be
        // history-aware.
        safelyDecodeURI(pathname)
      );
    return matches;
  }
  function convertRouteMatchToUiMatch(match, loaderData) {
    let {
      route,
      pathname,
      params
    } = match;
    return {
      id: route.id,
      pathname,
      params,
      data: loaderData[route.id],
      handle: route.handle
    };
  }
  function flattenRoutes(routes, branches, parentsMeta, parentPath) {
    branches === void 0 && (branches = []), parentsMeta === void 0 && (parentsMeta = []), parentPath === void 0 && (parentPath = "");
    let flattenRoute = (route, index, relativePath) => {
      let meta = {
        relativePath: relativePath === void 0 ? route.path || "" : relativePath,
        caseSensitive: route.caseSensitive === !0,
        childrenIndex: index,
        route
      };
      meta.relativePath.startsWith("/") && (invariant(meta.relativePath.startsWith(parentPath), 'Absolute route path "' + meta.relativePath + '" nested under path ' + ('"' + parentPath + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes."), meta.relativePath = meta.relativePath.slice(parentPath.length));
      let path = joinPaths([parentPath, meta.relativePath]), routesMeta = parentsMeta.concat(meta);
      route.children && route.children.length > 0 && (invariant(
        // Our types know better, but runtime JS may not!
        // @ts-expect-error
        route.index !== !0,
        "Index routes must not have child routes. Please remove " + ('all child routes from route path "' + path + '".')
      ), flattenRoutes(route.children, branches, routesMeta, path)), !(route.path == null && !route.index) && branches.push({
        path,
        score: computeScore(path, route.index),
        routesMeta
      });
    };
    return routes.forEach((route, index) => {
      var _route$path;
      if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?")))
        flattenRoute(route, index);
      else
        for (let exploded of explodeOptionalSegments(route.path))
          flattenRoute(route, index, exploded);
    }), branches;
  }
  function explodeOptionalSegments(path) {
    let segments = path.split("/");
    if (segments.length === 0)
      return [];
    let [first, ...rest] = segments, isOptional = first.endsWith("?"), required = first.replace(/\?$/, "");
    if (rest.length === 0)
      return isOptional ? [required, ""] : [required];
    let restExploded = explodeOptionalSegments(rest.join("/")), result = [];
    return result.push(...restExploded.map((subpath) => subpath === "" ? required : [required, subpath].join("/"))), isOptional && result.push(...restExploded), result.map((exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded);
  }
  function rankRouteBranches(branches) {
    branches.sort((a, b) => a.score !== b.score ? b.score - a.score : compareIndexes(a.routesMeta.map((meta) => meta.childrenIndex), b.routesMeta.map((meta) => meta.childrenIndex)));
  }
  var paramRe = /^:\w+$/, dynamicSegmentValue = 3, indexRouteValue = 2, emptySegmentValue = 1, staticSegmentValue = 10, splatPenalty = -2, isSplat = (s) => s === "*";
  function computeScore(path, index) {
    let segments = path.split("/"), initialScore = segments.length;
    return segments.some(isSplat) && (initialScore += splatPenalty), index && (initialScore += indexRouteValue), segments.filter((s) => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
  }
  function compareIndexes(a, b) {
    return a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]) ? (
      // If two routes are siblings, we should try to match the earlier sibling
      // first. This allows people to have fine-grained control over the matching
      // behavior by simply putting routes with identical paths in the order they
      // want them tried.
      a[a.length - 1] - b[b.length - 1]
    ) : (
      // Otherwise, it doesn't really make sense to rank non-siblings by index,
      // so they sort equally.
      0
    );
  }
  function matchRouteBranch(branch, pathname) {
    let {
      routesMeta
    } = branch, matchedParams = {}, matchedPathname = "/", matches = [];
    for (let i = 0; i < routesMeta.length; ++i) {
      let meta = routesMeta[i], end = i === routesMeta.length - 1, remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/", match = matchPath({
        path: meta.relativePath,
        caseSensitive: meta.caseSensitive,
        end
      }, remainingPathname);
      if (!match)
        return null;
      Object.assign(matchedParams, match.params);
      let route = meta.route;
      matches.push({
        // TODO: Can this as be avoided?
        params: matchedParams,
        pathname: joinPaths([matchedPathname, match.pathname]),
        pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
        route
      }), match.pathnameBase !== "/" && (matchedPathname = joinPaths([matchedPathname, match.pathnameBase]));
    }
    return matches;
  }
  function matchPath(pattern, pathname) {
    typeof pattern == "string" && (pattern = {
      path: pattern,
      caseSensitive: !1,
      end: !0
    });
    let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end), match = pathname.match(matcher);
    if (!match)
      return null;
    let matchedPathname = match[0], pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1"), captureGroups = match.slice(1);
    return {
      params: paramNames.reduce((memo6, paramName, index) => {
        if (paramName === "*") {
          let splatValue = captureGroups[index] || "";
          pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
        }
        return memo6[paramName] = safelyDecodeURIComponent(captureGroups[index] || "", paramName), memo6;
      }, {}),
      pathname: matchedPathname,
      pathnameBase,
      pattern
    };
  }
  function compilePath(path, caseSensitive, end) {
    caseSensitive === void 0 && (caseSensitive = !1), end === void 0 && (end = !0), warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), 'Route path "' + path + '" will be treated as if it were ' + ('"' + path.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + path.replace(/\*$/, "/*") + '".'));
    let paramNames = [], regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^$?{}|()[\]]/g, "\\$&").replace(/\/:(\w+)/g, (_, paramName) => (paramNames.push(paramName), "/([^\\/]+)"));
    return path.endsWith("*") ? (paramNames.push("*"), regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : end ? regexpSource += "\\/*$" : path !== "" && path !== "/" && (regexpSource += "(?:(?=\\/|$))"), [new RegExp(regexpSource, caseSensitive ? void 0 : "i"), paramNames];
  }
  function safelyDecodeURI(value) {
    try {
      return decodeURI(value);
    } catch (error) {
      return warning(!1, 'The URL path "' + value + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + error + ").")), value;
    }
  }
  function safelyDecodeURIComponent(value, paramName) {
    try {
      return decodeURIComponent(value);
    } catch (error) {
      return warning(!1, 'The value for the URL param "' + paramName + '" will not be decoded because' + (' the string "' + value + '" is a malformed URL segment. This is probably') + (" due to a bad percent encoding (" + error + ").")), value;
    }
  }
  function stripBasename(pathname, basename) {
    if (basename === "/")
      return pathname;
    if (!pathname.toLowerCase().startsWith(basename.toLowerCase()))
      return null;
    let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length, nextChar = pathname.charAt(startIndex);
    return nextChar && nextChar !== "/" ? null : pathname.slice(startIndex) || "/";
  }
  function resolvePath(to, fromPathname) {
    fromPathname === void 0 && (fromPathname = "/");
    let {
      pathname: toPathname,
      search = "",
      hash = ""
    } = typeof to == "string" ? parsePath(to) : to;
    return {
      pathname: toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname,
      search: normalizeSearch(search),
      hash: normalizeHash(hash)
    };
  }
  function resolvePathname(relativePath, fromPathname) {
    let segments = fromPathname.replace(/\/+$/, "").split("/");
    return relativePath.split("/").forEach((segment) => {
      segment === ".." ? segments.length > 1 && segments.pop() : segment !== "." && segments.push(segment);
    }), segments.length > 1 ? segments.join("/") : "/";
  }
  function getInvalidPathError(char, field, dest, path) {
    return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "].  Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
  }
  function getPathContributingMatches(matches) {
    return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
  }
  function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
    isPathRelative === void 0 && (isPathRelative = !1);
    let to;
    typeof toArg == "string" ? to = parsePath(toArg) : (to = _extends({}, toArg), invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to)), invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to)), invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to)));
    let isEmptyPath = toArg === "" || to.pathname === "", toPathname = isEmptyPath ? "/" : to.pathname, from;
    if (isPathRelative || toPathname == null)
      from = locationPathname;
    else {
      let routePathnameIndex = routePathnames.length - 1;
      if (toPathname.startsWith("..")) {
        let toSegments = toPathname.split("/");
        for (; toSegments[0] === ".."; )
          toSegments.shift(), routePathnameIndex -= 1;
        to.pathname = toSegments.join("/");
      }
      from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
    }
    let path = resolvePath(to, from), hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/"), hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
    return !path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash) && (path.pathname += "/"), path;
  }
  var joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/"), normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/"), normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search, normalizeHash = (hash) => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
  var ErrorResponseImpl = class {
    constructor(status, statusText, data, internal) {
      internal === void 0 && (internal = !1), this.status = status, this.statusText = statusText || "", this.internal = internal, data instanceof Error ? (this.data = data.toString(), this.error = data) : this.data = data;
    }
  };
  function isRouteErrorResponse(error) {
    return error != null && typeof error.status == "number" && typeof error.statusText == "string" && typeof error.internal == "boolean" && "data" in error;
  }
  var validMutationMethodsArr = ["post", "put", "patch", "delete"], validMutationMethods = new Set(validMutationMethodsArr), validRequestMethodsArr = ["get", ...validMutationMethodsArr], validRequestMethods = new Set(validRequestMethodsArr), redirectStatusCodes = /* @__PURE__ */ new Set([301, 302, 303, 307, 308]), redirectPreserveMethodStatusCodes = /* @__PURE__ */ new Set([307, 308]), IDLE_NAVIGATION = {
    state: "idle",
    location: void 0,
    formMethod: void 0,
    formAction: void 0,
    formEncType: void 0,
    formData: void 0,
    json: void 0,
    text: void 0
  }, IDLE_FETCHER = {
    state: "idle",
    data: void 0,
    formMethod: void 0,
    formAction: void 0,
    formEncType: void 0,
    formData: void 0,
    json: void 0,
    text: void 0
  }, IDLE_BLOCKER = {
    state: "unblocked",
    proceed: void 0,
    reset: void 0,
    location: void 0
  }, ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, defaultMapRouteProperties = (route) => ({
    hasErrorBoundary: !!route.hasErrorBoundary
  }), TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
  function createRouter(init) {
    let routerWindow = init.window ? init.window : typeof window != "undefined" ? window : void 0, isBrowser2 = typeof routerWindow != "undefined" && typeof routerWindow.document != "undefined" && typeof routerWindow.document.createElement != "undefined", isServer = !isBrowser2;
    invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");
    let mapRouteProperties2;
    if (init.mapRouteProperties)
      mapRouteProperties2 = init.mapRouteProperties;
    else if (init.detectErrorBoundary) {
      let detectErrorBoundary = init.detectErrorBoundary;
      mapRouteProperties2 = (route) => ({
        hasErrorBoundary: detectErrorBoundary(route)
      });
    } else
      mapRouteProperties2 = defaultMapRouteProperties;
    let manifest = {}, dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties2, void 0, manifest), inFlightDataRoutes, basename = init.basename || "/", future = _extends({
      v7_normalizeFormMethod: !1,
      v7_prependBasename: !1
    }, init.future), unlistenHistory = null, subscribers = /* @__PURE__ */ new Set(), savedScrollPositions = null, getScrollRestorationKey = null, getScrollPosition = null, initialScrollRestored = init.hydrationData != null, initialMatches = matchRoutes(dataRoutes, init.history.location, basename), initialErrors = null;
    if (initialMatches == null) {
      let error = getInternalRouterError(404, {
        pathname: init.history.location.pathname
      }), {
        matches,
        route
      } = getShortCircuitMatches(dataRoutes);
      initialMatches = matches, initialErrors = {
        [route.id]: error
      };
    }
    let initialized = (
      // All initialMatches need to be loaded before we're ready.  If we have lazy
      // functions around still then we'll need to run them in initialize()
      !initialMatches.some((m) => m.route.lazy) && // And we have to either have no loaders or have been provided hydrationData
      (!initialMatches.some((m) => m.route.loader) || init.hydrationData != null)
    ), router, state = {
      historyAction: init.history.action,
      location: init.history.location,
      matches: initialMatches,
      initialized,
      navigation: IDLE_NAVIGATION,
      // Don't restore on initial updateState() if we were SSR'd
      restoreScrollPosition: init.hydrationData != null ? !1 : null,
      preventScrollReset: !1,
      revalidation: "idle",
      loaderData: init.hydrationData && init.hydrationData.loaderData || {},
      actionData: init.hydrationData && init.hydrationData.actionData || null,
      errors: init.hydrationData && init.hydrationData.errors || initialErrors,
      fetchers: /* @__PURE__ */ new Map(),
      blockers: /* @__PURE__ */ new Map()
    }, pendingAction = Action.Pop, pendingPreventScrollReset = !1, pendingNavigationController, pendingViewTransitionEnabled = !1, appliedViewTransitions = /* @__PURE__ */ new Map(), removePageHideEventListener = null, isUninterruptedRevalidation = !1, isRevalidationRequired = !1, cancelledDeferredRoutes = [], cancelledFetcherLoads = [], fetchControllers = /* @__PURE__ */ new Map(), incrementingLoadId = 0, pendingNavigationLoadId = -1, fetchReloadIds = /* @__PURE__ */ new Map(), fetchRedirectIds = /* @__PURE__ */ new Set(), fetchLoadMatches = /* @__PURE__ */ new Map(), activeDeferreds = /* @__PURE__ */ new Map(), blockerFunctions = /* @__PURE__ */ new Map(), ignoreNextHistoryUpdate = !1;
    function initialize() {
      if (unlistenHistory = init.history.listen((_ref) => {
        let {
          action: historyAction,
          location,
          delta
        } = _ref;
        if (ignoreNextHistoryUpdate) {
          ignoreNextHistoryUpdate = !1;
          return;
        }
        warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");
        let blockerKey = shouldBlockNavigation({
          currentLocation: state.location,
          nextLocation: location,
          historyAction
        });
        if (blockerKey && delta != null) {
          ignoreNextHistoryUpdate = !0, init.history.go(delta * -1), updateBlocker(blockerKey, {
            state: "blocked",
            location,
            proceed() {
              updateBlocker(blockerKey, {
                state: "proceeding",
                proceed: void 0,
                reset: void 0,
                location
              }), init.history.go(delta);
            },
            reset() {
              let blockers = new Map(state.blockers);
              blockers.set(blockerKey, IDLE_BLOCKER), updateState({
                blockers
              });
            }
          });
          return;
        }
        return startNavigation(historyAction, location);
      }), isBrowser2) {
        restoreAppliedTransitions(routerWindow, appliedViewTransitions);
        let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
        routerWindow.addEventListener("pagehide", _saveAppliedTransitions), removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
      }
      return state.initialized || startNavigation(Action.Pop, state.location), router;
    }
    function dispose() {
      unlistenHistory && unlistenHistory(), removePageHideEventListener && removePageHideEventListener(), subscribers.clear(), pendingNavigationController && pendingNavigationController.abort(), state.fetchers.forEach((_, key) => deleteFetcher(key)), state.blockers.forEach((_, key) => deleteBlocker(key));
    }
    function subscribe2(fn) {
      return subscribers.add(fn), () => subscribers.delete(fn);
    }
    function updateState(newState, viewTransitionOpts) {
      state = _extends({}, state, newState), subscribers.forEach((subscriber) => subscriber(state, {
        unstable_viewTransitionOpts: viewTransitionOpts
      }));
    }
    function completeNavigation(location, newState) {
      var _location$state, _location$state2;
      let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== !0, actionData;
      newState.actionData ? Object.keys(newState.actionData).length > 0 ? actionData = newState.actionData : actionData = null : isActionReload ? actionData = state.actionData : actionData = null;
      let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData, blockers = state.blockers;
      blockers.size > 0 && (blockers = new Map(blockers), blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER)));
      let preventScrollReset = pendingPreventScrollReset === !0 || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== !0;
      inFlightDataRoutes && (dataRoutes = inFlightDataRoutes, inFlightDataRoutes = void 0), isUninterruptedRevalidation || pendingAction === Action.Pop || (pendingAction === Action.Push ? init.history.push(location, location.state) : pendingAction === Action.Replace && init.history.replace(location, location.state));
      let viewTransitionOpts;
      if (pendingAction === Action.Pop) {
        let priorPaths = appliedViewTransitions.get(state.location.pathname);
        priorPaths && priorPaths.has(location.pathname) ? viewTransitionOpts = {
          currentLocation: state.location,
          nextLocation: location
        } : appliedViewTransitions.has(location.pathname) && (viewTransitionOpts = {
          currentLocation: location,
          nextLocation: state.location
        });
      } else if (pendingViewTransitionEnabled) {
        let toPaths = appliedViewTransitions.get(state.location.pathname);
        toPaths ? toPaths.add(location.pathname) : (toPaths = /* @__PURE__ */ new Set([location.pathname]), appliedViewTransitions.set(state.location.pathname, toPaths)), viewTransitionOpts = {
          currentLocation: state.location,
          nextLocation: location
        };
      }
      updateState(_extends({}, newState, {
        actionData,
        loaderData,
        historyAction: pendingAction,
        location,
        initialized: !0,
        navigation: IDLE_NAVIGATION,
        revalidation: "idle",
        restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),
        preventScrollReset,
        blockers
      }), viewTransitionOpts), pendingAction = Action.Pop, pendingPreventScrollReset = !1, pendingViewTransitionEnabled = !1, isUninterruptedRevalidation = !1, isRevalidationRequired = !1, cancelledDeferredRoutes = [], cancelledFetcherLoads = [];
    }
    function navigate(to, opts) {
      return __async(this, null, function* () {
        if (typeof to == "number") {
          init.history.go(to);
          return;
        }
        let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative), {
          path,
          submission,
          error
        } = normalizeNavigateOptions(future.v7_normalizeFormMethod, !1, normalizedPath, opts), currentLocation = state.location, nextLocation = createLocation(state.location, path, opts && opts.state);
        nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));
        let userReplace = opts && opts.replace != null ? opts.replace : void 0, historyAction = Action.Push;
        userReplace === !0 ? historyAction = Action.Replace : userReplace === !1 || submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search && (historyAction = Action.Replace);
        let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === !0 : void 0, blockerKey = shouldBlockNavigation({
          currentLocation,
          nextLocation,
          historyAction
        });
        if (blockerKey) {
          updateBlocker(blockerKey, {
            state: "blocked",
            location: nextLocation,
            proceed() {
              updateBlocker(blockerKey, {
                state: "proceeding",
                proceed: void 0,
                reset: void 0,
                location: nextLocation
              }), navigate(to, opts);
            },
            reset() {
              let blockers = new Map(state.blockers);
              blockers.set(blockerKey, IDLE_BLOCKER), updateState({
                blockers
              });
            }
          });
          return;
        }
        return yield startNavigation(historyAction, nextLocation, {
          submission,
          // Send through the formData serialization error if we have one so we can
          // render at the right error boundary after we match routes
          pendingError: error,
          preventScrollReset,
          replace: opts && opts.replace,
          enableViewTransition: opts && opts.unstable_viewTransition
        });
      });
    }
    function revalidate() {
      if (interruptActiveLoads(), updateState({
        revalidation: "loading"
      }), state.navigation.state !== "submitting") {
        if (state.navigation.state === "idle") {
          startNavigation(state.historyAction, state.location, {
            startUninterruptedRevalidation: !0
          });
          return;
        }
        startNavigation(pendingAction || state.historyAction, state.navigation.location, {
          overrideNavigation: state.navigation
        });
      }
    }
    function startNavigation(historyAction, location, opts) {
      return __async(this, null, function* () {
        pendingNavigationController && pendingNavigationController.abort(), pendingNavigationController = null, pendingAction = historyAction, isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === !0, saveScrollPosition(state.location, state.matches), pendingPreventScrollReset = (opts && opts.preventScrollReset) === !0, pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === !0;
        let routesToUse = inFlightDataRoutes || dataRoutes, loadingNavigation = opts && opts.overrideNavigation, matches = matchRoutes(routesToUse, location, basename);
        if (!matches) {
          let error = getInternalRouterError(404, {
            pathname: location.pathname
          }), {
            matches: notFoundMatches,
            route
          } = getShortCircuitMatches(routesToUse);
          cancelActiveDeferreds(), completeNavigation(location, {
            matches: notFoundMatches,
            loaderData: {},
            errors: {
              [route.id]: error
            }
          });
          return;
        }
        if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
          completeNavigation(location, {
            matches
          });
          return;
        }
        pendingNavigationController = new AbortController();
        let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission), pendingActionData, pendingError;
        if (opts && opts.pendingError)
          pendingError = {
            [findNearestBoundary(matches).route.id]: opts.pendingError
          };
        else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
          let actionOutput = yield handleAction(request, location, opts.submission, matches, {
            replace: opts.replace
          });
          if (actionOutput.shortCircuited)
            return;
          pendingActionData = actionOutput.pendingActionData, pendingError = actionOutput.pendingActionError, loadingNavigation = getLoadingNavigation(location, opts.submission), request = new Request(request.url, {
            signal: request.signal
          });
        }
        let {
          shortCircuited,
          loaderData,
          errors
        } = yield handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, pendingActionData, pendingError);
        shortCircuited || (pendingNavigationController = null, completeNavigation(location, _extends({
          matches
        }, pendingActionData ? {
          actionData: pendingActionData
        } : {}, {
          loaderData,
          errors
        })));
      });
    }
    function handleAction(request, location, submission, matches, opts) {
      return __async(this, null, function* () {
        opts === void 0 && (opts = {}), interruptActiveLoads();
        let navigation = getSubmittingNavigation(location, submission);
        updateState({
          navigation
        });
        let result, actionMatch = getTargetMatch(matches, location);
        if (!actionMatch.route.action && !actionMatch.route.lazy)
          result = {
            type: ResultType.error,
            error: getInternalRouterError(405, {
              method: request.method,
              pathname: location.pathname,
              routeId: actionMatch.route.id
            })
          };
        else if (result = yield callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties2, basename), request.signal.aborted)
          return {
            shortCircuited: !0
          };
        if (isRedirectResult(result)) {
          let replace;
          return opts && opts.replace != null ? replace = opts.replace : replace = result.location === state.location.pathname + state.location.search, yield startRedirectNavigation(state, result, {
            submission,
            replace
          }), {
            shortCircuited: !0
          };
        }
        if (isErrorResult(result)) {
          let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
          return (opts && opts.replace) !== !0 && (pendingAction = Action.Push), {
            // Send back an empty object we can use to clear out any prior actionData
            pendingActionData: {},
            pendingActionError: {
              [boundaryMatch.route.id]: result.error
            }
          };
        }
        if (isDeferredResult(result))
          throw getInternalRouterError(400, {
            type: "defer-action"
          });
        return {
          pendingActionData: {
            [actionMatch.route.id]: result.data
          }
        };
      });
    }
    function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, pendingActionData, pendingError) {
      return __async(this, null, function* () {
        let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission), activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation), routesToUse = inFlightDataRoutes || dataRoutes, [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError);
        if (cancelActiveDeferreds((routeId) => !(matches && matches.some((m) => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some((m) => m.route.id === routeId)), pendingNavigationLoadId = ++incrementingLoadId, matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {
          let updatedFetchers2 = markFetchRedirectsDone();
          return completeNavigation(location, _extends({
            matches,
            loaderData: {},
            // Commit pending error if we're short circuiting
            errors: pendingError || null
          }, pendingActionData ? {
            actionData: pendingActionData
          } : {}, updatedFetchers2 ? {
            fetchers: new Map(state.fetchers)
          } : {})), {
            shortCircuited: !0
          };
        }
        if (!isUninterruptedRevalidation) {
          revalidatingFetchers.forEach((rf) => {
            let fetcher = state.fetchers.get(rf.key), revalidatingFetcher = getLoadingFetcher(void 0, fetcher ? fetcher.data : void 0);
            state.fetchers.set(rf.key, revalidatingFetcher);
          });
          let actionData = pendingActionData || state.actionData;
          updateState(_extends({
            navigation: loadingNavigation
          }, actionData ? Object.keys(actionData).length === 0 ? {
            actionData: null
          } : {
            actionData
          } : {}, revalidatingFetchers.length > 0 ? {
            fetchers: new Map(state.fetchers)
          } : {}));
        }
        revalidatingFetchers.forEach((rf) => {
          fetchControllers.has(rf.key) && abortFetcher(rf.key), rf.controller && fetchControllers.set(rf.key, rf.controller);
        });
        let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((f) => abortFetcher(f.key));
        pendingNavigationController && pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);
        let {
          results,
          loaderResults,
          fetcherResults
        } = yield callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);
        if (request.signal.aborted)
          return {
            shortCircuited: !0
          };
        pendingNavigationController && pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations), revalidatingFetchers.forEach((rf) => fetchControllers.delete(rf.key));
        let redirect2 = findRedirect(results);
        if (redirect2) {
          if (redirect2.idx >= matchesToLoad.length) {
            let fetcherKey = revalidatingFetchers[redirect2.idx - matchesToLoad.length].key;
            fetchRedirectIds.add(fetcherKey);
          }
          return yield startRedirectNavigation(state, redirect2.result, {
            replace
          }), {
            shortCircuited: !0
          };
        }
        let {
          loaderData,
          errors
        } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);
        activeDeferreds.forEach((deferredData, routeId) => {
          deferredData.subscribe((aborted) => {
            (aborted || deferredData.done) && activeDeferreds.delete(routeId);
          });
        });
        let updatedFetchers = markFetchRedirectsDone(), didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId), shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
        return _extends({
          loaderData,
          errors
        }, shouldUpdateFetchers ? {
          fetchers: new Map(state.fetchers)
        } : {});
      });
    }
    function getFetcher(key) {
      return state.fetchers.get(key) || IDLE_FETCHER;
    }
    function fetch2(key, routeId, href, opts) {
      if (isServer)
        throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");
      fetchControllers.has(key) && abortFetcher(key);
      let routesToUse = inFlightDataRoutes || dataRoutes, normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, routeId, opts == null ? void 0 : opts.relative), matches = matchRoutes(routesToUse, normalizedPath, basename);
      if (!matches) {
        setFetcherError(key, routeId, getInternalRouterError(404, {
          pathname: normalizedPath
        }));
        return;
      }
      let {
        path,
        submission,
        error
      } = normalizeNavigateOptions(future.v7_normalizeFormMethod, !0, normalizedPath, opts);
      if (error) {
        setFetcherError(key, routeId, error);
        return;
      }
      let match = getTargetMatch(matches, path);
      if (pendingPreventScrollReset = (opts && opts.preventScrollReset) === !0, submission && isMutationMethod(submission.formMethod)) {
        handleFetcherAction(key, routeId, path, match, matches, submission);
        return;
      }
      fetchLoadMatches.set(key, {
        routeId,
        path
      }), handleFetcherLoader(key, routeId, path, match, matches, submission);
    }
    function handleFetcherAction(key, routeId, path, match, requestMatches, submission) {
      return __async(this, null, function* () {
        if (interruptActiveLoads(), fetchLoadMatches.delete(key), !match.route.action && !match.route.lazy) {
          let error = getInternalRouterError(405, {
            method: submission.formMethod,
            pathname: path,
            routeId
          });
          setFetcherError(key, routeId, error);
          return;
        }
        let existingFetcher = state.fetchers.get(key), fetcher = getSubmittingFetcher(submission, existingFetcher);
        state.fetchers.set(key, fetcher), updateState({
          fetchers: new Map(state.fetchers)
        });
        let abortController = new AbortController(), fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);
        fetchControllers.set(key, abortController);
        let originatingLoadId = incrementingLoadId, actionResult = yield callLoaderOrAction("action", fetchRequest, match, requestMatches, manifest, mapRouteProperties2, basename);
        if (fetchRequest.signal.aborted) {
          fetchControllers.get(key) === abortController && fetchControllers.delete(key);
          return;
        }
        if (isRedirectResult(actionResult))
          if (fetchControllers.delete(key), pendingNavigationLoadId > originatingLoadId) {
            let doneFetcher = getDoneFetcher(void 0);
            state.fetchers.set(key, doneFetcher), updateState({
              fetchers: new Map(state.fetchers)
            });
            return;
          } else {
            fetchRedirectIds.add(key);
            let loadingFetcher = getLoadingFetcher(submission);
            return state.fetchers.set(key, loadingFetcher), updateState({
              fetchers: new Map(state.fetchers)
            }), startRedirectNavigation(state, actionResult, {
              fetcherSubmission: submission
            });
          }
        if (isErrorResult(actionResult)) {
          setFetcherError(key, routeId, actionResult.error);
          return;
        }
        if (isDeferredResult(actionResult))
          throw getInternalRouterError(400, {
            type: "defer-action"
          });
        let nextLocation = state.navigation.location || state.location, revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal), routesToUse = inFlightDataRoutes || dataRoutes, matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
        invariant(matches, "Didn't find any matches after fetcher action");
        let loadId = ++incrementingLoadId;
        fetchReloadIds.set(key, loadId);
        let loadFetcher = getLoadingFetcher(submission, actionResult.data);
        state.fetchers.set(key, loadFetcher);
        let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(
          init.history,
          state,
          matches,
          submission,
          nextLocation,
          isRevalidationRequired,
          cancelledDeferredRoutes,
          cancelledFetcherLoads,
          fetchLoadMatches,
          fetchRedirectIds,
          routesToUse,
          basename,
          {
            [match.route.id]: actionResult.data
          },
          void 0
          // No need to send through errors since we short circuit above
        );
        revalidatingFetchers.filter((rf) => rf.key !== key).forEach((rf) => {
          let staleKey = rf.key, existingFetcher2 = state.fetchers.get(staleKey), revalidatingFetcher = getLoadingFetcher(void 0, existingFetcher2 ? existingFetcher2.data : void 0);
          state.fetchers.set(staleKey, revalidatingFetcher), fetchControllers.has(staleKey) && abortFetcher(staleKey), rf.controller && fetchControllers.set(staleKey, rf.controller);
        }), updateState({
          fetchers: new Map(state.fetchers)
        });
        let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach((rf) => abortFetcher(rf.key));
        abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);
        let {
          results,
          loaderResults,
          fetcherResults
        } = yield callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);
        if (abortController.signal.aborted)
          return;
        abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations), fetchReloadIds.delete(key), fetchControllers.delete(key), revalidatingFetchers.forEach((r) => fetchControllers.delete(r.key));
        let redirect2 = findRedirect(results);
        if (redirect2) {
          if (redirect2.idx >= matchesToLoad.length) {
            let fetcherKey = revalidatingFetchers[redirect2.idx - matchesToLoad.length].key;
            fetchRedirectIds.add(fetcherKey);
          }
          return startRedirectNavigation(state, redirect2.result);
        }
        let {
          loaderData,
          errors
        } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, void 0, revalidatingFetchers, fetcherResults, activeDeferreds);
        if (state.fetchers.has(key)) {
          let doneFetcher = getDoneFetcher(actionResult.data);
          state.fetchers.set(key, doneFetcher);
        }
        let didAbortFetchLoads = abortStaleFetchLoads(loadId);
        state.navigation.state === "loading" && loadId > pendingNavigationLoadId ? (invariant(pendingAction, "Expected pending action"), pendingNavigationController && pendingNavigationController.abort(), completeNavigation(state.navigation.location, {
          matches,
          loaderData,
          errors,
          fetchers: new Map(state.fetchers)
        })) : (updateState(_extends({
          errors,
          loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors)
        }, didAbortFetchLoads || revalidatingFetchers.length > 0 ? {
          fetchers: new Map(state.fetchers)
        } : {})), isRevalidationRequired = !1);
      });
    }
    function handleFetcherLoader(key, routeId, path, match, matches, submission) {
      return __async(this, null, function* () {
        let existingFetcher = state.fetchers.get(key), loadingFetcher = getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : void 0);
        state.fetchers.set(key, loadingFetcher), updateState({
          fetchers: new Map(state.fetchers)
        });
        let abortController = new AbortController(), fetchRequest = createClientSideRequest(init.history, path, abortController.signal);
        fetchControllers.set(key, abortController);
        let originatingLoadId = incrementingLoadId, result = yield callLoaderOrAction("loader", fetchRequest, match, matches, manifest, mapRouteProperties2, basename);
        if (isDeferredResult(result) && (result = (yield resolveDeferredData(result, fetchRequest.signal, !0)) || result), fetchControllers.get(key) === abortController && fetchControllers.delete(key), fetchRequest.signal.aborted)
          return;
        if (isRedirectResult(result))
          if (pendingNavigationLoadId > originatingLoadId) {
            let doneFetcher2 = getDoneFetcher(void 0);
            state.fetchers.set(key, doneFetcher2), updateState({
              fetchers: new Map(state.fetchers)
            });
            return;
          } else {
            fetchRedirectIds.add(key), yield startRedirectNavigation(state, result);
            return;
          }
        if (isErrorResult(result)) {
          let boundaryMatch = findNearestBoundary(state.matches, routeId);
          state.fetchers.delete(key), updateState({
            fetchers: new Map(state.fetchers),
            errors: {
              [boundaryMatch.route.id]: result.error
            }
          });
          return;
        }
        invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");
        let doneFetcher = getDoneFetcher(result.data);
        state.fetchers.set(key, doneFetcher), updateState({
          fetchers: new Map(state.fetchers)
        });
      });
    }
    function startRedirectNavigation(state2, redirect2, _temp) {
      return __async(this, null, function* () {
        let {
          submission,
          fetcherSubmission,
          replace
        } = _temp === void 0 ? {} : _temp;
        redirect2.revalidate && (isRevalidationRequired = !0);
        let redirectLocation = createLocation(state2.location, redirect2.location, {
          _isRedirect: !0
        });
        if (invariant(redirectLocation, "Expected a location on the redirect navigation"), isBrowser2) {
          let isDocumentReload = !1;
          if (redirect2.reloadDocument)
            isDocumentReload = !0;
          else if (ABSOLUTE_URL_REGEX.test(redirect2.location)) {
            let url = init.history.createURL(redirect2.location);
            isDocumentReload = // Hard reload if it's an absolute URL to a new origin
            url.origin !== routerWindow.location.origin || // Hard reload if it's an absolute URL that does not match our basename
            stripBasename(url.pathname, basename) == null;
          }
          if (isDocumentReload) {
            replace ? routerWindow.location.replace(redirect2.location) : routerWindow.location.assign(redirect2.location);
            return;
          }
        }
        pendingNavigationController = null;
        let redirectHistoryAction = replace === !0 ? Action.Replace : Action.Push, {
          formMethod,
          formAction,
          formEncType
        } = state2.navigation;
        !submission && !fetcherSubmission && formMethod && formAction && formEncType && (submission = getSubmissionFromNavigation(state2.navigation));
        let activeSubmission = submission || fetcherSubmission;
        if (redirectPreserveMethodStatusCodes.has(redirect2.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod))
          yield startNavigation(redirectHistoryAction, redirectLocation, {
            submission: _extends({}, activeSubmission, {
              formAction: redirect2.location
            }),
            // Preserve this flag across redirects
            preventScrollReset: pendingPreventScrollReset
          });
        else {
          let overrideNavigation = getLoadingNavigation(redirectLocation, submission);
          yield startNavigation(redirectHistoryAction, redirectLocation, {
            overrideNavigation,
            // Send fetcher submissions through for shouldRevalidate
            fetcherSubmission,
            // Preserve this flag across redirects
            preventScrollReset: pendingPreventScrollReset
          });
        }
      });
    }
    function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {
      return __async(this, null, function* () {
        let results = yield Promise.all([...matchesToLoad.map((match) => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties2, basename)), ...fetchersToLoad.map((f) => f.matches && f.match && f.controller ? callLoaderOrAction("loader", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties2, basename) : {
          type: ResultType.error,
          error: getInternalRouterError(404, {
            pathname: f.path
          })
        })]), loaderResults = results.slice(0, matchesToLoad.length), fetcherResults = results.slice(matchesToLoad.length);
        return yield Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), !1, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map((f) => f.match), fetcherResults, fetchersToLoad.map((f) => f.controller ? f.controller.signal : null), !0)]), {
          results,
          loaderResults,
          fetcherResults
        };
      });
    }
    function interruptActiveLoads() {
      isRevalidationRequired = !0, cancelledDeferredRoutes.push(...cancelActiveDeferreds()), fetchLoadMatches.forEach((_, key) => {
        fetchControllers.has(key) && (cancelledFetcherLoads.push(key), abortFetcher(key));
      });
    }
    function setFetcherError(key, routeId, error) {
      let boundaryMatch = findNearestBoundary(state.matches, routeId);
      deleteFetcher(key), updateState({
        errors: {
          [boundaryMatch.route.id]: error
        },
        fetchers: new Map(state.fetchers)
      });
    }
    function deleteFetcher(key) {
      let fetcher = state.fetchers.get(key);
      fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key)) && abortFetcher(key), fetchLoadMatches.delete(key), fetchReloadIds.delete(key), fetchRedirectIds.delete(key), state.fetchers.delete(key);
    }
    function abortFetcher(key) {
      let controller = fetchControllers.get(key);
      invariant(controller, "Expected fetch controller: " + key), controller.abort(), fetchControllers.delete(key);
    }
    function markFetchersDone(keys) {
      for (let key of keys) {
        let fetcher = getFetcher(key), doneFetcher = getDoneFetcher(fetcher.data);
        state.fetchers.set(key, doneFetcher);
      }
    }
    function markFetchRedirectsDone() {
      let doneKeys = [], updatedFetchers = !1;
      for (let key of fetchRedirectIds) {
        let fetcher = state.fetchers.get(key);
        invariant(fetcher, "Expected fetcher: " + key), fetcher.state === "loading" && (fetchRedirectIds.delete(key), doneKeys.push(key), updatedFetchers = !0);
      }
      return markFetchersDone(doneKeys), updatedFetchers;
    }
    function abortStaleFetchLoads(landedId) {
      let yeetedKeys = [];
      for (let [key, id] of fetchReloadIds)
        if (id < landedId) {
          let fetcher = state.fetchers.get(key);
          invariant(fetcher, "Expected fetcher: " + key), fetcher.state === "loading" && (abortFetcher(key), fetchReloadIds.delete(key), yeetedKeys.push(key));
        }
      return markFetchersDone(yeetedKeys), yeetedKeys.length > 0;
    }
    function getBlocker(key, fn) {
      let blocker = state.blockers.get(key) || IDLE_BLOCKER;
      return blockerFunctions.get(key) !== fn && blockerFunctions.set(key, fn), blocker;
    }
    function deleteBlocker(key) {
      state.blockers.delete(key), blockerFunctions.delete(key);
    }
    function updateBlocker(key, newBlocker) {
      let blocker = state.blockers.get(key) || IDLE_BLOCKER;
      invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state);
      let blockers = new Map(state.blockers);
      blockers.set(key, newBlocker), updateState({
        blockers
      });
    }
    function shouldBlockNavigation(_ref2) {
      let {
        currentLocation,
        nextLocation,
        historyAction
      } = _ref2;
      if (blockerFunctions.size === 0)
        return;
      blockerFunctions.size > 1 && warning(!1, "A router only supports one blocker at a time");
      let entries = Array.from(blockerFunctions.entries()), [blockerKey, blockerFunction] = entries[entries.length - 1], blocker = state.blockers.get(blockerKey);
      if (!(blocker && blocker.state === "proceeding") && blockerFunction({
        currentLocation,
        nextLocation,
        historyAction
      }))
        return blockerKey;
    }
    function cancelActiveDeferreds(predicate) {
      let cancelledRouteIds = [];
      return activeDeferreds.forEach((dfd, routeId) => {
        (!predicate || predicate(routeId)) && (dfd.cancel(), cancelledRouteIds.push(routeId), activeDeferreds.delete(routeId));
      }), cancelledRouteIds;
    }
    function enableScrollRestoration(positions, getPosition, getKey) {
      if (savedScrollPositions = positions, getScrollPosition = getPosition, getScrollRestorationKey = getKey || null, !initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
        initialScrollRestored = !0;
        let y = getSavedScrollPosition(state.location, state.matches);
        y != null && updateState({
          restoreScrollPosition: y
        });
      }
      return () => {
        savedScrollPositions = null, getScrollPosition = null, getScrollRestorationKey = null;
      };
    }
    function getScrollKey(location, matches) {
      return getScrollRestorationKey && getScrollRestorationKey(location, matches.map((m) => convertRouteMatchToUiMatch(m, state.loaderData))) || location.key;
    }
    function saveScrollPosition(location, matches) {
      if (savedScrollPositions && getScrollPosition) {
        let key = getScrollKey(location, matches);
        savedScrollPositions[key] = getScrollPosition();
      }
    }
    function getSavedScrollPosition(location, matches) {
      if (savedScrollPositions) {
        let key = getScrollKey(location, matches), y = savedScrollPositions[key];
        if (typeof y == "number")
          return y;
      }
      return null;
    }
    function _internalSetRoutes(newRoutes) {
      manifest = {}, inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties2, void 0, manifest);
    }
    return router = {
      get basename() {
        return basename;
      },
      get state() {
        return state;
      },
      get routes() {
        return dataRoutes;
      },
      get window() {
        return routerWindow;
      },
      initialize,
      subscribe: subscribe2,
      enableScrollRestoration,
      navigate,
      fetch: fetch2,
      revalidate,
      // Passthrough to history-aware createHref used by useHref so we get proper
      // hash-aware URLs in DOM paths
      createHref: (to) => init.history.createHref(to),
      encodeLocation: (to) => init.history.encodeLocation(to),
      getFetcher,
      deleteFetcher,
      dispose,
      getBlocker,
      deleteBlocker,
      _internalFetchControllers: fetchControllers,
      _internalActiveDeferreds: activeDeferreds,
      // TODO: Remove setRoutes, it's temporary to avoid dealing with
      // updating the tree while validating the update algorithm.
      _internalSetRoutes
    }, router;
  }
  var UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
  function isSubmissionNavigation(opts) {
    return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== void 0);
  }
  function normalizeTo(location, matches, basename, prependBasename, to, fromRouteId, relative) {
    let contextualMatches, activeRouteMatch;
    if (fromRouteId != null && relative !== "path") {
      contextualMatches = [];
      for (let match of matches)
        if (contextualMatches.push(match), match.route.id === fromRouteId) {
          activeRouteMatch = match;
          break;
        }
    } else
      contextualMatches = matches, activeRouteMatch = matches[matches.length - 1];
    let path = resolveTo(to || ".", getPathContributingMatches(contextualMatches).map((m) => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
    return to == null && (path.search = location.search, path.hash = location.hash), (to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search) && (path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index"), prependBasename && basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), createPath(path);
  }
  function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
    if (!opts || !isSubmissionNavigation(opts))
      return {
        path
      };
    if (opts.formMethod && !isValidMethod(opts.formMethod))
      return {
        path,
        error: getInternalRouterError(405, {
          method: opts.formMethod
        })
      };
    let getInvalidBodyError = () => ({
      path,
      error: getInternalRouterError(400, {
        type: "invalid-body"
      })
    }), rawFormMethod = opts.formMethod || "get", formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase(), formAction = stripHashFromPath(path);
    if (opts.body !== void 0) {
      if (opts.formEncType === "text/plain") {
        if (!isMutationMethod(formMethod))
          return getInvalidBodyError();
        let text = typeof opts.body == "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ? (
          // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
          Array.from(opts.body.entries()).reduce((acc, _ref3) => {
            let [name, value] = _ref3;
            return "" + acc + name + "=" + value + `
`;
          }, "")
        ) : String(opts.body);
        return {
          path,
          submission: {
            formMethod,
            formAction,
            formEncType: opts.formEncType,
            formData: void 0,
            json: void 0,
            text
          }
        };
      } else if (opts.formEncType === "application/json") {
        if (!isMutationMethod(formMethod))
          return getInvalidBodyError();
        try {
          let json2 = typeof opts.body == "string" ? JSON.parse(opts.body) : opts.body;
          return {
            path,
            submission: {
              formMethod,
              formAction,
              formEncType: opts.formEncType,
              formData: void 0,
              json: json2,
              text: void 0
            }
          };
        } catch (e) {
          return getInvalidBodyError();
        }
      }
    }
    invariant(typeof FormData == "function", "FormData is not available in this environment");
    let searchParams, formData;
    if (opts.formData)
      searchParams = convertFormDataToSearchParams(opts.formData), formData = opts.formData;
    else if (opts.body instanceof FormData)
      searchParams = convertFormDataToSearchParams(opts.body), formData = opts.body;
    else if (opts.body instanceof URLSearchParams)
      searchParams = opts.body, formData = convertSearchParamsToFormData(searchParams);
    else if (opts.body == null)
      searchParams = new URLSearchParams(), formData = new FormData();
    else
      try {
        searchParams = new URLSearchParams(opts.body), formData = convertSearchParamsToFormData(searchParams);
      } catch (e) {
        return getInvalidBodyError();
      }
    let submission = {
      formMethod,
      formAction,
      formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
      formData,
      json: void 0,
      text: void 0
    };
    if (isMutationMethod(submission.formMethod))
      return {
        path,
        submission
      };
    let parsedPath = parsePath(path);
    return isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search) && searchParams.append("index", ""), parsedPath.search = "?" + searchParams, {
      path: createPath(parsedPath),
      submission
    };
  }
  function getLoaderMatchesUntilBoundary(matches, boundaryId) {
    let boundaryMatches = matches;
    if (boundaryId) {
      let index = matches.findIndex((m) => m.route.id === boundaryId);
      index >= 0 && (boundaryMatches = matches.slice(0, index));
    }
    return boundaryMatches;
  }
  function getMatchesToLoad(history, state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {
    let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : void 0, currentUrl = history.createURL(state.location), nextUrl = history.createURL(location), boundaryId = pendingError ? Object.keys(pendingError)[0] : void 0, navigationMatches = getLoaderMatchesUntilBoundary(matches, boundaryId).filter((match, index) => {
      if (match.route.lazy)
        return !0;
      if (match.route.loader == null)
        return !1;
      if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some((id) => id === match.route.id))
        return !0;
      let currentRouteMatch = state.matches[index], nextRouteMatch = match;
      return shouldRevalidateLoader(match, _extends({
        currentUrl,
        currentParams: currentRouteMatch.params,
        nextUrl,
        nextParams: nextRouteMatch.params
      }, submission, {
        actionResult,
        defaultShouldRevalidate: (
          // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
          isRevalidationRequired || // Clicked the same link, resubmitted a GET form
          currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || // Search params affect all loaders
          currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
        )
      }));
    }), revalidatingFetchers = [];
    return fetchLoadMatches.forEach((f, key) => {
      if (!matches.some((m) => m.route.id === f.routeId))
        return;
      let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
      if (!fetcherMatches) {
        revalidatingFetchers.push({
          key,
          routeId: f.routeId,
          path: f.path,
          matches: null,
          match: null,
          controller: null
        });
        return;
      }
      let fetcher = state.fetchers.get(key), fetcherMatch = getTargetMatch(fetcherMatches, f.path), shouldRevalidate = !1;
      fetchRedirectIds.has(key) ? shouldRevalidate = !1 : cancelledFetcherLoads.includes(key) ? shouldRevalidate = !0 : fetcher && fetcher.state !== "idle" && fetcher.data === void 0 ? shouldRevalidate = isRevalidationRequired : shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({
        currentUrl,
        currentParams: state.matches[state.matches.length - 1].params,
        nextUrl,
        nextParams: matches[matches.length - 1].params
      }, submission, {
        actionResult,
        defaultShouldRevalidate: isRevalidationRequired
      })), shouldRevalidate && revalidatingFetchers.push({
        key,
        routeId: f.routeId,
        path: f.path,
        matches: fetcherMatches,
        match: fetcherMatch,
        controller: new AbortController()
      });
    }), [navigationMatches, revalidatingFetchers];
  }
  function isNewLoader(currentLoaderData, currentMatch, match) {
    let isNew = (
      // [a] -> [a, b]
      !currentMatch || // [a, b] -> [a, c]
      match.route.id !== currentMatch.route.id
    ), isMissingData = currentLoaderData[match.route.id] === void 0;
    return isNew || isMissingData;
  }
  function isNewRouteInstance(currentMatch, match) {
    let currentPath = currentMatch.route.path;
    return (
      // param change for this match, /users/123 -> /users/456
      currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path
      // e.g. /files/images/avatar.jpg -> files/finances.xls
      currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
    );
  }
  function shouldRevalidateLoader(loaderMatch, arg) {
    if (loaderMatch.route.shouldRevalidate) {
      let routeChoice = loaderMatch.route.shouldRevalidate(arg);
      if (typeof routeChoice == "boolean")
        return routeChoice;
    }
    return arg.defaultShouldRevalidate;
  }
  function loadLazyRouteModule(route, mapRouteProperties2, manifest) {
    return __async(this, null, function* () {
      if (!route.lazy)
        return;
      let lazyRoute = yield route.lazy();
      if (!route.lazy)
        return;
      let routeToUpdate = manifest[route.id];
      invariant(routeToUpdate, "No route found in manifest");
      let routeUpdates = {};
      for (let lazyRouteProperty in lazyRoute) {
        let isPropertyStaticallyDefined = routeToUpdate[lazyRouteProperty] !== void 0 && // This property isn't static since it should always be updated based
        // on the route updates
        lazyRouteProperty !== "hasErrorBoundary";
        warning(!isPropertyStaticallyDefined, 'Route "' + routeToUpdate.id + '" has a static property "' + lazyRouteProperty + '" defined but its lazy function is also returning a value for this property. ' + ('The lazy route property "' + lazyRouteProperty + '" will be ignored.')), !isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty) && (routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty]);
      }
      Object.assign(routeToUpdate, routeUpdates), Object.assign(routeToUpdate, _extends({}, mapRouteProperties2(routeToUpdate), {
        lazy: void 0
      }));
    });
  }
  function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties2, basename, opts) {
    return __async(this, null, function* () {
      opts === void 0 && (opts = {});
      let resultType, result, onReject, runHandler = (handler) => {
        let reject, abortPromise = new Promise((_, r) => reject = r);
        return onReject = () => reject(), request.signal.addEventListener("abort", onReject), Promise.race([handler({
          request,
          params: match.params,
          context: opts.requestContext
        }), abortPromise]);
      };
      try {
        let handler = match.route[type];
        if (match.route.lazy)
          if (handler) {
            let handlerError, values = yield Promise.all([
              // If the handler throws, don't let it immediately bubble out,
              // since we need to let the lazy() execution finish so we know if this
              // route has a boundary that can handle the error
              runHandler(handler).catch((e) => {
                handlerError = e;
              }),
              loadLazyRouteModule(match.route, mapRouteProperties2, manifest)
            ]);
            if (handlerError)
              throw handlerError;
            result = values[0];
          } else if (yield loadLazyRouteModule(match.route, mapRouteProperties2, manifest), handler = match.route[type], handler)
            result = yield runHandler(handler);
          else if (type === "action") {
            let url = new URL(request.url), pathname = url.pathname + url.search;
            throw getInternalRouterError(405, {
              method: request.method,
              pathname,
              routeId: match.route.id
            });
          } else
            return {
              type: ResultType.data,
              data: void 0
            };
        else if (handler)
          result = yield runHandler(handler);
        else {
          let url = new URL(request.url), pathname = url.pathname + url.search;
          throw getInternalRouterError(404, {
            pathname
          });
        }
        invariant(result !== void 0, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ('"' + match.route.id + "\" but didn't return anything from your `" + type + "` ") + "function. Please return a value or `null`.");
      } catch (e) {
        resultType = ResultType.error, result = e;
      } finally {
        onReject && request.signal.removeEventListener("abort", onReject);
      }
      if (isResponse(result)) {
        let status = result.status;
        if (redirectStatusCodes.has(status)) {
          let location = result.headers.get("Location");
          if (invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header"), !ABSOLUTE_URL_REGEX.test(location))
            location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, !0, location);
          else if (!opts.isStaticRequest) {
            let currentUrl = new URL(request.url), url = location.startsWith("//") ? new URL(currentUrl.protocol + location) : new URL(location), isSameBasename = stripBasename(url.pathname, basename) != null;
            url.origin === currentUrl.origin && isSameBasename && (location = url.pathname + url.search + url.hash);
          }
          if (opts.isStaticRequest)
            throw result.headers.set("Location", location), result;
          return {
            type: ResultType.redirect,
            status,
            location,
            revalidate: result.headers.get("X-Remix-Revalidate") !== null,
            reloadDocument: result.headers.get("X-Remix-Reload-Document") !== null
          };
        }
        if (opts.isRouteRequest)
          throw {
            type: resultType === ResultType.error ? ResultType.error : ResultType.data,
            response: result
          };
        let data, contentType = result.headers.get("Content-Type");
        return contentType && /\bapplication\/json\b/.test(contentType) ? data = yield result.json() : data = yield result.text(), resultType === ResultType.error ? {
          type: resultType,
          error: new ErrorResponseImpl(status, result.statusText, data),
          headers: result.headers
        } : {
          type: ResultType.data,
          data,
          statusCode: result.status,
          headers: result.headers
        };
      }
      if (resultType === ResultType.error)
        return {
          type: resultType,
          error: result
        };
      if (isDeferredData(result)) {
        var _result$init, _result$init2;
        return {
          type: ResultType.deferred,
          deferredData: result,
          statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,
          headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)
        };
      }
      return {
        type: ResultType.data,
        data: result
      };
    });
  }
  function createClientSideRequest(history, location, signal, submission) {
    let url = history.createURL(stripHashFromPath(location)).toString(), init = {
      signal
    };
    if (submission && isMutationMethod(submission.formMethod)) {
      let {
        formMethod,
        formEncType
      } = submission;
      init.method = formMethod.toUpperCase(), formEncType === "application/json" ? (init.headers = new Headers({
        "Content-Type": formEncType
      }), init.body = JSON.stringify(submission.json)) : formEncType === "text/plain" ? init.body = submission.text : formEncType === "application/x-www-form-urlencoded" && submission.formData ? init.body = convertFormDataToSearchParams(submission.formData) : init.body = submission.formData;
    }
    return new Request(url, init);
  }
  function convertFormDataToSearchParams(formData) {
    let searchParams = new URLSearchParams();
    for (let [key, value] of formData.entries())
      searchParams.append(key, typeof value == "string" ? value : value.name);
    return searchParams;
  }
  function convertSearchParamsToFormData(searchParams) {
    let formData = new FormData();
    for (let [key, value] of searchParams.entries())
      formData.append(key, value);
    return formData;
  }
  function processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {
    let loaderData = {}, errors = null, statusCode, foundError = !1, loaderHeaders = {};
    return results.forEach((result, index) => {
      let id = matchesToLoad[index].route.id;
      if (invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData"), isErrorResult(result)) {
        let boundaryMatch = findNearestBoundary(matches, id), error = result.error;
        pendingError && (error = Object.values(pendingError)[0], pendingError = void 0), errors = errors || {}, errors[boundaryMatch.route.id] == null && (errors[boundaryMatch.route.id] = error), loaderData[id] = void 0, foundError || (foundError = !0, statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500), result.headers && (loaderHeaders[id] = result.headers);
      } else
        isDeferredResult(result) ? (activeDeferreds.set(id, result.deferredData), loaderData[id] = result.deferredData.data) : loaderData[id] = result.data, result.statusCode != null && result.statusCode !== 200 && !foundError && (statusCode = result.statusCode), result.headers && (loaderHeaders[id] = result.headers);
    }), pendingError && (errors = pendingError, loaderData[Object.keys(pendingError)[0]] = void 0), {
      loaderData,
      errors,
      statusCode: statusCode || 200,
      loaderHeaders
    };
  }
  function processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {
    let {
      loaderData,
      errors
    } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);
    for (let index = 0; index < revalidatingFetchers.length; index++) {
      let {
        key,
        match,
        controller
      } = revalidatingFetchers[index];
      invariant(fetcherResults !== void 0 && fetcherResults[index] !== void 0, "Did not find corresponding fetcher result");
      let result = fetcherResults[index];
      if (!(controller && controller.signal.aborted))
        if (isErrorResult(result)) {
          let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
          errors && errors[boundaryMatch.route.id] || (errors = _extends({}, errors, {
            [boundaryMatch.route.id]: result.error
          })), state.fetchers.delete(key);
        } else if (isRedirectResult(result))
          invariant(!1, "Unhandled fetcher revalidation redirect");
        else if (isDeferredResult(result))
          invariant(!1, "Unhandled fetcher deferred data");
        else {
          let doneFetcher = getDoneFetcher(result.data);
          state.fetchers.set(key, doneFetcher);
        }
    }
    return {
      loaderData,
      errors
    };
  }
  function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
    let mergedLoaderData = _extends({}, newLoaderData);
    for (let match of matches) {
      let id = match.route.id;
      if (newLoaderData.hasOwnProperty(id) ? newLoaderData[id] !== void 0 && (mergedLoaderData[id] = newLoaderData[id]) : loaderData[id] !== void 0 && match.route.loader && (mergedLoaderData[id] = loaderData[id]), errors && errors.hasOwnProperty(id))
        break;
    }
    return mergedLoaderData;
  }
  function findNearestBoundary(matches, routeId) {
    return (routeId ? matches.slice(0, matches.findIndex((m) => m.route.id === routeId) + 1) : [...matches]).reverse().find((m) => m.route.hasErrorBoundary === !0) || matches[0];
  }
  function getShortCircuitMatches(routes) {
    let route = routes.length === 1 ? routes[0] : routes.find((r) => r.index || !r.path || r.path === "/") || {
      id: "__shim-error-route__"
    };
    return {
      matches: [{
        params: {},
        pathname: "",
        pathnameBase: "",
        route
      }],
      route
    };
  }
  function getInternalRouterError(status, _temp4) {
    let {
      pathname,
      routeId,
      method,
      type
    } = _temp4 === void 0 ? {} : _temp4, statusText = "Unknown Server Error", errorMessage = "Unknown @remix-run/router error";
    return status === 400 ? (statusText = "Bad Request", method && pathname && routeId ? errorMessage = "You made a " + method + ' request to "' + pathname + '" but ' + ('did not provide a `loader` for route "' + routeId + '", ') + "so there is no way to handle the request." : type === "defer-action" ? errorMessage = "defer() is not supported in actions" : type === "invalid-body" && (errorMessage = "Unable to encode submission body")) : status === 403 ? (statusText = "Forbidden", errorMessage = 'Route "' + routeId + '" does not match URL "' + pathname + '"') : status === 404 ? (statusText = "Not Found", errorMessage = 'No route matches URL "' + pathname + '"') : status === 405 && (statusText = "Method Not Allowed", method && pathname && routeId ? errorMessage = "You made a " + method.toUpperCase() + ' request to "' + pathname + '" but ' + ('did not provide an `action` for route "' + routeId + '", ') + "so there is no way to handle the request." : method && (errorMessage = 'Invalid request method "' + method.toUpperCase() + '"')), new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), !0);
  }
  function findRedirect(results) {
    for (let i = results.length - 1; i >= 0; i--) {
      let result = results[i];
      if (isRedirectResult(result))
        return {
          result,
          idx: i
        };
    }
  }
  function stripHashFromPath(path) {
    let parsedPath = typeof path == "string" ? parsePath(path) : path;
    return createPath(_extends({}, parsedPath, {
      hash: ""
    }));
  }
  function isHashChangeOnly(a, b) {
    return a.pathname !== b.pathname || a.search !== b.search ? !1 : a.hash === "" ? b.hash !== "" : a.hash === b.hash ? !0 : b.hash !== "";
  }
  function isDeferredResult(result) {
    return result.type === ResultType.deferred;
  }
  function isErrorResult(result) {
    return result.type === ResultType.error;
  }
  function isRedirectResult(result) {
    return (result && result.type) === ResultType.redirect;
  }
  function isDeferredData(value) {
    let deferred = value;
    return deferred && typeof deferred == "object" && typeof deferred.data == "object" && typeof deferred.subscribe == "function" && typeof deferred.cancel == "function" && typeof deferred.resolveData == "function";
  }
  function isResponse(value) {
    return value != null && typeof value.status == "number" && typeof value.statusText == "string" && typeof value.headers == "object" && typeof value.body != "undefined";
  }
  function isValidMethod(method) {
    return validRequestMethods.has(method.toLowerCase());
  }
  function isMutationMethod(method) {
    return validMutationMethods.has(method.toLowerCase());
  }
  function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {
    return __async(this, null, function* () {
      for (let index = 0; index < results.length; index++) {
        let result = results[index], match = matchesToLoad[index];
        if (!match)
          continue;
        let currentMatch = currentMatches.find((m) => m.route.id === match.route.id), isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== void 0;
        if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {
          let signal = signals[index];
          invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result"), yield resolveDeferredData(result, signal, isFetcher).then((result2) => {
            result2 && (results[index] = result2 || results[index]);
          });
        }
      }
    });
  }
  function resolveDeferredData(result, signal, unwrap) {
    return __async(this, null, function* () {
      if (unwrap === void 0 && (unwrap = !1), !(yield result.deferredData.resolveData(signal))) {
        if (unwrap)
          try {
            return {
              type: ResultType.data,
              data: result.deferredData.unwrappedData
            };
          } catch (e) {
            return {
              type: ResultType.error,
              error: e
            };
          }
        return {
          type: ResultType.data,
          data: result.deferredData.data
        };
      }
    });
  }
  function hasNakedIndexQuery(search) {
    return new URLSearchParams(search).getAll("index").some((v) => v === "");
  }
  function getTargetMatch(matches, location) {
    let search = typeof location == "string" ? parsePath(location).search : location.search;
    if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || ""))
      return matches[matches.length - 1];
    let pathMatches = getPathContributingMatches(matches);
    return pathMatches[pathMatches.length - 1];
  }
  function getSubmissionFromNavigation(navigation) {
    let {
      formMethod,
      formAction,
      formEncType,
      text,
      formData,
      json: json2
    } = navigation;
    if (!(!formMethod || !formAction || !formEncType)) {
      if (text != null)
        return {
          formMethod,
          formAction,
          formEncType,
          formData: void 0,
          json: void 0,
          text
        };
      if (formData != null)
        return {
          formMethod,
          formAction,
          formEncType,
          formData,
          json: void 0,
          text: void 0
        };
      if (json2 !== void 0)
        return {
          formMethod,
          formAction,
          formEncType,
          formData: void 0,
          json: json2,
          text: void 0
        };
    }
  }
  function getLoadingNavigation(location, submission) {
    return submission ? {
      state: "loading",
      location,
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text
    } : {
      state: "loading",
      location,
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0
    };
  }
  function getSubmittingNavigation(location, submission) {
    return {
      state: "submitting",
      location,
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text
    };
  }
  function getLoadingFetcher(submission, data) {
    return submission ? {
      state: "loading",
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text,
      data
    } : {
      state: "loading",
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0,
      data
    };
  }
  function getSubmittingFetcher(submission, existingFetcher) {
    return {
      state: "submitting",
      formMethod: submission.formMethod,
      formAction: submission.formAction,
      formEncType: submission.formEncType,
      formData: submission.formData,
      json: submission.json,
      text: submission.text,
      data: existingFetcher ? existingFetcher.data : void 0
    };
  }
  function getDoneFetcher(data) {
    return {
      state: "idle",
      formMethod: void 0,
      formAction: void 0,
      formEncType: void 0,
      formData: void 0,
      json: void 0,
      text: void 0,
      data
    };
  }
  function restoreAppliedTransitions(_window, transitions) {
    try {
      let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);
      if (sessionPositions) {
        let json2 = JSON.parse(sessionPositions);
        for (let [k, v] of Object.entries(json2 || {}))
          v && Array.isArray(v) && transitions.set(k, new Set(v || []));
      }
    } catch (e) {
    }
  }
  function persistAppliedTransitions(_window, transitions) {
    if (transitions.size > 0) {
      let json2 = {};
      for (let [k, v] of transitions)
        json2[k] = [...v];
      try {
        _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json2));
      } catch (error) {
        warning(!1, "Failed to save applied view transitions in sessionStorage (" + error + ").");
      }
    }
  }

  // node_modules/react-router/dist/index.js
  function _extends2() {
    return _extends2 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        for (var key in source)
          Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
      }
      return target;
    }, _extends2.apply(this, arguments);
  }
  var DataRouterContext = /* @__PURE__ */ React.createContext(null), DataRouterStateContext = /* @__PURE__ */ React.createContext(null);
  var NavigationContext = /* @__PURE__ */ React.createContext(null), LocationContext = /* @__PURE__ */ React.createContext(null), RouteContext = /* @__PURE__ */ React.createContext({
    outlet: null,
    matches: [],
    isDataRoute: !1
  }), RouteErrorContext = /* @__PURE__ */ React.createContext(null);
  function useHref(to, _temp) {
    let {
      relative
    } = _temp === void 0 ? {} : _temp;
    useInRouterContext() || invariant(!1);
    let {
      basename,
      navigator: navigator2
    } = React.useContext(NavigationContext), {
      hash,
      pathname,
      search
    } = useResolvedPath(to, {
      relative
    }), joinedPathname = pathname;
    return basename !== "/" && (joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname])), navigator2.createHref({
      pathname: joinedPathname,
      search,
      hash
    });
  }
  function useInRouterContext() {
    return React.useContext(LocationContext) != null;
  }
  function useLocation() {
    return useInRouterContext() || invariant(!1), React.useContext(LocationContext).location;
  }
  function useMatch(pattern) {
    useInRouterContext() || invariant(!1);
    let {
      pathname
    } = useLocation();
    return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]);
  }
  function useIsomorphicLayoutEffect(cb) {
    React.useContext(NavigationContext).static || React.useLayoutEffect(cb);
  }
  function useNavigate() {
    let {
      isDataRoute
    } = React.useContext(RouteContext);
    return isDataRoute ? useNavigateStable() : useNavigateUnstable();
  }
  function useNavigateUnstable() {
    useInRouterContext() || invariant(!1);
    let dataRouterContext = React.useContext(DataRouterContext), {
      basename,
      navigator: navigator2
    } = React.useContext(NavigationContext), {
      matches
    } = React.useContext(RouteContext), {
      pathname: locationPathname
    } = useLocation(), routePathnamesJson = JSON.stringify(getPathContributingMatches(matches).map((match) => match.pathnameBase)), activeRef = React.useRef(!1);
    return useIsomorphicLayoutEffect(() => {
      activeRef.current = !0;
    }), React.useCallback(function(to, options) {
      if (options === void 0 && (options = {}), !activeRef.current)
        return;
      if (typeof to == "number") {
        navigator2.go(to);
        return;
      }
      let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
      dataRouterContext == null && basename !== "/" && (path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname])), (options.replace ? navigator2.replace : navigator2.push)(path, options.state, options);
    }, [basename, navigator2, routePathnamesJson, locationPathname, dataRouterContext]);
  }
  function useResolvedPath(to, _temp2) {
    let {
      relative
    } = _temp2 === void 0 ? {} : _temp2, {
      matches
    } = React.useContext(RouteContext), {
      pathname: locationPathname
    } = useLocation(), routePathnamesJson = JSON.stringify(getPathContributingMatches(matches).map((match) => match.pathnameBase));
    return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
  }
  function useRoutesImpl(routes, locationArg, dataRouterState) {
    useInRouterContext() || invariant(!1);
    let {
      navigator: navigator2
    } = React.useContext(NavigationContext), {
      matches: parentMatches
    } = React.useContext(RouteContext), routeMatch = parentMatches[parentMatches.length - 1], parentParams = routeMatch ? routeMatch.params : {}, parentPathname = routeMatch ? routeMatch.pathname : "/", parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/", parentRoute = routeMatch && routeMatch.route, locationFromContext = useLocation(), location;
    if (locationArg) {
      var _parsedLocationArg$pa;
      let parsedLocationArg = typeof locationArg == "string" ? parsePath(locationArg) : locationArg;
      parentPathnameBase === "/" || (_parsedLocationArg$pa = parsedLocationArg.pathname) != null && _parsedLocationArg$pa.startsWith(parentPathnameBase) || invariant(!1), location = parsedLocationArg;
    } else
      location = locationFromContext;
    let pathname = location.pathname || "/", remainingPathname = parentPathnameBase === "/" ? pathname : pathname.slice(parentPathnameBase.length) || "/", matches = matchRoutes(routes, {
      pathname: remainingPathname
    }), renderedMatches = _renderMatches(matches && matches.map((match) => Object.assign({}, match, {
      params: Object.assign({}, parentParams, match.params),
      pathname: joinPaths([
        parentPathnameBase,
        // Re-encode pathnames that were decoded inside matchRoutes
        navigator2.encodeLocation ? navigator2.encodeLocation(match.pathname).pathname : match.pathname
      ]),
      pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
        parentPathnameBase,
        // Re-encode pathnames that were decoded inside matchRoutes
        navigator2.encodeLocation ? navigator2.encodeLocation(match.pathnameBase).pathname : match.pathnameBase
      ])
    })), parentMatches, dataRouterState);
    return locationArg && renderedMatches ? /* @__PURE__ */ React.createElement(LocationContext.Provider, {
      value: {
        location: _extends2({
          pathname: "/",
          search: "",
          hash: "",
          state: null,
          key: "default"
        }, location),
        navigationType: Action.Pop
      }
    }, renderedMatches) : renderedMatches;
  }
  function DefaultErrorComponent() {
    let error = useRouteError(), message = isRouteErrorResponse(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error), stack = error instanceof Error ? error.stack : null, lightgrey = "rgba(200,200,200, 0.5)", preStyles = {
      padding: "0.5rem",
      backgroundColor: lightgrey
    }, codeStyles = {
      padding: "2px 4px",
      backgroundColor: lightgrey
    };
    return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React.createElement("h3", {
      style: {
        fontStyle: "italic"
      }
    }, message), stack ? /* @__PURE__ */ React.createElement("pre", {
      style: preStyles
    }, stack) : null, null);
  }
  var defaultErrorElement = /* @__PURE__ */ React.createElement(DefaultErrorComponent, null), RenderErrorBoundary = class extends React.Component {
    constructor(props) {
      super(props), this.state = {
        location: props.location,
        revalidation: props.revalidation,
        error: props.error
      };
    }
    static getDerivedStateFromError(error) {
      return {
        error
      };
    }
    static getDerivedStateFromProps(props, state) {
      return state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle" ? {
        error: props.error,
        location: props.location,
        revalidation: props.revalidation
      } : {
        error: props.error || state.error,
        location: state.location,
        revalidation: props.revalidation || state.revalidation
      };
    }
    componentDidCatch(error, errorInfo) {
      console.error("React Router caught the following error during render", error, errorInfo);
    }
    render() {
      return this.state.error ? /* @__PURE__ */ React.createElement(RouteContext.Provider, {
        value: this.props.routeContext
      }, /* @__PURE__ */ React.createElement(RouteErrorContext.Provider, {
        value: this.state.error,
        children: this.props.component
      })) : this.props.children;
    }
  };
  function RenderedRoute(_ref) {
    let {
      routeContext,
      match,
      children
    } = _ref, dataRouterContext = React.useContext(DataRouterContext);
    return dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary) && (dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id), /* @__PURE__ */ React.createElement(RouteContext.Provider, {
      value: routeContext
    }, children);
  }
  function _renderMatches(matches, parentMatches, dataRouterState) {
    var _dataRouterState2;
    if (parentMatches === void 0 && (parentMatches = []), dataRouterState === void 0 && (dataRouterState = null), matches == null) {
      var _dataRouterState;
      if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors)
        matches = dataRouterState.matches;
      else
        return null;
    }
    let renderedMatches = matches, errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors;
    if (errors != null) {
      let errorIndex = renderedMatches.findIndex((m) => m.route.id && (errors == null ? void 0 : errors[m.route.id]));
      errorIndex >= 0 || invariant(!1), renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));
    }
    return renderedMatches.reduceRight((outlet, match, index) => {
      let error = match.route.id ? errors == null ? void 0 : errors[match.route.id] : null, errorElement = null;
      dataRouterState && (errorElement = match.route.errorElement || defaultErrorElement);
      let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1)), getChildren = () => {
        let children;
        return error ? children = errorElement : match.route.Component ? children = /* @__PURE__ */ React.createElement(match.route.Component, null) : match.route.element ? children = match.route.element : children = outlet, /* @__PURE__ */ React.createElement(RenderedRoute, {
          match,
          routeContext: {
            outlet,
            matches: matches2,
            isDataRoute: dataRouterState != null
          },
          children
        });
      };
      return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React.createElement(RenderErrorBoundary, {
        location: dataRouterState.location,
        revalidation: dataRouterState.revalidation,
        component: errorElement,
        error,
        children: getChildren(),
        routeContext: {
          outlet: null,
          matches: matches2,
          isDataRoute: !0
        }
      }) : getChildren();
    }, null);
  }
  var DataRouterHook = /* @__PURE__ */ function(DataRouterHook3) {
    return DataRouterHook3.UseBlocker = "useBlocker", DataRouterHook3.UseRevalidator = "useRevalidator", DataRouterHook3.UseNavigateStable = "useNavigate", DataRouterHook3;
  }(DataRouterHook || {}), DataRouterStateHook = /* @__PURE__ */ function(DataRouterStateHook3) {
    return DataRouterStateHook3.UseBlocker = "useBlocker", DataRouterStateHook3.UseLoaderData = "useLoaderData", DataRouterStateHook3.UseActionData = "useActionData", DataRouterStateHook3.UseRouteError = "useRouteError", DataRouterStateHook3.UseNavigation = "useNavigation", DataRouterStateHook3.UseRouteLoaderData = "useRouteLoaderData", DataRouterStateHook3.UseMatches = "useMatches", DataRouterStateHook3.UseRevalidator = "useRevalidator", DataRouterStateHook3.UseNavigateStable = "useNavigate", DataRouterStateHook3.UseRouteId = "useRouteId", DataRouterStateHook3;
  }(DataRouterStateHook || {});
  function useDataRouterContext(hookName) {
    let ctx = React.useContext(DataRouterContext);
    return ctx || invariant(!1), ctx;
  }
  function useDataRouterState(hookName) {
    let state = React.useContext(DataRouterStateContext);
    return state || invariant(!1), state;
  }
  function useRouteContext(hookName) {
    let route = React.useContext(RouteContext);
    return route || invariant(!1), route;
  }
  function useCurrentRouteId(hookName) {
    let route = useRouteContext(hookName), thisRoute = route.matches[route.matches.length - 1];
    return thisRoute.route.id || invariant(!1), thisRoute.route.id;
  }
  function useRouteError() {
    var _state$errors;
    let error = React.useContext(RouteErrorContext), state = useDataRouterState(DataRouterStateHook.UseRouteError), routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);
    return error || ((_state$errors = state.errors) == null ? void 0 : _state$errors[routeId]);
  }
  var blockerId = 0;
  function useBlocker(shouldBlock) {
    let {
      router,
      basename
    } = useDataRouterContext(DataRouterHook.UseBlocker), state = useDataRouterState(DataRouterStateHook.UseBlocker), [blockerKey, setBlockerKey] = React.useState(""), blockerFunction = React.useCallback((arg) => {
      if (typeof shouldBlock != "function")
        return !!shouldBlock;
      if (basename === "/")
        return shouldBlock(arg);
      let {
        currentLocation,
        nextLocation,
        historyAction
      } = arg;
      return shouldBlock({
        currentLocation: _extends2({}, currentLocation, {
          pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname
        }),
        nextLocation: _extends2({}, nextLocation, {
          pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname
        }),
        historyAction
      });
    }, [basename, shouldBlock]);
    return React.useEffect(() => {
      let key = String(++blockerId);
      return setBlockerKey(key), () => router.deleteBlocker(key);
    }, [router]), React.useEffect(() => {
      blockerKey !== "" && router.getBlocker(blockerKey, blockerFunction);
    }, [router, blockerKey, blockerFunction]), blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;
  }
  function useNavigateStable() {
    let {
      router
    } = useDataRouterContext(DataRouterHook.UseNavigateStable), id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable), activeRef = React.useRef(!1);
    return useIsomorphicLayoutEffect(() => {
      activeRef.current = !0;
    }), React.useCallback(function(to, options) {
      options === void 0 && (options = {}), activeRef.current && (typeof to == "number" ? router.navigate(to) : router.navigate(to, _extends2({
        fromRouteId: id
      }, options)));
    }, [router, id]);
  }
  var START_TRANSITION = "startTransition", startTransitionImpl = React[START_TRANSITION];
  function Navigate(_ref4) {
    let {
      to,
      replace,
      state,
      relative
    } = _ref4;
    useInRouterContext() || invariant(!1);
    let {
      matches
    } = React.useContext(RouteContext), {
      pathname: locationPathname
    } = useLocation(), navigate = useNavigate(), path = resolveTo(to, getPathContributingMatches(matches).map((match) => match.pathnameBase), locationPathname, relative === "path"), jsonPath = JSON.stringify(path);
    return React.useEffect(() => navigate(JSON.parse(jsonPath), {
      replace,
      state,
      relative
    }), [navigate, jsonPath, relative, replace, state]), null;
  }
  function Router(_ref5) {
    let {
      basename: basenameProp = "/",
      children = null,
      location: locationProp,
      navigationType = Action.Pop,
      navigator: navigator2,
      static: staticProp = !1
    } = _ref5;
    useInRouterContext() && invariant(!1);
    let basename = basenameProp.replace(/^\/*/, "/"), navigationContext = React.useMemo(() => ({
      basename,
      navigator: navigator2,
      static: staticProp
    }), [basename, navigator2, staticProp]);
    typeof locationProp == "string" && (locationProp = parsePath(locationProp));
    let {
      pathname = "/",
      search = "",
      hash = "",
      state = null,
      key = "default"
    } = locationProp, locationContext = React.useMemo(() => {
      let trailingPathname = stripBasename(pathname, basename);
      return trailingPathname == null ? null : {
        location: {
          pathname: trailingPathname,
          search,
          hash,
          state,
          key
        },
        navigationType
      };
    }, [basename, pathname, search, hash, state, key, navigationType]);
    return locationContext == null ? null : /* @__PURE__ */ React.createElement(NavigationContext.Provider, {
      value: navigationContext
    }, /* @__PURE__ */ React.createElement(LocationContext.Provider, {
      children,
      value: locationContext
    }));
  }
  var neverSettledPromise = new Promise(() => {
  });
  function mapRouteProperties(route) {
    let updates = {
      // Note: this check also occurs in createRoutesFromChildren so update
      // there if you change this -- please and thank you!
      hasErrorBoundary: route.ErrorBoundary != null || route.errorElement != null
    };
    return route.Component && Object.assign(updates, {
      element: /* @__PURE__ */ React.createElement(route.Component),
      Component: void 0
    }), route.ErrorBoundary && Object.assign(updates, {
      errorElement: /* @__PURE__ */ React.createElement(route.ErrorBoundary),
      ErrorBoundary: void 0
    }), updates;
  }

  // node_modules/react-router-dom/dist/index.js
  function _extends3() {
    return _extends3 = Object.assign ? Object.assign.bind() : function(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        for (var key in source)
          Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]);
      }
      return target;
    }, _extends3.apply(this, arguments);
  }
  function _objectWithoutPropertiesLoose(source, excluded) {
    if (source == null)
      return {};
    var target = {}, sourceKeys = Object.keys(source), key, i;
    for (i = 0; i < sourceKeys.length; i++)
      key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
    return target;
  }
  function isModifiedEvent(event) {
    return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
  }
  function shouldProcessLinkClick(event, target) {
    return event.button === 0 && // Ignore everything but left clicks
    (!target || target === "_self") && // Let browser handle "target=_blank" etc.
    !isModifiedEvent(event);
  }
  var _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], _excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"];
  function createBrowserRouter(routes, opts) {
    return createRouter({
      basename: opts == null ? void 0 : opts.basename,
      future: _extends3({}, opts == null ? void 0 : opts.future, {
        v7_prependBasename: !0
      }),
      history: createBrowserHistory({
        window: opts == null ? void 0 : opts.window
      }),
      hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),
      routes,
      mapRouteProperties,
      window: opts == null ? void 0 : opts.window
    }).initialize();
  }
  function parseHydrationData() {
    var _window;
    let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData;
    return state && state.errors && (state = _extends3({}, state, {
      errors: deserializeErrors(state.errors)
    })), state;
  }
  function deserializeErrors(errors) {
    if (!errors)
      return null;
    let entries = Object.entries(errors), serialized = {};
    for (let [key, val] of entries)
      if (val && val.__type === "RouteErrorResponse")
        serialized[key] = new ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === !0);
      else if (val && val.__type === "Error") {
        if (val.__subType) {
          let ErrorConstructor = window[val.__subType];
          if (typeof ErrorConstructor == "function")
            try {
              let error = new ErrorConstructor(val.message);
              error.stack = "", serialized[key] = error;
            } catch (e) {
            }
        }
        if (serialized[key] == null) {
          let error = new Error(val.message);
          error.stack = "", serialized[key] = error;
        }
      } else
        serialized[key] = val;
    return serialized;
  }
  var ViewTransitionContext = /* @__PURE__ */ React2.createContext({
    isTransitioning: !1
  }), START_TRANSITION2 = "startTransition", startTransitionImpl2 = React2[START_TRANSITION2];
  function startTransitionSafe(cb) {
    startTransitionImpl2 ? startTransitionImpl2(cb) : cb();
  }
  var Deferred = class {
    constructor() {
      this.status = "pending", this.promise = new Promise((resolve, reject) => {
        this.resolve = (value) => {
          this.status === "pending" && (this.status = "resolved", resolve(value));
        }, this.reject = (reason) => {
          this.status === "pending" && (this.status = "rejected", reject(reason));
        };
      });
    }
  };
  function RouterProvider(_ref) {
    let {
      fallbackElement,
      router,
      future
    } = _ref, [state, setStateImpl] = React2.useState(router.state), [pendingState, setPendingState] = React2.useState(), [vtContext, setVtContext] = React2.useState({
      isTransitioning: !1
    }), [renderDfd, setRenderDfd] = React2.useState(), [transition, setTransition] = React2.useState(), [interruption, setInterruption] = React2.useState(), {
      v7_startTransition
    } = future || {}, optInStartTransition = React2.useCallback((cb) => {
      v7_startTransition ? startTransitionSafe(cb) : cb();
    }, [v7_startTransition]), setState = React2.useCallback((newState, _ref2) => {
      let {
        unstable_viewTransitionOpts: viewTransitionOpts
      } = _ref2;
      !viewTransitionOpts || router.window == null || typeof router.window.document.startViewTransition != "function" ? optInStartTransition(() => setStateImpl(newState)) : transition && renderDfd ? (renderDfd.resolve(), transition.skipTransition(), setInterruption({
        state: newState,
        currentLocation: viewTransitionOpts.currentLocation,
        nextLocation: viewTransitionOpts.nextLocation
      })) : (setPendingState(newState), setVtContext({
        isTransitioning: !0,
        currentLocation: viewTransitionOpts.currentLocation,
        nextLocation: viewTransitionOpts.nextLocation
      }));
    }, [optInStartTransition, transition, renderDfd, router.window]);
    React2.useLayoutEffect(() => router.subscribe(setState), [router, setState]), React2.useEffect(() => {
      vtContext.isTransitioning && setRenderDfd(new Deferred());
    }, [vtContext.isTransitioning]), React2.useEffect(() => {
      if (renderDfd && pendingState && router.window) {
        let newState = pendingState, renderPromise = renderDfd.promise, transition2 = router.window.document.startViewTransition(() => __async(this, null, function* () {
          optInStartTransition(() => setStateImpl(newState)), yield renderPromise;
        }));
        transition2.finished.finally(() => {
          setRenderDfd(void 0), setTransition(void 0), setPendingState(void 0), setVtContext({
            isTransitioning: !1
          });
        }), setTransition(transition2);
      }
    }, [optInStartTransition, pendingState, renderDfd, router.window]), React2.useEffect(() => {
      renderDfd && pendingState && state.location.key === pendingState.location.key && renderDfd.resolve();
    }, [renderDfd, transition, state.location, pendingState]), React2.useEffect(() => {
      !vtContext.isTransitioning && interruption && (setPendingState(interruption.state), setVtContext({
        isTransitioning: !0,
        currentLocation: interruption.currentLocation,
        nextLocation: interruption.nextLocation
      }), setInterruption(void 0));
    }, [vtContext.isTransitioning, interruption]);
    let navigator2 = React2.useMemo(() => ({
      createHref: router.createHref,
      encodeLocation: router.encodeLocation,
      go: (n) => router.navigate(n),
      push: (to, state2, opts) => router.navigate(to, {
        state: state2,
        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
      }),
      replace: (to, state2, opts) => router.navigate(to, {
        replace: !0,
        state: state2,
        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
      })
    }), [router]), basename = router.basename || "/", dataRouterContext = React2.useMemo(() => ({
      router,
      navigator: navigator2,
      static: !1,
      basename
    }), [router, navigator2, basename]);
    return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(DataRouterContext.Provider, {
      value: dataRouterContext
    }, /* @__PURE__ */ React2.createElement(DataRouterStateContext.Provider, {
      value: state
    }, /* @__PURE__ */ React2.createElement(ViewTransitionContext.Provider, {
      value: vtContext
    }, /* @__PURE__ */ React2.createElement(Router, {
      basename,
      location: state.location,
      navigationType: state.historyAction,
      navigator: navigator2
    }, state.initialized ? /* @__PURE__ */ React2.createElement(DataRoutes, {
      routes: router.routes,
      state
    }) : fallbackElement)))), null);
  }
  function DataRoutes(_ref3) {
    let {
      routes,
      state
    } = _ref3;
    return useRoutesImpl(routes, void 0, state);
  }
  var isBrowser = typeof window != "undefined" && typeof window.document != "undefined" && typeof window.document.createElement != "undefined", ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Link = /* @__PURE__ */ React2.forwardRef(function(_ref7, ref) {
    let {
      onClick,
      relative,
      reloadDocument,
      replace,
      state,
      target,
      to,
      preventScrollReset,
      unstable_viewTransition
    } = _ref7, rest = _objectWithoutPropertiesLoose(_ref7, _excluded), {
      basename
    } = React2.useContext(NavigationContext), absoluteHref, isExternal = !1;
    if (typeof to == "string" && ABSOLUTE_URL_REGEX2.test(to) && (absoluteHref = to, isBrowser))
      try {
        let currentUrl = new URL(window.location.href), targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to), path = stripBasename(targetUrl.pathname, basename);
        targetUrl.origin === currentUrl.origin && path != null ? to = path + targetUrl.search + targetUrl.hash : isExternal = !0;
      } catch (e) {
      }
    let href = useHref(to, {
      relative
    }), internalOnClick = useLinkClickHandler(to, {
      replace,
      state,
      target,
      preventScrollReset,
      relative,
      unstable_viewTransition
    });
    function handleClick(event) {
      onClick && onClick(event), event.defaultPrevented || internalOnClick(event);
    }
    return (
      // eslint-disable-next-line jsx-a11y/anchor-has-content
      /* @__PURE__ */ React2.createElement("a", _extends3({}, rest, {
        href: absoluteHref || href,
        onClick: isExternal || reloadDocument ? onClick : handleClick,
        ref,
        target
      }))
    );
  }), NavLink = /* @__PURE__ */ React2.forwardRef(function(_ref8, ref) {
    let {
      "aria-current": ariaCurrentProp = "page",
      caseSensitive = !1,
      className: classNameProp = "",
      end = !1,
      style: styleProp,
      to,
      unstable_viewTransition,
      children
    } = _ref8, rest = _objectWithoutPropertiesLoose(_ref8, _excluded2), path = useResolvedPath(to, {
      relative: rest.relative
    }), location = useLocation(), routerState = React2.useContext(DataRouterStateContext), {
      navigator: navigator2
    } = React2.useContext(NavigationContext), isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
    // eslint-disable-next-line react-hooks/rules-of-hooks
    useViewTransitionState(path) && unstable_viewTransition === !0, toPathname = navigator2.encodeLocation ? navigator2.encodeLocation(path).pathname : path.pathname, locationPathname = location.pathname, nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
    caseSensitive || (locationPathname = locationPathname.toLowerCase(), nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null, toPathname = toPathname.toLowerCase());
    let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/", isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/"), renderProps = {
      isActive,
      isPending,
      isTransitioning
    }, ariaCurrent = isActive ? ariaCurrentProp : void 0, className;
    typeof classNameProp == "function" ? className = classNameProp(renderProps) : className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
    let style = typeof styleProp == "function" ? styleProp(renderProps) : styleProp;
    return /* @__PURE__ */ React2.createElement(Link, _extends3({}, rest, {
      "aria-current": ariaCurrent,
      className,
      ref,
      style,
      to,
      unstable_viewTransition
    }), typeof children == "function" ? children(renderProps) : children);
  });
  var DataRouterHook2;
  (function(DataRouterHook3) {
    DataRouterHook3.UseScrollRestoration = "useScrollRestoration", DataRouterHook3.UseSubmit = "useSubmit", DataRouterHook3.UseSubmitFetcher = "useSubmitFetcher", DataRouterHook3.UseFetcher = "useFetcher", DataRouterHook3.useViewTransitionState = "useViewTransitionState";
  })(DataRouterHook2 || (DataRouterHook2 = {}));
  var DataRouterStateHook2;
  (function(DataRouterStateHook3) {
    DataRouterStateHook3.UseFetchers = "useFetchers", DataRouterStateHook3.UseScrollRestoration = "useScrollRestoration";
  })(DataRouterStateHook2 || (DataRouterStateHook2 = {}));
  function useDataRouterContext2(hookName) {
    let ctx = React2.useContext(DataRouterContext);
    return ctx || invariant(!1), ctx;
  }
  function useLinkClickHandler(to, _temp) {
    let {
      target,
      replace: replaceProp,
      state,
      preventScrollReset,
      relative,
      unstable_viewTransition
    } = _temp === void 0 ? {} : _temp, navigate = useNavigate(), location = useLocation(), path = useResolvedPath(to, {
      relative
    });
    return React2.useCallback((event) => {
      if (shouldProcessLinkClick(event, target)) {
        event.preventDefault();
        let replace = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
        navigate(to, {
          replace,
          state,
          preventScrollReset,
          relative,
          unstable_viewTransition
        });
      }
    }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, unstable_viewTransition]);
  }
  function usePrompt(_ref11) {
    let {
      when,
      message
    } = _ref11, blocker = useBlocker(when);
    React2.useEffect(() => {
      blocker.state === "blocked" && (window.confirm(message) ? setTimeout(blocker.proceed, 0) : blocker.reset());
    }, [blocker, message]), React2.useEffect(() => {
      blocker.state === "blocked" && !when && blocker.reset();
    }, [blocker, when]);
  }
  function useViewTransitionState(to, opts) {
    opts === void 0 && (opts = {});
    let vtContext = React2.useContext(ViewTransitionContext);
    vtContext == null && invariant(!1);
    let {
      basename
    } = useDataRouterContext2(DataRouterHook2.useViewTransitionState), path = useResolvedPath(to, {
      relative: opts.relative
    });
    if (!vtContext.isTransitioning)
      return !1;
    let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname, nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
    return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
  }

  // js/i18n.tsx
  init_define_SVG_ICONS_FONTAWESOME();

  // ../lektor/translations/ca.json
  var ca_default = {
    RETURN_TO_WEBSITE: "Tornar al Lloc Web",
    UNLOAD_ACTIVE_TAB: "Hi ha informaci\xF3 sense desar, est\xE0 segur que vol abandonar aquesta p\xE0gina?",
    EDIT_METADATA: "Editar Metadades",
    EDIT: "Editar",
    DELETE: "Esborrar",
    PREVIEW: "Previsualitzar",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Prim\xE0ria",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "Afegir P\xE0gina",
    ADD_ATTACHMENT: "Afegir Adjunt",
    ATTACHMENT_ACTIONS: "Accions sobre els Adjunts",
    PAGE_ACTIONS: "Accions sobre la P\xE0gina",
    NO_CHILD_PAGES: "Sense Subp\xE0gines",
    CHILD_PAGES: "Subp\xE0gines",
    NO_ATTACHMENTS: "Sense Adjunts",
    ATTACHMENTS: "Adjunts",
    ADD_ATTACHMENT_TO: "Afegir Adjunt a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Pot pujar un nou adjunt aqu\xED.",
    UPLOAD: "Pujar",
    PROGRESS: "Aven\xE7",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No s'ha proporcionat un ID.",
    ERROR_PAGE_ID_DUPLICATE: "Ja existeix una p\xE0gina amb aquest ID (%s).",
    ERROR_INVALID_ID: "ID inv\xE0lid",
    ERROR_INVALID_DATE: "Data inv\xE0lida",
    ERROR_INVALID_NUMBER: "N\xFAmero no v\xE0lid",
    ERROR_INVALID_URL: "URL no v\xE0lida",
    ERROR: "Error",
    ERROR_OCURRED: "Ha ocorregut un Error",
    ERROR_REQUEST_FAILED: "No s'ha pogut enviar la tasca al servidor.  Potser el servidor est\xE0 apagat o \xE9s inaccessible",
    ERROR_SERVER_UNAVAILABLE: "Servidor No Disponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "El servidor no respon.  Ha estat apagat o hi ha hagut un error cr\xEDtic que ha fet que estigui inoperatiu i hagi de ser reiniciat.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Afegir Subp\xE0gina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Pot afegir una nova subp\xE0gina aqu\xED. Tingui en compte que el model o el ID no podr\xE0 ser canviat f\xE0cilment m\xE9s endavant.",
    CREATE_CHILD_PAGE: "Afegir p\xE0gina filla",
    DELETE_ATTACHMENT_PROMPT: "Realment vol esborrar aquest adjunt?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Realment vol esborrar les metadades d'aquest adjunt alternatiu?",
    DELETE_PAGE_PROMPT: "Vol realment esborrar aquesta p\xE0gina?",
    DELETE_PAGE_ALT_PROMPT: "Realment desitja esborrar aquesta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Tamb\xE9 s'esborraran les subp\xE0gines que pengin d'aquesta p\xE0gina.",
    DELETE_RECORD: "Esborrar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Esborrar tamb\xE9 totes les alternatives i fitxers adjunts.",
    DELETE_ALL_ATTACHMENT_ALTS: "Esborrar totes les alternatives de l'annex i el fitxer adjunt.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Esborrar nom\xE9s el registre principal.  Els adjunts, les alternatives i les subp\xE0gines no seran esborrades.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Esborrar nom\xE9s les metadades del registre principal.",
    DELETE_PRIMARY_ALT_INFO: "Com aquest registre \xE9s una alternativa principal, pot ser esborrat per separat o conjuntament a la resta de continguts.",
    CHILD_PAGES_TO_BE_DELETED: "Subp\xE0gines que seran esborrares:",
    ALTS_TO_BE_DELETED: "Alternatives que seran eliminades:",
    ATTACHMENTS_TO_BE_DELETED: "Adjunts que seran eliminats:",
    YES_DELETE: "S\xED, esborrar",
    NO_CANCEL: "No, cancel\xB7lar",
    SYSTEM_FIELDS: "Camps del Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar les Metadades de l'Adjunt \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Desar els canvis",
    BROWSE_FS: "Veure al Sistema de fitxers",
    BROWSE_FS_MAC: "Mostrar al Finder",
    BROWSE_FS_WINDOWS: "Mostrar a l'Explorador",
    ERROR_CANNOT_BROWSE_FS: "Error: el fitxer no existeix encara.",
    REMOVE_FLOWBLOCK_PROMPT: "\xBFRealment vol esborrar aquest block?",
    ADD_FLOWBLOCK: "Afegir Block",
    INVALID_INPUT: "Entrada inv\xE0lida",
    UP: "Amunt",
    DOWN: "Abaix",
    REMOVE: "Esborrar",
    ID: "ID",
    CLOSE: "Tancar",
    CANCEL: "Cancel\xB7lar",
    BACK_TO_OVERVIEW: "Tornar a la Revisi\xF3",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Des d'aqu\xED pot publicar la versi\xF3 actual del lloc web.",
    PUBLISH_SERVER: "Servidor Destinaci\xF3",
    CURRENTLY_PUBLISHING: "Publicannt ...",
    STATE: "Estat",
    PUBLISH_DONE: "Publicat",
    PUBLISH_STATE_BUILDING: "Els canvis s'estan generant ...",
    PUBLISH_STATE_PUBLISH: "Els canvis s'estan publicant ...",
    PUBLISH_STATE_DONE: "Publicaci\xF3 finalitzada.",
    FIND_FILES: "Buscar Fitxers",
    FIND_FILES_PLACEHOLDER: "Introdueixi el nom de la p\xE0gina ...",
    ATTACHMENT_TYPE: "Tipus d'adjunt",
    URL_SLUG: "URL personalitzada",
    TEMPLATE: "Plantilla",
    HIDE_PAGE: "Amagar p\xE0gina",
    HIDE_PAGE_EXPLANATION: "Hauria d'estar oculta aquesta p\xE0gina?",
    PAGE_IS_DISCOVERABLE: "La P\xE0gina \xE9s detectable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si s'habilita, la p\xE0gina pot ser detectada, en cas contrari la URL del contingut ha de ser coneguda.",
    REFRESH_BUILD: "Regenerar Lloc Web",
    REFRESH_BUILD_NOTE: "Aix\xF2 esborra tots els resultats generats i llen\xE7a una nova generaci\xF3 des de zero.  Aix\xF2 \xE9s \xFAtil en algunes situacions on els errors de sincronitzaci\xF3 o a les plantilles han causat un resultat corrupte.",
    CURRENTLY_REFRESHING_BUILD: "Regenerant ...",
    REFRESHING_BUILD_DONE: "Actualitzaci\xF3 finalitzada!",
    FAILED_TO_LAUNCH_LEKTOR: "Ha fallat l'execuci\xF3 de Lektor.",
    PROJECT: "Projecte",
    CLOSE_PROJECT: "Tancar Projecte",
    OPEN_PROJECT: "Obrir Projecte",
    BROWSE_WEBSITE: "Anar al Lloc Web",
    VIEW_ADMIN_PANEL: "Anar al Panell d'Administraci\xF3",
    QUIT: "Sortir",
    FAILED_TO_LOAD_PROJECT: "Ha fallat la c\xE0rrega del projecte :(",
    LOADING_PROJECT: "Carregant projecte ...",
    INITIALIZING_LEKTOR: "Inicialitzant Lektor ...",
    QUIT_LEKTOR: "Sortir de Lektor",
    FILE: "Arxiu",
    UNDO: "Desfer",
    REDO: "Tornar a fer",
    CUT: "Tallar",
    COPY: "Copiar",
    PASTE: "Enganxar",
    SELECT_ALL: "Seleccionar-ho Tot",
    HELP: "Ajuda",
    VISIT_WEBSITE: "Visitar Web",
    INSTALL_SHELL_COMMAND: "Instalar Eina",
    INSTALL_SHELL_COMMAND_QUESTION: "Vol instal\xB7lar la eina 'lektor'? Es requereixen permisos d'administraci\xF3.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Ha fallat la instal\xB7laci\xF3 de l'eina.",
    INSTALL_SHELL_COMMAND_SUCCESS: "L'eina ha estat instal\xB7lada amb \xE8xit.",
    OPERATION_SUCCESS: "Amb \xE8xit",
    YES: "S\xED",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Error al intentar obrir el fitxer de contingut",
    OPEN_OTHER_PROJECT: "Obrir un altre Projecte",
    OPEN_OTHER_PROJECT_QUESTION: "Obrir aquest fitxer implica obrir un altre projecte (%s). El projecte actual ser\xE0 tancat. Vol continuar?"
  };

  // ../lektor/translations/de.json
  var de_default = {
    RETURN_TO_WEBSITE: "Zur Webseite",
    UNLOAD_ACTIVE_TAB: "Du hast ungespeicherte \xC4nderungen, willst du die Seite wirklich verlassen?",
    EDIT_METADATA: "Metadaten bearbeiten",
    EDIT: "Bearbeiten",
    DELETE: "L\xF6schen",
    PREVIEW: "Vorschau",
    ALTS: "Alternativen",
    PRIMARY_ALT: "Prim\xE4r",
    PRIMARY_OVERLAY: "\xDCberlagert",
    ADD_CHILD_PAGE: "Seite hinzuf\xFCgen",
    ADD_ATTACHMENT: "Anhang hinzuf\xFCgen",
    ATTACHMENT_ACTIONS: "Anhang-Aktionen",
    PAGE_ACTIONS: "Seiten-Aktionen",
    NO_CHILD_PAGES: "Keine Unterseiten",
    CHILD_PAGES: "Unterseiten",
    NO_ATTACHMENTS: "Keine Anh\xE4nge",
    ATTACHMENTS: "Anh\xE4nge",
    ADD_ATTACHMENT_TO: "Anhang zu \u201C%s\u201D hinzuf\xFCgen",
    ADD_ATTACHMENT_NOTE: "Hier kannst du neue Anh\xE4nge hochladen.",
    UPLOAD: "Hochladen",
    PROGRESS: "Fortschritt",
    ERROR_PREFIX: "Fehler: ",
    ERROR_NO_ID_PROVIDED: "Es wurde keine ID eingegeben.",
    ERROR_PAGE_ID_DUPLICATE: "Eine Seite mit dieser ID (%s) existiert bereits.",
    ERROR_INVALID_ID: "Ung\xFCltige ID",
    ERROR_INVALID_DATE: "Ung\xFCltiges Datum",
    ERROR_INVALID_NUMBER: "Ung\xFCltige Zahl",
    ERROR_INVALID_URL: "Ung\xFCltige URL",
    ERROR: "Fehler",
    ERROR_OCURRED: "Ein Fehler ist aufgetreten",
    ERROR_REQUEST_FAILED: "Ein Befehl konnte nicht an den Server gesendet werden. Eventuell reagiert der Server nicht oder wurde gestoppt.",
    ERROR_SERVER_UNAVAILABLE: "Server unerreichbar",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Der Server reagiert nicht. Entweder er wurde gestoppt oder ein kritischer Fehler ist aufgetreten und er muss neu gestartet werden.",
    MODEL: "Modell",
    ADD_CHILD_PAGE_TO: "Unterseite zu \u201C%s\u201D hinzuf\xFCgen",
    ADD_CHILD_PAGE_NOTE: "Du kannst hier eine neue Unterseite hinzuf\xFCgen.  Beachte, dass die ID und das Modell sp\xE4ter nicht mehr ver\xE4ndert werden kann.",
    CREATE_CHILD_PAGE: "Unterseite hinzuf\xFCgen",
    DELETE_ATTACHMENT_PROMPT: "Willst du den Anhang wirklich l\xF6schen?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Willst du die Metadaten dieser Anhang-Alternative wirklich l\xF6schen?",
    DELETE_PAGE_PROMPT: "Willst du diese Seite wirklich l\xF6schen?",
    DELETE_PAGE_ALT_PROMPT: "Willst du diese Alternative wirklich l\xF6schen?",
    DELETE_PAGE_CHILDREN_WARNING: "Dies wird auch die Unterseiten der Seite l\xF6schen.",
    DELETE_RECORD: "\u201C%s\u201D L\xF6schen",
    DELETE_ALL_PAGE_ALTS: "Alle Alternativen und angeh\xE4ngten Dateien mitl\xF6schen.",
    DELETE_ALL_ATTACHMENT_ALTS: "Alle Alternativen und die angeh\xE4ngte Datei l\xF6schen.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Nur den Prim\xE4reintrag l\xF6schen. Anh\xE4nge, andere Alternativen und Unterseiten werden nicht gel\xF6scht.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Nur die Metadaten des Prim\xE4reintrages l\xF6schen.",
    DELETE_PRIMARY_ALT_INFO: "Da dieser Eintrag eine Prim\xE4ralternative ist, kann diese auch separat gel\xF6scht werden oder zusammen mit allen anderen Inhalten.",
    CHILD_PAGES_TO_BE_DELETED: "Unterseiten, die gel\xF6scht werden:",
    ALTS_TO_BE_DELETED: "Alternativen, die gel\xF6scht werden:",
    ATTACHMENTS_TO_BE_DELETED: "Anh\xE4nge, die gel\xF6scht werden:",
    YES_DELETE: "Ja, l\xF6schen",
    NO_CANCEL: "Nein, abbrechen",
    SYSTEM_FIELDS: "Systemfelder",
    EDIT_ATTACHMENT_METADATA_OF: "Bearbeite Metadaten von Anhang \u201C%s\u201D",
    EDIT_PAGE_NAME: "Bearbeite \u201C%s\u201D",
    SAVE_CHANGES: "\xC4nderungen speichern",
    BROWSE_FS: "Im Dateisystem \xF6ffnen",
    BROWSE_FS_MAC: "In Finder anzeigen",
    BROWSE_FS_WINDOWS: "Im Explorer \xF6ffnen",
    ERROR_CANNOT_BROWSE_FS: "Fehler: Datei existiert noch nicht",
    REMOVE_FLOWBLOCK_PROMPT: "Willst du diesen Block wirklich entfernen?",
    ADD_FLOWBLOCK: "Block hinzuf\xFCgen",
    INVALID_INPUT: "Ung\xFCltige Eingabe",
    UP: "Nach oben",
    DOWN: "Nach unten",
    REMOVE: "Entfernen",
    ID: "ID",
    CLOSE: "Schlie\xDFen",
    CANCEL: "Abbrechen",
    BACK_TO_OVERVIEW: "\xDCbersicht",
    PUBLISH: "Ver\xF6ffentlichen",
    PUBLISH_NOTE: "Von hier aus kann der aktuelle Stand der Webseite publiziert werden.",
    PUBLISH_SERVER: "Ziel-Server",
    CURRENTLY_PUBLISHING: "Ver\xF6ffentlichung \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Ver\xF6ffentlicht",
    PUBLISH_STATE_BUILDING: "\xC4nderungen werden gebaut ...",
    PUBLISH_STATE_PUBLISH: "\xC4nderungen werden publiziert ...",
    PUBLISH_STATE_DONE: "Ver\xF6ffentlichung fertiggestellt.",
    FIND_FILES: "Seiten Finden",
    FIND_FILES_PLACEHOLDER: "Seitenname eingeben ...",
    ATTACHMENT_TYPE: "Attachment type",
    URL_SLUG: "URL-Slug",
    TEMPLATE: "Vorlage",
    HIDE_PAGE: "Seite verstecken",
    HIDE_PAGE_EXPLANATION: "Soll diese Seite versteckt werden?",
    PAGE_IS_DISCOVERABLE: "Seite ist erkundbar",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Wenn dies aktiviert ist, wird Seite von Vorlagen verlinkt. Ansonsten muss die URL bekannt sein.",
    REFRESH_BUILD: "\xC4nderungen regenerieren",
    REFRESH_BUILD_NOTE: "In machen Situationen kann es n\xFCtzlich sein, alle \xC4nderungen zu regenerieren.  Zum Beispiel k\xF6nnen Synchronisationsfehler und kaputte Vorlagen manchmal dazu f\xFChren, dass Seiten fehlerhaft gebaut wurden.  Dies bringt Lektor dazu, alle Seiten neu zu bauen.",
    CURRENTLY_REFRESHING_BUILD: "\xC4nderungen werden regeneriert ...",
    REFRESHING_BUILD_DONE: "\xC4nderungen wurden regeneriert!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor konnte nicht gestartet werden.",
    PROJECT: "Projekt",
    CLOSE_PROJECT: "Projekt schlie\xDFen",
    OPEN_PROJECT: "Projekt \xF6ffnen",
    BROWSE_WEBSITE: "Webseite anzeigen",
    VIEW_ADMIN_PANEL: "Admin-Panel \xF6ffnen",
    QUIT: "Beenden",
    FAILED_TO_LOAD_PROJECT: "Projekt konnte nicht geladen werden :(",
    LOADING_PROJECT: "Projekt wird ge\xF6ffnet ...",
    INITIALIZING_LEKTOR: "Initialisiere Lektor ...",
    QUIT_LEKTOR: "Lektor beenden",
    FILE: "Datei",
    UNDO: "R\xFCckg\xE4ngig",
    REDO: "Wiederholen",
    CUT: "Ausschneiden",
    COPY: "Kopieren",
    PASTE: "Einf\xFCgen",
    SELECT_ALL: "Alles Markieren",
    HELP: "Hilfe",
    VISIT_WEBSITE: "Webseite \xF6ffnen",
    INSTALL_SHELL_COMMAND: "Shell-Befehl installieren",
    INSTALL_SHELL_COMMAND_QUESTION: "M\xF6chtest du den 'lektor' Shell-Befehl installieren? Dies erfordert Admin-Rechte.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Konnte Shell-Befehl nicht installieren.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell-Befehl wurde erfolgreich installiert.",
    OPERATION_SUCCESS: "Operation erfolgreich",
    YES: "Ja",
    NO: "Nein",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Konnte Datei nicht \xF6ffnen",
    OPEN_OTHER_PROJECT: "Anderes Projekt \xF6ffnen",
    OPEN_OTHER_PROJECT_QUESTION: "Um diese Datei zu \xF6ffnen, muss ein anderes Projekt (%s) ge\xF6ffnet werden. Das aktuelle Projekt wird dadurch geschlossen. Fortfahren?"
  };

  // ../lektor/translations/en.json
  var en_default = {
    RETURN_TO_WEBSITE: "Return to Website",
    UNLOAD_ACTIVE_TAB: "You have unsaved information, are you sure you want to leave this page?",
    EDIT_METADATA: "Edit Metadata",
    EDIT: "Edit",
    DELETE: "Delete",
    PREVIEW: "Preview",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Primary",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "Add Page",
    ADD_ATTACHMENT: "Add Attachment",
    ATTACHMENT_ACTIONS: "Attachment Actions",
    PAGE_ACTIONS: "Page Actions",
    NO_CHILD_PAGES: "No Subpages",
    CHILD_PAGES: "Subpages",
    NO_ATTACHMENTS: "No attachments",
    ATTACHMENTS: "Attachments",
    ADD_ATTACHMENT_TO: "Add Attachment to \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "You can upload a new attachment here.",
    UPLOAD: "Upload",
    PROGRESS: "Progress",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No ID provided.",
    ERROR_PAGE_ID_DUPLICATE: "A page with this ID (%s) exists already.",
    ERROR_INVALID_ID: "Invalid ID",
    ERROR_INVALID_DATE: "Invalid date",
    ERROR_INVALID_NUMBER: "Not a valid number",
    ERROR_INVALID_URL: "Not a valid URL",
    ERROR: "Error",
    ERROR_OCURRED: "An Error ocurred",
    ERROR_REQUEST_FAILED: "Could not send command to server.  Maybe the server was stopped or is unresponsive?",
    ERROR_SERVER_UNAVAILABLE: "Server Unavailable",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "The server is not responding.  Either it was stopped or a critical error made it not operable and it needs to be restarted.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Add Subpage to \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "You can add a new subpage to the page here.  Note that the model or ID cannot be easily changed afterwards.",
    CREATE_CHILD_PAGE: "Add Child Page",
    DELETE_ATTACHMENT_PROMPT: "Do you really want to delete this attachment?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Do you really want to delete the metadata of this attachment alternative?",
    DELETE_PAGE_PROMPT: "Do you really want to delete this page?",
    DELETE_PAGE_ALT_PROMPT: "Do you really want to delete this alternative?",
    DELETE_PAGE_CHILDREN_WARNING: "This will also delete the child subpages of this page.",
    DELETE_RECORD: "Delete \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Also delete all alternatives and attached files.",
    DELETE_ALL_ATTACHMENT_ALTS: "Delete all alternatives and the attached file.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Delete only the primary record.  Attachments, alternatives and subpages will not be deleted.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Only delete the Metadata of the primary record.",
    DELETE_PRIMARY_ALT_INFO: "Because this record is a primary alternative it can be deleted separately or together with all other contents.",
    CHILD_PAGES_TO_BE_DELETED: "Subpages that will be deleted:",
    ALTS_TO_BE_DELETED: "Alternatives that will be deleted:",
    ATTACHMENTS_TO_BE_DELETED: "Attachments that will be deleted:",
    YES_DELETE: "Yes, delete",
    NO_CANCEL: "No, cancel",
    SYSTEM_FIELDS: "System Fields",
    EDIT_ATTACHMENT_METADATA_OF: "Edit Metadata of Attachment \u201C%s\u201D",
    EDIT_PAGE_NAME: "Edit \u201C%s\u201D",
    SAVE_CHANGES: "Save Changes",
    BROWSE_FS: "Browse in Filesystem",
    BROWSE_FS_MAC: "Reveal in Finder",
    BROWSE_FS_WINDOWS: "Open in Explorer",
    ERROR_CANNOT_BROWSE_FS: "Error: File does not exist yet.",
    REMOVE_FLOWBLOCK_PROMPT: "Do you really want to remove this block?",
    ADD_FLOWBLOCK: "Add Block",
    INVALID_INPUT: "Invalid Input",
    UP: "Up",
    DOWN: "Down",
    REMOVE: "Remove",
    ID: "ID",
    CLOSE: "Close",
    CANCEL: "Cancel",
    BACK_TO_OVERVIEW: "Back to Overview",
    PUBLISH: "Publish",
    PUBLISH_NOTE: "From here you can publish the current version of the website.",
    PUBLISH_SERVER: "Target Server",
    CURRENTLY_PUBLISHING: "Publishing \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Published",
    PUBLISH_STATE_BUILDING: "Changes are being built ...",
    PUBLISH_STATE_PUBLISH: "Changes are being published ...",
    PUBLISH_STATE_DONE: "Publishing done.",
    FIND_FILES: "Find Files",
    FIND_FILES_PLACEHOLDER: "Enter page name ...",
    ATTACHMENT_TYPE: "Attachment type",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Hide page",
    HIDE_PAGE_EXPLANATION: "Should this page be hidden?",
    PAGE_IS_DISCOVERABLE: "Page is discoverable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "If this is enabled the page can be discovered, otherwise the URL has to be known.",
    REFRESH_BUILD: "Refresh Build",
    REFRESH_BUILD_NOTE: "This deletes all cached build results which triggers a rebuilt from scratch.  This is useful in certain situations where sync errors or mistakes in templates caused corrupted output.",
    CURRENTLY_REFRESHING_BUILD: "Currently refreshing build ...",
    REFRESHING_BUILD_DONE: "Done refreshing build!",
    FAILED_TO_LAUNCH_LEKTOR: "Failed to launch Lektor.",
    PROJECT: "Project",
    CLOSE_PROJECT: "Close Project",
    OPEN_PROJECT: "Open Project",
    BROWSE_WEBSITE: "Browse Website",
    VIEW_ADMIN_PANEL: "View Admin Panel",
    QUIT: "Quit",
    FAILED_TO_LOAD_PROJECT: "Failed to load the project :(",
    LOADING_PROJECT: "Loading project ...",
    INITIALIZING_LEKTOR: "Initializing Lektor ...",
    QUIT_LEKTOR: "Quit Lektor",
    FILE: "File",
    UNDO: "Undo",
    REDO: "Redo",
    CUT: "Cut",
    COPY: "Copy",
    PASTE: "Paste",
    SELECT_ALL: "Select All",
    HELP: "Help",
    VISIT_WEBSITE: "Visit Website",
    INSTALL_SHELL_COMMAND: "Install Shell Command",
    INSTALL_SHELL_COMMAND_QUESTION: "Do you want to install the 'lektor' shell command? This requires admin rights.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Failed to install shell commands.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell command was successfully installed.",
    OPERATION_SUCCESS: "Success",
    YES: "Yes",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Failed to open content file",
    OPEN_OTHER_PROJECT: "Open other Project",
    OPEN_OTHER_PROJECT_QUESTION: "Opening this file requires opening another project (%s). The current project will be closed. Do you want to continue?",
    COLLAPSE: "Collapse",
    EXPAND: "Expand",
    TRISTATE_CHECKBOX_TOOLTIP: "Tri-state checkbox: use <del> or <backspace> to revert to unset",
    AUTOSIZE_TEXTAREA: "Autosize textarea",
    SHRINK_TEXTAREA: "Shrink textarea",
    PREFERENCES: "Preferences",
    RESET: "Reset",
    RESET_TO_DEFAULTS: "Reset to defaults",
    EDIT_SHORTCUT: "Edit",
    SAVE_SHORTCUT: "Save",
    PREVIEW_SHORTCUT: "(Save &) Preview",
    SEARCH_SHORTCUT: "Search"
  };

  // ../lektor/translations/es.json
  var es_default = {
    RETURN_TO_WEBSITE: "Volver al Sitio Web",
    UNLOAD_ACTIVE_TAB: "Tiene informaci\xF3n sin guardar, est\xE1 seguro de que quiere abandonar esta p\xE1gina?",
    EDIT_METADATA: "Editar Metadatos",
    EDIT: "Editar",
    DELETE: "Borrar",
    PREVIEW: "Previsualizar",
    ALTS: "Alternativas",
    PRIMARY_ALT: "Primaria",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "A\xF1adir P\xE1gina",
    ADD_ATTACHMENT: "A\xF1adir Adjunto",
    ATTACHMENT_ACTIONS: "Acciones de Adjunto",
    PAGE_ACTIONS: "Acciones de P\xE1gina",
    NO_CHILD_PAGES: "Sin Subp\xE1ginas",
    CHILD_PAGES: "Subp\xE1ginas",
    NO_ATTACHMENTS: "Sin Adjuntos",
    ATTACHMENTS: "Adjuntos",
    ADD_ATTACHMENT_TO: "A\xF1adir Adjunto a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Puede cargar un nuevo adjunto aqu\xED.",
    UPLOAD: "Cargar",
    PROGRESS: "Avance",
    ERROR_PREFIX: "Error: ",
    ERROR_NO_ID_PROVIDED: "No se proporcion\xF3 un ID.",
    ERROR_PAGE_ID_DUPLICATE: "Ya existe una p\xE1gina con este ID (%s).",
    ERROR_INVALID_ID: "ID inv\xE1lido",
    ERROR_INVALID_DATE: "Fecha inv\xE1lida",
    ERROR_INVALID_NUMBER: "N\xFAmero no v\xE1lido",
    ERROR_INVALID_URL: "URL no v\xE1lida",
    ERROR: "Error",
    ERROR_OCURRED: "Ocurri\xF3 un Error",
    ERROR_REQUEST_FAILED: "No se pudo enviar el comando al servidor.  \xBFEs posible que el servidor est\xE9 apagado o no responda?",
    ERROR_SERVER_UNAVAILABLE: "Servidor No Disponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "El servidor no responde.  Fue apagado o hubo un error cr\xEDtico que lo hace inoperativo y necesita ser reiniciado.",
    MODEL: "Modelo",
    ADD_CHILD_PAGE_TO: "A\xF1ada Subp\xE1gina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Puede a\xF1adir una nueva subp\xE1gina aqu\xED.  Tenga en cuenta que el modelo o el ID no puede ser cambiado f\xE1cilmente m\xE1s tarde.",
    CREATE_CHILD_PAGE: "A\xF1ada P\xE1gina Hijo",
    DELETE_ATTACHMENT_PROMPT: "\xBFQuiere realmente borrar este anexo?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\xBFQuiere realmente borrar los metadatos de esta alternativa de anexo?",
    DELETE_PAGE_PROMPT: "\xBFQuiere realmente borrar esta p\xE1gina?",
    DELETE_PAGE_ALT_PROMPT: "\xBFQuiere realmente borrar esta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Esto tambi\xE9n borrar\xE1 las subp\xE1ginas hijo de esta p\xE1gina.",
    DELETE_RECORD: "Borrar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Borrar tambi\xE9n todas las alternativas y ficheros adjuntos.",
    DELETE_ALL_ATTACHMENT_ALTS: "Borrar todas las alternativas y el fichero adjunto.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Borra s\xF3lo el registro principal.  Los adjuntos, las alternativas y las subp\xE1ginas no ser\xE1n borradas.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Borra s\xF3lo los metadatos del registro principal.",
    DELETE_PRIMARY_ALT_INFO: "Como este registro es una alternativa principal, puede ser borrado por separado o junto al resto de contenidos.",
    CHILD_PAGES_TO_BE_DELETED: "Subp\xE1ginas que ser\xE1n borradas:",
    ALTS_TO_BE_DELETED: "Alternativas que ser\xE1n borradas:",
    ATTACHMENTS_TO_BE_DELETED: "Adjuntos que ser\xE1n borrados:",
    YES_DELETE: "S\xED, borrar",
    NO_CANCEL: "No, cancelar",
    SYSTEM_FIELDS: "Campos de Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar los Metadatos del Adjunto \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Guardar los cambios",
    BROWSE_FS: "Navegar en el Sistema de ficheros",
    BROWSE_FS_MAC: "Mostrar en el Finder",
    BROWSE_FS_WINDOWS: "Abrir en el Explorador",
    ERROR_CANNOT_BROWSE_FS: "Error: el fichero no existe todav\xEDa.",
    REMOVE_FLOWBLOCK_PROMPT: "\xBFQuiere realmente borrar este bloque?",
    ADD_FLOWBLOCK: "A\xF1adir Bloque",
    INVALID_INPUT: "Entrada inv\xE1lida",
    UP: "Arriba",
    DOWN: "Abajo",
    REMOVE: "Eliminar",
    ID: "ID",
    CLOSE: "Cerrar",
    CANCEL: "Cancelar",
    BACK_TO_OVERVIEW: "Vuelve a Revisi\xF3n",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Desde aqu\xED puede publicar la versi\xF3n actual del sitio web.",
    PUBLISH_SERVER: "Servidor Destino",
    CURRENTLY_PUBLISHING: "Publicando \u2026",
    STATE: "Estado",
    PUBLISH_DONE: "Publicado",
    PUBLISH_STATE_BUILDING: "Los cambios se est\xE1n generando ...",
    PUBLISH_STATE_PUBLISH: "Los cambios est\xE1n siendo publicados ...",
    PUBLISH_STATE_DONE: "Publicaci\xF3n finalizada.",
    FIND_FILES: "Encontrar Ficheros",
    FIND_FILES_PLACEHOLDER: "Introduzca el nombre de la p\xE1gina ...",
    ATTACHMENT_TYPE: "Tipo de adjunto",
    URL_SLUG: "URL personalizada",
    TEMPLATE: "Plantilla",
    HIDE_PAGE: "Ocultar p\xE1gina",
    HIDE_PAGE_EXPLANATION: "\xBFDeber\xEDa estar oculta esta p\xE1gina?",
    PAGE_IS_DISCOVERABLE: "La P\xE1gina es detectable",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si esto est\xE1 habilitado la p\xE1gina puede ser detectada, en caso contrario la URL ha de ser conocida.",
    REFRESH_BUILD: "Refrescar la Generaci\xF3n",
    REFRESH_BUILD_NOTE: "Esto borra todos los resultados generados y lanza una nueva generaci\xF3n desde cero. Esto es \xFAtil en ciertas situaciones donde errores de sincronizaci\xF3n o en las plantillas causaron un resultado corrupto.",
    CURRENTLY_REFRESHING_BUILD: "Regenerando ...",
    REFRESHING_BUILD_DONE: "\xA1Acab\xF3 la regeneraci\xF3n!",
    FAILED_TO_LAUNCH_LEKTOR: "Fall\xF3 la ejecuci\xF3n de Lektor.",
    PROJECT: "Proyecto",
    CLOSE_PROJECT: "Cerrar Proyecto",
    OPEN_PROJECT: "Abrir Proyecto",
    BROWSE_WEBSITE: "Navegar Sitio Web",
    VIEW_ADMIN_PANEL: "Ver Panel de Administraci\xF3n",
    QUIT: "Salir",
    FAILED_TO_LOAD_PROJECT: "Fall\xF3 la carga del proyecto :(",
    LOADING_PROJECT: "Cargando proyecto ...",
    INITIALIZING_LEKTOR: "Inicializando Lektor ...",
    QUIT_LEKTOR: "Salir de Lektor",
    FILE: "Archivo",
    UNDO: "Deshacer",
    REDO: "Rehacer",
    CUT: "Cortar",
    COPY: "Copiar",
    PASTE: "Pegar",
    SELECT_ALL: "Seleccionar Todo",
    HELP: "Ayuda",
    VISIT_WEBSITE: "Visitar Web",
    INSTALL_SHELL_COMMAND: "Instalar Comando",
    INSTALL_SHELL_COMMAND_QUESTION: "\xBFQuiere instalar el comando 'lektor'? Son necesarios privilegios de administrador.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Fall\xF3 la instalaci\xF3n de los comandos.",
    INSTALL_SHELL_COMMAND_SUCCESS: "El comando se instal\xF3 con \xE9xito.",
    OPERATION_SUCCESS: "Con \xE9xito",
    YES: "S\xED",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Fall\xF3 al abrir el fichero de contenido",
    OPEN_OTHER_PROJECT: "Abrir otro Proyecto",
    OPEN_OTHER_PROJECT_QUESTION: "Abrir este fichero requiere abrir otro proyecto (%s). El proyecto actual ser\xE1 cerrado. \xBFQuiere continuar?"
  };

  // ../lektor/translations/fr.json
  var fr_default = {
    RETURN_TO_WEBSITE: "Retour au site Web",
    UNLOAD_ACTIVE_TAB: "Des informations ne sont pas enregistr\xE9es, voulez-vous vraiment quitter cette page\xA0?",
    EDIT_METADATA: "Modifier les m\xE9tadonn\xE9es",
    EDIT: "Modifier",
    DELETE: "Supprimer",
    PREVIEW: "Aper\xE7u",
    ALTS: "Alternatives",
    PRIMARY_ALT: "Primaire",
    PRIMARY_OVERLAY: "Superpos\xE9e",
    ADD_CHILD_PAGE: "Ajouter une page",
    ADD_ATTACHMENT: "Joindre un fichier",
    ATTACHMENT_ACTIONS: "Actions sur les fichiers joints",
    PAGE_ACTIONS: "Action sur les pages",
    NO_CHILD_PAGES: "Aucune sous-page",
    CHILD_PAGES: "Sous-pages",
    NO_ATTACHMENTS: "Aucun fichier joint",
    ATTACHMENTS: "Fichiers joints",
    ADD_ATTACHMENT_TO: "Joindre un fichier \xE0 \xAB\xA0%s\xA0\xBB",
    ADD_ATTACHMENT_NOTE: "Vous pouvez t\xE9l\xE9verser un nouveau fichier joint ici.",
    UPLOAD: "T\xE9l\xE9verser",
    PROGRESS: "Progression",
    ERROR_PREFIX: "Erreur\xA0: ",
    ERROR_NO_ID_PROVIDED: "Erreur\xA0: aucun ID fourni.",
    ERROR_PAGE_ID_DUPLICATE: "Une page avec cet ID (%s) existe d\xE9j\xE0.",
    ERROR_INVALID_ID: "ID non valide",
    ERROR_INVALID_DATE: "Date non valide",
    ERROR_INVALID_NUMBER: "Nombre non valide",
    ERROR_INVALID_URL: "URL non valide",
    ERROR: "Erreur",
    ERROR_OCURRED: "Une erreur a \xE9t\xE9 rencontr\xE9e",
    ERROR_REQUEST_FAILED: "La commande n'a pas pu \xEAtre envoy\xE9e au serveur. Le serveur a peut-\xEAtre \xE9t\xE9 arr\xEAt\xE9 ou ne r\xE9pond plus\xA0?",
    ERROR_SERVER_UNAVAILABLE: "Serveur indisponible",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Le serveur ne r\xE9pond pas. Il a d\xFB \xEAtre arr\xEAt\xE9 ou une erreur critique l'a rendu inop\xE9rant et il doit \xEAtre red\xE9marr\xE9.",
    MODEL: "Mod\xE8le",
    ADD_CHILD_PAGE_TO: "Ajouter une sous-page \xE0 \xAB\xA0%s\xA0\xBB",
    ADD_CHILD_PAGE_NOTE: "Vous pouvez ajouter une nouvelle sous-page \xE0 la page ici. Veuillez noter que le mod\xE8le ou l'ID ne peut pas \xEAtre chang\xE9 facilement ult\xE9rieurement.",
    CREATE_CHILD_PAGE: "Ajouter une sous-page",
    DELETE_ATTACHMENT_PROMPT: "Voulez-vous vraiment supprimer ce fichier joint\xA0?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Voulez-vous vraiment supprimer les m\xE9tadonn\xE9es de ce fichier joint alternatif\xA0?",
    DELETE_PAGE_PROMPT: "Voulez-vous vraiment supprimer cette page\xA0?",
    DELETE_PAGE_ALT_PROMPT: "Voulez-vous vraiment supprimer cette version alternative\xA0?",
    DELETE_PAGE_CHILDREN_WARNING: "Cela supprimera aussi les sous-pages de cette page.",
    DELETE_RECORD: "Supprimer \xAB\xA0%s\xA0\xBB",
    DELETE_ALL_PAGE_ALTS: "Supprimer aussi toutes les versions alternatives et les fichiers joints.",
    DELETE_ALL_ATTACHMENT_ALTS: "Supprimer toutes les versions alternatives et les fichiers joints.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Supprimer seulement le premier enregistrement. Les fichiers joints, versions alternatives et sous-pages ne seront pas supprim\xE9es.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Supprimer seulement les m\xE9tadonn\xE9es de la pi\xE8ce jointe primaire.",
    DELETE_PRIMARY_ALT_INFO: "Cet enregistrement \xE9tant l'alternative primaire, il peut \xEAtre supprim\xE9 s\xE9par\xE9ment ou avec tous les autres contenus.",
    CHILD_PAGES_TO_BE_DELETED: "Les sous-pages qui seront supprim\xE9es\xA0:",
    ALTS_TO_BE_DELETED: "Les versions alternatives qui seront supprim\xE9es\xA0:",
    ATTACHMENTS_TO_BE_DELETED: "Les fichiers joints qui seront supprim\xE9s\xA0:",
    YES_DELETE: "Oui, supprimer",
    NO_CANCEL: "Non, annuler",
    SYSTEM_FIELDS: "Champs syst\xE8me",
    EDIT_ATTACHMENT_METADATA_OF: "Modifier les m\xE9tadonn\xE9es du fichier joint \xAB\xA0%s\xA0\xBB",
    EDIT_PAGE_NAME: "Modifier \xAB\xA0%s\xA0\xBB",
    SAVE_CHANGES: "Enregistrer les changements",
    BROWSE_FS: "Parcourir le syst\xE8me de fichiers",
    BROWSE_FS_MAC: "R\xE9v\xE9ler dans le Finder",
    BROWSE_FS_WINDOWS: "Ouvrir dans l'Explorateur",
    ERROR_CANNOT_BROWSE_FS: "Erreur\xA0: le fichier n'existe pas encore.",
    REMOVE_FLOWBLOCK_PROMPT: "Voulez-vous vraiment supprimer ce bloc\xA0?",
    ADD_FLOWBLOCK: "Ajouter un bloc",
    INVALID_INPUT: "Saisie non valide",
    UP: "Haut",
    DOWN: "Bas",
    REMOVE: "Enlever",
    ID: "ID",
    CLOSE: "Fermer",
    CANCEL: "Annuler",
    BACK_TO_OVERVIEW: "Retour \xE0 l'aper\xE7u",
    PUBLISH: "Publier",
    PUBLISH_NOTE: "\xC0 partir de maintenant, vous pouvez publier la version actuelle de votre site Web.",
    PUBLISH_SERVER: "Serveur cible",
    CURRENTLY_PUBLISHING: "Publication en cours\u2026",
    STATE: "Statut",
    PUBLISH_DONE: "Publi\xE9",
    PUBLISH_STATE_BUILDING: "Les changements sont en cours de construction\u2026",
    PUBLISH_STATE_PUBLISH: "Les changements  sont en cours de publication\u2026",
    PUBLISH_STATE_DONE: "Publication effectu\xE9e.",
    FIND_FILES: "Trouver les fichiers",
    FIND_FILES_PLACEHOLDER: "Saisir le nom de la page\u2026",
    ATTACHMENT_TYPE: "Type de fichier joint",
    URL_SLUG: "Motif d'URL (slug)",
    TEMPLATE: "Mod\xE8le",
    HIDE_PAGE: "Masquer la page",
    HIDE_PAGE_EXPLANATION: "Est-ce que cette page devrait \xEAtre masqu\xE9e\xA0?",
    PAGE_IS_DISCOVERABLE: "La page est \xAB\xA0d\xE9couvrable\xA0\xBB",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Si activ\xE9, la page pourra \xEAtre retrouv\xE9e car elle sera index\xE9e, sinon l'URL devra \xEAtre connue pour y acc\xE9der.",
    REFRESH_BUILD: "Actualiser la construction",
    REFRESH_BUILD_NOTE: "Cela supprime tous les r\xE9sultats de la construction et entra\xEEne une reconstruction compl\xE8te. C'est utile dans certaines situations o\xF9 le r\xE9sultat est corrompu suite \xE0 des erreurs de synchronisation ou de mod\xE8les.",
    CURRENTLY_REFRESHING_BUILD: "Actualisation de la construction en cours\u2026",
    REFRESHING_BUILD_DONE: "Actualisation de la construction termin\xE9e",
    FAILED_TO_LAUNCH_LEKTOR: "Impossible de lancer Lektor.",
    PROJECT: "Projet",
    CLOSE_PROJECT: "Fermer le projet",
    OPEN_PROJECT: "Ouvrir le projet",
    BROWSE_WEBSITE: "Ouvrir le site Web",
    VIEW_ADMIN_PANEL: "Voir le panneau administrateur",
    QUIT: "Quitter",
    FAILED_TO_LOAD_PROJECT: "Impossible de charger le projet :(",
    LOADING_PROJECT: "Chargement du projet\u2026",
    INITIALIZING_LEKTOR: "Initialisation de Lektor\u2026",
    QUIT_LEKTOR: "Quitter Lektor",
    FILE: "Fichier",
    UNDO: "Annuler",
    REDO: "R\xE9tablir",
    CUT: "Couper",
    COPY: "Copier",
    PASTE: "Coller",
    SELECT_ALL: "S\xE9lectionner tout",
    HELP: "Aide",
    VISIT_WEBSITE: "Visiter le site Web",
    INSTALL_SHELL_COMMAND: "Installer la commande shell",
    INSTALL_SHELL_COMMAND_QUESTION: "Voulez-vous installer la commande shell \xAB\xA0lektor\xA0\xBB\xA0? Cela n\xE9cessite des droits administrateurs.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Impossible d'installer les commandes shell.",
    INSTALL_SHELL_COMMAND_SUCCESS: "La commande shell  a \xE9t\xE9 correctement install\xE9e.",
    OPERATION_SUCCESS: "Succ\xE8s",
    YES: "Oui",
    NO: "Non",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Impossible d'ouvir le contenu du fichier",
    OPEN_OTHER_PROJECT: "Ouvrir un autre projet",
    OPEN_OTHER_PROJECT_QUESTION: "Ouvrir ce fichier n\xE9cessite d'ouvrir un autre projet (%s). Le projet actuel sera ferm\xE9. Voulez-vous vraiment continuer\xA0?"
  };

  // ../lektor/translations/it.json
  var it_default = {
    RETURN_TO_WEBSITE: "Torna al sito web",
    UNLOAD_ACTIVE_TAB: "Hai informazioni non salvate, sei sicuro di voler abbandonare questa pagina?",
    EDIT_METADATA: "Modifica metadati",
    EDIT: "Modifica",
    DELETE: "Cancella",
    PREVIEW: "Anteprima",
    ALTS: "Alternative",
    PRIMARY_ALT: "Primaria",
    PRIMARY_OVERLAY: "Sovrascritta",
    ADD_CHILD_PAGE: "Aggiungi pagina",
    ADD_ATTACHMENT: "Aggiungi allegato",
    ATTACHMENT_ACTIONS: "Azioni sull'allegato",
    PAGE_ACTIONS: "Azioni sulla pagina",
    NO_CHILD_PAGES: "Nessuna sottopagina",
    CHILD_PAGES: "Sottopagine",
    NO_ATTACHMENTS: "Nessun alleagto",
    ATTACHMENTS: "Allegati",
    ADD_ATTACHMENT_TO: "Aggiungi allegato a \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Puoi caricare un allegato qui.",
    UPLOAD: "Carica",
    PROGRESS: "Avanzamento",
    ERROR_PREFIX: "Errore: ",
    ERROR_NO_ID_PROVIDED: "Nessun ID fornito.",
    ERROR_PAGE_ID_DUPLICATE: "Una pagina con questo ID (%s) esiste gi\xE0.",
    ERROR_INVALID_ID: "ID non valido",
    ERROR_INVALID_DATE: "Data non valida",
    ERROR_INVALID_NUMBER: "Non \xE8 un numero valido",
    ERROR_INVALID_URL: "Non \xE8 un indirizzo valido",
    ERROR: "Errore",
    ERROR_OCURRED: "\xC8 capitato un errore",
    ERROR_REQUEST_FAILED: "Impossibile inviare comandi al server.  Magari il server \xE8 stato spento o \xE8 sovraccarico?",
    ERROR_SERVER_UNAVAILABLE: "Server non disponibile",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Il server non risponde.  Pu\xF2 essere spento o un errore critico l'ha reso non operativo ed \xE8 necessario riavviarlo.",
    MODEL: "Modello",
    ADD_CHILD_PAGE_TO: "Aggiungi sottopagina a \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Puoi aggiungere una nuova sottopagina qui.  Tieni presente che il modello o l'ID non potranno essere cambiati facilmente in futuro.",
    CREATE_CHILD_PAGE: "Aggiungi sottopagina",
    DELETE_ATTACHMENT_PROMPT: "Vuoi veramente cancellare questo allegato?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Vuoi veramente cancellare i metadati di questa alternativa all'allegato?",
    DELETE_PAGE_PROMPT: "Vuoi veramente cancellare questa pagina?",
    DELETE_PAGE_ALT_PROMPT: "Vuoi veramente cancellare questa alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Questo canceller\xE0 anche le sottopagine di questa pagina.",
    DELETE_RECORD: "Cancella \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Cancella anche tutte le alternative ed i file allegati.",
    DELETE_ALL_ATTACHMENT_ALTS: "Cancella tutte le alternative ed il file allegato.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Cancella solo la pagina principale. Allegati, alternative e sottopagine nnon verranno cancellate.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Cancella solo i metadati dell'allegato principale.",
    DELETE_PRIMARY_ALT_INFO: "Dato che questo oggetto \xE8 l'alternativa primaria, pu\xF2 essere cancellato separatamente o insieme al resto del contenuto.",
    CHILD_PAGES_TO_BE_DELETED: "Sottopagine che verranno cancellate:",
    ALTS_TO_BE_DELETED: "Alternative che verranno cancellate:",
    ATTACHMENTS_TO_BE_DELETED: "Allegati che verranno cancellati:",
    YES_DELETE: "Si, cancella",
    NO_CANCEL: "No, annulla",
    SYSTEM_FIELDS: "Campi di sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Modifica i metadati dell'allegato \u201C%s\u201D",
    EDIT_PAGE_NAME: "Modifica \u201C%s\u201D",
    SAVE_CHANGES: "Salva modifiche",
    BROWSE_FS: "Apri nel filesystem",
    BROWSE_FS_MAC: "Apri in Finder",
    BROWSE_FS_WINDOWS: "Apri in Esplora risorse",
    ERROR_CANNOT_BROWSE_FS: "Errore: il file non esiste.",
    REMOVE_FLOWBLOCK_PROMPT: "Vuoi davvero cancellare questo blocco?",
    ADD_FLOWBLOCK: "Aggiungi blocco",
    INVALID_INPUT: "Input invalido",
    UP: "Su",
    DOWN: "Gi\xF9",
    REMOVE: "Rimuovi",
    ID: "ID",
    CLOSE: "Chiudi",
    CANCEL: "Annulla",
    BACK_TO_OVERVIEW: "Torna alla panoramica",
    PUBLISH: "Pubblica",
    PUBLISH_NOTE: "Da qui puoi pubblicare la versione corrente del sito web.",
    PUBLISH_SERVER: "Server di destinazione",
    CURRENTLY_PUBLISHING: "Pubblicazione in corso...",
    STATE: "Stato",
    PUBLISH_DONE: "Pubblicato",
    PUBLISH_STATE_BUILDING: "Costruendo le pagine modificate...",
    PUBLISH_STATE_PUBLISH: "Pubblicando le pagine modificate...",
    PUBLISH_STATE_DONE: "Pubblicazione completata.",
    FIND_FILES: "Trova i file",
    FIND_FILES_PLACEHOLDER: "Inserisci il nome della pagina...",
    ATTACHMENT_TYPE: "Tipo dell'allegato",
    URL_SLUG: "Alias della pagina",
    TEMPLATE: "Template",
    HIDE_PAGE: "Nascondi pagina",
    HIDE_PAGE_EXPLANATION: "Questa pagina deve essere nascosta?",
    PAGE_IS_DISCOVERABLE: "La pagina pu\xF2 essere scoperta?",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Se \xE8 abilitato la pagina pu\xF2 essere scoperta, altrimenti l'indirizzo deve essere noto.",
    REFRESH_BUILD: "Esegui build completa",
    REFRESH_BUILD_NOTE: "Questo cancella tutti i risultati precedenti, eseguendo una build completa.  Questo \xE8 utile in casi in cui errori di sincronizzazione o errori nei template rendono il risultato corrotto.",
    CURRENTLY_REFRESHING_BUILD: "Eseguendo build completa...",
    REFRESHING_BUILD_DONE: "Build completa eseguita!",
    FAILED_TO_LAUNCH_LEKTOR: "Impossibile eseguire Lektor.",
    PROJECT: "Progetto",
    CLOSE_PROJECT: "Chiudi progetto",
    OPEN_PROJECT: "Apri progetto",
    BROWSE_WEBSITE: "Naviga nel sito web",
    VIEW_ADMIN_PANEL: "Mostra pannello di amministrazione",
    QUIT: "Esci",
    FAILED_TO_LOAD_PROJECT: "Impossibile caricare il progetto :(",
    LOADING_PROJECT: "Caricamento del progetto...",
    INITIALIZING_LEKTOR: "Preparazione di Lektor...",
    QUIT_LEKTOR: "Esci da Lektor",
    FILE: "File",
    UNDO: "Annulla",
    REDO: "Ripeti",
    CUT: "Taglia",
    COPY: "Copia",
    PASTE: "Incolla",
    SELECT_ALL: "Seleziona tutto",
    HELP: "Aiuto",
    VISIT_WEBSITE: "Visita il sito web",
    INSTALL_SHELL_COMMAND: "Installa comando shell",
    INSTALL_SHELL_COMMAND_QUESTION: "Vuoi installare il comando shell 'lektor'? Questo richiede privilegi di amministrazione.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Impossibile installare il comando shell.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Il comando shell \xE8 stato installato con successo.",
    OPERATION_SUCCESS: "Successo",
    YES: "Si",
    NO: "No",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Impossibile aprire il file di contenuto",
    OPEN_OTHER_PROJECT: "Apri un altro progetto",
    OPEN_OTHER_PROJECT_QUESTION: "Aprire questo file richiede l'apertura di un altro progetto (%s). Il progetto corrente verr\xE0 chiuso. Vuoi proseguire?"
  };

  // ../lektor/translations/ja.json
  var ja_default = {
    RETURN_TO_WEBSITE: "Website\u306B\u623B\u308B",
    UNLOAD_ACTIVE_TAB: "\u4FDD\u5B58\u3057\u3066\u3044\u306A\u3044\u7DE8\u96C6\u304C\u3042\u308A\u307E\u3059\u3001\u672C\u5F53\u306B\u30DA\u30FC\u30B8\u3092\u96E2\u308C\u307E\u3059\u304B?",
    EDIT_METADATA: "\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u7DE8\u96C6",
    EDIT: "\u7DE8\u96C6",
    DELETE: "\u524A\u9664",
    PREVIEW: "\u30D7\u30EC\u30D3\u30E5\u30FC",
    ALTS: "\u4EE3\u66FF",
    PRIMARY_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30FC",
    PRIMARY_OVERLAY: "\u4E0A\u66F8\u304D",
    ADD_CHILD_PAGE: "\u30DA\u30FC\u30B8\u306E\u8FFD\u52A0",
    ADD_ATTACHMENT: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306E\u8FFD\u52A0",
    ATTACHMENT_ACTIONS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306E\u30A2\u30AF\u30B7\u30E7\u30F3",
    PAGE_ACTIONS: "\u30DA\u30FC\u30B8\u30A2\u30AF\u30B7\u30E7\u30F3",
    NO_CHILD_PAGES: "\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u3042\u308A\u307E\u305B\u3093",
    CHILD_PAGES: "\u30B5\u30D6\u30DA\u30FC\u30B8",
    NO_ATTACHMENTS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093",
    ATTACHMENTS: "\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8",
    ADD_ATTACHMENT_TO: "\u201C%s\u201D\u306B\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0\u3059\u308B",
    ADD_ATTACHMENT_NOTE: "\u3053\u3053\u306B\u65B0\u3057\u3044\u30A2\u30BF\u30C3\u30C1\u30E1\u30F3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u3059",
    UPLOAD: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",
    PROGRESS: "\u30D7\u30ED\u30B0\u30EC\u30B9",
    ERROR_PREFIX: "\u30A8\u30E9\u30FC: ",
    ERROR_NO_ID_PROVIDED: "ID\u304C\u3042\u308A\u307E\u305B\u3093",
    ERROR_PAGE_ID_DUPLICATE: "\u3053\u306EID (%s) \u306E\u30DA\u30FC\u30B8\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059",
    ERROR_INVALID_ID: "ID\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR_INVALID_DATE: "\u65E5\u4ED8\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR_INVALID_NUMBER: "\u4E0D\u6B63\u306A\u756A\u53F7\u3067\u3059",
    ERROR_INVALID_URL: "URL\u304C\u4E0D\u6B63\u3067\u3059",
    ERROR: "\u30A8\u30E9\u30FC",
    ERROR_OCURRED: "\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F",
    ERROR_REQUEST_FAILED: "\u30B5\u30FC\u30D0\u30FC\u306B\u30B3\u30DE\u30F3\u30C9\u304C\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3001\u30B5\u30FC\u30D0\u30FC\u304C\u6B62\u307E\u3063\u3066\u3044\u308B\u304B\u5FDC\u7B54\u304C\u306A\u3044\u306E\u304B\u3082\u3057\u308C\u307E\u305B\u3093",
    ERROR_SERVER_UNAVAILABLE: "\u30B5\u30FC\u30D0\u30FC\u30A2\u30F3\u30A2\u30D9\u30A4\u30E9\u30D6\u30EB",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u30B5\u30FC\u30D0\u30FC\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3001\u4E2D\u65AD\u3055\u308C\u305F\u304B\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u305F\u305F\u305F\u3081\u30AA\u30DA\u30EC\u30FC\u30B7\u30E7\u30F3\u304C\u5B8C\u4E86\u3057\u306A\u304B\u3063\u305F\u305F\u3081\u30EA\u30B9\u30BF\u30FC\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002",
    MODEL: "\u30E2\u30C7\u30EB",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D\u306B\u30B5\u30D6\u30DA\u30FC\u30B8\u3092\u8FFD\u52A0\u3059\u308B",
    ADD_CHILD_PAGE_NOTE: "\u3053\u306E\u30DA\u30FC\u30B8\u306B\u30B5\u30D6\u30DA\u30FC\u30B8\u304C\u4F5C\u308C\u307E\u3059\u3002\u6CE8\u610F: \u30E2\u30C7\u30EB\u307E\u305F\u306FID\u306F\u305D\u306E\u5F8C\u7C21\u5358\u306B\u306F\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002",
    CREATE_CHILD_PAGE: "\u30C1\u30E3\u30A4\u30EB\u30C9\u30DA\u30FC\u30B8\u3092\u4F5C\u308B",
    DELETE_ATTACHMENT_PROMPT: "\u672C\u5F53\u306B\u3053\u306E\u6DFB\u4ED8\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u672C\u5F53\u306B\u3053\u306E\u6DFB\u4ED8\u4EE3\u66FF\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_PAGE_PROMPT: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u672C\u5F53\u306B\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    DELETE_PAGE_ALT_PROMPT: "\u3053\u306E\u4EE3\u66FF\u3092\u672C\u80FD\u306B\u524A\u9664\u3057\u307E\u3059\u304B?",
    DELETE_PAGE_CHILDREN_WARNING: "\u3053\u306E\u30DA\u30FC\u30B8\u306E\u30B5\u30D6\u30DA\u30FC\u30B8\u3082\u524A\u9664\u3055\u308C\u307E\u3059",
    DELETE_RECORD: "\u201C%s\u201D\u3092\u524A\u9664",
    DELETE_ALL_PAGE_ALTS: "\u3059\u3079\u3066\u306E\u4EE3\u66FF\u3068\u6DFB\u4ED8\u3082\u524A\u9664",
    DELETE_ALL_ATTACHMENT_ALTS: "\u3059\u3079\u3066\u306E\u4EE3\u66FF\u3068\u6DFB\u4ED8\u3092\u524A\u9664",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30EC\u30B3\u30FC\u30C9\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u307F\u524A\u9664\u3002\u6DFB\u4ED8\u3001\u4EE3\u66FF\u3001\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u524A\u9664\u3055\u308C\u307E\u305B\u3093\u3002",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u30D7\u30E9\u30A4\u30DE\u30EA\u30EC\u30B3\u30FC\u30C9\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u307F\u524A\u9664",
    DELETE_PRIMARY_ALT_INFO: "\u3053\u306E\u30EC\u30B3\u30FC\u30C9\u306F\u30D7\u30E9\u30A4\u30DE\u30EA\u306E\u4EE3\u66FF\u306E\u305F\u3081\u3001\u5225\u306B\u524A\u9664\u3059\u308B\u3053\u3068\u3082\u3001\u4ED6\u306E\u3059\u3079\u3066\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3068\u3082\u306B\u524A\u9664\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002",
    CHILD_PAGES_TO_BE_DELETED: "\u30B5\u30D6\u30DA\u30FC\u30B8\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    ALTS_TO_BE_DELETED: "\u4EE3\u66FF\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    ATTACHMENTS_TO_BE_DELETED: "\u6DFB\u4ED8\u306F\u524A\u9664\u3055\u308C\u307E\u3059:",
    YES_DELETE: "\u306F\u3044\u3001\u524A\u9664\u3057\u307E\u3059",
    NO_CANCEL: "\u3044\u3044\u3048\u3001\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059",
    SYSTEM_FIELDS: "\u30B7\u30B9\u30C6\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9",
    EDIT_ATTACHMENT_METADATA_OF: "\u6DFB\u4ED8 \u201C%s\u201D\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u7DE8\u96C6",
    EDIT_PAGE_NAME: "\u201C%s\u201D\u3092\u7DE8\u96C6",
    SAVE_CHANGES: "\u7DE8\u96C6\u3092\u4FDD\u5B58",
    BROWSE_FS: "\u30D5\u30A1\u30A4\u30EB\u30B7\u30B9\u30C6\u30E0\u3067\u95B2\u89A7\u3059\u308B",
    BROWSE_FS_MAC: "\u30D5\u30A1\u30A4\u30F3\u30C0\u30FC\u3067\u958B\u304F",
    BROWSE_FS_WINDOWS: "\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u3067\u958B\u304F",
    ERROR_CANNOT_BROWSE_FS: "\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u306F\u5B58\u5728\u3057\u307E\u305B\u3093",
    REMOVE_FLOWBLOCK_PROMPT: "\u3053\u306E\u30D6\u30ED\u30C3\u30AF\u3092\u672C\u5F53\u306B\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
    ADD_FLOWBLOCK: "\u30D6\u30ED\u30C3\u30AF\u3092\u8FFD\u52A0",
    INVALID_INPUT: "\u4E0D\u6B63\u306A\u5165\u529B",
    UP: "\u30A2\u30C3\u30D7",
    DOWN: "\u30C0\u30A6\u30F3",
    REMOVE: "\u53D6\u308A\u9664\u304F",
    ID: "ID",
    CLOSE: "\u9589\u3058\u308B",
    CANCEL: "\u30AD\u30E3\u30F3\u30BB\u30EB",
    BACK_TO_OVERVIEW: "\u30AA\u30FC\u30D0\u30FC\u30D3\u30E5\u30FC\u306B\u623B\u308B",
    PUBLISH: "\u516C\u958B",
    PUBLISH_NOTE: "\u3053\u3053\u304B\u3089\u73FE\u884C\u306E\u30A6\u30A7\u30D6\u30B5\u30A4\u30C8\u3092\u516C\u958B\u3067\u304D\u307E\u3059\u3002",
    PUBLISH_SERVER: "\u30BF\u30FC\u30B2\u30C3\u30C8\u30B5\u30FC\u30D0\u30FC",
    CURRENTLY_PUBLISHING: "\u516C\u958B \u2026",
    STATE: "\u72B6\u614B",
    PUBLISH_DONE: "\u516C\u958B\u4E2D",
    PUBLISH_STATE_BUILDING: "\u5909\u66F4\u304C\u3092\u30D3\u30EB\u30C9\u3057\u3066\u3044\u307E\u3059...",
    PUBLISH_STATE_PUBLISH: "\u5909\u66F4\u304C\u516C\u958B\u3055\u308C\u307E\u3057\u305F ...",
    PUBLISH_STATE_DONE: "\u516C\u958B\u5B8C\u4E86",
    FIND_FILES: "\u30D5\u30A1\u30A4\u30EB\u3092\u898B\u3064\u3051\u308B",
    FIND_FILES_PLACEHOLDER: "\u30DA\u30FC\u30B8\u540D\u3092\u5165\u529B...",
    ATTACHMENT_TYPE: "\u6DFB\u4ED8\u30BF\u30A4\u30D7",
    URL_SLUG: "URL\u30B9\u30C8\u30EA\u30F3\u30B0",
    TEMPLATE: "\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8",
    HIDE_PAGE: "\u30D8\u30FC\u30B8\u3092\u96A0\u3059",
    HIDE_PAGE_EXPLANATION: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u975E\u8868\u793A\u306B\u3057\u307E\u3059\u304B?",
    PAGE_IS_DISCOVERABLE: "\u3053\u306E\u30DA\u30FC\u30B8\u306F\u5916\u90E8\u304B\u3089\u898B\u308B\u3053\u3068\u304C\u53EF\u80FD\u3067\u3059",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\u6709\u52B9\u306B\u3059\u308B\u3053\u3068\u3067\u3001\u30DA\u30FC\u30B8\u306F\u767A\u898B\u53EF\u80FD\u306B\u306A\u308A\u307E\u3059\u3001\u305D\u3046\u3057\u306A\u3044\u5834\u5408\u306F\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306E\u306B\u305D\u306EURL\u3092\u77E5\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",
    REFRESH_BUILD: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0",
    REFRESH_BUILD_NOTE: "\u3053\u308C\u306F\u3001\u30AD\u30E3\u30C3\u30B7\u30E5\u6E08\u307F\u306E\u30D3\u30EB\u30C9\u7D50\u679C\u3092\u3059\u3079\u3066\u524A\u9664\u3057\u3001\u6700\u521D\u304B\u3089\u306E\u69CB\u7BC9\u3092\u958B\u59CB\u3057\u307E\u3059\u3002\u540C\u671F\u306E\u30A8\u30E9\u30FC\u3084\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u5185\u306E\u30DF\u30B9\u306B\u3088\u308A\u51FA\u529B\u304C\u4E0D\u6B63\u306A\u5834\u5408\u306B\u6709\u52B9\u3067\u3059\u3002",
    CURRENTLY_REFRESHING_BUILD: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0\u4E2D...",
    REFRESHING_BUILD_DONE: "\u30D3\u30EB\u30C9\u3092\u66F4\u65B0\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor\u3092\u958B\u3051\u308B\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
    PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8",
    CLOSE_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u9589\u3058\u308B",
    OPEN_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u958B\u3051\u308B",
    BROWSE_WEBSITE: "\u30D6\u30E9\u30A6\u30B6\u3067\u958B\u304F",
    VIEW_ADMIN_PANEL: "\u30A2\u30C9\u30DF\u30F3\u30D1\u30CD\u30EB\u3092\u958B\u304F",
    QUIT: "\u7D42\u4E86",
    FAILED_TO_LOAD_PROJECT: "Failed to load the project :(",
    LOADING_PROJECT: "\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059 ...",
    INITIALIZING_LEKTOR: "Lektor\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059 ...",
    QUIT_LEKTOR: "Lektor\u3092\u7D42\u4E86\u3059\u308B",
    FILE: "\u30D5\u30A1\u30A4\u30EB",
    UNDO: "\u30A2\u30F3\u30C9\u30A5\u30FC",
    REDO: "\u30EA\u30C9\u30A5\u30FC",
    CUT: "\u30AB\u30C3\u30C8",
    COPY: "\u30B3\u30D4\u30FC",
    PASTE: "\u30DA\u30FC\u30B9\u30C8",
    SELECT_ALL: "\u5168\u3066\u3092\u9078\u629E",
    HELP: "\u30D8\u30EB\u30D7",
    VISIT_WEBSITE: "Website\u3092\u8A2A\u306D\u308B",
    INSTALL_SHELL_COMMAND: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",
    INSTALL_SHELL_COMMAND_QUESTION: "\u300Clektor\u300D\u306E\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059\u304B\uFF1F\u3002\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3059\u308B\u306B\u306F\u7BA1\u7406\u6A29\u9650\u304C\u5FC5\u8981\u3067\u3059\u3002",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u30B7\u30A7\u30EB\u30B3\u30DE\u30F3\u30C9\u306E\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u306B\u6210\u529F\u3057\u307E\u3057\u305F\u3002",
    OPERATION_SUCCESS: "\u6210\u529F",
    YES: "\u306F\u3044",
    NO: "\u3044\u3044\u3048",
    OK: "\u4E86\u89E3",
    FAILED_TO_OPEN_CONTENT_FILE: "\u30B3\u30F3\u30C6\u30F3\u30C4\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u306E\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
    OPEN_OTHER_PROJECT: "\u4ED6\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u958B\u304F",
    OPEN_OTHER_PROJECT_QUESTION: "\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u306B\u306F\u3001\u4ED6\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8(%s)\u3092\u958B\u304F\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u73FE\u5728\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306F\u9589\u3058\u3089\u308C\u307E\u3059\u3001\u51E6\u7406\u3092\u7D99\u7D9A\u3057\u307E\u3059\u304B?"
  };

  // ../lektor/translations/ko.json
  var ko_default = {
    RETURN_TO_WEBSITE: "\uC0AC\uC774\uD2B8\uB85C \uB418\uB3CC\uC544\uAC00\uAE30",
    UNLOAD_ACTIVE_TAB: "\uC800\uC7A5\uB418\uC9C0 \uC54A\uC740 \uC815\uBCF4\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uD398\uC774\uC9C0\uB97C \uB5A0\uB098\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
    EDIT_METADATA: "\uBA54\uD0C0\uB370\uC774\uD130 \uC218\uC815",
    EDIT: "\uC218\uC815",
    DELETE: "\uC0AD\uC81C",
    PREVIEW: "\uBBF8\uB9AC\uBCF4\uAE30",
    ALTS: "\uB2E4\uB978 \uC5B8\uC5B4",
    PRIMARY_ALT: "\uAE30\uBCF8",
    PRIMARY_OVERLAY: "\uACB9\uCE5C",
    ADD_CHILD_PAGE: "\uD398\uC774\uC9C0 \uCD94\uAC00",
    ADD_ATTACHMENT: "\uCCA8\uBD80 \uD30C\uC77C \uCD94\uAC00",
    ATTACHMENT_ACTIONS: "\uCCA8\uBD80 \uD30C\uC77C \uC791\uC5C5",
    PAGE_ACTIONS: "\uD398\uC774\uC9C0 \uC791\uC5C5",
    NO_CHILD_PAGES: "\uD558\uC704 \uD398\uC774\uC9C0 \uC5C6\uC74C",
    CHILD_PAGES: "\uD558\uC704 \uD398\uC774\uC9C0",
    NO_ATTACHMENTS: "\uCCA8\uBD80 \uD30C\uC77C \uC5C6\uC74C",
    ATTACHMENTS: "\uCCA8\uBD80 \uD30C\uC77C",
    ADD_ATTACHMENT_TO: "\u201C%s\u201C\uC5D0\uC11C \uCCA8\uBD80 \uD30C\uC77C \uCD94\uAC00",
    ADD_ATTACHMENT_NOTE: "\uC5EC\uAE30\uC11C \uC0C8\uB85C\uC6B4 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    UPLOAD: "\uC5C5\uB85C\uB4DC",
    PROGRESS: "\uC9C4\uD589",
    ERROR_PREFIX: "\uC5D0\uB7EC: ",
    ERROR_NO_ID_PROVIDED: "\uC81C\uACF5\uB41C ID\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",
    ERROR_PAGE_ID_DUPLICATE: "\uC774 ID (%s) \uD398\uC774\uC9C0\uB294 \uC774\uBBF8 \uC874\uC7AC\uD569\uB2C8\uB2E4.",
    ERROR_INVALID_ID: "\uC798\uBABB\uB41C ID",
    ERROR_INVALID_DATE: "\uC798\uBABB\uB41C \uB0A0\uC9DC",
    ERROR_INVALID_NUMBER: "\uC720\uD6A8\uD55C \uC22B\uC790 \uC544\uB2D8",
    ERROR_INVALID_URL: "\uC720\uD6A8\uD55C URL \uC544\uB2D8",
    ERROR: "\uC5D0\uB7EC",
    ERROR_OCURRED: "\uC624\uB958 \uBC1C\uC0DD",
    ERROR_REQUEST_FAILED: "\uC11C\uBC84\uC5D0 \uBA85\uB839\uC744 \uBCF4\uB0B4\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uC11C\uBC84\uAC00 \uC911\uC9C0\uB418\uC5C8\uAC70\uB098 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC744 \uC218\uB3C4 \uC788\uB124\uC694?",
    ERROR_SERVER_UNAVAILABLE: "\uC11C\uBC84\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\uC11C\uBC84\uAC00 \uC751\uB2F5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC11C\uBC84\uAC00 \uC911\uC9C0\uB418\uC5C8\uAC70\uB098, \uC7AC\uC2DC\uC791\uC744 \uD544\uC694\uB85C \uD558\uB294 \uCE58\uBA85\uC801\uC778 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.",
    MODEL: "\uBAA8\uB378",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D\uC5D0 \uD558\uC704 \uD398\uC774\uC9C0 \uCD94\uAC00",
    ADD_CHILD_PAGE_NOTE: "\uC774 \uD398\uC774\uC9C0\uC5D0\uC11C \uC0C8\uB85C\uC6B4 \uD558\uC704 \uD398\uC774\uC9C0\uB97C \uCD94\uAC00\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.  \uC911\uC694, \uB098\uC911\uC5D0 \uBAA8\uB378\uC774\uB098 ID\uB97C \uBCC0\uACBD\uD558\uAE30 \uC5B4\uB835\uC2B5\uB2C8\uB2E4.",
    CREATE_CHILD_PAGE: "\uD558\uC704 \uD398\uC774\uC9C0 \uCD94\uAC00",
    DELETE_ATTACHMENT_PROMPT: "\uC815\uB9D0\uB85C \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\uC815\uB9D0\uB85C \uCCA8\uBD80 \uD30C\uC77C\uC758 \uB2E4\uB978 \uC5B8\uC5B4\uC5D0 \uB300\uD55C \uBA54\uD0C0\uB370\uC774\uD130\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_PROMPT: "\uC815\uB9D0\uB85C \uC774 \uD398\uC774\uC9C0\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_ALT_PROMPT: "\uC815\uB9D0\uB85C \uC774 \uB2E4\uB978 \uC5B8\uC5B4\uB97C \uC0AD\uC81C\uD558\uC2E4 \uAC74\uAC00\uC694?",
    DELETE_PAGE_CHILDREN_WARNING: "\uC774 \uD398\uC774\uC9C0\uC758 \uD558\uC704 \uD398\uC774\uC9C0 \uB610\uD55C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",
    DELETE_RECORD: "\u201C%s\u201D \uC0AD\uC81C",
    DELETE_ALL_PAGE_ALTS: "\uB610\uD55C, \uBAA8\uB4E0 \uB2E4\uB978 \uC5B8\uC5B4\uC640 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
    DELETE_ALL_ATTACHMENT_ALTS: "\uBAA8\uB4E0 \uB2E4\uB978 \uC5B8\uC5B4\uC640 \uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\uC624\uC9C1 \uC8FC \uB808\uCF54\uB4DC\uB9CC \uC0AD\uC81C\uB429\uB2C8\uB2E4. \uCCA8\uBD80 \uD30C\uC77C, \uB2E4\uB978 \uC5B8\uC5B4, \uD558\uC704 \uD398\uC774\uC9C0\uB294 \uC0AD\uC81C\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\uC624\uC9C1 \uC8FC \uB808\uCF54\uB4DC\uC758 \uBA54\uD0C0\uB370\uC774\uD130\uB9CC \uC0AD\uC81C\uB429\uB2C8\uB2E4.",
    DELETE_PRIMARY_ALT_INFO: "\uC774 \uB808\uCF54\uB4DC\uB294 \uAE30\uBCF8 \uC5B8\uC5B4\uC774\uAE30 \uB54C\uBB38\uC5D0 \uBCC4\uB3C4\uB85C \uC0AD\uC81C\uD558\uAC70\uB098 \uB2E4\uB978 \uCF58\uD150\uCE20 \uC804\uBD80\uC640 \uAC19\uC774 \uC0AD\uC81C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    CHILD_PAGES_TO_BE_DELETED: "\uD558\uC704 \uD398\uC774\uC9C0\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    ALTS_TO_BE_DELETED: "\uB2E4\uB978 \uC5B8\uC5B4\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    ATTACHMENTS_TO_BE_DELETED: "\uCCA8\uBD80 \uD30C\uC77C\uC744 \uC0AD\uC81C\uD569\uB2C8\uB2E4:",
    YES_DELETE: "\uB124, \uC0AD\uC81C",
    NO_CANCEL: "\uC544\uB2C8\uC694, \uCDE8\uC18C",
    SYSTEM_FIELDS: "\uC2DC\uC2A4\uD15C \uD544\uB4DC",
    EDIT_ATTACHMENT_METADATA_OF: "\uCCA8\uBD80 \uD30C\uC77C \u201C%s\u201D\uC758 \uBA54\uD0C0\uB370\uC774\uD130 \uC218\uC815",
    EDIT_PAGE_NAME: "\u201C%s\u201D \uC218\uC815",
    SAVE_CHANGES: "\uBCC0\uACBD \uC800\uC7A5",
    BROWSE_FS: "\uD30C\uC77C \uC2DC\uC2A4\uD15C \uAC80\uC0C9",
    BROWSE_FS_MAC: "\uD30C\uC778\uB354\uC5D0\uC11C \uAC80\uC0C9",
    BROWSE_FS_WINDOWS: "\uD0D0\uC0C9\uAE30\uC5D0\uC11C \uC5F4\uAE30",
    ERROR_CANNOT_BROWSE_FS: "\uC624\uB958: \uD30C\uC77C\uC774 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
    REMOVE_FLOWBLOCK_PROMPT: "\uC774 \uBE14\uB85D\uC744 \uC81C\uAC70\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",
    ADD_FLOWBLOCK: "\uBE14\uB85D \uCD94\uAC00",
    INVALID_INPUT: "\uC798\uBABB\uB41C \uC785\uB825",
    UP: "\uC704\uB85C",
    DOWN: "\uC544\uB798\uB85C",
    REMOVE: "\uC81C\uAC70",
    ID: "ID",
    CLOSE: "\uB2EB\uAE30",
    CANCEL: "\uCDE8\uC18C",
    BACK_TO_OVERVIEW: "\uAC1C\uC694\uB85C \uB418\uB3CC\uC544\uAC00\uAE30",
    PUBLISH: "\uBC1C\uD589",
    PUBLISH_NOTE: "\uC5EC\uAE30\uC11C \uC6F9\uC0AC\uC774\uD2B8 \uD604\uC7AC \uBC84\uC804\uC744 \uBC1C\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    PUBLISH_SERVER: "\uB300\uC0C1 \uC11C\uBC84",
    CURRENTLY_PUBLISHING: "\uBC1C\uD589 \uC911 ...",
    STATE: "\uC0C1\uD0DC",
    PUBLISH_DONE: "\uBC1C\uD589\uB428",
    PUBLISH_STATE_BUILDING: "\uBCC0\uACBD \uC0AC\uD56D \uBE4C\uB4DC \uC911 ...",
    PUBLISH_STATE_PUBLISH: "\uBCC0\uACBD \uC0AC\uD56D \uBC1C\uD589 \uC911 ...",
    PUBLISH_STATE_DONE: "\uBC1C\uD589 \uC644\uB8CC.",
    FIND_FILES: "\uD30C\uC77C \uCC3E\uAE30",
    FIND_FILES_PLACEHOLDER: "\uD398\uC774\uC9C0 \uC774\uB984 \uC785\uB825 ...",
    ATTACHMENT_TYPE: "\uCCA8\uBD80 \uD30C\uC77C \uD615\uC2DD",
    URL_SLUG: "URL slug",
    TEMPLATE: "\uD15C\uD50C\uB9BF",
    HIDE_PAGE: "\uD398\uC774\uC9C0 \uC228\uAE30\uAE30",
    HIDE_PAGE_EXPLANATION: "\uC774 \uD398\uC774\uC9C0\uB97C \uC228\uAE38\uAE4C\uC694?",
    PAGE_IS_DISCOVERABLE: "\uD398\uC774\uC9C0 \uB2E4\uC2DC\uBCF4\uC774\uAE30",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\uC774 \uC124\uC815\uC774 \uD65C\uC131\uD654\uB418\uC5B4\uC788\uC73C\uBA74 \uD398\uC774\uC9C0\uB97C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 URL\uB9CC \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
    REFRESH_BUILD: "\uC0C8\uB85C\uC6B4 \uBE4C\uB4DC",
    REFRESH_BUILD_NOTE: "\uC774 \uD2B8\uB9AC\uAC70\uB294 \uCC98\uC74C\uBD80\uD130 \uB2E4\uC2DC \uBE4C\uB4DC\uD569\uB2C8\uB2E4. \uADF8\uB7EC\uBA74\uC11C \uC774\uC804 \uBE4C\uB4DC\uD558\uBA74\uC11C \uCE90\uC2DC\uB41C \uACB0\uACFC\uB97C \uC0AD\uC81C\uD569\uB2C8\uB2E4. \uC774 \uAE30\uB2A5\uC740 \uB3D9\uAE30\uD654 \uC624\uB958\uB098 \uD15C\uD50C\uB9BF\uC5D0\uC11C \uC798\uBABB\uB41C \uC124\uC815\uC73C\uB85C \uCD9C\uB825\uBB3C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC744 \uB54C \uC720\uC6A9\uD569\uB2C8\uB2E4.",
    CURRENTLY_REFRESHING_BUILD: "\uC9C0\uAE08 \uC0C8\uB86D\uAC8C \uBE4C\uB4DC \uC911 ...",
    REFRESHING_BUILD_DONE: "\uC0C8\uB85C\uC6B4 \uBE4C\uB4DC\uB97C \uC644\uB8CC\uD558\uC600\uC2B5\uB2C8\uB2E4!",
    FAILED_TO_LAUNCH_LEKTOR: "\uC2E4\uD589\uD558\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    PROJECT: "\uD504\uB85C\uC81D\uD2B8",
    CLOSE_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uB2EB\uAE30",
    OPEN_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uC5F4\uAE30",
    BROWSE_WEBSITE: "\uC6F9\uC0AC\uC774\uD2B8 \uCC3E\uC544\uBCF4\uAE30",
    VIEW_ADMIN_PANEL: "\uAD00\uB9AC\uC790 \uD310\uB12C \uBCF4\uAE30",
    QUIT: "\uB098\uAC00\uAE30",
    FAILED_TO_LOAD_PROJECT: "\uD504\uB85C\uC81D\uD2B8\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4. :(",
    LOADING_PROJECT: "\uD504\uB85C\uC81D\uD2B8 \uBD88\uB7EC\uC624\uB294 \uC911 ...",
    INITIALIZING_LEKTOR: "Lektor \uCD08\uAE30\uD654 \uC911 ...",
    QUIT_LEKTOR: "Lektor \uB098\uAC00\uAE30",
    FILE: "\uD30C\uC77C",
    UNDO: "\uC2E4\uD589 \uCDE8\uC18C",
    REDO: "\uB2E4\uC2DC \uC2E4\uD589",
    CUT: "\uC798\uB77C\uB0B4\uAE30",
    COPY: "\uBCF5\uC0AC",
    PASTE: "\uBD99\uC5EC\uB123\uAE30",
    SELECT_ALL: "\uC804\uBD80 \uC120\uD0DD",
    HELP: "\uB3C4\uC6C0\uB9D0",
    VISIT_WEBSITE: "\uC6F9\uC0AC\uC774\uD2B8 \uBC29\uBB38",
    INSTALL_SHELL_COMMAND: "\uC258 \uCEE4\uBA58\uB4DC \uC124\uCE58",
    INSTALL_SHELL_COMMAND_QUESTION: "'lektor' \uC258 \uBA85\uB839\uC744 \uC124\uCE58\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uAD00\uB9AC\uC790 \uAD8C\uD55C\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\uC258 \uBA85\uB839\uC744 \uC124\uCE58\uD558\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    INSTALL_SHELL_COMMAND_SUCCESS: "\uC258 \uBA85\uB839\uC774 \uC131\uACF5\uC801\uC73C\uB85C \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
    OPERATION_SUCCESS: "\uC644\uB8CC",
    YES: "\uC608",
    NO: "\uC544\uB2C8\uC624",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "\uD604\uC7AC \uD30C\uC77C\uC744 \uC5F4\uC9C0 \uBABB\uD558\uC600\uC2B5\uB2C8\uB2E4.",
    OPEN_OTHER_PROJECT: "\uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8 \uC5F4\uAE30",
    OPEN_OTHER_PROJECT_QUESTION: "\uC5F4\uB824\uB294 \uD30C\uC77C\uC740 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8 (%s)\uB97C \uC5F4\uC5B4\uC57C\uD569\uB2C8\uB2E4. \uD604\uC7AC \uD504\uB85C\uC81D\uD2B8\uB294 \uC885\uB8CC\uB429\uB2C8\uB2E4. \uACC4\uC18D \uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?"
  };

  // ../lektor/translations/nl.json
  var nl_default = {
    RETURN_TO_WEBSITE: "Terug naar Website",
    UNLOAD_ACTIVE_TAB: "U hebt niet-opgeslagen data, weet je zeker dat je deze pagina wil verlaten?",
    EDIT_METADATA: "Bewerk Metadata",
    EDIT: "Bewerken",
    DELETE: "Verwijderen",
    PREVIEW: "Voorbeeld",
    ALTS: "Alternatieven",
    PRIMARY_ALT: "Primair",
    PRIMARY_OVERLAY: "Overlapt",
    ADD_CHILD_PAGE: "Pagina toevoegen",
    ADD_ATTACHMENT: "Bijlage toevoegen",
    ATTACHMENT_ACTIONS: "Bijlage Acties",
    PAGE_ACTIONS: "Pagina Acties",
    NO_CHILD_PAGES: "Geen Subpagina's",
    CHILD_PAGES: "Subpagina's",
    NO_ATTACHMENTS: "Geen bijlages",
    ATTACHMENTS: "Bijlages",
    ADD_ATTACHMENT_TO: "Voeg bijlage toe aan \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Je kan hier een nieuwe bijlage uploaden.",
    UPLOAD: "Upload",
    PROGRESS: "Vooruitgang",
    ERROR_PREFIX: "Fout: ",
    ERROR_NO_ID_PROVIDED: "Geen ID gegeven.",
    ERROR_PAGE_ID_DUPLICATE: "Een pagina met deze ID (%s) bestaat al.",
    ERROR_INVALID_ID: "Ongeldige ID",
    ERROR_INVALID_DATE: "Ongeldige datum",
    ERROR_INVALID_NUMBER: "Geen geldig getal",
    ERROR_INVALID_URL: "Geen geldige URL",
    ERROR: "Fout",
    ERROR_OCURRED: "Er is een fout opgetreden",
    ERROR_REQUEST_FAILED: "Kon het commando niet naar de server sturen. Misschien is de server gestopt of reageert deze niet?",
    ERROR_SERVER_UNAVAILABLE: "Server niet beschikbaar",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "De server reageert niet. Deze was gestopt of door een kritieke fout niet langer operationeel en moet worden herstart.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Voeg Subpagina toe aan \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "U kan hier een nieuwe subpagina toevoegen. Merk op dat het model of de ID achteraf niet makkelijk gewijzigd kunnen worden.",
    CREATE_CHILD_PAGE: "Subpagina Toevoegen",
    DELETE_ATTACHMENT_PROMPT: "Weet je zeker dat je deze bijlage wilt verwijderen?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Weet je zeker dat je de metadata van dit bijlage alternatief wilt verwijderen?",
    DELETE_PAGE_PROMPT: "Weet je zeker dat je deze pagina wilt verwijderen?",
    DELETE_PAGE_ALT_PROMPT: "Weet je zeker dat je dit alternatief wilt verwijderen?",
    DELETE_PAGE_CHILDREN_WARNING: "Dit zal ook de subpagina's van deze pagina verwijderen.",
    DELETE_RECORD: "Verwijder \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Verwijder ook de alternatieven en bijlages.",
    DELETE_ALL_ATTACHMENT_ALTS: "Verwijder alle alternatieven en bijlages.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Verwijder enkel de primaire record. Bijlages, alternatieven en subpagina's zullen niet verwijderd worden.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Verwijder enkel de metadata van de primaire record.",
    DELETE_PRIMARY_ALT_INFO: "Omdat dit record een primair alternatief is, kan het apart verwijderd worden of samen met alle andere inhoud.",
    CHILD_PAGES_TO_BE_DELETED: "Subpagina's die verwijderd zullen worden:",
    ALTS_TO_BE_DELETED: "Alternatieven die verwijderd zullen worden:",
    ATTACHMENTS_TO_BE_DELETED: "Bijlages die verwijderd zullen worden:",
    YES_DELETE: "Ja, verwijder",
    NO_CANCEL: "Nee, annuleer",
    SYSTEM_FIELDS: "Systeem Velden",
    EDIT_ATTACHMENT_METADATA_OF: "Bewerk Metadata van Bijlage \u201C%s\u201D",
    EDIT_PAGE_NAME: "Bewerk \u201C%s\u201D",
    SAVE_CHANGES: "Wijzigingen opslaan",
    BROWSE_FS: "Blader in Bestandsysteem",
    BROWSE_FS_MAC: "Bekijk in Finder",
    BROWSE_FS_WINDOWS: "Open in Explorer",
    ERROR_CANNOT_BROWSE_FS: "Fout: Bestand bestaat nog niet.",
    REMOVE_FLOWBLOCK_PROMPT: "Weet je zeker dat je dit blok wilt verwijderen?",
    ADD_FLOWBLOCK: "Blok Toevoegen",
    INVALID_INPUT: "Ongeldige Invoer",
    UP: "Omhoog",
    DOWN: "Omlaag",
    REMOVE: "Verwijderen",
    ID: "ID",
    CLOSE: "Sluiten",
    CANCEL: "Annuleren",
    BACK_TO_OVERVIEW: "Terug naar Overzicht",
    PUBLISH: "Publiceren",
    PUBLISH_NOTE: "Van hieruit kan je de huidige versie van je website publiceren.",
    PUBLISH_SERVER: "Doelserver",
    CURRENTLY_PUBLISHING: "Publiceren \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Gepubliceerd",
    PUBLISH_STATE_BUILDING: "De wijzigingen worden gebouwd ...",
    PUBLISH_STATE_PUBLISH: "De wijzigingen worden gepuliceerd ...",
    PUBLISH_STATE_DONE: "Klaar met publiceren.",
    FIND_FILES: "Zoek bestanden",
    FIND_FILES_PLACEHOLDER: "Vul paginanaam in ...",
    ATTACHMENT_TYPE: "Type Bijlage",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Verberg pagina",
    HIDE_PAGE_EXPLANATION: "Moet deze pagina verborgen zijn?",
    PAGE_IS_DISCOVERABLE: "Deze pagina is vindbaar",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Als dit ingeschakeld is, is de pagina vindbaar. Anders moet de URL bekend zijn.",
    REFRESH_BUILD: "Ververs Build",
    REFRESH_BUILD_NOTE: "Dit verwijdert alle buildresultaten in de cache en veroorzaakt een volledige rebuild. Dit is nuttig in bepaalde situaties waar synchonisatiefouten of fouten in de templates de uitvoer corrupt hebben gemaakt.",
    CURRENTLY_REFRESHING_BUILD: "Bezig met verversen van de build ...",
    REFRESHING_BUILD_DONE: "Klaar met de build te verversen!",
    FAILED_TO_LAUNCH_LEKTOR: "Het starten van Lektor is mislukt.",
    PROJECT: "Project",
    CLOSE_PROJECT: "Sluit Project",
    OPEN_PROJECT: "Open Project",
    BROWSE_WEBSITE: "Bekijk Website",
    VIEW_ADMIN_PANEL: "Bekijk Admin Paneel",
    QUIT: "Afsluiten",
    FAILED_TO_LOAD_PROJECT: "Laden van het project is mislukt :(",
    LOADING_PROJECT: "Project laden ...",
    INITIALIZING_LEKTOR: "Lektor Initializeren ...",
    QUIT_LEKTOR: "Lektor Afsluiten",
    FILE: "Bestand",
    UNDO: "Ongedaan maken",
    REDO: "Opnieuw",
    CUT: "Knippen",
    COPY: "Kopi\xEBren",
    PASTE: "Plakken",
    SELECT_ALL: "Selecteer alles",
    HELP: "Help",
    VISIT_WEBSITE: "Bezoek Website",
    INSTALL_SHELL_COMMAND: "Installeer Shell Commando",
    INSTALL_SHELL_COMMAND_QUESTION: "Weet je zeker dat je het 'lektor' shell commando wil installeren? Dit vereist admin rechten.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Installeren van de shell commando's mislukt.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell commando's zijn ge\xEFnstalleerd.",
    OPERATION_SUCCESS: "Success",
    YES: "Ja",
    NO: "Nee",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Kon het inhoudbestand niet openen",
    OPEN_OTHER_PROJECT: "Open ander Project",
    OPEN_OTHER_PROJECT_QUESTION: "Om deze file te openen moet een ander project geopend worden (%s). Het huidige project zal gesloten worden. Wil je verdergaan?"
  };

  // ../lektor/translations/pl.json
  var pl_default = {
    RETURN_TO_WEBSITE: "Wr\xF3\u0107 do strony",
    UNLOAD_ACTIVE_TAB: "Masz niezapisane dane, czy na pewno chcesz opu\u015Bci\u0107 t\u0105 stron\u0119 ?",
    EDIT_METADATA: "Edytuj dane",
    EDIT: "Edytuj",
    DELETE: "Usu\u0144",
    PREVIEW: "Podgl\u0105d",
    ALTS: "Wersje j\u0119zykowe",
    PRIMARY_ALT: "Podstawowy j\u0119zyk",
    PRIMARY_OVERLAY: "(Na\u0142o\u017Cony)",
    ADD_CHILD_PAGE: "Dodaj podstron\u0119",
    ADD_ATTACHMENT: "Dodaj za\u0142\u0105cznik",
    ATTACHMENT_ACTIONS: "Operacje na za\u0142\u0105cznikach",
    PAGE_ACTIONS: "Operacje na stronach",
    NO_CHILD_PAGES: "Brak podstron",
    CHILD_PAGES: "Podstrony",
    NO_ATTACHMENTS: "Brak za\u0142\u0105cznik\xF3w",
    ATTACHMENTS: "Za\u0142\u0105czniki",
    ADD_ATTACHMENT_TO: "Dodaj za\u0142\u0105cznik do \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Mo\u017Cesz wgra\u0107 nowy za\u0142\u0105cznik tutaj.",
    UPLOAD: "Wgraj",
    PROGRESS: "Post\u0119p",
    ERROR_PREFIX: "B\u0142\u0105d: ",
    ERROR_NO_ID_PROVIDED: "Nie podano ID.",
    ERROR_PAGE_ID_DUPLICATE: "Strona z ID: (%s) ju\u017C istnieje.",
    ERROR_INVALID_ID: "B\u0142\u0119dny ID",
    ERROR_INVALID_DATE: "B\u0142\u0119dna data",
    ERROR_INVALID_NUMBER: "B\u0142\u0119dny numer",
    ERROR_INVALID_URL: "B\u0142\u0119dny adres URL",
    ERROR: "B\u0142\u0105d",
    ERROR_OCURRED: "Wyst\u0105pi\u0142 b\u0142\u0105d",
    ERROR_REQUEST_FAILED: "Nie mo\u017Cna wys\u0142a\u0107 \u017C\u0105dania do serwera. Mo\u017Ce zosta\u0142 zatrzymany, albo nie odpowiada?",
    ERROR_SERVER_UNAVAILABLE: "Serwer niedost\u0119pny",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Serwer nie odpowiada. Zosta\u0142 zatrzymany, albo wyst\u0105pi\u0142 b\u0142\u0105d krytyczny, kt\xF3ry spowodowa\u0142 brak dzia\u0142ania. By\u0107 mo\u017Ce musi zosta\u0107 zrestartowany.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "Dodaj podstron\u0119 do \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Mo\u017Cesz doda\u0107 podstron\u0119 tutaj. Pami\u0119taj, \u017Ce Model oraz ID nie mog\u0105 by\u0107 zmienione p\xF3\u017Aniej w prosty spos\xF3b.",
    CREATE_CHILD_PAGE: "Dodaj podstron\u0119",
    DELETE_ATTACHMENT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten za\u0142\u0105cznik?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 dane za\u0142\u0105cznika dla tego j\u0119zyka?",
    DELETE_PAGE_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 t\u0105 stron\u0119?",
    DELETE_PAGE_ALT_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten j\u0119zyk?",
    DELETE_PAGE_CHILDREN_WARNING: "To spowoduje tak\u017Ce usuni\u0119cie wszystkich podstron.",
    DELETE_RECORD: "Skasuj \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Usu\u0144 r\xF3wnie\u017C wszystkie wersje j\u0119zykowe oraz za\u0142\u0105czniki.",
    DELETE_ALL_ATTACHMENT_ALTS: "Usu\u0144 wszystkie wersje j\u0119zykowe oraz za\u0142\u0105czony plik.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Usu\u0144 tylko podstawowy rekord.  Za\u0142\u0105czniki, wersje j\u0119zykowe oraz podstrony nie b\u0119d\u0119 usuni\u0119te.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Usu\u0144 tylko dane podstawowego rekordu.",
    DELETE_PRIMARY_ALT_INFO: "Poniewa\u017C ten rekord zawiera podstawow\u0105 wersj\u0119 j\u0119zykow\u0105 mo\u017Ce zosta\u0107 usuni\u0119ty osobno jak i razem z pozosta\u0142\u0105 zawarto\u015Bci\u0105.",
    CHILD_PAGES_TO_BE_DELETED: "Podstrony, kt\xF3re zostan\u0105 usuni\u0119te:",
    ALTS_TO_BE_DELETED: "Wersje j\u0119zykowe, kt\xF3re zostan\u0105 usuni\u0119te:",
    ATTACHMENTS_TO_BE_DELETED: "Za\u0142\u0105czniki, kt\xF3re zostan\u0105 usuni\u0119te:",
    YES_DELETE: "Tak, usu\u0144",
    NO_CANCEL: "Nie, anuluj",
    SYSTEM_FIELDS: "Pola Systemowe",
    EDIT_ATTACHMENT_METADATA_OF: "Edytuj dane za\u0142\u0105cznika \u201C%s\u201D",
    EDIT_PAGE_NAME: "Edytuj \u201C%s\u201D",
    SAVE_CHANGES: "Zapisz zmiany",
    BROWSE_FS: "Otw\xF3rz w przegl\u0105darce plik\xF3w",
    BROWSE_FS_MAC: "Otw\xF3rz w Finderze",
    BROWSE_FS_WINDOWS: "Otw\xF3rz w eksploratorze plik\xF3w",
    ERROR_CANNOT_BROWSE_FS: "B\u0142\u0105d: Plik jeszcze nie istnieje.",
    REMOVE_FLOWBLOCK_PROMPT: "Czy na pewno chcesz usun\u0105\u0107 ten blok ?",
    ADD_FLOWBLOCK: "Dodaj blok",
    INVALID_INPUT: "B\u0142\u0119dne dane wej\u015Bciowe",
    UP: "W g\xF3r\u0119",
    DOWN: "W d\xF3\u0142",
    REMOVE: "Usu\u0144",
    ID: "ID",
    CLOSE: "Zamknij",
    CANCEL: "Anuluj",
    BACK_TO_OVERVIEW: "Powr\xF3t do przegl\u0105du",
    PUBLISH: "Publikuj",
    PUBLISH_NOTE: "St\u0105d mo\u017Cesz opublikowa\u0107 aktualn\u0105 wersj\u0119 strony.",
    PUBLISH_SERVER: "Serwer Docelowy",
    CURRENTLY_PUBLISHING: "Publikowanie \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Opublikowany",
    PUBLISH_STATE_BUILDING: "Zmiany s\u0105 wprowadzane ...",
    PUBLISH_STATE_PUBLISH: "Zmiany s\u0105 publikowane ...",
    PUBLISH_STATE_DONE: "Publikowanie zako\u0144czone.",
    FIND_FILES: "Znad\u017A Pliki",
    FIND_FILES_PLACEHOLDER: "Podaj nazw\u0119 strony ...",
    ATTACHMENT_TYPE: "Typ za\u0142\u0105cznika",
    URL_SLUG: "Przyjazny URL",
    TEMPLATE: "Szablon",
    HIDE_PAGE: "Ukryj stron\u0119",
    HIDE_PAGE_EXPLANATION: "Czy ta strona powinna by\u0107 ukryta?",
    PAGE_IS_DISCOVERABLE: "Strona jest 'widoczna'",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Je\u015Bli w\u0142\u0105czone, strona jest widoczna na li\u015Bcie stron oraz w listingu dla danego rekordu. W przeciwnym razie, adres URL musi by\u0107 znany",
    REFRESH_BUILD: "Zbuduj od\u015Bwie\u017Con\u0105 wersj\u0119",
    REFRESH_BUILD_NOTE: "To spowoduje usuni\u0119cie pami\u0119ci podr\u0119cznej i stworzenie wersji ko\u0144cowej od nowa. Ta opcja jest przydatna w sytuacjach, gdzie b\u0142\u0119dy albo pomy\u0142ki synchronizacji w szablonach spowodowa\u0142y uszkodzenie danych wyj\u015Bciowych.",
    CURRENTLY_REFRESHING_BUILD: "Aktualnie od\u015Bwie\u017Cam pakiet wyj\u015Bciowy ...",
    REFRESHING_BUILD_DONE: "Zako\u0144czono od\u015Bwie\u017Canie pakietu wyj\u015Bciowego!",
    FAILED_TO_LAUNCH_LEKTOR: "Nie uda\u0142o si\u0119 uruchomi\u0107 Lektor.",
    PROJECT: "Projekt",
    CLOSE_PROJECT: "Zamknij projekt",
    OPEN_PROJECT: "Otw\xF3rz projekt",
    BROWSE_WEBSITE: "Przegl\u0105daj stron\u0119",
    VIEW_ADMIN_PANEL: "Przejd\u017A do panelu administracyjnego",
    QUIT: "Wyjd\u017A",
    FAILED_TO_LOAD_PROJECT: "Nie uda\u0142o si\u0119 za\u0142adowa\u0107 projektu :(",
    LOADING_PROJECT: "\u0141adowanie projektu ...",
    INITIALIZING_LEKTOR: "Inicjalizacja Lektor ...",
    QUIT_LEKTOR: "Opu\u015B\u0107 Lektor",
    FILE: "Plik",
    UNDO: "Cofnij",
    REDO: "Pon\xF3w",
    CUT: "Wytnij",
    COPY: "Kopiuj",
    PASTE: "Wklej",
    SELECT_ALL: "Zaznacz wszystko",
    HELP: "Pomoc",
    VISIT_WEBSITE: "Odwied\u017A stron\u0119",
    INSTALL_SHELL_COMMAND: "Zainstaluj komend\u0119 pow\u0142oki",
    INSTALL_SHELL_COMMAND_QUESTION: "Czy chcesz zainstalowa\u0107 komend\u0119 'lektor' w pow\u0142oce systemowej? Wygamane s\u0105 uprawnienia administracyjne.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Nie uda\u0142o si\u0119 zainstalowa\u0107 komend w pow\u0142oce systemowej.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Komenda zosta\u0142a pomy\u015Blnie zainstalowana w pow\u0142oce systemowej.",
    OPERATION_SUCCESS: "Sukces",
    YES: "Tak",
    NO: "Nie",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Nie uda\u0142o si\u0119 otworzy\u0107 zawarto\u015Bci pliku",
    OPEN_OTHER_PROJECT: "Otw\xF3rz inny projekt",
    OPEN_OTHER_PROJECT_QUESTION: "Otwarcie tego pliku wymaga otwarcia kolejnego projektu (%s). Obecny projekt zostanie zamkni\u0119ty. Czy chcesz kontynuowa\u0107?"
  };

  // ../lektor/translations/pt.json
  var pt_default = {
    RETURN_TO_WEBSITE: "Retornar ao Site",
    UNLOAD_ACTIVE_TAB: "Voc\xEA tem modifica\xE7\xF5es n\xE3o salvas, tem certeza que deseja deixar a p\xE1gina?",
    EDIT_METADATA: "Editar Metadado",
    EDIT: "Editar",
    DELETE: "Deletar",
    PREVIEW: "Pr\xE9-visualizar",
    ALTS: "Alternativas",
    PRIMARY_ALT: "Prim\xE1ria",
    PRIMARY_OVERLAY: "Revestida",
    ADD_CHILD_PAGE: "Add P\xE1gina",
    ADD_ATTACHMENT: "Add Anexo",
    ATTACHMENT_ACTIONS: "A\xE7\xF5es de Anexos",
    PAGE_ACTIONS: "A\xE7\xF5es de P\xE1ginas",
    NO_CHILD_PAGES: "Sem sub-p\xE1ginas",
    CHILD_PAGES: "Sub-p\xE1ginas",
    NO_ATTACHMENTS: "Sem anexos",
    ATTACHMENTS: "Anexos",
    ADD_ATTACHMENT_TO: "Add anexo para \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "Voc\xEA pode subir um novo anexo aqui.",
    UPLOAD: "Upload",
    PROGRESS: "Progresso",
    ERROR_PREFIX: "Erro: ",
    ERROR_NO_ID_PROVIDED: "Nenhuma ID fornecida.",
    ERROR_PAGE_ID_DUPLICATE: "Uma p\xE1gina com este ID (%s) j\xE1 existe.",
    ERROR_INVALID_ID: "ID inv\xE1lido",
    ERROR_INVALID_DATE: "Data inv\xE1lida",
    ERROR_INVALID_NUMBER: "N\xE3o \xE9 um n\xFAmero v\xE1lido",
    ERROR_INVALID_URL: "N\xE3o \xE9 uma URL v\xE1lida",
    ERROR: "Erro",
    ERROR_OCURRED: "Ocorreu um Erro",
    ERROR_REQUEST_FAILED: "N\xE3o foi poss\xEDvel enviar o comando ao servidor.  Talvez o servidor foi parado ou n\xE3o est\xE1 respondendo",
    ERROR_SERVER_UNAVAILABLE: "Servidor N\xE3o Dispon\xEDvel",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "O servidor n\xE3o est\xE1 respondendo.  Ou foi parado ou um erro s\xE9rio o fez parar e precisa ser reiniciado.",
    MODEL: "Modelo",
    ADD_CHILD_PAGE_TO: "Add Sub-p\xE1gina para \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "Voc\xEA pode adicionar uma nova sub-p\xE1gina aqui.  Note que o modelo ou o ID n\xE3o podem ser mudados facilmente depois.",
    CREATE_CHILD_PAGE: "Add P\xE1gina Filha",
    DELETE_ATTACHMENT_PROMPT: "Voc\xEA tem certeza que deseja deletar este anexo?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Voc\xEA tem certeza que deseja deletar o metadado deste anexo alternativo?",
    DELETE_PAGE_PROMPT: "Voc\xEA tem certeza que deseja deletar esta p\xE1gina",
    DELETE_PAGE_ALT_PROMPT: "Voc\xEA tem certeza que deseja deletar esta alternativa?",
    DELETE_PAGE_CHILDREN_WARNING: "Isto tamb\xE9m deletar\xE1 as sub-p\xE1ginas filhas desta p\xE1gina.",
    DELETE_RECORD: "Deletar \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "Tamb\xE9m delete todas alternativas e arquivos de anexo.",
    DELETE_ALL_ATTACHMENT_ALTS: "Delete todas alternativas e arquivo de anexo",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Delete somente o registro prim\xE1rio.  Anexos, alternativas e sub-p\xE1ginas n\xE3o ser\xE3o deletadas.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Delete somente o Metadado do registro prim\xE1rio.",
    DELETE_PRIMARY_ALT_INFO: "Porque este registro \xE9 uma alternativa prim\xE1ria ele pode ser deletado separadamente ou junto com todos os outros conte\xFAdos.",
    CHILD_PAGES_TO_BE_DELETED: "Sub-p\xE1ginas que ser\xE3o deletadas:",
    ALTS_TO_BE_DELETED: "Alternativas que ser\xE3o deletadas:",
    ATTACHMENTS_TO_BE_DELETED: "Anexos que ser\xE3o deletados:",
    YES_DELETE: "Sim, deletar",
    NO_CANCEL: "N\xE3o, cancelar",
    SYSTEM_FIELDS: "Campos do Sistema",
    EDIT_ATTACHMENT_METADATA_OF: "Editar Metadado do Anexo \u201C%s\u201D",
    EDIT_PAGE_NAME: "Editar \u201C%s\u201D",
    SAVE_CHANGES: "Salvar Altera\xE7\xF5es",
    BROWSE_FS: "Navegar no Sistema",
    BROWSE_FS_MAC: "Mostrar no Finder",
    BROWSE_FS_WINDOWS: "Abrir no Explorer",
    ERROR_CANNOT_BROWSE_FS: "Erro: Arquivo n\xE3o existe ainda.",
    REMOVE_FLOWBLOCK_PROMPT: "Voc\xEA realmente deseja remover este bloco?",
    ADD_FLOWBLOCK: "Add Bloco",
    INVALID_INPUT: "Entrada Inv\xE1lida",
    UP: "Cima",
    DOWN: "Baixo",
    REMOVE: "Remover",
    ID: "ID",
    CLOSE: "Fechar",
    CANCEL: "Cancelar",
    BACK_TO_OVERVIEW: "Voltar para Overview",
    PUBLISH: "Publicar",
    PUBLISH_NOTE: "Daqui voc\xEA pode publicar a vers\xE3o atual do website.",
    PUBLISH_SERVER: "Servidor Alvo",
    CURRENTLY_PUBLISHING: "Publicando \u2026",
    STATE: "Status",
    PUBLISH_DONE: "Publicado",
    PUBLISH_STATE_BUILDING: "Mudan\xE7as est\xE3o sendo constru\xEDdas ...",
    PUBLISH_STATE_PUBLISH: "Mudan\xE7as est\xE3o sendo publicadas ...",
    PUBLISH_STATE_DONE: "Publica\xE7\xE3o feita.",
    FIND_FILES: "Procurar Arquivos",
    FIND_FILES_PLACEHOLDER: "Entrar com o nome da p\xE1gina ...",
    ATTACHMENT_TYPE: "Tipo de anexo",
    URL_SLUG: "URL slug",
    TEMPLATE: "Template",
    HIDE_PAGE: "Esconder p\xE1gina",
    HIDE_PAGE_EXPLANATION: "Isto deveria ser escondido?",
    PAGE_IS_DISCOVERABLE: "P\xE1gina \xE9 descobr\xEDvel",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Se isto estiver ativo a p\xE1gina pode ser descoberta, caso contr\xE1rio ser\xE1 necess\xE1rio saber a URL.",
    REFRESH_BUILD: "Atualizar Build",
    REFRESH_BUILD_NOTE: "Isto deleta todos os resultados de builds em cache ativando uma build do zero.  Isto \xE9 \xFAtil em situa\xE7\xF5es onde erros de sincroniza\xE7\xE3o ou erros no template causam sa\xEDdas corrompidas.",
    CURRENTLY_REFRESHING_BUILD: "No momento atualizando a build ...",
    REFRESHING_BUILD_DONE: "Atualiza\xE7\xE3o da build feita!",
    FAILED_TO_LAUNCH_LEKTOR: "Falha ao iniciar o Lektor.",
    PROJECT: "Projeto",
    CLOSE_PROJECT: "Fechar Projeto",
    OPEN_PROJECT: "Abrir Projeto",
    BROWSE_WEBSITE: "Navegar no Website",
    VIEW_ADMIN_PANEL: "Ver Admin Painel",
    QUIT: "Sair",
    FAILED_TO_LOAD_PROJECT: "Falha ao carregar o projeto :(",
    LOADING_PROJECT: "Carregando o projeto ...",
    INITIALIZING_LEKTOR: "Iniciando o Lektor ...",
    QUIT_LEKTOR: "Sair do Lektor",
    FILE: "Arquivo",
    UNDO: "Desfazer",
    REDO: "Refazer",
    CUT: "Cortar",
    COPY: "Copiar",
    PASTE: "Colar",
    SELECT_ALL: "Selecionar Todos",
    HELP: "Ajuda",
    VISIT_WEBSITE: "Visitar Website",
    INSTALL_SHELL_COMMAND: "Instalar Shell Command",
    INSTALL_SHELL_COMMAND_QUESTION: "Voc\xEA deseja instalar 'lektor' shell command? Isto requer permiss\xF5es de administrador.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Falha ao instalar shell commands.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell command foi instalado com sucesso.",
    OPERATION_SUCCESS: "Sucesso",
    YES: "Sim",
    NO: "N\xE3o",
    OK: "OK",
    FAILED_TO_OPEN_CONTENT_FILE: "Falha ao abrir o conte\xFAdo do arquivo",
    OPEN_OTHER_PROJECT: "Abrir outro Projeto",
    OPEN_OTHER_PROJECT_QUESTION: "Abrir este arquivo requer abrir outro projeto (%s). O projeto atual ser\xE1 fechado. Deseja continuar?"
  };

  // ../lektor/translations/ru.json
  var ru_default = {
    RETURN_TO_WEBSITE: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430 \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    UNLOAD_ACTIVE_TAB: "\u0412\u0430\u0448\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B. \u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u043E\u043A\u0438\u043D\u0443\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    EDIT_METADATA: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435",
    EDIT: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
    DELETE: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
    PREVIEW: "\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",
    ALTS: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",
    PRIMARY_ALT: "\u041E\u0441\u043D\u043E\u0432\u043D\u043E\u0439",
    PRIMARY_OVERLAY: "\u041E\u0432\u0435\u0440\u043B\u0435\u0439",
    ADD_CHILD_PAGE: "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    ADD_ATTACHMENT: "\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B",
    ATTACHMENT_ACTIONS: "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C",
    PAGE_ACTIONS: "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435\u0439",
    NO_CHILD_PAGES: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442",
    CHILD_PAGES: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",
    NO_ATTACHMENTS: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442",
    ATTACHMENTS: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B",
    ADD_ATTACHMENT_TO: "\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u201C%s\u201D",
    ADD_ATTACHMENT_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B.",
    UPLOAD: "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",
    PROGRESS: "\u041F\u0440\u043E\u0433\u0440\u0435\u0441\u0441",
    ERROR_PREFIX: "\u041E\u0448\u0438\u0431\u043A\u0430: ",
    ERROR_NO_ID_PROVIDED: "\u041E\u0448\u0438\u0431\u043A\u0430: \u041E\u0442\u0441\u0443\u0442\u0441\u0443\u0435\u0442 ID.",
    ERROR_PAGE_ID_DUPLICATE: "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0441 ID (%s) \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",
    ERROR_INVALID_ID: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 ID",
    ERROR_INVALID_DATE: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u0434\u0430\u0442\u0430",
    ERROR_INVALID_NUMBER: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E",
    ERROR_INVALID_URL: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 URL",
    ERROR: "\u041E\u0448\u0438\u0431\u043A\u0430",
    ERROR_OCURRED: "\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430",
    ERROR_REQUEST_FAILED: "\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.  \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0438\u043B\u0438 \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442.",
    ERROR_SERVER_UNAVAILABLE: "\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442. \u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0438\u043B\u0438 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440.",
    MODEL: "\u041C\u043E\u0434\u0435\u043B\u044C",
    ADD_CHILD_PAGE_TO: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u201C%s\u201D",
    ADD_CHILD_PAGE_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u0443\u044E \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443. \u0418\u043C\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043E \u0432\u044B \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u0442\u0435 \u043B\u0435\u0433\u043A\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C \u0438 ID \u043F\u043E\u0441\u043B\u0435 \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.",
    CREATE_CHILD_PAGE: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    DELETE_ATTACHMENT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435?",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F?",
    DELETE_PAGE_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    DELETE_PAGE_ALT_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B?",
    DELETE_PAGE_CHILDREN_WARNING: "\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u0430 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441\u043E \u0432\u0441\u0435\u043C\u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u043C\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u043C\u0438.",
    DELETE_RECORD: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u201C%s\u201D",
    DELETE_ALL_PAGE_ALTS: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B.",
    DELETE_ALL_ATTACHMENT_ALTS: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E.  \u0412\u043B\u043E\u0436\u0435\u043D\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B, \u0444\u0430\u0439\u043B\u044B \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E.",
    DELETE_PRIMARY_ALT_INFO: "\u0414\u0430\u043D\u043D\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0438 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0430 \u043A\u0430\u043A \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E, \u0442\u0430\u043A \u0438 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441\u043E \u0432\u0441\u0435\u043C \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u044B\u043C.",
    CHILD_PAGES_TO_BE_DELETED: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    ALTS_TO_BE_DELETED: "\u0412\u0435\u0440\u0441\u0438\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    ATTACHMENTS_TO_BE_DELETED: "\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u044B:",
    YES_DELETE: "\u0414\u0430, \u0443\u0434\u0430\u043B\u0438\u0442\u044C",
    NO_CANCEL: "\u041E\u0442\u043C\u0435\u043D\u0430",
    SYSTEM_FIELDS: "\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u043F\u043E\u043B\u044F",
    EDIT_ATTACHMENT_METADATA_OF: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u201C%s\u201D",
    EDIT_PAGE_NAME: "\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u201C%s\u201D",
    SAVE_CHANGES: "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F",
    BROWSE_FS: "\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0432 \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u0435",
    BROWSE_FS_MAC: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 Finder",
    BROWSE_FS_WINDOWS: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u041E\u0431\u043E\u0437\u0440\u0435\u0432\u0430\u0442\u0435\u043B\u0435",
    ERROR_CANNOT_BROWSE_FS: "\u041E\u0448\u0438\u0431\u043A\u0430: \u0424\u0430\u0439\u043B \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.",
    REMOVE_FLOWBLOCK_PROMPT: "\u0412\u044B \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0431\u043B\u043E\u043A?",
    ADD_FLOWBLOCK: "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0431\u043B\u043E\u043A",
    INVALID_INPUT: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0432\u0432\u043E\u0434",
    UP: "\u0412\u0432\u0435\u0440\u0445",
    DOWN: "\u0412\u043D\u0438\u0437",
    REMOVE: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C",
    ID: "\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 (ID)",
    CLOSE: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
    CANCEL: "\u041E\u0442\u043C\u0435\u043D\u0430",
    BACK_TO_OVERVIEW: "\u041D\u0430 \u0441\u0442\u0430\u0440\u0442\u043E\u0432\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    PUBLISH: "\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C",
    PUBLISH_NOTE: "\u0417\u0434\u0435\u0441\u044C \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430.",
    PUBLISH_SERVER: "\u0421\u0435\u0440\u0432\u0435\u0440",
    CURRENTLY_PUBLISHING: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u2026",
    STATE: "\u0421\u0442\u0430\u0442\u0443\u0441",
    PUBLISH_DONE: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",
    PUBLISH_STATE_BUILDING: "\u0421\u0431\u043E\u0440\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ...",
    PUBLISH_STATE_PUBLISH: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ...",
    PUBLISH_STATE_DONE: "\u041F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430.",
    FIND_FILES: "\u041F\u043E\u0438\u0441\u043A \u0444\u0430\u0439\u043B\u0430",
    FIND_FILES_PLACEHOLDER: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B ...",
    ATTACHMENT_TYPE: "\u0422\u0438\u043F \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F",
    URL_SLUG: "\u041A\u0440\u0430\u0442\u043A\u0438\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0434\u043B\u044F URL",
    TEMPLATE: "\u0428\u0430\u0431\u043B\u043E\u043D",
    HIDE_PAGE: "\u0421\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
    HIDE_PAGE_EXPLANATION: "\u0421\u043A\u0440\u044B\u0442\u044C \u0434\u0430\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443?",
    REFRESH_BUILD: "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0431\u043E\u0440\u043A\u0443",
    REFRESH_BUILD_NOTE: "\u0412 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044F\u0445 \u0431\u044B\u0432\u0430\u0435\u0442 \u043F\u043E\u043B\u0435\u0437\u043D\u043E \u0437\u0430\u043D\u043E\u0432\u043E \u043F\u0435\u0440\u0435\u0441\u043E\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430: \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u0451\u043B \u0441\u0431\u043E\u0439 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u043E\u0448\u0438\u0431\u043A\u0430 \u0432 \u0448\u0430\u0431\u043B\u043E\u043D\u0435 \u043F\u0440\u0438\u0432\u0435\u043B\u0430 \u043A \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u043C\u0443 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044E \u0432\u0435\u0431\u0441\u0430\u0439\u0442\u0430.",
    CURRENTLY_REFRESHING_BUILD: "\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u043E\u0440\u043A\u0438 ...",
    REFRESHING_BUILD_DONE: "\u0421\u0431\u043E\u0440\u043A\u0430 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430!",
    FAILED_TO_LAUNCH_LEKTOR: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C Lektor.",
    PROJECT: "\u041F\u0440\u043E\u0435\u043A\u0442",
    CLOSE_PROJECT: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442",
    OPEN_PROJECT: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442",
    BROWSE_WEBSITE: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    VIEW_ADMIN_PANEL: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0430\u0434\u043C\u0438\u043D-\u043F\u0430\u043D\u0435\u043B\u044C",
    QUIT: "\u0412\u044B\u0439\u0442\u0438",
    FAILED_TO_LOAD_PROJECT: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043F\u0440\u043E\u0435\u043A\u0442 :(",
    LOADING_PROJECT: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 ...",
    INITIALIZING_LEKTOR: "\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F Lektor ...",
    QUIT_LEKTOR: "\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 Lektor",
    FILE: "\u0424\u0430\u0439\u043B",
    UNDO: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",
    REDO: "\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C",
    CUT: "\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C",
    COPY: "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
    PASTE: "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C",
    SELECT_ALL: "\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0432\u0441\u0451",
    HELP: "\u041F\u043E\u043C\u043E\u0449\u044C",
    VISIT_WEBSITE: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u0435\u0431\u0441\u0430\u0439\u0442",
    INSTALL_SHELL_COMMAND: "\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430",
    INSTALL_SHELL_COMMAND_QUESTION: "\u0412\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 'lektor' \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430? \u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u044B \u043F\u0440\u0430\u0432\u0430 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430.",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u0434\u043B\u044F \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430 \u0431\u044B\u043B\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430.",
    OPERATION_SUCCESS: "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430 \u0443\u0441\u043F\u0435\u0448\u043D\u043E",
    YES: "\u0414\u0430",
    NO: "\u041D\u0435\u0442",
    OK: "\u041E\u041A"
  };

  // ../lektor/translations/tr.json
  var tr_default = {
    RETURN_TO_WEBSITE: "Web sitesine d\xF6n",
    UNLOAD_ACTIVE_TAB: "Kaydedilmemi\u015F bilgileriniz var, bu sayfadan \xE7\u0131kmak istedi\u011Finize emin misiniz?",
    EDIT_METADATA: "Metadatay\u0131 d\xFCzenle",
    EDIT: "D\xFCzenle",
    DELETE: "Sil",
    PREVIEW: "G\xF6r\xFCnt\xFCle",
    ALTS: "Alternatifler",
    PRIMARY_ALT: "Birincil",
    PRIMARY_OVERLAY: "\xD6rten",
    ADD_CHILD_PAGE: "Sayfa ekle",
    ADD_ATTACHMENT: "Ek ekle",
    ATTACHMENT_ACTIONS: "Ek \u0130\u015Flemleri",
    PAGE_ACTIONS: "Sayfa \u0130\u015Flemleri",
    NO_CHILD_PAGES: "Altsayfa yok",
    CHILD_PAGES: "Altsayfalar",
    NO_ATTACHMENTS: "Ek yok",
    ATTACHMENTS: "Ekler",
    ADD_ATTACHMENT_TO: "\u201C%s\u201D i\xE7eri\u011Fine ek ekle",
    ADD_ATTACHMENT_NOTE: "Buraya yeni bir ek y\xFCkleyebilirsiniz.",
    UPLOAD: "Y\xFCkle",
    PROGRESS: "\u0130lerleme",
    ERROR_PREFIX: "Hata: ",
    ERROR_NO_ID_PROVIDED: "\u0130sim verilmemi\u015F.",
    ERROR_PAGE_ID_DUPLICATE: "Bu isme (%s) sahip bir i\xE7erik zaten var.",
    ERROR_INVALID_ID: "Ge\xE7ersiz isim",
    ERROR_INVALID_DATE: "Ge\xE7ersiz tarih",
    ERROR_INVALID_NUMBER: "Ge\xE7ersiz say\u0131",
    ERROR_INVALID_URL: "Ge\xE7ersiz URL",
    ERROR: "Hata",
    ERROR_OCURRED: "Bir hata olu\u015Ftu",
    ERROR_REQUEST_FAILED: "Sunucuya komut g\xF6nderilemedi.  Sunucunuz durmu\u015F ya da tak\u0131lm\u0131\u015F olabilir mi?",
    ERROR_SERVER_UNAVAILABLE: "Sunucuya eri\u015Filemiyor",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "Sunucu yan\u0131t vermiyor.  Sunucu ya durmu\u015F ya da kritik bir hata nedeniyle i\u015Flemiyor ve yeniden ba\u015Flat\u0131lmas\u0131 gerekiyor.",
    MODEL: "Model",
    ADD_CHILD_PAGE_TO: "\u201C%s\u201D i\xE7eri\u011Fine altsayfa ekle",
    ADD_CHILD_PAGE_NOTE: "Burada sayfaya bir altsayfa ekleyebilirsiniz.  Modeli ve ismi sonradan de\u011Fi\u015Ftirmenin kolay olmayaca\u011F\u0131n\u0131 akl\u0131n\u0131zda bulundurun.",
    CREATE_CHILD_PAGE: "\xC7ocuk sayfa ekle",
    DELETE_ATTACHMENT_PROMPT: "Bu eki silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_ATTACHMENT_ALT_PROMPT: "Bu ek alternatifinin metadatas\u0131n\u0131 silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_PROMPT: "Bu sayfay\u0131 silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_ALT_PROMPT: "Bu alternatifi silmeyi ger\xE7ekten istiyor musunuz?",
    DELETE_PAGE_CHILDREN_WARNING: "Bu i\u015Flem bu sayfan\u0131n altsayfalar\u0131n\u0131 da silecek.",
    DELETE_RECORD: "\u201C%s\u201D i\xE7eri\u011Fini sil",
    DELETE_ALL_PAGE_ALTS: "B\xFCt\xFCn alternatifleri ve eklenmi\u015F dosyalar\u0131 da sil.",
    DELETE_ALL_ATTACHMENT_ALTS: "B\xFCt\xFCn alternatifleri ve eklenmi\u015F dosyay\u0131 sil.",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "Yaln\u0131zca birincil kayd\u0131 sil.  Ekler, alternatifler ve altsayfalar silinmeyecek.",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "Only delete the Metadata of the primary record.",
    DELETE_PRIMARY_ALT_INFO: "Bu kay\u0131t birincil alternatif oldu\u011Fundan b\xFCt\xFCn di\u011Fer i\xE7eriklerden ayr\u0131 ya da onlarla beraber silinebilir.",
    CHILD_PAGES_TO_BE_DELETED: "Silinecek altsayfalar:",
    ALTS_TO_BE_DELETED: "Silinecek alternatifler:",
    ATTACHMENTS_TO_BE_DELETED: "Silinecek ekler:",
    YES_DELETE: "Evet, sil",
    NO_CANCEL: "Hay\u0131r, vazge\xE7",
    SYSTEM_FIELDS: "Sistem Alanlar\u0131",
    EDIT_ATTACHMENT_METADATA_OF: "\u201C%s\u201D ekinini metadatas\u0131n\u0131 d\xFCzenle",
    EDIT_PAGE_NAME: "\u201C%s\u201D i\xE7eri\u011Fini d\xFCzenle",
    SAVE_CHANGES: "De\u011Fi\u015Fiklikleri kaydet",
    BROWSE_FS: "Dosya sisteminde g\xF6z at",
    BROWSE_FS_MAC: "Finder uygulamas\u0131nda g\xF6ster",
    BROWSE_FS_WINDOWS: "Explorer uygulamas\u0131nda a\xE7",
    ERROR_CANNOT_BROWSE_FS: "Hata: Dosya hen\xFCz yok.",
    REMOVE_FLOWBLOCK_PROMPT: "Bu blo\u011Fu silmeyi ger\xE7ekten istiyor musunuz?",
    ADD_FLOWBLOCK: "Blok ekle",
    INVALID_INPUT: "Ge\xE7ersiz girdi",
    UP: "Yukar\u0131",
    DOWN: "A\u015Fa\u011F\u0131",
    REMOVE: "Kald\u0131r",
    ID: "\u0130sim",
    CLOSE: "Kapat",
    CANCEL: "Vazge\xE7",
    BACK_TO_OVERVIEW: "Genel bak\u0131\u015Fa geri d\xF6n",
    PUBLISH: "Yay\u0131mla",
    PUBLISH_NOTE: "Buradan web sitesinin \u015Fu anki halini yay\u0131mlayabilirsiniz.",
    PUBLISH_SERVER: "Hedef Sunucu",
    CURRENTLY_PUBLISHING: "Yay\u0131mlan\u0131yor\u2026",
    STATE: "Durum",
    PUBLISH_DONE: "Yay\u0131mland\u0131",
    PUBLISH_STATE_BUILDING: "\xC7\u0131kt\u0131 de\u011Fi\u015Fiklikleri uygulan\u0131yor...",
    PUBLISH_STATE_PUBLISH: "De\u011Fi\u015Fiklikler yay\u0131mlan\u0131yor...",
    PUBLISH_STATE_DONE: "Yay\u0131mlanma bitti.",
    FIND_FILES: "Dosya bul",
    FIND_FILES_PLACEHOLDER: "Sayfa ad\u0131 yaz\u0131n...",
    ATTACHMENT_TYPE: "Ek tipi",
    URL_SLUG: "URL ismi",
    TEMPLATE: "\u015Eablon",
    HIDE_PAGE: "Sayfay\u0131 gizle",
    HIDE_PAGE_EXPLANATION: "Bu sayfa gizlensin mi?",
    PAGE_IS_DISCOVERABLE: "Sayfa sorgularda listelenir",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "Bu se\xE7iliyse sayfa sorguyla bulunabilir; aksi halde URL adresinin bilinmesi gerekir.",
    REFRESH_BUILD: "\xC7\u0131kt\u0131y\u0131 tazele",
    REFRESH_BUILD_NOTE: "Bu i\u015Flem \xFCretilmi\u015F b\xFCt\xFCn \xE7\u0131kt\u0131y\u0131 siler ve s\u0131f\u0131rdan yeni \xE7\u0131kt\u0131 \xFCretilmesini tetikler.  Senkronizasyon sorunlar\u0131 ve \u015Fablonlardaki hatalar gibi nedenlerle \xE7\u0131kt\u0131n\u0131n bozulmas\u0131 durumlar\u0131nda yararl\u0131 olur.",
    CURRENTLY_REFRESHING_BUILD: "\xC7\u0131kt\u0131 tazeleniyor...",
    REFRESHING_BUILD_DONE: "\xC7\u0131kt\u0131n\u0131n tazelenmesi bitti!",
    FAILED_TO_LAUNCH_LEKTOR: "Lektor ba\u015Flat\u0131lamad\u0131.",
    PROJECT: "Proje",
    CLOSE_PROJECT: "Projeyi kapa",
    OPEN_PROJECT: "Projeyi a\xE7",
    BROWSE_WEBSITE: "Siteye g\xF6z at",
    VIEW_ADMIN_PANEL: "Y\xF6netim panelini g\xF6ster",
    QUIT: "\xC7\u0131k",
    FAILED_TO_LOAD_PROJECT: "Proje y\xFCklenemedi :(",
    LOADING_PROJECT: "Proje y\xFCkleniyor...",
    INITIALIZING_LEKTOR: "Lektor ba\u015Flat\u0131l\u0131yor...",
    QUIT_LEKTOR: "Lektor'dan \xE7\u0131k",
    FILE: "Dosya",
    UNDO: "Yinele",
    REDO: "Geri al",
    CUT: "Kes",
    COPY: "Kopyala",
    PASTE: "Yap\u0131\u015Ft\u0131r",
    SELECT_ALL: "Hepsini se\xE7",
    HELP: "Yard\u0131m",
    VISIT_WEBSITE: "Siteye git",
    INSTALL_SHELL_COMMAND: "Shell komutunu kur",
    INSTALL_SHELL_COMMAND_QUESTION: "'lektor' shell komutunu kurmak istiyor musunuz? Bu i\u015Flem y\xF6netici yetkisi gerektirir.",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "Shell komutu kurulamad\u0131.",
    INSTALL_SHELL_COMMAND_SUCCESS: "Shell komutu ba\u015Far\u0131yla kuruldu.",
    OPERATION_SUCCESS: "Ba\u015Far\u0131l\u0131",
    YES: "Evet",
    NO: "Hay\u0131r",
    OK: "Tamam",
    FAILED_TO_OPEN_CONTENT_FILE: "\u0130\xE7erik dosyas\u0131 a\xE7\u0131lamad\u0131",
    OPEN_OTHER_PROJECT: "Ba\u015Fka proje a\xE7",
    OPEN_OTHER_PROJECT_QUESTION: "Bu dosyan\u0131n a\xE7\u0131lmas\u0131 ba\u015Fka bir projenin (%s) a\xE7\u0131lmas\u0131n\u0131 gerektiriyor. \u015Eu anki proje kapat\u0131lacak. Devam etmek istiyor musunuz?",
    COLLAPSE: "Daralt",
    EXPAND: "Geni\u015Flet",
    TRISTATE_CHECKBOX_TOOLTIP: "\xDC\xE7 durumlu kutucuk: ayarlanmam\u0131\u015F durumuna d\xF6nd\xFCrmek i\xE7in <del> ya da <backspace> tu\u015Flar\u0131na bas\u0131n",
    AUTOSIZE_TEXTAREA: "Metin alan\u0131 boyutlar\u0131n\u0131 otomatik ayarla",
    SHRINK_TEXTAREA: "Metin alan\u0131n\u0131 ufalt",
    PREFERENCES: "Tercihler",
    RESET: "Ba\u015Ftan al",
    RESET_TO_DEFAULTS: "Varsay\u0131lan de\u011Ferlerine d\xF6nd\xFCr",
    EDIT_SHORTCUT: "D\xFCzenle",
    SAVE_SHORTCUT: "Kaydet",
    PREVIEW_SHORTCUT: "(Kaydet ve) G\xF6r\xFCnt\xFCle",
    SEARCH_SHORTCUT: "Ara"
  };

  // ../lektor/translations/zh.json
  var zh_default = {
    RETURN_TO_WEBSITE: "\u56DE\u5230\u7DB2\u9801",
    UNLOAD_ACTIVE_TAB: "\u4F60\u9084\u6709\u672A\u5132\u5B58\u7684\u8CC7\u8A0A\uFF0C\u78BA\u5B9A\u8981\u96E2\u958B\u9019\u500B\u9801\u9762\uFF1F",
    EDIT_METADATA: "\u7DE8\u8F2F\u5143\u8CC7\u6599",
    EDIT: "\u7DE8\u8F2F",
    DELETE: "\u522A\u9664",
    PREVIEW: "\u9810\u89BD",
    ALTS: "\u526F\u8A9E",
    PRIMARY_ALT: "\u4E3B\u8A9E",
    PRIMARY_OVERLAY: "Overlaid",
    ADD_CHILD_PAGE: "\u65B0\u589E\u9801\u9762",
    ADD_ATTACHMENT: "\u65B0\u589E\u9644\u4EF6",
    ATTACHMENT_ACTIONS: "\u9644\u4EF6\u884C\u70BA",
    PAGE_ACTIONS: "\u9801\u9762\u884C\u70BA",
    NO_CHILD_PAGES: "\u6C92\u6709\u9644\u4EF6",
    CHILD_PAGES: "\u5B50\u9801\u9762",
    NO_ATTACHMENTS: "\u6C92\u6709\u9644\u4EF6",
    ATTACHMENTS: "\u9644\u4EF6",
    ADD_ATTACHMENT_TO: "\u65B0\u589E\u9644\u4EF6\u5230\u300C%s\u300D",
    ADD_ATTACHMENT_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u4E0A\u50B3\u65B0\u7684\u9644\u4EF6\u3002",
    UPLOAD: "\u4E0A\u50B3",
    PROGRESS: "\u9032\u5EA6",
    ERROR_PREFIX: "\u932F\u8AA4\uFF1A",
    ERROR_NO_ID_PROVIDED: "\u932F\u8AA4\uFF1A\u6C92\u6709\u63D0\u4F9BID\u3002",
    ERROR_PAGE_ID_DUPLICATE: "\u5DF2\u7D93\u6709\u9801\u9762\u7684ID\u8DDF\u9019\u500BID\uFF08%s\uFF09\u4E00\u6A23\u4E86\u3002",
    ERROR_INVALID_ID: "\u7121\u6548\u7684ID",
    ERROR_INVALID_DATE: "\u7121\u6548\u7684\u65E5\u671F",
    ERROR_INVALID_NUMBER: "\u7121\u6548\u7684\u6578\u5B57",
    ERROR_INVALID_URL: "\u7121\u6548\u7684URL",
    ERROR: "\u932F\u8AA4",
    ERROR_OCURRED: "\u767C\u751F\u932F\u8AA4",
    ERROR_REQUEST_FAILED: "\u7121\u6CD5\u50B3\u9001\u6307\u4EE4\u5230\u4F3A\u670D\u5668\uFF0C\u53EF\u80FD\u5B83\u88AB\u95DC\u4E86\u6216\u6C92\u56DE\u61C9\uFF1F",
    ERROR_SERVER_UNAVAILABLE: "\u4F3A\u670D\u5668\u639B\u6389\u4E86",
    ERROR_SERVER_UNAVAILABLE_MESSAGE: "\u4F3A\u670D\u5668\u76EE\u524D\u6C92\u56DE\u61C9\uFF0C\u5B83\u53EF\u80FD\u5DF2\u88AB\u95DC\u9589\u6216\u662F\u9047\u5230\u56B4\u91CD\u932F\u8AA4\u5C0E\u81F4\u7121\u6CD5\u904B\u4F5C\uFF0C\u4F3A\u670D\u5668\u9700\u8981\u91CD\u65B0\u555F\u52D5\u3002",
    MODEL: "\u6A21\u578B",
    ADD_CHILD_PAGE_TO: "\u65B0\u589E\u5B50\u9762\u9801\u5230 \u300C%s\u300D",
    ADD_CHILD_PAGE_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u52A0\u5165\u65B0\u7684\u5B50\u9801\u9762\uFF0C\u6CE8\u610F\u6A21\u578B\u53CAID\u4E4B\u5F8C\u7121\u6CD5\u8F15\u6613\u66F4\u6539\u3002",
    CREATE_CHILD_PAGE: "\u65B0\u589E\u5B50\u9801\u9762",
    DELETE_ATTACHMENT_PROMPT: "\u771F\u7684\u8981\u522A\u9664\u9019\u500B\u9644\u4EF6\uFF1F",
    DELETE_ATTACHMENT_ALT_PROMPT: "\u4F60\u771F\u7684\u60F3\u522A\u9664\u9019\u500B\u526F\u8A9E\u9644\u4EF6\u7684\u5143\u8CC7\u6599\u55CE\uFF1F",
    DELETE_PAGE_PROMPT: "\u771F\u7684\u8981\u522A\u9664\u9019\u500B\u9801\u9762\uFF1F",
    DELETE_PAGE_ALT_PROMPT: "\u4F60\u771F\u7684\u60F3\u522A\u9664\u9019\u500B\u5206\u652F\u55CE\uFF1F",
    DELETE_PAGE_CHILDREN_WARNING: "\u9019\u4E5F\u6703\u628A\u9019\u500B\u9801\u9762\u7684\u5B50\u9801\u9762\u522A\u9664\u3002",
    DELETE_RECORD: "\u522A\u9664\u300C%s\u300D",
    DELETE_ALL_PAGE_ALTS: "\u9806\u4FBF\u522A\u9664\u6240\u6709\u526F\u8A9E\u53CA\u9644\u52A0\u6A94\u6848\u3002",
    DELETE_ALL_ATTACHMENT_ALTS: "\u522A\u9664\u6240\u6709\u526F\u8A9E\u53CA\u9644\u52A0\u6A94\u6848\u3002",
    DELETE_ONLY_PRIMARY_PAGE_ALT: "\u53EA\u522A\u9664\u4E3B\u8A9E\u7684\u7D00\u9304\uFF0C\u9644\u4EF6\u3001\u526F\u8A9E\u3001\u53CA\u5B50\u9801\u9762\u4E0D\u6703\u88AB\u522A\u9664\u3002",
    DELETE_ONLY_PRIMARY_ATTACHMENT_ALT: "\u53EA\u522A\u9664\u4E3B\u8A9E\u7D00\u9304\u7684\u5143\u8CC7\u6599\u3002",
    DELETE_PRIMARY_ALT_INFO: "\u4E3B\u8A9E\u53EF\u4EE5\u88AB\u55AE\u7368\u522A\u9664\uFF0C\u6216\u662F\u9023\u540C\u526F\u8A9E\u4E00\u8D77\u522A\u9664\u3002",
    CHILD_PAGES_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u5B50\u9801\u9762\uFF1A",
    ALTS_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u526F\u8A9E\uFF1A",
    ATTACHMENTS_TO_BE_DELETED: "\u5373\u5C07\u88AB\u522A\u9664\u7684\u9644\u4EF6\uFF1A",
    YES_DELETE: "\u5C0D\uFF0C\u5C31\u662F\u8981\u628A\u5B83\u522A\u6389\uFF01",
    NO_CANCEL: "\u9084\u662F\u4E0D\u8981\u597D\u4E86...",
    SYSTEM_FIELDS: "\u7CFB\u7D71\u6B04\u4F4D",
    EDIT_ATTACHMENT_METADATA_OF: "\u7DE8\u8F2F\u9644\u4EF6\u300C%s\u300D\u7684\u5143\u8CC7\u6599",
    EDIT_PAGE_NAME: "\u7DE8\u8F2F\u300C%s\u300D",
    SAVE_CHANGES: "\u5132\u5B58\u8B8A\u66F4",
    BROWSE_FS: "\u7528\u6587\u4EF6\u7CFB\u7D71\u958B\u555F",
    BROWSE_FS_MAC: "\u7528Finder\u958B\u555F",
    BROWSE_FS_WINDOWS: "\u7528\u6A94\u6848\u7E3D\u7BA1\u958B\u555F",
    ERROR_CANNOT_BROWSE_FS: "\u932F\u8AA4\uFF1A\u6A94\u6848\u9084\u6C92\u6709\u5B58\u5728\u3002",
    REMOVE_FLOWBLOCK_PROMPT: "\u4F60\u771F\u7684\u8981\u522A\u6389\u9019\u500B\u5340\u584A\uFF1F",
    ADD_FLOWBLOCK: "\u65B0\u589E\u5340\u584A",
    INVALID_INPUT: "\u7121\u6548\u7684\u8F38\u5165",
    UP: "\u4E0A",
    DOWN: "\u4E0B",
    REMOVE: "\u79FB\u9664",
    ID: "ID",
    CLOSE: "\u95DC\u9589",
    CANCEL: "\u53D6\u6D88",
    BACK_TO_OVERVIEW: "\u56DE\u5230\u7E3D\u89BD",
    PUBLISH: "\u767C\u4F48",
    PUBLISH_NOTE: "\u4F60\u53EF\u4EE5\u5728\u9019\u88E1\u767C\u4F48\u7DB2\u7AD9\u76EE\u524D\u7684\u7248\u672C\u3002",
    PUBLISH_SERVER: "\u76EE\u6A19\u4F3A\u670D\u5668",
    CURRENTLY_PUBLISHING: "\u767C\u4F48\u4E2D...",
    STATE: "\u72C0\u614B",
    PUBLISH_DONE: "\u5DF2\u767C\u4F48",
    PUBLISH_STATE_BUILDING: "\u6B63\u5728\u5EFA\u7F6E\u8B8A\u66F4...",
    PUBLISH_STATE_PUBLISH: "\u6B63\u5728\u767C\u4F48\u8B8A\u66F4...",
    PUBLISH_STATE_DONE: "\u767C\u4F48\u5B8C\u6210\u3002",
    FIND_FILES: "\u641C\u5C0B\u6A94\u6848",
    FIND_FILES_PLACEHOLDER: "\u8F38\u5165\u9801\u9762\u540D\u7A31...",
    ATTACHMENT_TYPE: "\u9644\u4EF6\u985E\u578B",
    URL_SLUG: "URL\u7E2E\u7565\u540D",
    TEMPLATE: "\u6A21\u677F",
    HIDE_PAGE: "\u96B1\u85CF\u9801\u9762",
    HIDE_PAGE_EXPLANATION: "\u8981\u96B1\u85CF\u9019\u500B\u9801\u9762\u55CE\uFF1F",
    PAGE_IS_DISCOVERABLE: "\u7DB2\u9801\u53EF\u4EE5\u88AB\u767C\u73FE",
    PAGE_IS_DISCOVERABLE_EXPLANATION: "\u82E5\u555F\u7528\u5247\u9019\u500B\u9801\u9762\u53EF\u4EE5\u88AB\u767C\u73FE\uFF0C\u5426\u5247\u5FC5\u9808\u77E5\u9053URL\u624D\u80FD\u9023\u7D50\u5230\u9019\u88E1\u3002",
    REFRESH_BUILD: "\u91CD\u65B0\u6574\u7406\u5EFA\u7F6E",
    REFRESH_BUILD_NOTE: "\u9019\u6703\u522A\u6389\u6240\u6709\u7DE9\u5B58\u7684\u5EFA\u7F6E\u7D50\u679C\u4E26\u5C0E\u81F4\u91CD\u65B0\u7F6E\u5EFA\u3002\u9019\u5728\u7279\u6B8A\u60C5\u6CC1\uFF08\u5982\u540C\u6B65\u932F\u8AA4\u3001\u6A21\u677F\u51FA\u932F\u7B49\uFF09\u4E0B\u6703\u6709\u7528\u3002",
    CURRENTLY_REFRESHING_BUILD: "\u5237\u65B0\u5EFA\u7F6E\u4E2D...",
    REFRESHING_BUILD_DONE: "\u5B8C\u6210\u5237\u65B0\u5EFA\u7F6E\uFF01",
    FAILED_TO_LAUNCH_LEKTOR: "\u555F\u52D5Lektor\u5931\u6557\u3002",
    PROJECT: "\u5C08\u6848",
    CLOSE_PROJECT: "\u95DC\u9589\u5C08\u6848",
    OPEN_PROJECT: "\u958B\u555F\u5C08\u6848",
    BROWSE_WEBSITE: "\u700F\u89BD\u7DB2\u7AD9",
    VIEW_ADMIN_PANEL: "\u67E5\u770B\u7BA1\u7406\u54E1\u9762\u677F",
    QUIT: "\u96E2\u958B",
    FAILED_TO_LOAD_PROJECT: "\u8B80\u53D6\u5C08\u6848\u5931\u6557 QAQ",
    LOADING_PROJECT: "\u8B80\u53D6\u5C08\u6848\u4E2D...",
    INITIALIZING_LEKTOR: "\u521D\u59CB\u5316Lektor\u4E2D...",
    QUIT_LEKTOR: "\u96E2\u958BLektor",
    FILE: "\u6A94\u6848",
    UNDO: "\u5FA9\u539F",
    REDO: "\u91CD\u505A",
    CUT: "\u526A\u4E0B",
    COPY: "\u8907\u88FD",
    PASTE: "\u8CBC\u4E0A",
    SELECT_ALL: "\u5168\u9078",
    HELP: "\u8AAA\u660E",
    VISIT_WEBSITE: "\u53C3\u89C0\u7DB2\u7AD9",
    INSTALL_SHELL_COMMAND: "\u5B89\u88DD\u547D\u4EE4\u5217\u6A21\u5F0F",
    INSTALL_SHELL_COMMAND_QUESTION: "\u4F60\u60F3\u5B89\u88DDlektor\u547D\u4EE4\u5217\u6A21\u5F0F\u55CE\uFF1F \u9019\u9700\u8981\u7BA1\u7406\u54E1\u6B0A\u9650\u3002",
    FAILED_TO_INSTALL_SHELL_COMMANDS: "\u5B89\u88DD\u547D\u4EE4\u5217\u6A21\u5F0F\u5931\u6557\u3002",
    INSTALL_SHELL_COMMAND_SUCCESS: "\u547D\u4EE4\u5217\u6A21\u5F0F\u5B89\u88DD\u6210\u529F",
    OPERATION_SUCCESS: "\u6210\u529F",
    YES: "\u662F",
    NO: "\u5426",
    OK: "\u597D",
    FAILED_TO_OPEN_CONTENT_FILE: "\u958B\u555F\u6A94\u6848\u5931\u6557",
    OPEN_OTHER_PROJECT: "\u958B\u555F\u5176\u5B83\u5C08\u6848",
    OPEN_OTHER_PROJECT_QUESTION: "\u958B\u555F\u9019\u4EFD\u6A94\u6848\u9700\u8981\u9023\u540C\u958B\u555F\u53E6\u4E00\u500B\u5C08\u6848\uFF08%s\uFF09\uFF0C\u76EE\u524D\u7684\u5C08\u6848\u5C07\u6703\u88AB\u95DC\u9589\uFF0C\u78BA\u5B9A\u8981\u7E7C\u7E8C\uFF1F"
  };

  // js/i18n.tsx
  var translations = {
    ca: ca_default,
    de: de_default,
    en: en_default,
    es: es_default,
    fr: fr_default,
    it: it_default,
    ja: ja_default,
    ko: ko_default,
    nl: nl_default,
    pl: pl_default,
    pt: pt_default,
    ru: ru_default,
    tr: tr_default,
    zh: zh_default
  }, currentLanguage = "en", _a, currentTranslations = (_a = translations[currentLanguage]) != null ? _a : {};
  function setCurrentLanguage(lang) {
    currentLanguage = lang, currentTranslations = translations[currentLanguage];
  }
  function getCurrentLanguge() {
    return currentLanguage;
  }
  function trans(key) {
    var _a2;
    return (_a2 = currentTranslations[key]) != null ? _a2 : key;
  }
  function trans_obj(translation_object) {
    var _a2, _b;
    return (_b = (_a2 = translation_object[currentLanguage]) != null ? _a2 : translation_object.en) != null ? _b : "";
  }
  function trans_fallback(translation_object, fallback) {
    return translation_object && trans_obj(translation_object) || fallback;
  }
  function trans_format(key, replacement) {
    return trans(key).replace("%s", replacement);
  }

  // js/context/record-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react = __toESM(require_react()), RecordContext = (0, import_react.createContext)({
    path: "/",
    alt: "_primary"
  });
  function useRecord() {
    return (0, import_react.useContext)(RecordContext);
  }
  function useRecordAlt() {
    return useRecord().alt;
  }
  function useRecordPath() {
    return useRecord().path;
  }

  // js/views/App.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react58 = __toESM(require_react());

  // js/header/Header.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react7 = __toESM(require_react());

  // js/header/BreadCrumbs.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react5 = __toESM(require_react());

  // js/fetch.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var FetchError = class extends Error {
    constructor(code) {
      super();
      this.code = code;
    }
  };
  function handleJSON(response) {
    if (!response.ok)
      throw new FetchError("REQUEST_FAILED");
    return response.json();
  }
  var credentials = "same-origin", headers = { "Content-Type": "application/json" };
  function fetchJSON(input, method, json2) {
    let init = json2 === void 0 ? { credentials, method } : { credentials, method, headers, body: JSON.stringify(json2) };
    return fetch(input, init).then(handleJSON);
  }
  function apiUrl(endpoint, params) {
    let url = `${$LEKTOR_CONFIG.admin_root}/api${endpoint}`;
    if (params) {
      let urlParams = new URLSearchParams();
      return Object.entries(params).forEach(([key, value]) => {
        urlParams.set(key, value);
      }), `${url}?${urlParams.toString()}`;
    }
    return url;
  }
  function get(endpoint, params) {
    let url = apiUrl(endpoint, params);
    return fetchJSON(url, "GET");
  }
  function post(endpoint, params, json2) {
    let url = apiUrl(endpoint, params);
    return fetchJSON(url, "POST", json2);
  }
  function put(endpoint, json2) {
    let url = apiUrl(endpoint);
    return fetchJSON(url, "PUT", json2);
  }

  // js/error-dialog.ts
  init_define_SVG_ICONS_FONTAWESOME();

  // js/events.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function dispatch(type, detail) {
    document.dispatchEvent(new CustomEvent(type, { detail }));
  }
  function subscribe(type, handler) {
    document.addEventListener(type, handler);
  }
  function unsubscribe(type, handler) {
    document.removeEventListener(type, handler);
  }

  // js/error-dialog.ts
  function showErrorDialog(error) {
    throw error instanceof FetchError ? dispatch("lektor-error", error) : console.error("unknown error:", error), error;
  }

  // js/components/AdminLink.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react3 = __toESM(require_react());

  // js/components/use-go-to-admin-page.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react2 = __toESM(require_react());
  function adminPath(page, path, alt) {
    let params = new URLSearchParams({ path });
    return alt !== "_primary" && params.set("alt", alt), `/${page}?${params.toString()}`;
  }
  function useGoToAdminPage() {
    let navigate = useNavigate();
    return (0, import_react2.useCallback)(
      (name, path, alt) => {
        navigate(adminPath(name, path, alt));
      },
      [navigate]
    );
  }

  // js/components/AdminLink.tsx
  function AdminLink(_a2) {
    var _b = _a2, {
      page,
      path,
      alt,
      children
    } = _b, otherProps = __objRest(_b, [
      "page",
      "path",
      "alt",
      "children"
    ]);
    let current = useRecord(), recordMatches = path === current.path && alt === current.alt;
    return /* @__PURE__ */ import_react3.default.createElement(
      NavLink,
      __spreadValues({
        to: adminPath(page, path, alt),
        className: ({ isActive }) => isActive && recordMatches ? "active" : void 0
      }, otherProps),
      children
    );
  }
  var AdminLink_default = (0, import_react3.memo)(AdminLink);

  // js/context/page-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react4 = __toESM(require_react()), PAGE_NAMES = [
    "edit",
    "delete",
    "preview",
    "add-child",
    "upload"
  ];
  function isPageName(p) {
    return PAGE_NAMES.includes(p);
  }
  var PageContext = (0, import_react4.createContext)("edit");

  // js/header/BreadCrumbs.tsx
  function Crumb({
    alt,
    item,
    targetPage
  }) {
    let { path, exists } = item, label = exists ? trans_fallback(item.label_i18n, item.label) : item.id;
    return /* @__PURE__ */ import_react5.default.createElement("li", { className: exists ? "breadcrumb-item" : "breadcrumb-item missing-record-crumb" }, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: targetPage, path, alt }, label));
  }
  function AddNewPage({
    alt,
    item
  }) {
    return item.can_have_children ? /* @__PURE__ */ import_react5.default.createElement("li", { className: "new-record-crumb" }, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: "add-child", path: item.path, alt }, "+")) : null;
  }
  function BreadCrumbs() {
    let page = (0, import_react5.useContext)(PageContext), { path, alt } = useRecord(), [segments, setSegments] = (0, import_react5.useState)(
      null
    );
    if ((0, import_react5.useEffect)(() => {
      let ignore = !1;
      return get("/pathinfo", { path }).then((resp) => {
        ignore || setSegments(resp.segments);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]), !segments)
      return /* @__PURE__ */ import_react5.default.createElement("ul", { className: "breadcrumb" }, /* @__PURE__ */ import_react5.default.createElement("li", null, /* @__PURE__ */ import_react5.default.createElement(AdminLink_default, { page: "edit", path: "/", alt: "_primary" }, trans("BACK_TO_OVERVIEW"))));
    let target = page === "preview" ? "preview" : "edit", lastItem = segments[segments.length - 1];
    return /* @__PURE__ */ import_react5.default.createElement("ul", { className: "breadcrumb" }, segments.map((item) => /* @__PURE__ */ import_react5.default.createElement(Crumb, { key: item.path, item, alt, targetPage: target })), /* @__PURE__ */ import_react5.default.createElement(AddNewPage, { item: lastItem, alt }));
  }
  var BreadCrumbs_default = BreadCrumbs;

  // js/header/GlobalActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react6 = __toESM(require_react());

  // js/utils.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function isValidUrl(url) {
    return !!url.match(/^([a-z0-9+.-]+):(\/\/)?[^/]\S+$/);
  }
  function trimLeadingSlashes(string) {
    let match = /^\/*(.*?)$/.exec(string);
    return match ? match[1] : "";
  }
  function trimTrailingSlashes(string) {
    let match = /^(.*?)\/*$/.exec(string);
    return match ? match[1] : "";
  }
  function trimSlashes(string) {
    let match = /^\/*(.*?)\/*$/.exec(string);
    return match ? match[1] : "";
  }
  function getCanonicalUrl(localPath) {
    return `${trimTrailingSlashes($LEKTOR_CONFIG.site_root)}/${trimLeadingSlashes(localPath)}`;
  }
  function getPlatform() {
    try {
      let appVersion = navigator.appVersion;
      return appVersion.match(/Win/) ? "windows" : appVersion.match(/\bMac/) ? "mac" : appVersion.match(/\b(X11|Linux)/) ? "linux" : null;
    } catch (e) {
      return null;
    }
  }
  function getParentPath(path) {
    let match = /^(\/.*)\/[^/]*$/.exec(path);
    return match ? match[1] : null;
  }

  // js/shortcut-keys.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var shortcutKeyRegexp = new RegExp(
    [
      "^",
      "(?:Meta\\+)?(?:Control\\+)?(?:Alt\\+)?(?:Shift\\+)?",
      "(?<=\\+)[A-Z]\\w*",
      "$"
    ].join("")
  );
  function isValidShortcutKey(value) {
    return typeof value == "string" && shortcutKeyRegexp.test(value);
  }
  function mod(key) {
    return `${getPlatform() === "mac" ? "Meta" : "Control"}+${key}`;
  }
  var defaultShortcutKeyMap = /* @__PURE__ */ new Map([
    ["EDIT_SHORTCUT" /* Edit */, mod("E")],
    ["PREVIEW_SHORTCUT" /* Preview */, mod("S")],
    ["SAVE_SHORTCUT" /* Save */, null],
    ["SEARCH_SHORTCUT" /* Search */, mod("G")]
  ]), ignoredKeys = /* @__PURE__ */ new Set([
    "Unidentified",
    // Modifier Keys
    "Alt",
    "AltGraph",
    "CapsLock",
    "Control",
    "Fn",
    "FnLock",
    "Meta",
    "NumLock",
    "ScrollLock",
    "Shift",
    "Symbol",
    "SymbolLock",
    "Hyper",
    "Super",
    // Legacy Modifier Keys
    "Hyper",
    "Super"
  ]), eraseHotkeyKeys = /* @__PURE__ */ new Set([
    "Backspace",
    "Delete",
    " "
    // space key
  ]);
  function isPrintingKey(key) {
    return key.length === 1 || key == "Enter" || key == "Tab";
  }
  var modifierKeys = ["Meta", "Control", "Alt", "Shift"];
  function getShortcutKey(event) {
    if ((event instanceof Event ? event : event.nativeEvent).isComposing || ignoredKeys.has(event.key))
      return null;
    let activeMods = modifierKeys.filter((mod2) => event.getModifierState(mod2));
    if (activeMods.length === 0 && eraseHotkeyKeys.has(event.key) || isPrintingKey(event.key) && !activeMods.some((mod2) => mod2 != "Shift"))
      return null;
    let key = event.key.length == 1 ? event.key.toUpperCase() : event.key;
    return [...activeMods, key].join("+");
  }
  var shortcutHandlers = /* @__PURE__ */ new Map();
  function setShortcutHandler(action, handler) {
    let prevHandler = shortcutHandlers.get(action);
    return shortcutHandlers.set(action, handler), () => prevHandler ? shortcutHandlers.set(action, prevHandler) : shortcutHandlers.delete(action);
  }
  function dispatchShortcut(action) {
    let handler = shortcutHandlers.get(action);
    handler && handler();
  }
  function installShortcutKeyListener(keymap) {
    let actionForKey = new Map(
      Array.from(keymap.entries()).filter(([, key]) => key).map(([action, key]) => [key, action])
    ), keydownListener = (event) => {
      let key = getShortcutKey(event), action = key && actionForKey.get(key);
      action && (event.preventDefault(), event.stopPropagation(), dispatchShortcut(action));
    };
    return window.addEventListener("keydown", keydownListener), () => {
      window.removeEventListener("keydown", keydownListener);
    };
  }
  function serializeShortcutKeyMap(keymap) {
    return Object.fromEntries(
      Array.from(keymap.entries()).filter(([, key]) => key)
    );
  }
  function deserializeShortcutKeyMap(obj) {
    let data = obj;
    return new Map(
      Array.from(defaultShortcutKeyMap.keys(), (action) => {
        var _a2;
        let key = (_a2 = data[action]) != null ? _a2 : null;
        if (key !== null && !isValidShortcutKey(key))
          throw new Error("Invalid value for ShortcutKey in serialized keymap");
        return [action, key];
      })
    );
  }

  // js/header/GlobalActions.tsx
  var findFiles = () => {
    dispatch("lektor-dialog", { type: "find-files" });
  }, refresh = () => {
    dispatch("lektor-dialog", { type: "refresh" });
  }, publish = () => {
    dispatch("lektor-dialog", { type: "publish" });
  }, preferences = () => {
    dispatch("lektor-dialog", { type: "preferences" });
  };
  function GlobalActions() {
    let record = useRecord(), [previewUrl, setPreviewUrl] = (0, import_react6.useState)(), fetchPreviewUrl = (0, import_react6.useMemo)(() => __async(this, null, function* () {
      try {
        let { url } = yield get("/previewinfo", record), canonicalUrl = getCanonicalUrl(url != null ? url : "/");
        return setPreviewUrl(canonicalUrl), canonicalUrl;
      } catch (err) {
        showErrorDialog(err);
      }
    }), [record]);
    (0, import_react6.useEffect)(() => setShortcutHandler("SEARCH_SHORTCUT" /* Search */, findFiles), []);
    let returnToWebsite = (0, import_react6.useCallback)(() => {
      previewUrl === null && fetchPreviewUrl.then((href) => {
        window.location.href = href;
      }).catch(showErrorDialog);
    }, [previewUrl, fetchPreviewUrl]);
    return /* @__PURE__ */ import_react6.default.createElement("div", { className: "btn-group" }, /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: findFiles,
        title: trans("FIND_FILES")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-search fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: publish,
        title: trans("PUBLISH")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-cloud-upload fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: refresh,
        title: trans("REFRESH_BUILD")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-refresh fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "a",
      {
        href: previewUrl,
        className: "btn btn-secondary border",
        title: trans("RETURN_TO_WEBSITE"),
        onClick: returnToWebsite
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-eye fa-fw" })
    ), /* @__PURE__ */ import_react6.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: preferences,
        title: trans("PREFERENCES")
      },
      /* @__PURE__ */ import_react6.default.createElement("i", { className: "fa fa-gear fa-fw" })
    ));
  }

  // js/header/Header.tsx
  function Header({
    sidebarIsActive,
    toggleSidebar
  }) {
    return /* @__PURE__ */ import_react7.default.createElement("header", null, /* @__PURE__ */ import_react7.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react7.default.createElement(
      "button",
      {
        type: "button",
        className: sidebarIsActive ? "fa fa-bars navbar-toggle active" : "fa fa-bars navbar-toggle",
        onClick: toggleSidebar,
        "aria-label": "Toggle navigation"
      }
    ), /* @__PURE__ */ import_react7.default.createElement("div", { className: "d-flex justify-content-between" }, /* @__PURE__ */ import_react7.default.createElement(BreadCrumbs_default, null), /* @__PURE__ */ import_react7.default.createElement("div", null, /* @__PURE__ */ import_react7.default.createElement(GlobalActions, null)))));
  }

  // js/sidebar/Sidebar.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react13 = __toESM(require_react());

  // js/sidebar/PageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react8 = __toESM(require_react());
  var getBrowseButtonTitle = () => {
    let platform = getPlatform();
    return platform === "mac" ? trans("BROWSE_FS_MAC") : platform === "windows" ? trans("BROWSE_FS_WINDOWS") : trans("BROWSE_FS");
  };
  function BrowseFSLink() {
    let record = useRecord(), fsOpen = (0, import_react8.useCallback)(
      (ev) => {
        ev.preventDefault(), post("/browsefs", record).then(({ okay }) => {
          okay || alert(trans("ERROR_CANNOT_BROWSE_FS"));
        }, showErrorDialog);
      },
      [record]
    );
    return /* @__PURE__ */ import_react8.default.createElement("a", { href: "#", onClick: fsOpen }, getBrowseButtonTitle());
  }
  function PageActions({ recordInfo }) {
    let { path, alt } = useRecord();
    return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("h3", null, recordInfo.is_attachment ? trans("ATTACHMENT_ACTIONS") : trans("PAGE_ACTIONS")), /* @__PURE__ */ import_react8.default.createElement("ul", { className: "nav" }, /* @__PURE__ */ import_react8.default.createElement("li", { key: "edit" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "edit", path, alt }, recordInfo.is_attachment ? trans("EDIT_METADATA") : trans("EDIT"))), recordInfo.can_be_deleted && /* @__PURE__ */ import_react8.default.createElement("li", { key: "delete" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "delete", path, alt }, trans("DELETE"))), /* @__PURE__ */ import_react8.default.createElement("li", { key: "preview" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "preview", path, alt }, trans("PREVIEW"))), recordInfo.exists && /* @__PURE__ */ import_react8.default.createElement("li", { key: "fs-open" }, /* @__PURE__ */ import_react8.default.createElement(BrowseFSLink, null)), recordInfo.can_have_children && /* @__PURE__ */ import_react8.default.createElement("li", { key: "add-child" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "add-child", path, alt }, trans("ADD_CHILD_PAGE"))), recordInfo.can_have_attachments && /* @__PURE__ */ import_react8.default.createElement("li", { key: "add-attachment" }, /* @__PURE__ */ import_react8.default.createElement(AdminLink_default, { page: "upload", path, alt }, trans("ADD_ATTACHMENT")))));
  }
  var PageActions_default = (0, import_react8.memo)(PageActions);

  // js/sidebar/Alternatives.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react9 = __toESM(require_react());
  function Alternatives({ alts }) {
    let page = (0, import_react9.useContext)(PageContext), path = useRecordPath();
    if (alts.length < 2)
      return null;
    let items = alts.map((item) => {
      let title = trans_obj(item.name_i18n);
      item.is_primary ? title += ` (${trans("PRIMARY_ALT")})` : item.primary_overlay && (title += ` (${trans("PRIMARY_OVERLAY")})`);
      let className = item.exists ? "alt" : "alt alt-missing";
      return /* @__PURE__ */ import_react9.default.createElement("li", { key: item.alt, className }, /* @__PURE__ */ import_react9.default.createElement(AdminLink_default, { page, path, alt: item.alt }, title));
    });
    return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement("h3", null, trans("ALTS")), /* @__PURE__ */ import_react9.default.createElement("ul", { className: "nav" }, items));
  }
  var Alternatives_default = (0, import_react9.memo)(Alternatives);

  // js/sidebar/AttachmentActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react10 = __toESM(require_react());
  function AttachmentActions({ recordInfo }) {
    let alt = useRecordAlt(), attachments = recordInfo.attachments;
    return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement("h3", null, trans("ATTACHMENTS")), /* @__PURE__ */ import_react10.default.createElement("ul", { className: "nav" }, attachments.length > 0 ? attachments.map((atch) => /* @__PURE__ */ import_react10.default.createElement("li", { key: atch.id }, /* @__PURE__ */ import_react10.default.createElement(AdminLink_default, { page: "edit", path: atch.path, alt }, atch.id, " (", atch.type, ")"))) : /* @__PURE__ */ import_react10.default.createElement("li", { key: "_missing" }, /* @__PURE__ */ import_react10.default.createElement("em", null, trans("NO_ATTACHMENTS")))));
  }
  var AttachmentActions_default = (0, import_react10.memo)(AttachmentActions);

  // js/sidebar/constants.ts
  init_define_SVG_ICONS_FONTAWESOME();

  // js/sidebar/ChildActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react12 = __toESM(require_react());

  // js/sidebar/ChildPagination.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react11 = __toESM(require_react());
  function ChildPagination({
    page,
    numberOfChildren,
    setPage
  }) {
    let pages = Math.ceil(numberOfChildren / 15);
    return pages <= 1 ? null : /* @__PURE__ */ import_react11.default.createElement("li", { className: "pagination" }, page > 1 ? /* @__PURE__ */ import_react11.default.createElement(
      "a",
      {
        href: "#",
        onClick: (ev) => {
          ev.preventDefault(), setPage(page - 1);
        }
      },
      "\xAB"
    ) : /* @__PURE__ */ import_react11.default.createElement("em", null, "\xAB"), /* @__PURE__ */ import_react11.default.createElement("span", { className: "page" }, `${page} / ${pages}`), page < pages ? /* @__PURE__ */ import_react11.default.createElement(
      "a",
      {
        href: "#",
        onClick: (ev) => {
          ev.preventDefault(), setPage(page + 1);
        }
      },
      "\xBB"
    ) : /* @__PURE__ */ import_react11.default.createElement("em", null, "\xBB"));
  }

  // js/sidebar/ChildActions.tsx
  function ChildActions({
    targetPage,
    allChildren,
    page,
    setPage
  }) {
    let alt = useRecordAlt(), shownChildren = allChildren.slice(
      (page - 1) * 15,
      page * 15
    );
    return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("h3", null, trans("CHILD_PAGES")), /* @__PURE__ */ import_react12.default.createElement("ul", { className: "nav" }, /* @__PURE__ */ import_react12.default.createElement(
      ChildPagination,
      {
        numberOfChildren: allChildren.length,
        page,
        setPage
      }
    ), shownChildren.length > 0 ? shownChildren.map((child) => /* @__PURE__ */ import_react12.default.createElement("li", { key: child.id }, /* @__PURE__ */ import_react12.default.createElement(AdminLink_default, { page: targetPage, path: child.path, alt }, trans_obj(child.label_i18n)))) : /* @__PURE__ */ import_react12.default.createElement("li", { key: "_missing" }, /* @__PURE__ */ import_react12.default.createElement("em", null, trans("NO_CHILD_PAGES")))));
  }

  // js/sidebar/Sidebar.tsx
  var ChildPosCache = class {
    constructor() {
      this.memo = [];
    }
    /** Remember the page for a record. */
    rememberPosition(record, page) {
      this.memo = this.memo.filter(([r]) => r !== record), this.memo.unshift([record, page]), this.memo.length > 5 && (this.memo.length = 5);
    }
    getPosition(record, childCount) {
      var _a2;
      let page = (_a2 = this.memo.find(([r]) => r === record)) == null ? void 0 : _a2[1];
      return page ? Math.min(page, Math.ceil(childCount / 15)) : 1;
    }
  }, compareAlternatives = (a, b) => {
    let nameA = (a.is_primary ? "A" : "B") + trans_obj(a.name_i18n), nameB = (b.is_primary ? "A" : "B") + trans_obj(b.name_i18n);
    return nameA === nameB ? 0 : nameA < nameB ? -1 : 1;
  };
  function Sidebar() {
    let page = (0, import_react13.useContext)(PageContext), path = useRecordPath(), [recordInfo, setRecordInfo] = (0, import_react13.useState)(null), [childrenPage, setChildrenPage] = (0, import_react13.useState)(1), [childPosCache] = (0, import_react13.useState)(() => new ChildPosCache()), [updateForced, forceUpdate] = (0, import_react13.useReducer)((x) => x + 1, 0);
    return (0, import_react13.useEffect)(() => {
      let handler = ({ detail }) => {
        detail === path && forceUpdate();
      };
      return subscribe("lektor-attachments-changed", handler), () => {
        unsubscribe("lektor-attachments-changed", handler);
      };
    }, [path]), (0, import_react13.useEffect)(() => {
      let ignore = !1;
      return get("/recordinfo", { path }).then((resp) => {
        ignore || (setRecordInfo(__spreadProps(__spreadValues({}, resp), { alts: resp.alts.sort(compareAlternatives) })), setChildrenPage(childPosCache.getPosition(path, resp.children.length)));
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path, childPosCache, updateForced]), recordInfo ? /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(PageActions_default, { recordInfo }), /* @__PURE__ */ import_react13.default.createElement(Alternatives_default, { alts: recordInfo.alts }), recordInfo.can_have_children && /* @__PURE__ */ import_react13.default.createElement(
      ChildActions,
      {
        targetPage: page === "preview" ? "preview" : "edit",
        allChildren: recordInfo.children,
        page: childrenPage,
        setPage: (page2) => {
          childPosCache.rememberPosition(path, page2), setChildrenPage(page2);
        }
      }
    ), recordInfo.can_have_attachments && /* @__PURE__ */ import_react13.default.createElement(AttachmentActions_default, { recordInfo })) : null;
  }
  var Sidebar_default = Sidebar;

  // js/components/DialogSlot.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react21 = __toESM(require_react());

  // js/dialogs/find-files/FindFiles.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react16 = __toESM(require_react());

  // js/components/SlideDialog.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react14 = __toESM(require_react());
  function SlideDialog({
    title,
    hasCloseButton,
    dismiss,
    children
  }) {
    return (0, import_react14.useEffect)(() => {
      let handler = (ev) => {
        ev.key === "Escape" && (ev.preventDefault(), dismiss());
      };
      return window.addEventListener("keydown", handler), () => {
        window.removeEventListener("keydown", handler);
      };
    }, [dismiss]), (0, import_react14.useEffect)(() => {
      window.scrollTo(0, 0);
    }, []), /* @__PURE__ */ import_react14.default.createElement("div", { className: "dialog-slot" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "sliding-panel col-md-6 offset-md-3" }, hasCloseButton && /* @__PURE__ */ import_react14.default.createElement(
      "a",
      {
        href: "#",
        className: "close-btn",
        onClick: (ev) => {
          ev.preventDefault(), dismiss();
        }
      },
      trans("CLOSE")
    ), /* @__PURE__ */ import_react14.default.createElement("h3", null, title), children)), /* @__PURE__ */ import_react14.default.createElement("div", { className: "interface-protector" }));
  }

  // js/dialogs/find-files/ResultRow.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react15 = __toESM(require_react());
  function ResultRow({
    result,
    isActive,
    dismiss,
    alt,
    target
  }) {
    return /* @__PURE__ */ import_react15.default.createElement("li", { className: isActive ? "active" : "" }, /* @__PURE__ */ import_react15.default.createElement(AdminLink_default, { page: target, path: result.path, alt, onClick: dismiss }, result.parents.map((item) => /* @__PURE__ */ import_react15.default.createElement("span", { key: item.title }, item.title)), /* @__PURE__ */ import_react15.default.createElement("strong", null, result.title)));
  }

  // js/dialogs/find-files/FindFiles.tsx
  function FindFiles({ dismiss }) {
    let alt = useRecordAlt(), page = (0, import_react16.useContext)(PageContext), [query, setQuery] = (0, import_react16.useState)(""), [results, setResults] = (0, import_react16.useState)([]), [selected, setSelected] = (0, import_react16.useState)(-1), goToAdminPage = useGoToAdminPage(), target = page === "preview" ? "preview" : "edit";
    (0, import_react16.useEffect)(() => {
      if (!query) {
        setResults([]), setSelected(-1);
        return;
      }
      let ignore = !1;
      return post("/find", { q: query, alt, lang: getCurrentLanguge() }).then(
        ({ results: results2 }) => {
          ignore || (setResults(results2), setSelected((selected2) => Math.min(selected2, results2.length - 1)));
        },
        showErrorDialog
      ), () => {
        ignore = !0;
      };
    }, [alt, query]);
    let onInputKey = (0, import_react16.useCallback)(
      (event) => {
        if (event.key === "ArrowDown")
          event.preventDefault(), setSelected((selected2) => (selected2 + 1) % results.length);
        else if (event.key === "ArrowUp")
          event.preventDefault(), setSelected(
            (selected2) => (selected2 - 1 + results.length) % results.length
          );
        else if (event.key === "Enter") {
          let item = results[selected];
          item && (dismiss(), goToAdminPage(target, item.path, alt));
        }
      },
      [alt, dismiss, goToAdminPage, results, selected, target]
    );
    return /* @__PURE__ */ import_react16.default.createElement(SlideDialog, { dismiss, hasCloseButton: !0, title: trans("FIND_FILES") }, /* @__PURE__ */ import_react16.default.createElement(
      "input",
      {
        type: "text",
        autoFocus: !0,
        className: "form-control",
        value: query,
        onChange: (ev) => {
          setQuery(ev.target.value);
        },
        onKeyDown: onInputKey,
        placeholder: trans("FIND_FILES_PLACEHOLDER")
      }
    ), /* @__PURE__ */ import_react16.default.createElement("ul", { className: "search-results" }, results.map((result, idx) => /* @__PURE__ */ import_react16.default.createElement(
      ResultRow,
      {
        key: result.path,
        result,
        isActive: idx === selected,
        dismiss,
        alt,
        target
      }
    ))));
  }
  var FindFiles_default = FindFiles;

  // js/dialogs/Preferences.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react18 = __toESM(require_react());

  // js/context/appsettings-context.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react17 = __toESM(require_react());
  var defaultAppSettings = {
    shortcutKeyMap: defaultShortcutKeyMap
  }, AppSettingsContext = (0, import_react17.createContext)(defaultAppSettings);
  function useAppSettings() {
    return (0, import_react17.useContext)(AppSettingsContext);
  }
  function serializeAppSettings(settings) {
    return {
      shortcutKeyMap: serializeShortcutKeyMap(settings.shortcutKeyMap)
    };
  }
  function hasAttribute(obj, attr) {
    return typeof obj == "object" && obj !== null && attr in obj;
  }
  function deserializeAppSettings(obj) {
    if (!hasAttribute(obj, "shortcutKeyMap"))
      throw new Error("Bad stored value for AppSettings");
    return {
      shortcutKeyMap: deserializeShortcutKeyMap(obj.shortcutKeyMap)
    };
  }
  var appSettingsKey = "com.getlektor--appsettings";
  function loadAppSettings() {
    try {
      let saved = localStorage.getItem(appSettingsKey);
      if (saved)
        return deserializeAppSettings(JSON.parse(saved));
    } catch (e) {
      console.log("Failed to load AppSettings from localStorage", e);
    }
    return defaultAppSettings;
  }
  function saveAppSettings(settings) {
    localStorage.setItem(
      appSettingsKey,
      JSON.stringify(serializeAppSettings(settings))
    );
  }

  // js/dialogs/Preferences.tsx
  function Preferences({
    setAppSettings,
    dismiss
  }) {
    let appSettings = useAppSettings(), [state, setState] = (0, import_react18.useState)(appSettings), save = () => {
      setAppSettings(state), dismiss();
    }, setKeyMap = (0, import_react18.useCallback)((action) => {
      setState((state2) => __spreadProps(__spreadValues({}, state2), {
        shortcutKeyMap: typeof action == "function" ? action(state2.shortcutKeyMap) : action
      }));
    }, []);
    return /* @__PURE__ */ import_react18.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("PREFERENCES")
      },
      /* @__PURE__ */ import_react18.default.createElement("form", null, /* @__PURE__ */ import_react18.default.createElement(ShortcutKeyPrefs, { keyMap: state.shortcutKeyMap, setKeyMap }), /* @__PURE__ */ import_react18.default.createElement("div", { className: "d-flex" }, /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "submit",
          disabled: state === appSettings,
          className: "btn btn-primary border me-2",
          onClick: save
        },
        trans("SAVE_CHANGES")
      ), /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border me-2",
          disabled: state === defaultAppSettings,
          onClick: () => {
            setState(defaultAppSettings);
          }
        },
        trans("RESET_TO_DEFAULTS")
      ), /* @__PURE__ */ import_react18.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          onClick: dismiss
        },
        trans("CANCEL")
      )))
    );
  }
  function ShortcutKeyPrefs({
    keyMap,
    setKeyMap
  }) {
    let setShortcut = (0, import_react18.useCallback)(
      (action, key) => {
        setKeyMap(
          (keyMap2) => new Map(
            Array.from(keyMap2.entries(), ([a, k]) => [
              a,
              a === action ? key : k !== key ? k : null
            ])
          )
        );
      },
      [setKeyMap]
    );
    return /* @__PURE__ */ import_react18.default.createElement("fieldset", { className: "border border-dark p-2 mb-3" }, /* @__PURE__ */ import_react18.default.createElement("legend", null, "Shortcut Keys"), Array.from(keyMap, ([action, key]) => /* @__PURE__ */ import_react18.default.createElement("div", { className: "row mb-3", key: action }, /* @__PURE__ */ import_react18.default.createElement("label", { htmlFor: action, className: "col-sm-6 col-form-label text-end" }, trans(action)), /* @__PURE__ */ import_react18.default.createElement("div", { className: "col-sm-4" }, /* @__PURE__ */ import_react18.default.createElement(
      ShortcutKeyInputWidget,
      {
        value: key,
        onValueChange: (key2) => {
          setShortcut(action, key2);
        },
        className: "form-control",
        id: action
      }
    )))));
  }
  function ShortcutKeyInputWidget(_a2) {
    var _b = _a2, {
      value,
      onValueChange
    } = _b, props = __objRest(_b, [
      "value",
      "onValueChange"
    ]);
    return /* @__PURE__ */ import_react18.default.createElement(
      "input",
      __spreadValues({
        type: "text",
        value: value != null ? value : "",
        onChange: () => null,
        onKeyDown: (event) => {
          let key = getShortcutKey(event), doUnset = eraseHotkeyKeys.has(event.key);
          (key || doUnset) && (event.preventDefault(), event.stopPropagation(), onValueChange(key));
        }
      }, props)
    );
  }

  // js/dialogs/Publish.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react19 = __toESM(require_react());
  function TargetServers({
    activeTarget,
    servers,
    setActiveTarget
  }) {
    function onChange(event) {
      setActiveTarget(event.target.value);
    }
    let serverOptions = servers.map((server) => /* @__PURE__ */ import_react19.default.createElement("option", { value: server.id, key: server.id }, trans_fallback(server.name_i18n, server.name) + " (" + server.short_target + ")"));
    return /* @__PURE__ */ import_react19.default.createElement("dl", null, /* @__PURE__ */ import_react19.default.createElement("dt", null, trans("PUBLISH_SERVER")), /* @__PURE__ */ import_react19.default.createElement("dd", null, /* @__PURE__ */ import_react19.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react19.default.createElement(
      "select",
      {
        value: activeTarget,
        onChange,
        className: "form-control"
      },
      serverOptions
    ))));
  }
  function BuildLog({ log }) {
    let buildLog = (0, import_react19.useRef)(null);
    return (0, import_react19.useEffect)(() => {
      let node = buildLog.current;
      node && (node.scrollTop = node.scrollHeight);
    }, [log]), /* @__PURE__ */ import_react19.default.createElement("pre", { ref: buildLog, className: "build-log" }, log.join(`
`));
  }
  function Publish({
    dismiss,
    preventNavigation
  }) {
    let [servers, setServers] = (0, import_react19.useState)([]), [activeTarget, setActiveTarget] = (0, import_react19.useState)(""), [log, setLog] = (0, import_react19.useState)([]), [state, setState] = (0, import_react19.useState)("IDLE");
    (0, import_react19.useEffect)(() => {
      get("/servers", null).then(({ servers: servers2 }) => {
        setServers(servers2), setActiveTarget(servers2.length ? servers2[0].id : "");
      }, showErrorDialog);
    }, []);
    let onPublish = (0, import_react19.useCallback)(() => {
      setLog([]), setState("BUILDING"), preventNavigation(!0), post("/build", null).then(() => {
        setState("PUBLISH");
        let eventSource = new EventSource(
          apiUrl("/publish", { server: activeTarget })
        );
        eventSource.addEventListener("message", (event) => {
          let data = JSON.parse(event.data);
          data === null ? (setState("DONE"), preventNavigation(!1), eventSource.close()) : setLog((log2) => log2.concat(data.msg));
        });
      }, showErrorDialog);
    }, [activeTarget, preventNavigation]), isSafeToPublish = state === "IDLE" || state === "DONE";
    return /* @__PURE__ */ import_react19.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("PUBLISH")
      },
      /* @__PURE__ */ import_react19.default.createElement("p", null, trans("PUBLISH_NOTE")),
      /* @__PURE__ */ import_react19.default.createElement(
        TargetServers,
        {
          activeTarget,
          servers,
          setActiveTarget
        }
      ),
      /* @__PURE__ */ import_react19.default.createElement("p", null, /* @__PURE__ */ import_react19.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-primary",
          disabled: !isSafeToPublish,
          onClick: onPublish
        },
        trans("PUBLISH")
      ), " ", /* @__PURE__ */ import_react19.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          disabled: !isSafeToPublish,
          onClick: dismiss
        },
        trans(state === "DONE" ? "CLOSE" : "CANCEL")
      )),
      state !== "IDLE" ? /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("h3", null, state !== "DONE" ? trans("CURRENTLY_PUBLISHING") : trans("PUBLISH_DONE")), /* @__PURE__ */ import_react19.default.createElement("pre", null, trans("STATE") + ": " + trans(`PUBLISH_STATE_${state}`)), /* @__PURE__ */ import_react19.default.createElement(BuildLog, { log })) : null
    );
  }
  var Publish_default = Publish;

  // js/dialogs/Refresh.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react20 = __toESM(require_react());
  function Refresh({
    dismiss,
    preventNavigation
  }) {
    let [state, setState] = (0, import_react20.useState)("IDLE"), isSafeToNavigate = state === "IDLE" || state === "DONE", refresh2 = (0, import_react20.useCallback)(() => {
      setState("CLEANING"), post("/clean", null).then(() => {
        setState("DONE");
      }, showErrorDialog);
    }, []);
    return (0, import_react20.useEffect)(() => {
      preventNavigation(!isSafeToNavigate);
    }, [preventNavigation, isSafeToNavigate]), /* @__PURE__ */ import_react20.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("REFRESH_BUILD")
      },
      /* @__PURE__ */ import_react20.default.createElement("p", null, trans("REFRESH_BUILD_NOTE")),
      /* @__PURE__ */ import_react20.default.createElement("p", null, /* @__PURE__ */ import_react20.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-primary",
          disabled: !isSafeToNavigate,
          onClick: refresh2
        },
        trans("REFRESH_BUILD")
      ), " ", /* @__PURE__ */ import_react20.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          disabled: !isSafeToNavigate,
          onClick: dismiss
        },
        trans(state === "DONE" ? "CLOSE" : "CANCEL")
      )),
      state !== "IDLE" && /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("h3", null, state !== "DONE" ? trans("CURRENTLY_REFRESHING_BUILD") : trans("REFRESHING_BUILD_DONE")))
    );
  }

  // js/components/DialogSlot.tsx
  function DialogSlot({
    setAppSettings
  }) {
    let [dialog, setDialog] = (0, import_react21.useState)(null), dismiss = (0, import_react21.useCallback)(() => {
      setDialog((c) => c != null && c.preventNavigation ? c : null);
    }, []), prevent = (0, import_react21.useCallback)((preventNavigation) => {
      setDialog((d) => d ? __spreadProps(__spreadValues({}, d), { preventNavigation }) : null);
    }, []);
    if ((0, import_react21.useEffect)(() => {
      let handler = ({ detail }) => {
        setDialog((current) => current != null ? current : detail);
      };
      return subscribe("lektor-dialog", handler), () => {
        unsubscribe("lektor-dialog", handler);
      };
    }, []), !dialog)
      return null;
    if (dialog.type === "find-files")
      return /* @__PURE__ */ import_react21.default.createElement(FindFiles_default, { dismiss });
    if (dialog.type === "refresh")
      return /* @__PURE__ */ import_react21.default.createElement(Refresh, { dismiss, preventNavigation: prevent });
    if (dialog.type === "publish")
      return /* @__PURE__ */ import_react21.default.createElement(Publish_default, { dismiss, preventNavigation: prevent });
    if (dialog.type === "preferences")
      return /* @__PURE__ */ import_react21.default.createElement(Preferences, { setAppSettings, dismiss });
    let exhaustiveCheck = dialog.type;
    throw new Error(exhaustiveCheck);
  }

  // js/components/ServerStatus.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react22 = __toESM(require_react());
  function ServerStatus() {
    let [state, setState] = (0, import_react22.useState)({
      serverIsUp: !0,
      projectId: null
    });
    return (0, import_react22.useEffect)(() => {
      let onInterval = () => {
        get("/ping", null).then(
          ({ project_id }) => {
            setState(
              ({ projectId }) => projectId === null ? { projectId: project_id, serverIsUp: !0 } : { projectId, serverIsUp: projectId === project_id }
            );
          },
          () => {
            setState((s) => __spreadProps(__spreadValues({}, s), { serverIsUp: !1 }));
          }
        );
      }, id = window.setInterval(onInterval, 2e3);
      return () => {
        window.clearInterval(id);
      };
    }, []), state.serverIsUp ? null : /* @__PURE__ */ import_react22.default.createElement("div", { className: "interface-protector server-down-panel" }, /* @__PURE__ */ import_react22.default.createElement("div", { className: "server-down-dialog" }, /* @__PURE__ */ import_react22.default.createElement("h3", null, trans("ERROR_SERVER_UNAVAILABLE")), /* @__PURE__ */ import_react22.default.createElement("p", null, trans("ERROR_SERVER_UNAVAILABLE_MESSAGE"))));
  }

  // js/components/ErrorDialog.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react23 = __toESM(require_react());
  function ErrorDialog() {
    let [error, setError] = (0, import_react23.useState)(null), dismiss = (0, import_react23.useCallback)(() => {
      setError(null);
    }, []);
    return (0, import_react23.useEffect)(() => {
      let handler = ({ detail }) => {
        setError(detail);
      };
      return subscribe("lektor-error", handler), () => {
        unsubscribe("lektor-error", handler);
      };
    }, []), error ? /* @__PURE__ */ import_react23.default.createElement(
      SlideDialog,
      {
        dismiss,
        hasCloseButton: !1,
        title: trans("ERROR")
      },
      /* @__PURE__ */ import_react23.default.createElement("p", null, trans("ERROR_OCURRED"), ": ", trans("ERROR_" + error.code)),
      /* @__PURE__ */ import_react23.default.createElement("p", null, /* @__PURE__ */ import_react23.default.createElement("button", { type: "button", className: "btn btn-primary", onClick: dismiss }, trans("CLOSE")))
    ) : null;
  }

  // js/views/edit/EditPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react44 = __toESM(require_react());

  // js/widgets.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react40 = __toESM(require_react());

  // js/widgets/IntegerInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react26 = __toESM(require_react());

  // js/widgets/InputWidgetBase.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react25 = __toESM(require_react());

  // js/userLabel.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react24 = __toESM(require_react());
  function formatUserLabel(inputConfig) {
    let label = typeof inputConfig == "string" ? inputConfig : trans_obj(inputConfig);
    if (!label)
      return /* @__PURE__ */ import_react24.default.createElement("span", null);
    let iconData = label.match(/^\[\[\s*(.*?)\s*(;\s*(.*?))?\s*\]\]$/);
    if (iconData) {
      let className = "fa fa-" + iconData[1];
      return (iconData[3] || "").match(/90|180|270/) && (className += " fa-rotate-" + iconData[3]), /* @__PURE__ */ import_react24.default.createElement("i", { className });
    }
    return /* @__PURE__ */ import_react24.default.createElement("span", null, label);
  }

  // js/widgets/types.ts
  init_define_SVG_ICONS_FONTAWESOME();
  function getInputClass(type) {
    return type.size === "small" ? "form-control form-control-sm" : type.size === "large" ? "form-control form-control-lg" : "form-control";
  }

  // js/widgets/InputWidgetBase.tsx
  function InputWidgetBase({
    type,
    value,
    onChange,
    postprocessValue,
    inputAddon: inputAddon5,
    inputType,
    validate,
    disabled,
    placeholder
  }) {
    let onChangeHandler = (0, import_react25.useCallback)(
      (event) => {
        let value2 = event.target.value;
        postprocessValue && (value2 = postprocessValue(value2)), onChange(value2);
      },
      [onChange, postprocessValue]
    ), failure = validate ? validate(value) : null, setValidity = (el) => {
      el == null || el.setCustomValidity(failure != null ? failure : "");
    }, configuredAddon = type.addon_label_i18n, addon = configuredAddon ? formatUserLabel(configuredAddon) : inputAddon5;
    return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react25.default.createElement(
      "input",
      {
        ref: setValidity,
        type: inputType,
        disabled,
        placeholder,
        className: getInputClass(type),
        onChange: onChangeHandler,
        value: value || ""
      }
    ), /* @__PURE__ */ import_react25.default.createElement("span", { className: "input-group-text" }, addon)), failure !== null && /* @__PURE__ */ import_react25.default.createElement("div", { className: "validation-block validation-block-error" }, failure));
  }

  // js/widgets/IntegerInputWidget.tsx
  function postprocessInteger(value) {
    return value.trim();
  }
  function validateInteger(value) {
    return value && !value.match(/^-?\d+$/) ? trans("ERROR_INVALID_NUMBER") : null;
  }
  function IntegerInputWidget(props) {
    return /* @__PURE__ */ import_react26.default.createElement(
      InputWidgetBase,
      __spreadValues({
        inputType: "text",
        inputAddon: "0",
        postprocessValue: postprocessInteger,
        validate: validateInteger
      }, props)
    );
  }

  // js/widgets/MultiLineTextInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react27 = __toESM(require_react());
  var config = {
    // On initial render, if the natural height of the textarea is less than
    // than maxInitialHeight, the textarea will start in autosize mode.
    // Otherwise, it will start with a static height of defaultStaticHeight.
    // (Both of these are relative to windowHeight.)
    maxInitialHeight: 0.6,
    defaultStaticHeight: 0.4,
    // The maximum target height for the "shrink" button, relative to windowHeight.
    maxTargetHeight: 0.8,
    // The minimum target height for the "shrink" button, in lines.
    minTargetLines: 5,
    // Default shrink factor, if remembered height is not viable
    fallbackShrinkFactor: 0.5,
    // When textarea is manually resized, if the new size larger than the
    // largest of (extraLines * lineHeight) or (maxResizeHeight * windowHeight),
    // the textarea will be switched to autosize mode.
    extraLines: 2,
    maxResizeHeight: 0.8,
    // When window is narrower than this, textareas are always autosized
    minWindowWidth: 576
  };
  function _pixels(dimension) {
    return Number(dimension.replace(/px/, ""));
  }
  function deref(ref) {
    if (ref.current === void 0 || ref.current === null)
      throw new Error("Attempt to dereference undefined reference");
    return ref.current;
  }
  function isTouchDevice() {
    return "ontouchstart" in window || navigator.maxTouchPoints > 0;
  }
  function shouldEnableDragHandle() {
    return window.innerWidth >= config.minWindowWidth && !isTouchDevice();
  }
  function textareaResizeWatcher(textarea) {
    let height;
    function mousedownListener() {
      height = textarea.style.height, window.addEventListener("mouseup", mouseupListener, { once: !0 });
    }
    function mouseupListener() {
      if (textarea.style.height !== height) {
        let event = new CustomEvent("textarea-resized", {
          detail: { height: _pixels(textarea.style.height) }
        });
        textarea.dispatchEvent(event);
      }
    }
    return textarea.addEventListener("mousedown", mousedownListener), () => {
      window.removeEventListener("mouseup", mouseupListener), textarea.removeEventListener("mousedown", mousedownListener);
    };
  }
  function initState(arg) {
    let resizeable = shouldEnableDragHandle(), height = window.innerHeight * config.defaultStaticHeight, autosized = !0, lineHeight = 21, borderHeight = 2, decorationHeight = 12.5;
    if (arg) {
      let { textarea, replica } = arg, cs = getComputedStyle(textarea);
      lineHeight = _pixels(cs.lineHeight), borderHeight = _pixels(cs.borderTopWidth) + _pixels(cs.borderBottomWidth), decorationHeight = borderHeight + _pixels(cs.paddingTop) + _pixels(cs.paddingBottom), resizeable && replica.scrollHeight + borderHeight > window.innerHeight * config.maxInitialHeight && (autosized = !1);
    }
    return {
      resizeable,
      autosized,
      height,
      lineHeight,
      borderHeight,
      decorationHeight
    };
  }
  function reduceState(state, action) {
    switch (action.type) {
      case "initialize":
        return initState(action);
      case "set-height":
        return state.autosized ? __spreadProps(__spreadValues({}, state), { autosized: !1, height: action.height }) : state;
      case "autosize":
        return state.autosized ? state : __spreadProps(__spreadValues({}, state), { autosized: !0 });
      case "enable-drag-handle":
        return state.resizeable ? state : __spreadProps(__spreadValues({}, state), { resizeable: !0 });
      case "disable-drag-handle":
        return state.resizeable ? __spreadProps(__spreadValues({}, state), { resizeable: !1, autosized: !0 }) : state;
    }
  }
  function MultiLineTextInputWidget({
    type,
    value,
    placeholder,
    disabled,
    onChange: onChangeProp
  }) {
    let textareaRef = (0, import_react27.useRef)(null), replicaRef = (0, import_react27.useRef)(null), [state, dispatch2] = (0, import_react27.useReducer)(reduceState, null, initState);
    (0, import_react27.useEffect)(() => {
      let textarea = deref(textareaRef), replica = deref(replicaRef);
      dispatch2({ type: "initialize", textarea, replica });
      let windowResizeListener = () => {
        shouldEnableDragHandle() ? dispatch2({ type: "enable-drag-handle" }) : dispatch2({ type: "disable-drag-handle" });
      };
      window.addEventListener("resize", windowResizeListener);
      let disconnectResizeWatcher = textareaResizeWatcher(textarea);
      return () => {
        disconnectResizeWatcher(), window.removeEventListener("resize", windowResizeListener);
      };
    }, []), (0, import_react27.useEffect)(() => {
      if (state.resizeable) {
        let textarea = deref(textareaRef), replica = deref(replicaRef), observer = new MutationObserver(() => {
          textarea.style.height && (replica.style.maxHeight = "0px");
        });
        observer.observe(textarea, { attributeFilter: ["style"] });
        let resizeListener = (event) => {
          let { height } = event.detail;
          dispatch2({ type: "set-height", height });
        };
        return textarea.addEventListener("textarea-resized", resizeListener), () => {
          textarea.removeEventListener("textarea-resized", resizeListener), observer.disconnect();
        };
      }
    }, [state.resizeable]);
    let getNaturalHeight = () => {
      let replica = replicaRef.current;
      return replica ? (replica.innerText = value, replica.scrollHeight + state.borderHeight) : 0;
    };
    (0, import_react27.useEffect)(() => {
      if (!state.autosized) {
        let reasonableHeight = Math.max(
          getNaturalHeight() + state.lineHeight * config.extraLines,
          window.innerHeight * config.maxResizeHeight
        );
        state.height > reasonableHeight && dispatch2({ type: "autosize" });
      }
    });
    let onChange = (event) => {
      onChangeProp(event.target.value);
    };
    return /* @__PURE__ */ import_react27.default.createElement("div", { className: "text-widget" }, /* @__PURE__ */ import_react27.default.createElement(
      "div",
      {
        style: { maxHeight: state.autosized ? "" : "0px" },
        ref: replicaRef,
        className: "text-widget__replica"
      },
      value
    ), /* @__PURE__ */ import_react27.default.createElement(
      "textarea",
      {
        style: { height: state.autosized ? "" : `${state.height}px` },
        ref: textareaRef,
        className: [
          "text-widget__textarea",
          state.autosized && "text-widget__textarea--autosized",
          state.resizeable && "text-widget__textarea--resizeable",
          getInputClass(type)
        ].filter(Boolean).join(" "),
        onChange,
        value,
        disabled,
        placeholder
      }
    ), /* @__PURE__ */ import_react27.default.createElement(
      ToggleButton,
      {
        state,
        dispatch: dispatch2,
        naturalHeight: getNaturalHeight()
      }
    ));
  }
  function ToggleButton({
    state,
    dispatch: dispatch2,
    naturalHeight
  }) {
    let action = getToggleAction(state, naturalHeight);
    if (!action)
      return null;
    let { title, icon } = toggleButtonLabels[action.type], onClick = (event) => {
      event.preventDefault(), dispatch2(action);
    }, className = "position-absolute top-0 start-100 translate-middle bg-light border rounded-circle";
    return /* @__PURE__ */ import_react27.default.createElement("a", { href: "#", title: trans(title), onClick, className }, /* @__PURE__ */ import_react27.default.createElement("i", { className: `fa fa-${icon} fa-fw` }));
  }
  var toggleButtonLabels = {
    autosize: {
      title: "AUTOSIZE_TEXTAREA",
      icon: "expand"
    },
    "set-height": {
      title: "SHRINK_TEXTAREA",
      icon: "compress"
    }
  };
  function getToggleAction(state, naturalHeight) {
    if (!state.resizeable)
      return null;
    if (!state.autosized)
      return { type: "autosize" };
    let targetHeight = Math.min(
      state.height,
      // last manually set height
      Math.ceil(window.innerHeight * config.maxTargetHeight)
    );
    if (targetHeight < naturalHeight)
      return { type: "set-height", height: targetHeight };
    let lines = Math.round(
      (naturalHeight - state.decorationHeight) / state.lineHeight
    ), targetLines = Math.max(
      config.minTargetLines,
      Math.ceil(lines * config.fallbackShrinkFactor)
    ), fallbackHeight = Math.ceil(
      targetLines * state.lineHeight + state.decorationHeight
    );
    return fallbackHeight < naturalHeight ? { type: "set-height", height: fallbackHeight } : null;
  }

  // js/widgets/BooleanInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react28 = __toESM(require_react());
  var isTrue = (value) => value === "true" || value === "yes" || value === "1", isDeleteOrBackspace = (event) => event.altKey || event.metaKey || event.shiftKey && !event.ctrlKey ? !1 : event.key === "Delete" || event.key === "Backspace";
  function BooleanInputWidget({
    type,
    value,
    disabled,
    placeholder,
    onChange
  }) {
    return /* @__PURE__ */ import_react28.default.createElement("div", { className: "form-check" }, /* @__PURE__ */ import_react28.default.createElement("label", { className: "form-check-label" }, /* @__PURE__ */ import_react28.default.createElement(
      "input",
      {
        type: "checkbox",
        className: [
          "form-check-input",
          `form-check-input--default-${placeholder ? "true" : "false"}`
        ].join(" "),
        disabled,
        ref: (checkbox) => {
          checkbox && (checkbox.indeterminate = !value);
        },
        checked: isTrue(value || placeholder),
        onChange: (ev) => {
          onChange(ev.target.checked ? "yes" : "no");
        },
        onKeyDown: (ev) => {
          isDeleteOrBackspace(ev) && (ev.preventDefault(), ev.stopPropagation(), onChange(null));
        },
        title: trans("TRISTATE_CHECKBOX_TOOLTIP")
      }
    ), type.checkbox_label_i18n ? trans_obj(type.checkbox_label_i18n) : null));
  }

  // js/widgets/DateInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react29 = __toESM(require_react());
  var parseInteger = (s) => Number.parseInt(s, 10);
  function isValidDate(year, month, day) {
    let date = new Date(year, month - 1, day);
    return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day;
  }
  var DATE_RE = new RegExp("^\\s*(?<year>\\d{4})-(?<month>\\d{1,2})-(?<day>\\d{1,2})\\s*$");
  function validateDate(value) {
    var _a2;
    if (!value)
      return null;
    let groups = (_a2 = value.match(DATE_RE)) == null ? void 0 : _a2.groups;
    return groups && isValidDate(
      parseInteger(groups.year),
      parseInteger(groups.month),
      parseInteger(groups.day)
    ) ? null : trans("ERROR_INVALID_DATE");
  }
  var REVERSE_DATE_RE = new RegExp("^(?<day>\\d{1,2})\\.(?<month>\\d{1,2})\\.(?<year>\\d{4})\\s*$"), pad = (n) => n < 10 ? `0${n}` : `${n}`;
  function postprocessDate(value) {
    var _a2;
    value = value.trim();
    let groups = (_a2 = value.match(REVERSE_DATE_RE)) == null ? void 0 : _a2.groups;
    if (groups) {
      let day = parseInteger(groups.day), month = parseInteger(groups.month);
      return `${parseInteger(groups.year)}-${pad(month)}-${pad(day)}`;
    }
    return value;
  }
  var inputAddon = /* @__PURE__ */ import_react29.default.createElement("i", { className: "fa fa-calendar" });
  function DateInputWidget(props) {
    return /* @__PURE__ */ import_react29.default.createElement(
      InputWidgetBase,
      __spreadValues({
        inputType: "date",
        inputAddon,
        postprocessValue: postprocessDate,
        validate: validateDate
      }, props)
    );
  }

  // js/widgets/FloatInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react30 = __toESM(require_react());
  function postprocessFloat(value) {
    return value.trim();
  }
  function validateFloat(value) {
    return value && !value.match(/^[+,-]?\d+[.]\d+$/) ? trans("ERROR_INVALID_NUMBER") : null;
  }
  function FloatInputWidget(props) {
    return /* @__PURE__ */ import_react30.default.createElement(
      InputWidgetBase,
      __spreadValues({
        inputType: "text",
        inputAddon: "0.0",
        postprocessValue: postprocessFloat,
        validate: validateFloat
      }, props)
    );
  }

  // js/widgets/UrlInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react31 = __toESM(require_react());
  function validateUrl(value) {
    return value && !isValidUrl(value) ? trans("ERROR_INVALID_URL") : null;
  }
  var inputAddon2 = /* @__PURE__ */ import_react31.default.createElement("i", { className: "fa fa-external-link" });
  function UrlInputWidget(props) {
    return /* @__PURE__ */ import_react31.default.createElement(
      InputWidgetBase,
      __spreadValues({
        inputType: "text",
        inputAddon: inputAddon2,
        validate: validateUrl
      }, props)
    );
  }

  // js/widgets/SlugInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react32 = __toESM(require_react());
  function postprocessSlug(value) {
    return value.replace(/\s+/g, "-");
  }
  var inputAddon3 = /* @__PURE__ */ import_react32.default.createElement("i", { className: "fa fa-link" });
  function SlugInputWidget(props) {
    return /* @__PURE__ */ import_react32.default.createElement(
      InputWidgetBase,
      __spreadValues({
        inputType: "text",
        inputAddon: inputAddon3,
        postprocessValue: postprocessSlug
      }, props)
    );
  }

  // js/widgets/SingleLineTextInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react33 = __toESM(require_react());
  var inputAddon4 = /* @__PURE__ */ import_react33.default.createElement("i", { className: "fa fa-paragraph" });
  function SingleLineTextInputWidget(props) {
    return /* @__PURE__ */ import_react33.default.createElement(InputWidgetBase, __spreadValues({ inputType: "text", inputAddon: inputAddon4 }, props));
  }

  // js/widgets/CheckboxesInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react34 = __toESM(require_react());
  var checkboxIsActive = (field, value) => value !== null && value.includes(field), flipSetValue = (set, value, isActive) => isActive ? set.includes(value) ? set : [...set, value] : set.filter((v) => v !== value), deserialize = (value) => {
    if (!value)
      return null;
    let rv = value.split(",").map((x) => x.trim());
    return rv.length === 1 && rv[0] === "" && (rv = []), rv;
  };
  function CheckboxesInputWidget({
    disabled,
    type,
    onChange,
    value,
    placeholder
  }) {
    var _a2;
    let deserializedValue = deserialize(value), deserializedPlaceholder = deserialize(placeholder);
    return /* @__PURE__ */ import_react34.default.createElement("div", { className: "checkboxes-widget" }, (_a2 = type.choices) == null ? void 0 : _a2.map(([key, description]) => /* @__PURE__ */ import_react34.default.createElement("div", { className: "form-check", key }, /* @__PURE__ */ import_react34.default.createElement("label", { className: "form-check-label" }, /* @__PURE__ */ import_react34.default.createElement(
      "input",
      {
        className: "form-check-input",
        type: "checkbox",
        disabled,
        checked: checkboxIsActive(
          key,
          deserializedValue != null ? deserializedValue : deserializedPlaceholder
        ),
        onChange: (ev) => {
          let newValue = flipSetValue(
            deserializedValue || [],
            key,
            ev.target.checked
          );
          onChange(newValue.join(", "));
        }
      }
    ), trans_obj(description)))));
  }

  // js/widgets/SelectInputWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react35 = __toESM(require_react());
  function SelectInputWidget(props) {
    var _a2;
    let { type, value, placeholder, onChange, disabled } = props, choices = (_a2 = type.choices) == null ? void 0 : _a2.map((item) => /* @__PURE__ */ import_react35.default.createElement("option", { key: item[0], value: item[0] }, trans_obj(item[1])));
    return /* @__PURE__ */ import_react35.default.createElement("div", null, /* @__PURE__ */ import_react35.default.createElement(
      "select",
      {
        className: getInputClass(type),
        value: value || placeholder || "",
        onChange: (e) => {
          onChange(e.target.value);
        },
        disabled
      },
      /* @__PURE__ */ import_react35.default.createElement("option", { key: "", value: "" }, "----"),
      choices
    ));
  }

  // js/widgets/flow/FlowWidget.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react38 = __toESM(require_react());

  // js/widgets/flow/metaformat.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  function lineIsDashes(rawLine) {
    let line = rawLine.trim();
    return line.length >= 3 && line.match(/[^-]/) === null;
  }
  function processBuf(buf) {
    if (buf.length === 0)
      return buf;
    let lines = buf.map((line) => lineIsDashes(line) ? line.substr(1) : line), lastLine = lines[lines.length - 1];
    return lastLine.endsWith(`
`) && (lines[lines.length - 1] = lastLine.substr(0, lastLine.length - 1)), lines;
  }
  function trimTabsAndSpaces(str) {
    let match = str.match(/^[\t ]*(.*?)[\t ]*$/m);
    return match ? match[1] : "";
  }
  function tokenize(lines) {
    let key = null, buf = [], wantNewline = !1, rv = [];
    function flushItem() {
      key !== null && (rv.push([key, processBuf(buf)]), key = null, buf = []);
    }
    for (let i = 0; i < lines.length; i++) {
      let match = lines[i].match(/^(.*?)(\r?\n)*$/m), line = match ? `${match[1]}
` : `
`;
      if (line.trimRight() === "---")
        wantNewline = !1, flushItem();
      else if (key !== null) {
        if (wantNewline && (wantNewline = !1, line.match(/^\s*$/)))
          continue;
        buf.push(line);
      } else {
        let bits = line.split(":");
        if (bits.length >= 2) {
          let [rawKey, ...rest] = bits;
          key = rawKey.trim();
          let firstBit = trimTabsAndSpaces(rest.join(":"));
          firstBit.match(/^\s*$/) ? (buf = [], wantNewline = !0) : buf = [firstBit];
        }
      }
    }
    return flushItem(), rv;
  }
  function serialize(blocks) {
    let rv = [];
    return blocks.forEach((item, idx) => {
      let [key, value] = item;
      if (idx > 0 && rv.push(`---
`), value.match(/([\r\n]|(^[\t ])|([\t ]$))/m)) {
        rv.push(key + `:
`), rv.push(`
`);
        let lines = value.split(/\n/);
        lines[lines.length - 1] === "" && lines.pop(), lines.forEach((line) => {
          rv.push(lineIsDashes(line) ? `-${line}
` : `${line}
`);
        });
      } else
        rv.push(key + ": " + value + `
`);
    }), rv;
  }

  // js/widgets/flow/FlowBlock.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react36 = __toESM(require_react());
  var FlowBlock_default = (0, import_react36.memo)(function({
    block,
    moveBlock,
    renderFormField,
    removeBlock,
    idx,
    length
  }) {
    let [collapsed, toggle] = (0, import_react36.useReducer)((s) => !s, !1);
    return /* @__PURE__ */ import_react36.default.createElement("div", { className: "flow-block" }, /* @__PURE__ */ import_react36.default.createElement("div", { className: "d-flex justify-content-between" }, /* @__PURE__ */ import_react36.default.createElement("h4", { className: "block-name" }, formatUserLabel(block.model.name_i18n)), /* @__PURE__ */ import_react36.default.createElement("div", { className: "btn-group action-bar" }, /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: collapsed ? trans("EXPAND") : trans("COLLAPSE"),
        onClick: toggle
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: collapsed ? "fa fa-expand" : "fa fa-compress" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("UP"),
        disabled: idx === 0,
        onClick: () => {
          moveBlock(idx, -1);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-chevron-up" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("DOWN"),
        disabled: idx === length - 1,
        onClick: () => {
          moveBlock(idx, 1);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-chevron-down" })
    ), /* @__PURE__ */ import_react36.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary btn-sm border",
        title: trans("REMOVE"),
        onClick: () => {
          removeBlock(idx);
        }
      },
      /* @__PURE__ */ import_react36.default.createElement("i", { className: "fa fa-fw fa-times" })
    ))), collapsed ? null : /* @__PURE__ */ import_react36.default.createElement(
      FieldRows,
      {
        fields: block.model.fields,
        renderFunc: renderFormField.bind(void 0, block)
      }
    ));
  });

  // js/widgets/flow/AddFlowBlockButtons.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react37 = __toESM(require_react());
  function AddFlowBlockButtons({
    flowblock_order,
    flowblocks,
    addBlock
  }) {
    let models = flowblock_order.map((key) => flowblocks[key]);
    return /* @__PURE__ */ import_react37.default.createElement("div", { className: "add-flow-block" }, /* @__PURE__ */ import_react37.default.createElement("label", null, `${trans("ADD_FLOWBLOCK")}: `), /* @__PURE__ */ import_react37.default.createElement("div", { className: "btn-group" }, models.map((model) => {
      let label = model.button_label ? formatUserLabel(model.button_label) : formatUserLabel(model.name_i18n);
      return /* @__PURE__ */ import_react37.default.createElement(
        "button",
        {
          type: "button",
          className: "btn btn-secondary border",
          onClick: () => {
            addBlock(model);
          },
          title: trans_obj(model.name_i18n),
          key: model.id
        },
        label
      );
    })));
  }

  // js/widgets/flow/FlowWidget.tsx
  function parseFlowFormat(value = "") {
    let blocks = [], lines = value.split(/\r?\n/), blockName = null, blockLines = [], flush = () => {
      blockName !== null && (blocks.push([blockName, blockLines]), blockLines = []);
    };
    for (let line of lines) {
      if (blockName === null && line.match(/^\s*$/))
        continue;
      let blockStart = line.match(/^####\s*([^#]*?)\s*####\s*$/);
      if (blockStart) {
        flush(), blockName = blockStart[1];
        continue;
      } else if (blockName === null)
        return [];
      blockLines.push(line.replace(/^#####(.*?)#####$/, "####$1####"));
    }
    return flush(), blocks;
  }
  function serializeFlowFormat(blocks) {
    let serialisedBlocks = [];
    blocks.forEach(([blockName, lines]) => {
      serialisedBlocks.push(`#### ${blockName} ####
`), lines.forEach((line) => {
        serialisedBlocks.push(line.replace(/^(####(.*)####)(\r?\n)?$/, "#$1#$3"));
      });
    });
    let rv = serialisedBlocks.join("");
    return rv.endsWith(`
`) ? rv.substr(0, rv.length - 1) : rv;
  }
  function deserializeFlowBlock(model, lines, localId) {
    let data = {}, rawData = {};
    return tokenize(lines).forEach(([key, lines2]) => {
      rawData[key] = lines2.join("");
    }), model.fields.forEach((field) => {
      let value = rawData[field.name] || "", Widget = getWidgetComponent(field.type);
      !value && field.default && (value = field.default), Widget && Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type)), data[field.name] = value;
    }), { localId, model, data };
  }
  function serializeFlowBlock(flockBlockModel, data) {
    let rv = [];
    return flockBlockModel.fields.forEach((field) => {
      let Widget = getWidgetComponent(field.type);
      if (Widget === null)
        return;
      let value = data[field.name];
      value != null && (Widget.serializeValue && (value = Widget.serializeValue(value, field.type)), rv.push([field.name, value]));
    }), serialize(rv);
  }
  function FlowWidget(props) {
    let { value, onChange } = props, moveBlock = (0, import_react38.useCallback)(
      (idx, offset) => {
        onChange((prevValue) => {
          let newIndex = idx + offset;
          if (newIndex < 0 || newIndex >= prevValue.length)
            return prevValue;
          let newValue = [...prevValue];
          return newValue[newIndex] = prevValue[idx], newValue[idx] = prevValue[newIndex], newValue;
        });
      },
      [onChange]
    ), removeBlock = (0, import_react38.useCallback)(
      (idx) => {
        confirm(trans("REMOVE_FLOWBLOCK_PROMPT")) && onChange((v) => v.filter((item, i) => i !== idx));
      },
      [onChange]
    ), addNewBlock = (0, import_react38.useCallback)(
      (flowBlockModel) => {
        onChange((prevValue) => {
          prevValue != null || (prevValue = []);
          let newBlockId = Math.max(0, ...prevValue.map(({ localId }) => localId)) + 1, newBlock = deserializeFlowBlock(flowBlockModel, [], newBlockId);
          return [...prevValue, newBlock];
        });
      },
      [onChange]
    ), renderFormField = (0, import_react38.useCallback)(
      (block, field) => {
        let fieldValue = block.data[field.name], placeholder = field.default, Widget = getWidgetComponentWithFallback(field.type);
        Widget.deserializeValue && placeholder != null && (placeholder = Widget.deserializeValue(placeholder, field.type));
        let setFieldValue = (fieldName, v) => {
          onChange((prevValue) => {
            let newValue = [...prevValue], idx = newValue.indexOf(block), data = __spreadProps(__spreadValues({}, block.data), {
              [fieldName]: typeof v == "function" ? v(block.data[fieldName]) : v
            });
            return newValue[idx] = __spreadProps(__spreadValues({}, block), { data }), newValue;
          });
        };
        return /* @__PURE__ */ import_react38.default.createElement(
          FieldBox,
          {
            key: field.name,
            value: fieldValue,
            placeholder,
            field,
            setFieldValue
          }
        );
      },
      [onChange]
    ), { flowblock_order, flowblocks } = props.type;
    return /* @__PURE__ */ import_react38.default.createElement("div", { className: "flow-widget" }, value.map((block, idx) => /* @__PURE__ */ import_react38.default.createElement(
      FlowBlock_default,
      {
        key: block.localId,
        block,
        moveBlock,
        renderFormField,
        removeBlock,
        length: value.length,
        idx
      }
    )), /* @__PURE__ */ import_react38.default.createElement(
      AddFlowBlockButtons,
      {
        flowblock_order,
        flowblocks,
        addBlock: addNewBlock
      }
    ));
  }
  FlowWidget.deserializeValue = (value, { flowblocks }) => {
    let blockId = 0, blocks = [];
    return parseFlowFormat(value).forEach(([id, lines]) => {
      let flowBlock = flowblocks[id];
      flowBlock !== void 0 && blocks.push(deserializeFlowBlock(flowBlock, lines, ++blockId));
    }), blocks;
  };
  FlowWidget.serializeValue = (value) => serializeFlowFormat(
    value.map(({ model: flowBlockModel, data }) => [
      flowBlockModel.id,
      serializeFlowBlock(flowBlockModel, data)
    ])
  );

  // js/widgets/fakeWidgets.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react39 = __toESM(require_react());
  function LineWidget() {
    return /* @__PURE__ */ import_react39.default.createElement("hr", null);
  }
  LineWidget.isFakeWidget = !0;
  function SpacingWidget() {
    return /* @__PURE__ */ import_react39.default.createElement("div", { className: "spacing-widget" });
  }
  SpacingWidget.isFakeWidget = !0;
  function InfoWidget(props) {
    let label = trans_obj(props.field.label_i18n);
    return /* @__PURE__ */ import_react39.default.createElement("div", { className: "info-widget" }, /* @__PURE__ */ import_react39.default.createElement("p", null, label ? /* @__PURE__ */ import_react39.default.createElement("strong", null, label + ": ") : null, trans_obj(props.field.description_i18n)));
  }
  InfoWidget.isFakeWidget = !0;
  function HeadingWidget(props) {
    var _a2;
    return /* @__PURE__ */ import_react39.default.createElement("h3", null, trans_obj((_a2 = props.field.type.heading_i18n) != null ? _a2 : {}));
  }
  HeadingWidget.isFakeWidget = !0;

  // js/widgets.tsx
  var widgetComponents = {
    "singleline-text": SingleLineTextInputWidget,
    "multiline-text": MultiLineTextInputWidget,
    datepicker: DateInputWidget,
    integer: IntegerInputWidget,
    float: FloatInputWidget,
    checkbox: BooleanInputWidget,
    url: UrlInputWidget,
    slug: SlugInputWidget,
    flow: FlowWidget,
    checkboxes: CheckboxesInputWidget,
    select: SelectInputWidget,
    "f-line": LineWidget,
    "f-spacing": SpacingWidget,
    "f-info": InfoWidget,
    "f-heading": HeadingWidget
  };
  function FallbackWidget(props) {
    return /* @__PURE__ */ import_react40.default.createElement("div", null, /* @__PURE__ */ import_react40.default.createElement("em", null, `Widget "${props.type.widget}" not implemented`, ` (used by type "${props.type.name}")`));
  }
  var FieldBox = import_react40.default.memo(function(props) {
    let { field, value, placeholder, disabled, setFieldValue } = props, onChange = (0, import_react40.useCallback)(
      (value2) => {
        setFieldValue(field.name, value2);
      },
      [field, setFieldValue]
    ), className = `col-md-${getFieldColumns(field)}`, Widget = getWidgetComponentWithFallback(field.type);
    if (Widget.isFakeWidget)
      return /* @__PURE__ */ import_react40.default.createElement("div", { className, key: field.name }, /* @__PURE__ */ import_react40.default.createElement(Widget, { key: field.name, field }));
    let description = field.description_i18n ? /* @__PURE__ */ import_react40.default.createElement("div", { className: "help-text" }, trans_obj(field.description_i18n)) : null;
    return /* @__PURE__ */ import_react40.default.createElement("div", { className, key: field.name }, /* @__PURE__ */ import_react40.default.createElement("dl", { className: "field" }, field.hide_label ? null : /* @__PURE__ */ import_react40.default.createElement("dt", null, trans_obj(field.label_i18n)), /* @__PURE__ */ import_react40.default.createElement("dd", null, description, /* @__PURE__ */ import_react40.default.createElement(
      Widget,
      {
        value,
        onChange,
        type: field.type,
        placeholder: placeholder != null ? placeholder : void 0,
        disabled
      }
    ))));
  });
  function getWidgetComponent(type) {
    return widgetComponents[type.widget] || null;
  }
  function getWidgetComponentWithFallback(type) {
    return widgetComponents[type.widget] || FallbackWidget;
  }
  function getFieldColumns(field) {
    let widthSpec = (field.type.width || "1/1").split("/"), fraction = 12 * +widthSpec[0] / +widthSpec[1];
    return Number.isNaN(fraction) ? 12 : Math.min(12, Math.max(2, parseInt(`${fraction}`)));
  }
  function processFields(fields) {
    let rows = [], currentColumns = 0, row = [];
    return fields.forEach((field) => {
      let columns = getFieldColumns(field);
      columns + currentColumns > 12 && (rows.push(row), currentColumns = 0, row = []), row.push(field), currentColumns += columns;
    }), row.length > 0 && rows.push(row), rows;
  }
  function splitFields(fields) {
    let normalFields = [], systemFields = [];
    return fields.forEach((field) => {
      field.name.substr(0, 1) === "_" ? systemFields.push(field) : normalFields.push(field);
    }), [normalFields, systemFields];
  }
  function FieldRows({
    fields,
    renderFunc
  }) {
    let rows = (0, import_react40.useMemo)(() => processFields(fields), [fields]);
    return /* @__PURE__ */ import_react40.default.createElement(import_react40.default.Fragment, null, rows.map((row, idx) => /* @__PURE__ */ import_react40.default.createElement("div", { key: idx, className: "row field-row" }, row.map(renderFunc))));
  }

  // js/views/edit/EditPageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react41 = __toESM(require_react());
  function EditPageActions({
    recordInfo,
    hasPendingChanges
  }) {
    let { path, alt } = useRecord(), goToAdminPage = useGoToAdminPage(), deleteRecord = (0, import_react41.useCallback)(() => {
      goToAdminPage("delete", path, alt);
    }, [alt, goToAdminPage, path]);
    return /* @__PURE__ */ import_react41.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react41.default.createElement(
      "button",
      {
        type: "submit",
        disabled: !hasPendingChanges,
        className: "btn btn-primary"
      },
      trans("SAVE_CHANGES")
    ), recordInfo.can_be_deleted ? /* @__PURE__ */ import_react41.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: deleteRecord
      },
      trans("DELETE")
    ) : null);
  }

  // js/components/ToggleGroup.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react42 = __toESM(require_react());
  function ToggleGroup({
    className = "",
    groupTitle,
    children
  }) {
    let [open, setOpen] = (0, import_react42.useState)(!1), toggle = (0, import_react42.useCallback)((event) => {
      event.preventDefault(), setOpen((v) => !v);
    }, []);
    return /* @__PURE__ */ import_react42.default.createElement(
      "div",
      {
        className: open ? `${className} toggle-group` : `${className} toggle-group closed`
      },
      /* @__PURE__ */ import_react42.default.createElement("h4", { className: "toggle-group-header", onClick: toggle }, groupTitle),
      /* @__PURE__ */ import_react42.default.createElement("div", { className: "toggle-group-content" }, children)
    );
  }

  // js/components/use-changed-flag.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react43 = __toESM(require_react()), import_react_dom = __toESM(require_react_dom());
  function reducer(state, flushed) {
    return flushed !== null ? __spreadProps(__spreadValues({}, state), { flushed }) : __spreadProps(__spreadValues({}, state), { changes: state.changes + 1 });
  }
  function useChangedFlag() {
    let [state, setFlushed] = (0, import_react43.useReducer)(reducer, { changes: 0, flushed: 0 }), changesRef = (0, import_react43.useRef)(state.changes);
    (0, import_react43.useEffect)(() => {
      changesRef.current = state.changes;
    }, [state]);
    let hasPendingChanges = state.changes != state.flushed, setDirty = (0, import_react43.useCallback)(() => {
      setFlushed(null);
    }, [setFlushed]), setClean = (0, import_react43.useCallback)(
      (cb, options) => __async(this, null, function* () {
        let changes = changesRef.current, update = () => {
          setFlushed(changes);
        }, result = yield cb();
        return options != null && options.sync ? (0, import_react_dom.flushSync)(update) : update(), result;
      }),
      [setFlushed]
    );
    return [hasPendingChanges, setDirty, setClean];
  }

  // js/views/edit/EditPage.tsx
  function legalFields(recordDataModel, recordInfo) {
    function isLegalField(field) {
      switch (field.name) {
        case "_id":
        case "_path":
        case "_gid":
        case "_alt":
        case "_source_alt":
        case "_model":
        case "_attachment_for":
          return !1;
        case "_attachment_type":
          return recordInfo.is_attachment;
      }
      return !0;
    }
    return recordDataModel.fields.filter(isLegalField);
  }
  function getPlaceholderForField(recordInfo, Widget, field) {
    return field.default !== null ? Widget.deserializeValue ? Widget.deserializeValue(field.default, field.type) : field.default : field.name === "_slug" ? recordInfo.slug_format : field.name === "_template" ? recordInfo.default_template : field.name === "_attachment_type" ? recordInfo.implied_attachment_type : null;
  }
  function getValueForField(recordData, Widget, field) {
    let value = recordData[field.name];
    return value === void 0 && (value = "", Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type))), value;
  }
  function getRecordData({ data, datamodel, record_info }) {
    let recordData = {};
    return legalFields(datamodel, record_info).forEach((field) => {
      let Widget = getWidgetComponentWithFallback(field.type), value = data[field.name];
      value !== void 0 && (Widget.deserializeValue && (value = Widget.deserializeValue(value, field.type)), recordData[field.name] = value);
    }), recordData;
  }
  function getValues({
    recordDataModel,
    recordInfo,
    recordData
  }) {
    let rv = {};
    return !recordDataModel || !recordInfo || legalFields(recordDataModel, recordInfo).forEach((field) => {
      let value = recordData[field.name];
      if (value !== void 0) {
        let Widget = getWidgetComponentWithFallback(field.type);
        Widget.serializeValue && (value = Widget.serializeValue(value, field.type));
      } else
        value = null;
      rv[field.name] = value;
    }), rv;
  }
  function EditPage() {
    let { path, alt } = useRecord(), form = (0, import_react44.useRef)(null), [recordData, setRecordData] = (0, import_react44.useState)({}), [recordDataModel, setRecordDataModel] = (0, import_react44.useState)(null), [recordInfo, setRecordInfo] = (0, import_react44.useState)(null), [hasPendingChanges, setDirty, setClean] = useChangedFlag(), goToAdminPage = useGoToAdminPage();
    usePrompt({
      when: hasPendingChanges,
      message: trans("UNLOAD_ACTIVE_TAB")
    }), (0, import_react44.useEffect)(() => {
      let ignore = !1;
      return setClean(
        () => __async(this, null, function* () {
          let rawrecord = yield get("/rawrecord", { path, alt }).catch(
            showErrorDialog
          );
          ignore || (setRecordData(getRecordData(rawrecord)), setRecordDataModel(rawrecord.datamodel), setRecordInfo(rawrecord.record_info));
        }),
        { sync: !0 }
      ).catch(console.error), () => {
        ignore = !0;
      };
    }, [alt, path, setClean]);
    let setFieldValue = (0, import_react44.useCallback)(
      (fieldName, value) => {
        setRecordData((r) => __spreadProps(__spreadValues({}, r), {
          [fieldName]: typeof value == "function" ? value(r[fieldName]) : value
        })), setDirty();
      },
      [setDirty]
    ), maybeSaveChanges = (0, import_react44.useCallback)(() => __async(this, null, function* () {
      if (hasPendingChanges)
        return setClean(
          () => __async(this, null, function* () {
            let data = getValues({ recordDataModel, recordInfo, recordData });
            yield put("/rawrecord", { data, path, alt }).catch(showErrorDialog);
          }),
          { sync: !0 }
        );
    }), [
      path,
      alt,
      hasPendingChanges,
      setClean,
      recordData,
      recordDataModel,
      recordInfo
    ]);
    (0, import_react44.useEffect)(() => {
      let saveAndPreview = () => __async(this, null, function* () {
        yield maybeSaveChanges(), goToAdminPage("preview", path, alt);
      }), cleanup = [
        setShortcutHandler("SAVE_SHORTCUT" /* Save */, () => {
          maybeSaveChanges().catch(console.error);
        }),
        setShortcutHandler("PREVIEW_SHORTCUT" /* Preview */, () => {
          saveAndPreview().catch(console.error);
        })
      ];
      return () => {
        cleanup.forEach((cb) => {
          cb();
        });
      };
    }, [maybeSaveChanges, path, alt, goToAdminPage]);
    let renderFormField = (0, import_react44.useCallback)(
      (field) => {
        let Widget = getWidgetComponentWithFallback(field.type);
        if (!recordInfo)
          return null;
        let disabled = !(field.alts_enabled === null || field.alts_enabled !== (recordInfo.alt === "_primary"));
        return /* @__PURE__ */ import_react44.default.createElement(
          FieldBox,
          {
            key: field.name,
            value: getValueForField(recordData, Widget, field),
            placeholder: getPlaceholderForField(recordInfo, Widget, field),
            field,
            setFieldValue,
            disabled
          }
        );
      },
      [recordData, recordInfo, setFieldValue]
    );
    if (!recordInfo || !recordDataModel)
      return null;
    let label = trans_fallback(recordInfo.label_i18n, recordInfo.label), title = recordInfo.is_attachment ? trans_format("EDIT_ATTACHMENT_METADATA_OF", label) : trans_format("EDIT_PAGE_NAME", label), fields = legalFields(recordDataModel, recordInfo), [normalFields, systemFields] = splitFields(fields);
    return /* @__PURE__ */ import_react44.default.createElement(import_react44.default.Fragment, null, /* @__PURE__ */ import_react44.default.createElement("h2", null, title), /* @__PURE__ */ import_react44.default.createElement(
      "form",
      {
        ref: form,
        onSubmit: (e) => {
          e.preventDefault(), maybeSaveChanges().catch(console.error);
        }
      },
      /* @__PURE__ */ import_react44.default.createElement(FieldRows, { fields: normalFields, renderFunc: renderFormField }),
      systemFields.length > 0 && /* @__PURE__ */ import_react44.default.createElement(
        ToggleGroup,
        {
          groupTitle: trans("SYSTEM_FIELDS"),
          className: "system-fields"
        },
        /* @__PURE__ */ import_react44.default.createElement(FieldRows, { fields: systemFields, renderFunc: renderFormField })
      ),
      /* @__PURE__ */ import_react44.default.createElement(
        EditPageActions,
        {
          recordInfo,
          hasPendingChanges
        }
      )
    ));
  }
  var EditPage_default = EditPage;

  // js/views/delete/DeletePage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react51 = __toESM(require_react());

  // js/views/delete/DeletableAttachments.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react45 = __toESM(require_react());
  function DeletableAttachments({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react45.default.createElement("div", null, /* @__PURE__ */ import_react45.default.createElement("h4", null, trans("ATTACHMENTS_TO_BE_DELETED")), /* @__PURE__ */ import_react45.default.createElement("ul", null, recordInfo.attachments.map((atch) => /* @__PURE__ */ import_react45.default.createElement("li", { key: atch.id }, atch.id, " (", atch.type, ")"))));
  }

  // js/views/delete/DeletableChildPages.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react46 = __toESM(require_react());
  function DeletableChildPages({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react46.default.createElement("div", null, /* @__PURE__ */ import_react46.default.createElement("h4", null, trans("CHILD_PAGES_TO_BE_DELETED")), /* @__PURE__ */ import_react46.default.createElement("ul", null, recordInfo.children.map((child) => /* @__PURE__ */ import_react46.default.createElement("li", { key: child.id }, trans_obj(child.label_i18n)))));
  }

  // js/views/delete/DeletableAlternatives.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react47 = __toESM(require_react());
  function DeletableAlternatives({
    recordInfo
  }) {
    return /* @__PURE__ */ import_react47.default.createElement("div", null, /* @__PURE__ */ import_react47.default.createElement("h4", null, trans("ALTS_TO_BE_DELETED")), /* @__PURE__ */ import_react47.default.createElement("ul", null, recordInfo.alts.filter((i) => i.exists).map((item) => {
      let title = trans_obj(item.name_i18n);
      return item.is_primary ? title += " (" + trans("PRIMARY_ALT") + ")" : item.primary_overlay && (title += " (" + trans("PRIMARY_OVERLAY") + ")"), /* @__PURE__ */ import_react47.default.createElement("li", { key: item.alt }, title);
    })));
  }

  // js/views/delete/DeletePageActions.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react48 = __toESM(require_react());
  function DeletePageActions({
    deleteRecord,
    cancelDelete
  }) {
    return /* @__PURE__ */ import_react48.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react48.default.createElement("button", { type: "button", className: "btn btn-primary", onClick: deleteRecord }, trans("YES_DELETE")), /* @__PURE__ */ import_react48.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-secondary border",
        onClick: cancelDelete
      },
      trans("NO_CANCEL")
    ));
  }

  // js/views/delete/DeleteAllAltsChoice.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react49 = __toESM(require_react());
  function DeleteAllAltsChoice({
    deleteMasterRecord,
    setDeleteMasterRecord,
    isAttachment
  }) {
    return /* @__PURE__ */ import_react49.default.createElement(import_react49.default.Fragment, null, /* @__PURE__ */ import_react49.default.createElement("p", null, trans("DELETE_PRIMARY_ALT_INFO")), /* @__PURE__ */ import_react49.default.createElement("ul", null, /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement("label", null, /* @__PURE__ */ import_react49.default.createElement(
      "input",
      {
        type: "radio",
        checked: deleteMasterRecord,
        onChange: () => {
          setDeleteMasterRecord(!0);
        }
      }
    ), " ", trans(
      isAttachment ? "DELETE_ALL_ATTACHMENT_ALTS" : "DELETE_ALL_PAGE_ALTS"
    ))), /* @__PURE__ */ import_react49.default.createElement("li", null, /* @__PURE__ */ import_react49.default.createElement("label", null, /* @__PURE__ */ import_react49.default.createElement(
      "input",
      {
        type: "radio",
        checked: !deleteMasterRecord,
        onChange: () => {
          setDeleteMasterRecord(!1);
        }
      }
    ), " ", trans(
      isAttachment ? "DELETE_ONLY_PRIMARY_ATTACHMENT_ALT" : "DELETE_ONLY_PRIMARY_PAGE_ALT"
    )))));
  }

  // js/views/delete/DeletePageHeader.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react50 = __toESM(require_react());
  function DeletePageHeader({
    recordInfo,
    currentAlt
  }) {
    let isPrimary = currentAlt === "_primary", altInfo = recordInfo.alts.find((a) => a.alt === currentAlt), label = trans_fallback(recordInfo.label_i18n, recordInfo.id);
    return !isPrimary && altInfo && (label += ` (${trans_obj(altInfo.name_i18n)})`), /* @__PURE__ */ import_react50.default.createElement(import_react50.default.Fragment, null, /* @__PURE__ */ import_react50.default.createElement("h2", null, trans_format("DELETE_RECORD", label)), recordInfo.is_attachment ? /* @__PURE__ */ import_react50.default.createElement("p", null, isPrimary ? trans("DELETE_ATTACHMENT_PROMPT") : trans("DELETE_ATTACHMENT_ALT_PROMPT"), " ") : /* @__PURE__ */ import_react50.default.createElement("p", null, isPrimary ? trans("DELETE_PAGE_PROMPT") : trans("DELETE_PAGE_ALT_PROMPT"), " ", recordInfo.children.length > 0 && isPrimary ? trans("DELETE_PAGE_CHILDREN_WARNING") : null));
  }

  // js/views/delete/DeletePage.tsx
  function DeletePage() {
    let { path, alt } = useRecord(), [recordInfo, setRecordInfo] = (0, import_react51.useState)(null), [deleteMasterRecord, setDeleteMasterRecord] = (0, import_react51.useState)(!0), goToAdminPage = useGoToAdminPage();
    (0, import_react51.useEffect)(() => {
      let ignore = !1;
      return get("/recordinfo", { path }).then((resp) => {
        ignore || setRecordInfo(resp);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]), (0, import_react51.useEffect)(() => {
      setDeleteMasterRecord(alt === "_primary");
    }, [alt]);
    let deleteRecord = (0, import_react51.useCallback)(() => {
      let parent = getParentPath(path), targetPath = parent === null ? "/" : parent;
      post("/deleterecord", {
        path,
        alt,
        delete_master: deleteMasterRecord ? "1" : "0"
      }).then(() => {
        recordInfo != null && recordInfo.is_attachment && dispatch("lektor-attachments-changed", parent != null ? parent : ""), goToAdminPage("edit", targetPath, alt);
      }, showErrorDialog);
    }, [alt, path, deleteMasterRecord, goToAdminPage, recordInfo]), cancelDelete = (0, import_react51.useCallback)(() => {
      goToAdminPage("edit", path, alt);
    }, [goToAdminPage, path, alt]);
    if (!recordInfo || !recordInfo.can_be_deleted)
      return null;
    let hasAlts = recordInfo.alts.filter((a) => a.exists).length > 1;
    return /* @__PURE__ */ import_react51.default.createElement("div", null, /* @__PURE__ */ import_react51.default.createElement(DeletePageHeader, { recordInfo, currentAlt: alt }), hasAlts && alt === "_primary" && /* @__PURE__ */ import_react51.default.createElement(
      DeleteAllAltsChoice,
      {
        deleteMasterRecord,
        setDeleteMasterRecord,
        isAttachment: recordInfo.is_attachment
      }
    ), deleteMasterRecord && /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, hasAlts && alt === "_primary" && /* @__PURE__ */ import_react51.default.createElement(DeletableAlternatives, { recordInfo }), recordInfo.children.length > 0 && /* @__PURE__ */ import_react51.default.createElement(DeletableChildPages, { recordInfo }), recordInfo.attachments.length > 0 && /* @__PURE__ */ import_react51.default.createElement(DeletableAttachments, { recordInfo })), /* @__PURE__ */ import_react51.default.createElement(
      DeletePageActions,
      {
        deleteRecord,
        cancelDelete
      }
    ));
  }
  var DeletePage_default = DeletePage;

  // js/views/PreviewPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react52 = __toESM(require_react());
  function getSiteRootUrl() {
    let site_root = `/${trimLeadingSlashes($LEKTOR_CONFIG.site_root)}`, absRootUrl = new URL(site_root, document.baseURI).href;
    return trimTrailingSlashes(absRootUrl);
  }
  function usePreviewUrl(siteRootUrl) {
    let { path, alt } = useRecord(), [previewUrl, setPreviewUrl] = (0, import_react52.useState)("about:blank");
    return (0, import_react52.useEffect)(() => {
      let ignore = !1;
      return get("/previewinfo", { path, alt }).then(({ url }) => {
        ignore || setPreviewUrl(url ? siteRootUrl + url : "about:blank");
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path, alt, siteRootUrl]), previewUrl;
  }
  function PreviewPage() {
    let siteRootUrl = (0, import_react52.useMemo)(getSiteRootUrl, []), previewUrl = usePreviewUrl(siteRootUrl), iframe = (0, import_react52.useRef)(null), goToAdminPage = useGoToAdminPage();
    (0, import_react52.useEffect)(() => {
      var _a2, _b;
      let location = (_b = (_a2 = iframe.current) == null ? void 0 : _a2.contentWindow) == null ? void 0 : _b.location;
      location && location.href !== previewUrl && location.replace(previewUrl);
    }, [previewUrl]);
    let onLoad = (0, import_react52.useCallback)(() => {
      var _a2;
      let contentWindow = (_a2 = iframe.current) == null ? void 0 : _a2.contentWindow;
      if (contentWindow)
        try {
          contentWindow.addEventListener("keydown", (ev) => {
            let clone = new KeyboardEvent(ev.type, ev);
            window.dispatchEvent(clone) || ev.preventDefault();
          });
          let href = contentWindow.location.href;
          if (href && href !== previewUrl && href.startsWith(`${siteRootUrl}/`)) {
            let url_path = href.substring(siteRootUrl.length);
            get("/matchurl", { url_path }).then(({ exists, alt, path }) => {
              exists && goToAdminPage("preview", path, alt);
            }, showErrorDialog);
          }
        } catch (e) {
          if (!(e instanceof DOMException && e.name === "SecurityError"))
            throw e;
        }
    }, [goToAdminPage, previewUrl, siteRootUrl]);
    return /* @__PURE__ */ import_react52.default.createElement("iframe", { className: "preview", ref: iframe, onLoad });
  }

  // js/views/add-child-page/AddChildPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react56 = __toESM(require_react());

  // js/slugify.ts
  init_define_SVG_ICONS_FONTAWESOME();
  var charmap = {
    // latin
    \u00C0: "A",
    \u00C1: "A",
    \u00C2: "A",
    \u00C3: "A",
    \u00C4: "Ae",
    \u00C5: "A",
    \u00C6: "AE",
    \u00C7: "C",
    \u00C8: "E",
    \u00C9: "E",
    \u00CA: "E",
    \u00CB: "E",
    \u00CC: "I",
    \u00CD: "I",
    \u00CE: "I",
    \u00CF: "I",
    \u00D0: "D",
    \u00D1: "N",
    \u00D2: "O",
    \u00D3: "O",
    \u00D4: "O",
    \u00D5: "O",
    \u00D6: "Oe",
    \u0150: "O",
    \u00D8: "O",
    \u00D9: "U",
    \u00DA: "U",
    \u00DB: "U",
    \u00DC: "Ue",
    \u0170: "U",
    \u00DD: "Y",
    \u00DE: "TH",
    \u00DF: "ss",
    \u00E0: "a",
    \u00E1: "a",
    \u00E2: "a",
    \u00E3: "a",
    \u00E4: "ae",
    \u00E5: "a",
    \u00E6: "ae",
    \u00E7: "c",
    \u00E8: "e",
    \u00E9: "e",
    \u00EA: "e",
    \u00EB: "e",
    \u00EC: "i",
    \u00ED: "i",
    \u00EE: "i",
    \u00EF: "i",
    \u00F0: "d",
    \u00F1: "n",
    \u00F2: "o",
    \u00F3: "o",
    \u00F4: "o",
    \u00F5: "o",
    \u00F6: "oe",
    \u0151: "o",
    \u00F8: "o",
    \u00F9: "u",
    \u00FA: "u",
    \u00FB: "u",
    \u00FC: "ue",
    \u0171: "u",
    \u00FD: "y",
    \u00FE: "th",
    \u00FF: "y",
    "\u1E9E": "SS",
    // greek
    \u03B1: "a",
    \u03B2: "b",
    \u03B3: "g",
    \u03B4: "d",
    \u03B5: "e",
    \u03B6: "z",
    \u03B7: "h",
    \u03B8: "8",
    \u03B9: "i",
    \u03BA: "k",
    \u03BB: "l",
    \u03BC: "m",
    \u03BD: "n",
    \u03BE: "3",
    \u03BF: "o",
    \u03C0: "p",
    \u03C1: "r",
    \u03C3: "s",
    \u03C4: "t",
    \u03C5: "y",
    \u03C6: "f",
    \u03C7: "x",
    \u03C8: "ps",
    \u03C9: "w",
    \u03AC: "a",
    \u03AD: "e",
    \u03AF: "i",
    \u03CC: "o",
    \u03CD: "y",
    \u03AE: "h",
    \u03CE: "w",
    \u03C2: "s",
    \u03CA: "i",
    \u03B0: "y",
    \u03CB: "y",
    \u0390: "i",
    \u0391: "A",
    \u0392: "B",
    \u0393: "G",
    \u0394: "D",
    \u0395: "E",
    \u0396: "Z",
    \u0397: "H",
    \u0398: "8",
    \u0399: "I",
    \u039A: "K",
    \u039B: "L",
    \u039C: "M",
    \u039D: "N",
    \u039E: "3",
    \u039F: "O",
    \u03A0: "P",
    \u03A1: "R",
    \u03A3: "S",
    \u03A4: "T",
    \u03A5: "Y",
    \u03A6: "F",
    \u03A7: "X",
    \u03A8: "PS",
    \u03A9: "W",
    \u0386: "A",
    \u0388: "E",
    \u038A: "I",
    \u038C: "O",
    \u038E: "Y",
    \u0389: "H",
    \u038F: "W",
    \u03AA: "I",
    \u03AB: "Y",
    // turkish
    \u015F: "s",
    \u015E: "S",
    \u0131: "i",
    \u0130: "I",
    \u011F: "g",
    \u011E: "G",
    // russian
    \u0430: "a",
    \u0431: "b",
    \u0432: "v",
    \u0433: "g",
    \u0434: "d",
    \u0435: "e",
    \u0451: "yo",
    \u0436: "zh",
    \u0437: "z",
    \u0438: "i",
    \u0439: "j",
    \u043A: "k",
    \u043B: "l",
    \u043C: "m",
    \u043D: "n",
    \u043E: "o",
    \u043F: "p",
    \u0440: "r",
    \u0441: "s",
    \u0442: "t",
    \u0443: "u",
    \u0444: "f",
    \u0445: "h",
    \u0446: "c",
    \u0447: "ch",
    \u0448: "sh",
    \u0449: "sh",
    \u044A: "u",
    \u044B: "y",
    \u044C: "",
    \u044D: "e",
    \u044E: "yu",
    \u044F: "ya",
    \u0410: "A",
    \u0411: "B",
    \u0412: "V",
    \u0413: "G",
    \u0414: "D",
    \u0415: "E",
    \u0401: "Yo",
    \u0416: "Zh",
    \u0417: "Z",
    \u0418: "I",
    \u0419: "J",
    \u041A: "K",
    \u041B: "L",
    \u041C: "M",
    \u041D: "N",
    \u041E: "O",
    \u041F: "P",
    \u0420: "R",
    \u0421: "S",
    \u0422: "T",
    \u0423: "U",
    \u0424: "F",
    \u0425: "H",
    \u0426: "C",
    \u0427: "Ch",
    \u0428: "Sh",
    \u0429: "Sh",
    \u042A: "U",
    \u042B: "Y",
    \u042C: "",
    \u042D: "E",
    \u042E: "Yu",
    \u042F: "Ya",
    // ukranian
    \u0404: "Ye",
    \u0406: "I",
    \u0407: "Yi",
    \u0490: "G",
    \u0454: "ye",
    \u0456: "i",
    \u0457: "yi",
    \u0491: "g",
    // czech
    \u010D: "c",
    \u010F: "d",
    \u011B: "e",
    \u0148: "n",
    \u0159: "r",
    \u0161: "s",
    \u0165: "t",
    \u016F: "u",
    \u017E: "z",
    \u010C: "C",
    \u010E: "D",
    \u011A: "E",
    \u0147: "N",
    \u0158: "R",
    \u0160: "S",
    \u0164: "T",
    \u016E: "U",
    \u017D: "Z",
    // polish
    \u0105: "a",
    \u0107: "c",
    \u0119: "e",
    \u0142: "l",
    \u0144: "n",
    \u015B: "s",
    \u017A: "z",
    \u017C: "z",
    \u0104: "A",
    \u0106: "C",
    \u0118: "E",
    \u0141: "L",
    \u0143: "N",
    \u015A: "S",
    \u0179: "Z",
    \u017B: "Z",
    // latvian
    \u0101: "a",
    \u0113: "e",
    \u0123: "g",
    \u012B: "i",
    \u0137: "k",
    \u013C: "l",
    \u0146: "n",
    \u016B: "u",
    \u0100: "A",
    \u0112: "E",
    \u0122: "G",
    \u012A: "I",
    \u0136: "K",
    \u013B: "L",
    \u0145: "N",
    \u016A: "U",
    // lithuanian
    \u0117: "e",
    \u012F: "i",
    \u0173: "u",
    \u0116: "E",
    \u012E: "I",
    \u0172: "U",
    // romanian
    \u021B: "t",
    \u021A: "T",
    \u0163: "t",
    \u0162: "T",
    \u0219: "s",
    \u0218: "S",
    \u0103: "a",
    \u0102: "A",
    // currency
    "\u20AC": "euro",
    "\u20A2": "cruzeiro",
    "\u20A3": "french franc",
    "\xA3": "pound",
    "\u20A4": "lira",
    "\u20A5": "mill",
    "\u20A6": "naira",
    "\u20A7": "peseta",
    "\u20A8": "rupee",
    "\u20A9": "won",
    "\u20AA": "new shequel",
    "\u20AB": "dong",
    "\u20AD": "kip",
    "\u20AE": "tugrik",
    "\u20AF": "drachma",
    "\u20B0": "penny",
    "\u20B1": "peso",
    "\u20B2": "guarani",
    "\u20B3": "austral",
    "\u20B4": "hryvnia",
    "\u20B5": "cedi",
    "\xA2": "cent",
    "\xA5": "yen",
    \u5143: "yuan",
    \u5186: "yen",
    "\uFDFC": "rial",
    "\u20A0": "ecu",
    "\xA4": "currency",
    "\u0E3F": "baht",
    $: "dollar",
    "\u20B9": "indian rupee",
    // symbols
    "\xA9": "(c)",
    \u0153: "oe",
    \u0152: "OE",
    "\u2211": "sum",
    "\xAE": "(r)",
    "\u2020": "+",
    "\u201C": '"',
    "\u201D": '"',
    "\u2018": "'",
    "\u2019": "'",
    "\u2202": "d",
    \u0192: "f",
    "\u2122": "tm",
    "\u2120": "sm",
    "\u2026": "...",
    "\u02DA": "o",
    \u00BA: "o",
    \u00AA: "a",
    "\u2022": "*",
    "\u2206": "delta",
    "\u221E": "infinity",
    "\u2665": "love",
    "&": "and",
    "|": "or",
    "<": "less",
    ">": "greater",
    "=": "equals"
  }, multicharmap = {
    "<3": "love",
    "&&": "and",
    "||": "or",
    "w/": "with"
  }, pretty = {
    replacement: "-",
    remove: /[.]/g,
    charmap,
    multicharmap
  };
  function slugify(rawString) {
    let string = rawString.toString(), opts = pretty, lengths = [];
    Object.keys(opts.multicharmap).forEach((key) => {
      let len = key.length;
      lengths.includes(len) || lengths.push(len);
    });
    let result = "";
    for (let char, i = 0, l = string.length; i < l; i++)
      char = string[i], lengths.some((len) => {
        let str = string.substr(i, len);
        return opts.multicharmap[str] ? (i += len - 1, char = opts.multicharmap[str], !0) : !1;
      }) || opts.charmap[char] && (char = opts.charmap[char]), char = char.replace(/[^\w\s\-._~]/g, ""), opts.remove && (char = char.replace(opts.remove, "")), result += char;
    return result = result.replace(/^\s+|\s+$/g, ""), result = result.replace(/[-\s]+/g, opts.replacement), result.replace(opts.replacement + "$", "");
  }

  // js/views/add-child-page/AvailableModels.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react53 = __toESM(require_react());
  function AvailableModels({
    newChildInfo,
    selected,
    setSelected
  }) {
    let available = Object.values(newChildInfo.available_models).sort(
      (a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())
    );
    return /* @__PURE__ */ import_react53.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react53.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react53.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react53.default.createElement("dt", null, trans("MODEL")), /* @__PURE__ */ import_react53.default.createElement("dd", null, /* @__PURE__ */ import_react53.default.createElement(
      "select",
      {
        value: selected,
        className: "form-control",
        onChange: (event) => {
          setSelected(event.target.value);
        }
      },
      available.map((model) => /* @__PURE__ */ import_react53.default.createElement("option", { value: model.id, key: model.id }, trans_obj(model.name_i18n)))
    )))));
  }

  // js/views/add-child-page/PrimaryFieldRow.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react54 = __toESM(require_react());
  function PrimaryField({
    primary,
    field,
    setPrimary
  }) {
    let Widget = getWidgetComponentWithFallback(field.type), value = Widget.deserializeValue ? Widget.deserializeValue(primary, field.type) : primary;
    return /* @__PURE__ */ import_react54.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react54.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react54.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react54.default.createElement("dt", null, formatUserLabel(field.label_i18n)), /* @__PURE__ */ import_react54.default.createElement("dd", null, /* @__PURE__ */ import_react54.default.createElement(
      Widget,
      {
        value,
        onChange: setPrimary,
        type: field.type,
        field
      }
    )))));
  }

  // js/views/add-child-page/Slug.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react55 = __toESM(require_react());
  function Slug({
    id,
    placeholder,
    setId
  }) {
    return /* @__PURE__ */ import_react55.default.createElement("div", { className: "row field-row" }, /* @__PURE__ */ import_react55.default.createElement("div", { className: "col-md-12" }, /* @__PURE__ */ import_react55.default.createElement("dl", { className: "field" }, /* @__PURE__ */ import_react55.default.createElement("dt", null, formatUserLabel(trans("ID"))), /* @__PURE__ */ import_react55.default.createElement("dd", null, /* @__PURE__ */ import_react55.default.createElement(
      SlugInputWidget,
      {
        value: id,
        placeholder,
        onChange: setId,
        type: { widget: "slug", name: "slug", size: "normal" }
      }
    )))));
  }

  // js/views/add-child-page/AddChildPage.tsx
  var alertErr = (text) => {
    alert(trans("ERROR_PREFIX") + text);
  };
  function AddChildPage() {
    var _a2;
    let { path, alt } = useRecord(), [newChildInfo, setNewChildInfo] = (0, import_react56.useState)(null), [selectedModel, setSelectedModel] = (0, import_react56.useState)(""), [id, setId] = (0, import_react56.useState)(""), [primary, setPrimary] = (0, import_react56.useState)("");
    (0, import_react56.useEffect)(() => {
      let ignore = !1;
      return get("/newrecord", { path }).then((resp) => {
        var _a3;
        if (!ignore) {
          let defaultModel = resp.available_models.page ? "page" : Object.keys(resp.available_models).sort()[0], selectedModel2 = (_a3 = resp.implied_model) != null ? _a3 : defaultModel;
          setNewChildInfo(resp), setId(""), setPrimary(""), setSelectedModel(selectedModel2);
        }
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]);
    let primaryField = (_a2 = newChildInfo == null ? void 0 : newChildInfo.available_models[selectedModel]) == null ? void 0 : _a2.primary_field, goToAdminPage = useGoToAdminPage(), createRecord = (0, import_react56.useCallback)(() => {
      let currentId = id || slugify(primary).toLowerCase();
      if (!currentId) {
        alertErr(trans("ERROR_NO_ID_PROVIDED"));
        return;
      }
      let data = {};
      newChildInfo != null && newChildInfo.implied_model || (data._model = selectedModel), primaryField && (data[primaryField.name] = primary), post("/newrecord", null, { id: currentId, path, data }).then(
        ({ exists, valid_id, path: path2 }) => {
          exists ? alertErr(trans_format("ERROR_PAGE_ID_DUPLICATE", currentId)) : valid_id ? goToAdminPage("edit", path2, alt) : alertErr(trans_format("ERROR_INVALID_ID", currentId));
        },
        showErrorDialog
      );
    }, [
      alt,
      goToAdminPage,
      newChildInfo,
      id,
      path,
      primary,
      primaryField,
      selectedModel
    ]);
    return newChildInfo ? /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, /* @__PURE__ */ import_react56.default.createElement("h2", null, trans_format("ADD_CHILD_PAGE_TO", newChildInfo.label)), /* @__PURE__ */ import_react56.default.createElement("p", null, trans("ADD_CHILD_PAGE_NOTE")), !newChildInfo.implied_model && /* @__PURE__ */ import_react56.default.createElement(
      AvailableModels,
      {
        newChildInfo,
        selected: selectedModel,
        setSelected: setSelectedModel
      }
    ), primaryField && /* @__PURE__ */ import_react56.default.createElement(
      PrimaryField,
      {
        primary,
        setPrimary,
        field: primaryField
      }
    ), /* @__PURE__ */ import_react56.default.createElement(
      Slug,
      {
        id,
        placeholder: slugify(primary).toLowerCase(),
        setId
      }
    ), /* @__PURE__ */ import_react56.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react56.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-primary",
        onClick: createRecord
      },
      trans("CREATE_CHILD_PAGE")
    ))) : null;
  }
  var AddChildPage_default = AddChildPage;

  // js/views/AddAttachmentPage.tsx
  init_define_SVG_ICONS_FONTAWESOME();
  var import_react57 = __toESM(require_react());
  function AddAttachmentPage() {
    let path = useRecordPath(), [newAttachmentInfo, setNewAttachmentInfo] = (0, import_react57.useState)(null), fileInput = (0, import_react57.useRef)(null), [currentFiles, setCurrentFiles] = (0, import_react57.useState)([]), [isUploading, setIsUploading] = (0, import_react57.useState)(!1), [currentProgress, setCurrentProgress] = (0, import_react57.useState)(0);
    (0, import_react57.useEffect)(() => {
      let ignore = !1;
      return get("/newattachment", { path }).then((resp) => {
        ignore || setNewAttachmentInfo(resp);
      }, showErrorDialog), () => {
        ignore = !0;
      };
    }, [path]);
    let onFileSelected = (0, import_react57.useCallback)(
      ({ target }) => {
        if (isUploading || !target.files)
          return;
        let files = Array.prototype.slice.call(target.files, 0);
        setCurrentFiles(files), setIsUploading(!0);
        let formData = new FormData();
        formData.append("path", path), files.forEach((file) => {
          formData.append("file", file, file.name);
        });
        let xhr = new XMLHttpRequest();
        xhr.open("POST", apiUrl("/newattachment")), xhr.onprogress = (event) => {
          setCurrentProgress(Math.round(event.loaded * 100 / event.total));
        }, xhr.onload = () => {
          setIsUploading(!1), setCurrentProgress(100), dispatch("lektor-attachments-changed", path);
        }, xhr.send(formData);
      },
      [path, isUploading]
    );
    return newAttachmentInfo ? /* @__PURE__ */ import_react57.default.createElement(import_react57.default.Fragment, null, /* @__PURE__ */ import_react57.default.createElement("h2", null, trans_format("ADD_ATTACHMENT_TO", newAttachmentInfo.label)), /* @__PURE__ */ import_react57.default.createElement("p", null, trans("ADD_ATTACHMENT_NOTE")), /* @__PURE__ */ import_react57.default.createElement("ul", null, currentFiles.map((file) => /* @__PURE__ */ import_react57.default.createElement("li", { key: file.name }, file.name, " (", file.type, ")"))), /* @__PURE__ */ import_react57.default.createElement("p", null, trans("PROGRESS"), ": ", currentProgress, "%"), /* @__PURE__ */ import_react57.default.createElement(
      "input",
      {
        type: "file",
        ref: fileInput,
        multiple: !0,
        style: { display: "none" },
        onChange: onFileSelected
      }
    ), /* @__PURE__ */ import_react57.default.createElement("div", { className: "actions" }, /* @__PURE__ */ import_react57.default.createElement(
      "button",
      {
        type: "button",
        className: "btn btn-primary",
        onClick: () => {
          var _a2;
          return (_a2 = fileInput.current) == null ? void 0 : _a2.click();
        }
      },
      trans("UPLOAD")
    ))) : null;
  }
  var AddAttachmentPage_default = AddAttachmentPage;

  // js/views/App.tsx
  var mainComponentForPage = {
    edit: EditPage_default,
    delete: DeletePage_default,
    preview: PreviewPage,
    "add-child": AddChildPage_default,
    upload: AddAttachmentPage_default
  };
  function App() {
    let page = (0, import_react58.useContext)(PageContext), [sidebarIsActive, toggleSidebar] = (0, import_react58.useReducer)((v) => !v, !1), [appSettings, setAppSettings] = (0, import_react58.useState)(loadAppSettings()), { path, alt } = useRecord(), goToAdminPage = useGoToAdminPage(), MainComponent = mainComponentForPage[page];
    return (0, import_react58.useEffect)(() => (saveAppSettings(appSettings), installShortcutKeyListener(appSettings.shortcutKeyMap)), [appSettings]), (0, import_react58.useEffect)(() => {
      let cleanup = [
        { action: "EDIT_SHORTCUT" /* Edit */, target: "edit" },
        { action: "PREVIEW_SHORTCUT" /* Preview */, target: "preview" }
      ].filter(({ target }) => target != page).map(
        ({ action, target }) => setShortcutHandler(action, () => {
          goToAdminPage(target, path, alt);
        })
      );
      return () => {
        cleanup.forEach((cb) => {
          cb();
        });
      };
    }, [page, path, alt, goToAdminPage]), /* @__PURE__ */ import_react58.default.createElement(AppSettingsContext.Provider, { value: appSettings }, /* @__PURE__ */ import_react58.default.createElement(Header, { sidebarIsActive, toggleSidebar }), /* @__PURE__ */ import_react58.default.createElement(ErrorDialog, null), /* @__PURE__ */ import_react58.default.createElement(DialogSlot, { setAppSettings }), /* @__PURE__ */ import_react58.default.createElement("div", { className: "container" }, /* @__PURE__ */ import_react58.default.createElement(
      "div",
      {
        className: sidebarIsActive ? "block-offcanvas row active" : "block-offcanvas row"
      },
      /* @__PURE__ */ import_react58.default.createElement("nav", { className: "sidebar col-md-2 col-sm-3" }, /* @__PURE__ */ import_react58.default.createElement(Sidebar_default, null)),
      /* @__PURE__ */ import_react58.default.createElement("div", { className: "main col-md-10 col-sm-9" }, /* @__PURE__ */ import_react58.default.createElement(MainComponent, null))
    )), /* @__PURE__ */ import_react58.default.createElement(ServerStatus, null));
  }

  // js/main.tsx
  function Page({ page }) {
    let { search } = useLocation(), record = (0, import_react59.useMemo)(() => {
      var _a2, _b;
      let params = new URLSearchParams(search);
      return {
        path: `/${trimSlashes((_a2 = params.get("path")) != null ? _a2 : "/")}`,
        alt: (_b = params.get("alt")) != null ? _b : "_primary"
      };
    }, [search]);
    return /* @__PURE__ */ import_react59.default.createElement(PageContext.Provider, { value: page }, /* @__PURE__ */ import_react59.default.createElement(RecordContext.Provider, { value: record }, /* @__PURE__ */ import_react59.default.createElement(App, null)));
  }
  function Main() {
    var _a2;
    let page = (_a2 = useMatch(":page")) == null ? void 0 : _a2.params.page;
    return isPageName(page) ? /* @__PURE__ */ import_react59.default.createElement(Page, { page }) : /* @__PURE__ */ import_react59.default.createElement(Navigate, { to: adminPath("edit", "/", "_primary") });
  }
  var dash = document.getElementById("dash");
  if (dash) {
    setCurrentLanguage($LEKTOR_CONFIG.lang);
    let root = (0, import_client.createRoot)(dash), router = createBrowserRouter(
      [
        {
          path: "/",
          element: /* @__PURE__ */ import_react59.default.createElement(Navigate, { to: adminPath("edit", "/", "_primary") })
        },
        {
          path: "/:page",
          element: /* @__PURE__ */ import_react59.default.createElement(Main, null)
        }
      ],
      {
        basename: $LEKTOR_CONFIG.admin_root
      }
    ), app = /* @__PURE__ */ import_react59.default.createElement(RouterProvider, { router });
    root.render(app);
  }
})();
/*! Bundled license information:

react/cjs/react.production.min.js:
  (**
   * @license React
   * react.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

scheduler/cjs/scheduler.production.min.js:
  (**
   * @license React
   * scheduler.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

react-dom/cjs/react-dom.production.min.js:
  (**
   * @license React
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

@remix-run/router/dist/router.js:
  (**
   * @remix-run/router v1.10.0
   *
   * Copyright (c) Remix Software Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

react-router/dist/index.js:
  (**
   * React Router v6.17.0
   *
   * Copyright (c) Remix Software Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)

react-router-dom/dist/index.js:
  (**
   * React Router DOM v6.17.0
   *
   * Copyright (c) Remix Software Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE.md file in the root directory of this source tree.
   *
   * @license MIT
   *)
*/
//# sourceMappingURL=app.js.map
