@expofp/floorplan
Version:
Interactive floor plan library for expos and events
9,108 lines • 281 kB
JavaScript
(function() {
try {
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
e.SENTRY_RELEASE = { id: "3.39.1" };
var t = new e.Error().stack;
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "8c324ca2-2d6a-4876-9e32-25c82c04dd3a", e._sentryDebugIdIdentifier = "sentry-dbid-8c324ca2-2d6a-4876-9e32-25c82c04dd3a");
} catch {}
})();
import { r as e, t } from "./rolldown-runtime-BOCG9HEF.js";
import { s as n } from "./efp-debug-init-DfQX41Dz.js";
import { t as r } from "./es5-CP2UUc_5.js";
//#region ../config/src/lib/config-store.ts
var i;
function a(e) {
i = e;
}
function o() {
if (!i) throw Error("Config not loaded yet");
return i;
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
var s;
function c(e, t, n) {
var r;
function i(n, r) {
if (n._zod || Object.defineProperty(n, "_zod", {
value: {
def: r,
constr: s,
traits: /* @__PURE__ */ new Set()
},
enumerable: !1
}), n._zod.traits.has(e)) return;
n._zod.traits.add(e), t(n, r);
let i = s.prototype, a = Object.keys(i);
for (let e = 0; e < a.length; e++) {
let t = a[e];
t in n || (n[t] = i[t].bind(n));
}
}
let a = (r = n == null ? void 0 : n.Parent) == null ? Object : r;
class o extends a {}
Object.defineProperty(o, "name", { value: e });
function s(e) {
var t;
let r = n != null && n.Parent ? new o() : this;
i(r, e), (t = r._zod).deferred != null || (t.deferred = []);
for (let e of r._zod.deferred) e();
return r;
}
return Object.defineProperty(s, "init", { value: i }), Object.defineProperty(s, Symbol.hasInstance, { value: (t) => {
var r;
return n != null && n.Parent && t instanceof n.Parent ? !0 : t == null || (r = t._zod) == null || (r = r.traits) == null ? void 0 : r.has(e);
} }), Object.defineProperty(s, "name", { value: e }), s;
}
var l = class extends Error {
constructor() {
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
}
}, u = class extends Error {
constructor(e) {
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
}
};
(s = globalThis).__zod_globalConfig != null || (s.__zod_globalConfig = {});
var d = globalThis.__zod_globalConfig;
function f(e) {
return e && Object.assign(d, e), d;
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
function p(e) {
let t = Object.values(e).filter((e) => typeof e == "number");
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
}
function m(e, t) {
return typeof t == "bigint" ? t.toString() : t;
}
function h(e) {
return { get value() {
{
let t = e();
return Object.defineProperty(this, "value", { value: t }), t;
}
throw Error("cached value already set");
} };
}
function g(e) {
return e == null;
}
function _(e) {
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
return e.slice(t, n);
}
function v(e, t) {
let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
return Math.abs(n - r) < i ? 0 : n - r;
}
var y = /* @__PURE__*/ Symbol("evaluating");
function b(e, t, n) {
let r;
Object.defineProperty(e, t, {
get() {
if (r !== y) return r === void 0 && (r = y, r = n()), r;
},
set(n) {
Object.defineProperty(e, t, { value: n });
},
configurable: !0
});
}
function x(e, t, n) {
Object.defineProperty(e, t, {
value: n,
writable: !0,
enumerable: !0,
configurable: !0
});
}
function S(...e) {
let t = {};
for (let n of e) {
let e = Object.getOwnPropertyDescriptors(n);
Object.assign(t, e);
}
return Object.defineProperties({}, t);
}
function C(e) {
return JSON.stringify(e);
}
function ee(e) {
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
}
var te = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
function ne(e) {
return typeof e == "object" && !!e && !Array.isArray(e);
}
var re = /* @__PURE__*/ h(() => {
var e;
if (d.jitless || typeof navigator < "u" && !((e = navigator) == null || (e = e.userAgent) == null) && e.includes("Cloudflare")) return !1;
try {
return Function(""), !0;
} catch {
return !1;
}
});
function ie(e) {
if (ne(e) === !1) return !1;
let t = e.constructor;
if (t === void 0 || typeof t != "function") return !0;
let n = t.prototype;
return !(ne(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
}
function ae(e) {
return ie(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
}
var oe = /* @__PURE__*/ new Set([
"string",
"number",
"symbol"
]);
function w(e) {
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function T(e, t, n) {
let r = new e._zod.constr(t == null ? e._zod.def : t);
return (!t || n != null && n.parent) && (r._zod.parent = e), r;
}
function E(e) {
let t = e;
if (!t) return {};
if (typeof t == "string") return { error: () => t };
if ((t == null ? void 0 : t.message) !== void 0) {
if ((t == null ? void 0 : t.error) !== void 0) throw Error("Cannot specify both `message` and `error` params");
t.error = t.message;
}
return delete t.message, typeof t.error == "string" ? {
...t,
error: () => t.error
} : t;
}
function se(e) {
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
}
var ce = {
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
int32: [-2147483648, 2147483647],
uint32: [0, 4294967295],
float32: [-34028234663852886e22, 34028234663852886e22],
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
};
function le(e, t) {
let n = e._zod.def, r = n.checks;
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
return T(e, S(e._zod.def, {
get shape() {
let e = {};
for (let r in t) {
if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
t[r] && (e[r] = n.shape[r]);
}
return x(this, "shape", e), e;
},
checks: []
}));
}
function ue(e, t) {
let n = e._zod.def, r = n.checks;
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
return T(e, S(e._zod.def, {
get shape() {
let r = { ...e._zod.def.shape };
for (let e in t) {
if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
t[e] && delete r[e];
}
return x(this, "shape", r), r;
},
checks: []
}));
}
function de(e, t) {
if (!ie(t)) throw Error("Invalid input to extend: expected a plain object");
let n = e._zod.def.checks;
if (n && n.length > 0) {
let n = e._zod.def.shape;
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
}
return T(e, S(e._zod.def, { get shape() {
let n = {
...e._zod.def.shape,
...t
};
return x(this, "shape", n), n;
} }));
}
function fe(e, t) {
if (!ie(t)) throw Error("Invalid input to safeExtend: expected a plain object");
return T(e, S(e._zod.def, { get shape() {
let n = {
...e._zod.def.shape,
...t
};
return x(this, "shape", n), n;
} }));
}
function pe(e, t) {
var n, r;
if ((n = e._zod.def.checks) != null && n.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
return T(e, S(e._zod.def, {
get shape() {
let n = {
...e._zod.def.shape,
...t._zod.def.shape
};
return x(this, "shape", n), n;
},
get catchall() {
return t._zod.def.catchall;
},
checks: (r = t._zod.def.checks) == null ? [] : r
}));
}
function me(e, t, n) {
let r = t._zod.def.checks;
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
return T(t, S(t._zod.def, {
get shape() {
let r = t._zod.def.shape, i = { ...r };
if (n) for (let t in n) {
if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
n[t] && (i[t] = e ? new e({
type: "optional",
innerType: r[t]
}) : r[t]);
}
else for (let t in r) i[t] = e ? new e({
type: "optional",
innerType: r[t]
}) : r[t];
return x(this, "shape", i), i;
},
checks: []
}));
}
function he(e, t, n) {
return T(t, S(t._zod.def, { get shape() {
let r = t._zod.def.shape, i = { ...r };
if (n) for (let t in n) {
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
n[t] && (i[t] = new e({
type: "nonoptional",
innerType: r[t]
}));
}
else for (let t in r) i[t] = new e({
type: "nonoptional",
innerType: r[t]
});
return x(this, "shape", i), i;
} }));
}
function ge(e, t = 0) {
if (e.aborted === !0) return !0;
for (let r = t; r < e.issues.length; r++) {
var n;
if (((n = e.issues[r]) == null ? void 0 : n.continue) !== !0) return !0;
}
return !1;
}
function _e(e, t = 0) {
if (e.aborted === !0) return !0;
for (let r = t; r < e.issues.length; r++) {
var n;
if (((n = e.issues[r]) == null ? void 0 : n.continue) === !1) return !0;
}
return !1;
}
function ve(e, t) {
return t.map((t) => {
var n;
return (n = t).path != null || (n.path = []), t.path.unshift(e), t;
});
}
function ye(e) {
return typeof e == "string" ? e : e == null ? void 0 : e.message;
}
function be(e, t, n) {
var r, i, a, o, s, c, l, u, d;
let f = e.message ? e.message : (r = (i = (a = (o = ye((s = e.inst) == null || (s = s._zod.def) == null || (c = s.error) == null ? void 0 : c.call(s, e))) == null ? ye(t == null || (l = t.error) == null ? void 0 : l.call(t, e)) : o) == null ? ye((u = n.customError) == null ? void 0 : u.call(n, e)) : a) == null ? ye((d = n.localeError) == null ? void 0 : d.call(n, e)) : i) == null ? "Invalid input" : r, { inst: p, continue: m, input: h, ...g } = e;
return g.path != null || (g.path = []), g.message = f, t != null && t.reportInput && (g.input = h), g;
}
function xe(e) {
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
}
function Se(...e) {
let [t, n, r] = e;
return typeof t == "string" ? {
message: t,
code: "custom",
input: n,
inst: r
} : { ...t };
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
var Ce = (e, t) => {
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
value: e._zod,
enumerable: !1
}), Object.defineProperty(e, "issues", {
value: t,
enumerable: !1
}), e.message = JSON.stringify(t, m, 2), Object.defineProperty(e, "toString", {
value: () => e.message,
enumerable: !1
});
}, we = c("$ZodError", Ce), Te = c("$ZodError", Ce, { Parent: Error });
function Ee(e, t = (e) => e.message) {
let n = {}, r = [];
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
return {
formErrors: r,
fieldErrors: n
};
}
function De(e, t = (e) => e.message) {
let n = { _errors: [] }, r = (e, i = []) => {
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
else {
let e = [...i, ...a.path];
if (e.length === 0) n._errors.push(t(a));
else {
let r = n, i = 0;
for (; i < e.length;) {
let n = e[i];
i === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(a))) : r[n] = r[n] || { _errors: [] }, r = r[n], i++;
}
}
}
};
return r(e), n;
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
var Oe = (e) => (t, n, r, i) => {
let a = r ? {
...r,
async: !1
} : { async: !1 }, o = t._zod.run({
value: n,
issues: []
}, a);
if (o instanceof Promise) throw new l();
if (o.issues.length) {
var s;
let t = new ((s = i == null ? void 0 : i.Err) == null ? e : s)(o.issues.map((e) => be(e, a, f())));
throw te(t, i == null ? void 0 : i.callee), t;
}
return o.value;
}, ke = /* @__PURE__*/ Oe(Te), Ae = (e) => async (t, n, r, i) => {
let a = r ? {
...r,
async: !0
} : { async: !0 }, o = t._zod.run({
value: n,
issues: []
}, a);
if (o instanceof Promise && (o = await o), o.issues.length) {
var s;
let t = new ((s = i == null ? void 0 : i.Err) == null ? e : s)(o.issues.map((e) => be(e, a, f())));
throw te(t, i == null ? void 0 : i.callee), t;
}
return o.value;
}, je = /* @__PURE__*/ Ae(Te), Me = (e) => (t, n, r) => {
let i = r ? {
...r,
async: !1
} : { async: !1 }, a = t._zod.run({
value: n,
issues: []
}, i);
if (a instanceof Promise) throw new l();
return a.issues.length ? {
success: !1,
error: new (e == null ? we : e)(a.issues.map((e) => be(e, i, f())))
} : {
success: !0,
data: a.value
};
}, Ne = /* @__PURE__*/ Me(Te), Pe = (e) => async (t, n, r) => {
let i = r ? {
...r,
async: !0
} : { async: !0 }, a = t._zod.run({
value: n,
issues: []
}, i);
return a instanceof Promise && (a = await a), a.issues.length ? {
success: !1,
error: new e(a.issues.map((e) => be(e, i, f())))
} : {
success: !0,
data: a.value
};
}, Fe = /* @__PURE__*/ Pe(Te), Ie = (e) => (t, n, r) => {
let i = r ? {
...r,
direction: "backward"
} : { direction: "backward" };
return Oe(e)(t, n, i);
}, Le = (e) => (t, n, r) => Oe(e)(t, n, r), Re = (e) => async (t, n, r) => {
let i = r ? {
...r,
direction: "backward"
} : { direction: "backward" };
return Ae(e)(t, n, i);
}, ze = (e) => async (t, n, r) => Ae(e)(t, n, r), Be = (e) => (t, n, r) => {
let i = r ? {
...r,
direction: "backward"
} : { direction: "backward" };
return Me(e)(t, n, i);
}, Ve = (e) => (t, n, r) => Me(e)(t, n, r), He = (e) => async (t, n, r) => {
let i = r ? {
...r,
direction: "backward"
} : { direction: "backward" };
return Pe(e)(t, n, i);
}, Ue = (e) => async (t, n, r) => Pe(e)(t, n, r), We = /^[cC][0-9a-z]{6,}$/, Ge = /^[0-9a-z]+$/, Ke = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, qe = /^[0-9a-vA-V]{20}$/, Je = /^[A-Za-z0-9]{27}$/, Ye = /^[a-zA-Z0-9_-]{21}$/, Xe = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ze = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Qe = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, $e = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, et = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
function tt() {
return new RegExp(et, "u");
}
var nt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, rt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, it = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, at = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ot = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, st = /^[A-Za-z0-9_-]*$/, ct = /^https?$/, lt = /^\+[1-9]\d{6,14}$/, ut = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", dt = /*@__PURE__*/ RegExp(`^${ut}$`);
function ft(e) {
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
}
function pt(e) {
return RegExp(`^${ft(e)}$`);
}
function mt(e) {
let t = ft({ precision: e.precision }), n = ["Z"];
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
let r = `${t}(?:${n.join("|")})`;
return RegExp(`^${ut}T(?:${r})$`);
}
var ht = (e) => {
var t, n;
let r = e ? `[\\s\\S]{${(t = e == null ? void 0 : e.minimum) == null ? 0 : t},${(n = e == null ? void 0 : e.maximum) == null ? "" : n}}` : "[\\s\\S]*";
return RegExp(`^${r}$`);
}, gt = /^-?\d+$/, _t = /^-?\d+(?:\.\d+)?$/, vt = /^(?:true|false)$/i, yt = /^null$/i, bt = /^[^A-Z]*$/, xt = /^[^a-z]*$/, D = /*@__PURE__*/ c("$ZodCheck", (e, t) => {
var n;
e._zod != null || (e._zod = {}), e._zod.def = t, (n = e._zod).onattach != null || (n.onattach = []);
}), St = {
number: "number",
bigint: "bigint",
object: "date"
}, Ct = /*@__PURE__*/ c("$ZodCheckLessThan", (e, t) => {
D.init(e, t);
let n = St[typeof t.value];
e._zod.onattach.push((e) => {
var n;
let r = e._zod.bag, i = (n = t.inclusive ? r.maximum : r.exclusiveMaximum) == null ? Infinity : n;
t.value < i && (t.inclusive ? r.maximum = t.value : r.exclusiveMaximum = t.value);
}), e._zod.check = (r) => {
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
origin: n,
code: "too_big",
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
input: r.value,
inclusive: t.inclusive,
inst: e,
continue: !t.abort
});
};
}), wt = /*@__PURE__*/ c("$ZodCheckGreaterThan", (e, t) => {
D.init(e, t);
let n = St[typeof t.value];
e._zod.onattach.push((e) => {
var n;
let r = e._zod.bag, i = (n = t.inclusive ? r.minimum : r.exclusiveMinimum) == null ? -Infinity : n;
t.value > i && (t.inclusive ? r.minimum = t.value : r.exclusiveMinimum = t.value);
}), e._zod.check = (r) => {
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
origin: n,
code: "too_small",
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
input: r.value,
inclusive: t.inclusive,
inst: e,
continue: !t.abort
});
};
}), Tt = /*@__PURE__*/ c("$ZodCheckMultipleOf", (e, t) => {
D.init(e, t), e._zod.onattach.push((e) => {
var n;
(n = e._zod.bag).multipleOf != null || (n.multipleOf = t.value);
}), e._zod.check = (n) => {
if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : v(n.value, t.value) === 0) || n.issues.push({
origin: typeof n.value,
code: "not_multiple_of",
divisor: t.value,
input: n.value,
inst: e,
continue: !t.abort
});
};
}), Et = /*@__PURE__*/ c("$ZodCheckNumberFormat", (e, t) => {
var n;
D.init(e, t), t.format = t.format || "float64";
let r = (n = t.format) == null ? void 0 : n.includes("int"), i = r ? "int" : "number", [a, o] = ce[t.format];
e._zod.onattach.push((e) => {
let n = e._zod.bag;
n.format = t.format, n.minimum = a, n.maximum = o, r && (n.pattern = gt);
}), e._zod.check = (n) => {
let s = n.value;
if (r) {
if (!Number.isInteger(s)) {
n.issues.push({
expected: i,
format: t.format,
code: "invalid_type",
continue: !1,
input: s,
inst: e
});
return;
}
if (!Number.isSafeInteger(s)) {
s > 0 ? n.issues.push({
input: s,
code: "too_big",
maximum: 2 ** 53 - 1,
note: "Integers must be within the safe integer range.",
inst: e,
origin: i,
inclusive: !0,
continue: !t.abort
}) : n.issues.push({
input: s,
code: "too_small",
minimum: -(2 ** 53 - 1),
note: "Integers must be within the safe integer range.",
inst: e,
origin: i,
inclusive: !0,
continue: !t.abort
});
return;
}
}
s < a && n.issues.push({
origin: "number",
input: s,
code: "too_small",
minimum: a,
inclusive: !0,
inst: e,
continue: !t.abort
}), s > o && n.issues.push({
origin: "number",
input: s,
code: "too_big",
maximum: o,
inclusive: !0,
inst: e,
continue: !t.abort
});
};
}), Dt = /*@__PURE__*/ c("$ZodCheckMaxLength", (e, t) => {
var n;
D.init(e, t), (n = e._zod.def).when != null || (n.when = (e) => {
let t = e.value;
return !g(t) && t.length !== void 0;
}), e._zod.onattach.push((e) => {
var n;
let r = (n = e._zod.bag.maximum) == null ? Infinity : n;
t.maximum < r && (e._zod.bag.maximum = t.maximum);
}), e._zod.check = (n) => {
let r = n.value;
if (r.length <= t.maximum) return;
let i = xe(r);
n.issues.push({
origin: i,
code: "too_big",
maximum: t.maximum,
inclusive: !0,
input: r,
inst: e,
continue: !t.abort
});
};
}), Ot = /*@__PURE__*/ c("$ZodCheckMinLength", (e, t) => {
var n;
D.init(e, t), (n = e._zod.def).when != null || (n.when = (e) => {
let t = e.value;
return !g(t) && t.length !== void 0;
}), e._zod.onattach.push((e) => {
var n;
let r = (n = e._zod.bag.minimum) == null ? -Infinity : n;
t.minimum > r && (e._zod.bag.minimum = t.minimum);
}), e._zod.check = (n) => {
let r = n.value;
if (r.length >= t.minimum) return;
let i = xe(r);
n.issues.push({
origin: i,
code: "too_small",
minimum: t.minimum,
inclusive: !0,
input: r,
inst: e,
continue: !t.abort
});
};
}), kt = /*@__PURE__*/ c("$ZodCheckLengthEquals", (e, t) => {
var n;
D.init(e, t), (n = e._zod.def).when != null || (n.when = (e) => {
let t = e.value;
return !g(t) && t.length !== void 0;
}), e._zod.onattach.push((e) => {
let n = e._zod.bag;
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
}), e._zod.check = (n) => {
let r = n.value, i = r.length;
if (i === t.length) return;
let a = xe(r), o = i > t.length;
n.issues.push({
origin: a,
...o ? {
code: "too_big",
maximum: t.length
} : {
code: "too_small",
minimum: t.length
},
inclusive: !0,
exact: !0,
input: n.value,
inst: e,
continue: !t.abort
});
};
}), At = /*@__PURE__*/ c("$ZodCheckStringFormat", (e, t) => {
var n, r;
D.init(e, t), e._zod.onattach.push((e) => {
let n = e._zod.bag;
n.format = t.format, t.pattern && (n.patterns != null || (n.patterns = /* @__PURE__ */ new Set()), n.patterns.add(t.pattern));
}), t.pattern ? (n = e._zod).check != null || (n.check = (n) => {
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
origin: "string",
code: "invalid_format",
format: t.format,
input: n.value,
...t.pattern ? { pattern: t.pattern.toString() } : {},
inst: e,
continue: !t.abort
});
}) : (r = e._zod).check != null || (r.check = () => {});
}), jt = /*@__PURE__*/ c("$ZodCheckRegex", (e, t) => {
At.init(e, t), e._zod.check = (n) => {
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
origin: "string",
code: "invalid_format",
format: "regex",
input: n.value,
pattern: t.pattern.toString(),
inst: e,
continue: !t.abort
});
};
}), Mt = /*@__PURE__*/ c("$ZodCheckLowerCase", (e, t) => {
t.pattern != null || (t.pattern = bt), At.init(e, t);
}), Nt = /*@__PURE__*/ c("$ZodCheckUpperCase", (e, t) => {
t.pattern != null || (t.pattern = xt), At.init(e, t);
}), Pt = /*@__PURE__*/ c("$ZodCheckIncludes", (e, t) => {
D.init(e, t);
let n = w(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
t.pattern = r, e._zod.onattach.push((e) => {
let t = e._zod.bag;
t.patterns != null || (t.patterns = /* @__PURE__ */ new Set()), t.patterns.add(r);
}), e._zod.check = (n) => {
n.value.includes(t.includes, t.position) || n.issues.push({
origin: "string",
code: "invalid_format",
format: "includes",
includes: t.includes,
input: n.value,
inst: e,
continue: !t.abort
});
};
}), Ft = /*@__PURE__*/ c("$ZodCheckStartsWith", (e, t) => {
D.init(e, t);
let n = RegExp(`^${w(t.prefix)}.*`);
t.pattern != null || (t.pattern = n), e._zod.onattach.push((e) => {
let t = e._zod.bag;
t.patterns != null || (t.patterns = /* @__PURE__ */ new Set()), t.patterns.add(n);
}), e._zod.check = (n) => {
n.value.startsWith(t.prefix) || n.issues.push({
origin: "string",
code: "invalid_format",
format: "starts_with",
prefix: t.prefix,
input: n.value,
inst: e,
continue: !t.abort
});
};
}), It = /*@__PURE__*/ c("$ZodCheckEndsWith", (e, t) => {
D.init(e, t);
let n = RegExp(`.*${w(t.suffix)}$`);
t.pattern != null || (t.pattern = n), e._zod.onattach.push((e) => {
let t = e._zod.bag;
t.patterns != null || (t.patterns = /* @__PURE__ */ new Set()), t.patterns.add(n);
}), e._zod.check = (n) => {
n.value.endsWith(t.suffix) || n.issues.push({
origin: "string",
code: "invalid_format",
format: "ends_with",
suffix: t.suffix,
input: n.value,
inst: e,
continue: !t.abort
});
};
}), Lt = /*@__PURE__*/ c("$ZodCheckOverwrite", (e, t) => {
D.init(e, t), e._zod.check = (e) => {
e.value = t.tx(e.value);
};
}), Rt = class {
constructor(e = []) {
this.content = [], this.indent = 0, this && (this.args = e);
}
indented(e) {
this.indent += 1, e(this), --this.indent;
}
write(e) {
if (typeof e == "function") {
e(this, { execution: "sync" }), e(this, { execution: "async" });
return;
}
let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
for (let e of r) this.content.push(e);
}
compile() {
var e, t, n;
let r = Function, i = (e = this) == null ? void 0 : e.args, a = [...((t = (n = this) == null ? void 0 : n.content) == null ? [""] : t).map((e) => ` ${e}`)];
return new r(...i, a.join("\n"));
}
}, zt = {
major: 4,
minor: 4,
patch: 3
}, O = /*@__PURE__*/ c("$ZodType", (e, t) => {
var n, r;
e != null || (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = zt;
let i = [...(n = e._zod.def.checks) == null ? [] : n];
e._zod.traits.has("$ZodCheck") && i.unshift(e);
for (let t of i) for (let n of t._zod.onattach) n(e);
if (i.length === 0) {
var a;
(r = e._zod).deferred != null || (r.deferred = []), (a = e._zod.deferred) == null || a.push(() => {
e._zod.run = e._zod.parse;
});
} else {
let t = (e, t, n) => {
let r = ge(e), i;
for (let o of t) {
if (o._zod.def.when) {
if (_e(e) || !o._zod.def.when(e)) continue;
} else if (r) continue;
let t = e.issues.length, s = o._zod.check(e);
if (s instanceof Promise && (n == null ? void 0 : n.async) === !1) throw new l();
if (i || s instanceof Promise) {
var a;
i = ((a = i) == null ? Promise.resolve() : a).then(async () => {
await s, e.issues.length !== t && (r || (r = ge(e, t)));
});
} else {
if (e.issues.length === t) continue;
r || (r = ge(e, t));
}
}
return i ? i.then(() => e) : e;
}, n = (n, r, a) => {
if (ge(n)) return n.aborted = !0, n;
let o = t(r, i, a);
if (o instanceof Promise) {
if (a.async === !1) throw new l();
return o.then((t) => e._zod.parse(t, a));
}
return e._zod.parse(o, a);
};
e._zod.run = (r, a) => {
if (a.skipChecks) return e._zod.parse(r, a);
if (a.direction === "backward") {
let t = e._zod.parse({
value: r.value,
issues: []
}, {
...a,
skipChecks: !0
});
return t instanceof Promise ? t.then((e) => n(e, r, a)) : n(t, r, a);
}
let o = e._zod.parse(r, a);
if (o instanceof Promise) {
if (a.async === !1) throw new l();
return o.then((e) => t(e, i, a));
}
return t(o, i, a);
};
}
b(e, "~standard", () => ({
validate: (t) => {
try {
var n;
let r = Ne(e, t);
return r.success ? { value: r.data } : { issues: (n = r.error) == null ? void 0 : n.issues };
} catch {
return Fe(e, t).then((e) => {
var t;
return e.success ? { value: e.data } : { issues: (t = e.error) == null ? void 0 : t.issues };
});
}
},
vendor: "zod",
version: 1
}));
}), Bt = /*@__PURE__*/ c("$ZodString", (e, t) => {
var n, r, i;
O.init(e, t), e._zod.pattern = (n = [...(r = e == null || (i = e._zod.bag) == null ? void 0 : i.patterns) == null ? [] : r].pop()) == null ? ht(e._zod.bag) : n, e._zod.parse = (n, r) => {
if (t.coerce) try {
n.value = String(n.value);
} catch {}
return typeof n.value == "string" || n.issues.push({
expected: "string",
code: "invalid_type",
input: n.value,
inst: e
}), n;
};
}), k = /*@__PURE__*/ c("$ZodStringFormat", (e, t) => {
At.init(e, t), Bt.init(e, t);
}), Vt = /*@__PURE__*/ c("$ZodGUID", (e, t) => {
t.pattern != null || (t.pattern = Ze), k.init(e, t);
}), Ht = /*@__PURE__*/ c("$ZodUUID", (e, t) => {
if (t.version) {
let e = {
v1: 1,
v2: 2,
v3: 3,
v4: 4,
v5: 5,
v6: 6,
v7: 7,
v8: 8
}[t.version];
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
t.pattern != null || (t.pattern = Qe(e));
} else t.pattern != null || (t.pattern = Qe());
k.init(e, t);
}), Ut = /*@__PURE__*/ c("$ZodEmail", (e, t) => {
t.pattern != null || (t.pattern = $e), k.init(e, t);
}), Wt = /*@__PURE__*/ c("$ZodURL", (e, t) => {
k.init(e, t), e._zod.check = (n) => {
try {
var r;
let i = n.value.trim();
if (!t.normalize && ((r = t.protocol) == null ? void 0 : r.source) === ct.source && !/^https?:\/\//i.test(i)) {
n.issues.push({
code: "invalid_format",
format: "url",
note: "Invalid URL format",
input: n.value,
inst: e,
continue: !t.abort
});
return;
}
let a = new URL(i);
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(a.hostname) || n.issues.push({
code: "invalid_format",
format: "url",
note: "Invalid hostname",
pattern: t.hostname.source,
input: n.value,
inst: e,
continue: !t.abort
})), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(a.protocol.endsWith(":") ? a.protocol.slice(0, -1) : a.protocol) || n.issues.push({
code: "invalid_format",
format: "url",
note: "Invalid protocol",
pattern: t.protocol.source,
input: n.value,
inst: e,
continue: !t.abort
})), t.normalize ? n.value = a.href : n.value = i;
return;
} catch {
n.issues.push({
code: "invalid_format",
format: "url",
input: n.value,
inst: e,
continue: !t.abort
});
}
};
}), Gt = /*@__PURE__*/ c("$ZodEmoji", (e, t) => {
t.pattern != null || (t.pattern = tt()), k.init(e, t);
}), Kt = /*@__PURE__*/ c("$ZodNanoID", (e, t) => {
t.pattern != null || (t.pattern = Ye), k.init(e, t);
}), qt = /*@__PURE__*/ c("$ZodCUID", (e, t) => {
t.pattern != null || (t.pattern = We), k.init(e, t);
}), Jt = /*@__PURE__*/ c("$ZodCUID2", (e, t) => {
t.pattern != null || (t.pattern = Ge), k.init(e, t);
}), Yt = /*@__PURE__*/ c("$ZodULID", (e, t) => {
t.pattern != null || (t.pattern = Ke), k.init(e, t);
}), Xt = /*@__PURE__*/ c("$ZodXID", (e, t) => {
t.pattern != null || (t.pattern = qe), k.init(e, t);
}), Zt = /*@__PURE__*/ c("$ZodKSUID", (e, t) => {
t.pattern != null || (t.pattern = Je), k.init(e, t);
}), Qt = /*@__PURE__*/ c("$ZodISODateTime", (e, t) => {
t.pattern != null || (t.pattern = mt(t)), k.init(e, t);
}), $t = /*@__PURE__*/ c("$ZodISODate", (e, t) => {
t.pattern != null || (t.pattern = dt), k.init(e, t);
}), en = /*@__PURE__*/ c("$ZodISOTime", (e, t) => {
t.pattern != null || (t.pattern = pt(t)), k.init(e, t);
}), tn = /*@__PURE__*/ c("$ZodISODuration", (e, t) => {
t.pattern != null || (t.pattern = Xe), k.init(e, t);
}), nn = /*@__PURE__*/ c("$ZodIPv4", (e, t) => {
t.pattern != null || (t.pattern = nt), k.init(e, t), e._zod.bag.format = "ipv4";
}), rn = /*@__PURE__*/ c("$ZodIPv6", (e, t) => {
t.pattern != null || (t.pattern = rt), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
try {
new URL(`http://[${n.value}]`);
} catch {
n.issues.push({
code: "invalid_format",
format: "ipv6",
input: n.value,
inst: e,
continue: !t.abort
});
}
};
}), an = /*@__PURE__*/ c("$ZodCIDRv4", (e, t) => {
t.pattern != null || (t.pattern = it), k.init(e, t);
}), on = /*@__PURE__*/ c("$ZodCIDRv6", (e, t) => {
t.pattern != null || (t.pattern = at), k.init(e, t), e._zod.check = (n) => {
let r = n.value.split("/");
try {
if (r.length !== 2) throw Error();
let [e, t] = r;
if (!t) throw Error();
let n = Number(t);
if (`${n}` !== t || n < 0 || n > 128) throw Error();
new URL(`http://[${e}]`);
} catch {
n.issues.push({
code: "invalid_format",
format: "cidrv6",
input: n.value,
inst: e,
continue: !t.abort
});
}
};
});
function sn(e) {
if (e === "") return !0;
if (/\s/.test(e) || e.length % 4 != 0) return !1;
try {
return atob(e), !0;
} catch {
return !1;
}
}
var cn = /*@__PURE__*/ c("$ZodBase64", (e, t) => {
t.pattern != null || (t.pattern = ot), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
sn(n.value) || n.issues.push({
code: "invalid_format",
format: "base64",
input: n.value,
inst: e,
continue: !t.abort
});
};
});
function ln(e) {
if (!st.test(e)) return !1;
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
return sn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
}
var un = /*@__PURE__*/ c("$ZodBase64URL", (e, t) => {
t.pattern != null || (t.pattern = st), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
ln(n.value) || n.issues.push({
code: "invalid_format",
format: "base64url",
input: n.value,
inst: e,
continue: !t.abort
});
};
}), dn = /*@__PURE__*/ c("$ZodE164", (e, t) => {
t.pattern != null || (t.pattern = lt), k.init(e, t);
});
function fn(e, t = null) {
try {
let n = e.split(".");
if (n.length !== 3) return !1;
let [r] = n;
if (!r) return !1;
let i = JSON.parse(atob(r));
return !("typ" in i && (i == null ? void 0 : i.typ) !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
} catch {
return !1;
}
}
var pn = /*@__PURE__*/ c("$ZodJWT", (e, t) => {
k.init(e, t), e._zod.check = (n) => {
fn(n.value, t.alg) || n.issues.push({
code: "invalid_format",
format: "jwt",
input: n.value,
inst: e,
continue: !t.abort
});
};
}), mn = /*@__PURE__*/ c("$ZodNumber", (e, t) => {
var n;
O.init(e, t), e._zod.pattern = (n = e._zod.bag.pattern) == null ? _t : n, e._zod.parse = (n, r) => {
if (t.coerce) try {
n.value = Number(n.value);
} catch {}
let i = n.value;
if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : "Infinity" : void 0;
return n.issues.push({
expected: "number",
code: "invalid_type",
input: i,
inst: e,
...a ? { received: a } : {}
}), n;
};
}), hn = /*@__PURE__*/ c("$ZodNumberFormat", (e, t) => {
Et.init(e, t), mn.init(e, t);
}), gn = /*@__PURE__*/ c("$ZodBoolean", (e, t) => {
O.init(e, t), e._zod.pattern = vt, e._zod.parse = (n, r) => {
if (t.coerce) try {
n.value = !!n.value;
} catch {}
let i = n.value;
return typeof i == "boolean" || n.issues.push({
expected: "boolean",
code: "invalid_type",
input: i,
inst: e
}), n;
};
}), _n = /*@__PURE__*/ c("$ZodNull", (e, t) => {
O.init(e, t), e._zod.pattern = yt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
let r = t.value;
return r === null || t.issues.push({
expected: "null",
code: "invalid_type",
input: r,
inst: e
}), t;
};
}), vn = /*@__PURE__*/ c("$ZodAny", (e, t) => {
O.init(e, t), e._zod.parse = (e) => e;
}), yn = /*@__PURE__*/ c("$ZodUnknown", (e, t) => {
O.init(e, t), e._zod.parse = (e) => e;
}), bn = /*@__PURE__*/ c("$ZodNever", (e, t) => {
O.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
expected: "never",
code: "invalid_type",
input: t.value,
inst: e
}), t);
});
function xn(e, t, n) {
e.issues.length && t.issues.push(...ve(n, e.issues)), t.value[n] = e.value;
}
var Sn = /*@__PURE__*/ c("$ZodArray", (e, t) => {
O.init(e, t), e._zod.parse = (n, r) => {
let i = n.value;
if (!Array.isArray(i)) return n.issues.push({
expected: "array",
code: "invalid_type",
input: i,
inst: e
}), n;
n.value = Array(i.length);
let a = [];
for (let e = 0; e < i.length; e++) {
let o = i[e], s = t.element._zod.run({
value: o,
issues: []
}, r);
s instanceof Promise ? a.push(s.then((t) => xn(t, n, e))) : xn(s, n, e);
}
return a.length ? Promise.all(a).then(() => n) : n;
};
});
function Cn(e, t, n, r, i, a) {
let o = n in r;
if (e.issues.length) {
if (i && a && !o) return;
t.issues.push(...ve(n, e.issues));
}
if (!o && !i) {
e.issues.length || t.issues.push({
code: "invalid_type",
expected: "nonoptional",
input: void 0,
path: [n]
});
return;
}
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
}
function wn(e) {
let t = Object.keys(e.shape);
for (let r of t) {
var n;
if (!(!((n = e.shape) == null || (n = n[r]) == null || (n = n._zod) == null || (n = n.traits) == null) && n.has("$ZodType"))) throw Error(`Invalid element at key "${r}": expected a Zod schema`);
}
let r = se(e.shape);
return {
...e,
keys: t,
keySet: new Set(t),
numKeys: t.length,
optionalKeys: new Set(r)
};
}
function Tn(e, t, n, r, i, a) {
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
for (let i in t) {
if (i === "__proto__" || s.has(i)) continue;
if (l === "never") {
o.push(i);
continue;
}
let a = c.run({
value: t[i],
issues: []
}, r);
a instanceof Promise ? e.push(a.then((e) => Cn(e, n, i, t, u, d))) : Cn(a, n, i, t, u, d);
}
return o.length && n.issues.push({
code: "unrecognized_keys",
keys: o,
input: t,
inst: a
}), e.length ? Promise.all(e).then(() => n) : n;
}
var En = /*@__PURE__*/ c("$ZodObject", (e, t) => {
O.init(e, t);
let n = Object.getOwnPropertyDescriptor(t, "shape");
if (!(n != null && n.get)) {
let e = t.shape;
Object.defineProperty(t, "shape", { get: () => {
let n = { ...e };
return Object.defineProperty(t, "shape", { value: n }), n;
} });
}
let r = h(() => wn(t));
b(e._zod, "propValues", () => {
let e = t.shape, n = {};
for (let t in e) {
let r = e[t]._zod;
if (r.values) {
n[t] != null || (n[t] = /* @__PURE__ */ new Set());
for (let e of r.values) n[t].add(e);
}
}
return n;
});
let i = ne, a = t.catchall, o;
e._zod.parse = (t, n) => {
o != null || (o = r.value);
let s = t.value;
if (!i(s)) return t.issues.push({
expected: "object",
code: "invalid_type",
input: s,
inst: e
}), t;
t.value = {};
let c = [], l = o.shape;
for (let e of o.keys) {
let r = l[e], i = r._zod.optin === "optional", a = r._zod.optout === "optional", o = r._zod.run({
value: s[e],
issues: []
}, n);
o instanceof Promise ? c.push(o.then((n) => Cn(n, t, e, s, i, a))) : Cn(o, t, e, s, i, a);
}
return a ? Tn(c, s, t, n, r.value, e) : c.length ? Promise.all(c).then(() => t) : t;
};
}), Dn = /*@__PURE__*/ c("$ZodObjectJIT", (e, t) => {
En.init(e, t);
let n = e._zod.parse, r = h(() => wn(t)), i = (e) => {
let t = new Rt([
"shape",
"payload",
"ctx"
]), n = r.value, i = (e) => {
let t = C(e);
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
};
t.write("const input = payload.value;");
let a = Object.create(null), o = 0;
for (let e of n.keys) a[e] = `key_${o++}`;
t.write("const newResult = {};");
for (let r of n.keys) {
var s, c;
let n = a[r], o = C(r), l = e[r], u = (l == null || (s = l._zod) == null ? void 0 : s.optin) === "optional", d = (l == null || (c = l._zod) == null ? void 0 : c.optout) === "optional";
t.write(`const ${n} = ${i(r)};`), u && d ? t.write(`
if (${n}.issues.length) {
if (${o} in input) {
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
...iss,
path: iss.path ? [${o}, ...iss.path] : [${o}]
})));
}
}
if (${n}.value === undefined) {
if (${o} in input) {
newResult[${o}] = undefined;
}
} else {
newResult[${o}] = ${n}.value;
}
`) : u ? t.write(`
if (${n}.issues.length) {
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
...iss,
path: iss.path ? [${o}, ...iss.path] : [${o}]
})));
}
if (${n}.value === undefined) {
if (${o} in input) {
newResult[${o}] = undefined;
}
} else {
newResult[${o}] = ${n}.value;
}
`) : t.write(`
const ${n}_present = ${o} in input;
if (${n}.issues.length) {
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
...iss,
path: iss.path ? [${o}, ...iss.path] : [${o}]
})));
}
if (!${n}_present && !${n}.issues.length) {
payload.issues.push({
code: "invalid_type",
expected: "nonoptional",
input: undefined,
path: [${o}]
});
}
if (${n}_present) {
if (${n}.value === undefined) {
newResult[${o}] = undefined;
} else {
newResult[${o}] = ${n}.value;
}
}
`);
}
t.write("payload.value = newResult;"), t.write("return payload;");
let l = t.compile();
return (t, n) => l(e, t, n);
}, a, o = ne, s = !d.jitless, c = s && re.value, l = t.catchall, u;
e._zod.parse = (d, f) => {
u != null || (u = r.value);
let p = d.value;
return o(p) ? s && c && (f == null ? void 0 : f.async) === !1 && f.jitless !== !0 ? (a || (a = i(t.shape)), d = a(d, f), l ? Tn([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
expected: "object",
code: "invalid_type",
input: p,
inst: e
}), d);
};
});
function On(e, t, n, r) {
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
let i = e.filter((e) => !ge(e));
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
code: "invalid_union",
input: t.value,
inst: n,
errors: e.map((e) => e.issues.map((e) => be(e, r, f())))
}), t);
}
var kn = /*@__PURE__*/ c("$ZodUnion", (e, t) => {
O.init(e, t), b(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), b(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), b(e._zod, "values", () => {
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
}), b(e._zod, "pattern", () => {
if (t.options.every((e) => e._zod.pattern)) {
let e = t.options.map((e) => e._zod.pattern);
return RegExp(`^(${e.map((e) => _(e.source)).join("|")})$`);
}
});
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
e._zod.parse = (r, i) => {
if (n) return n(r, i);
let a = !1, o = [];
for (let e of t.options) {
let t = e._zod.run({
value: r.value,
issues: []
}, i);
if (t instanceof Promise) o.push(t), a = !0;
else {
if (t.issues.length === 0) return t;
o.push(t);
}
}
return a ? Promise.all(o).then((t) => On(t, r, e, i)) : On(o, r, e, i);
};
}), An = /*@__PURE__*/ c("$ZodDiscriminatedUnion", (e, t) => {
t.inclusive = !1, kn.init(e, t);
let n = e._zod.parse;
b(e._zod, "propValues", () => {
let e = {};
for (let n of t.options) {
let r = n._zod.propValues;
if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);
for (let [t, n] of Object.entries(r)) {
e[t] || (e[t] = /* @__PURE__ */ new Set());
for (let r of n) e[t].add(r);
}
}
return e;
});
let r = h(() => {
let e = t.options, n = /* @__PURE__ */ new Map();
for (let i of e) {
var r;
let e = (r = i._zod.propValues) == null ? void 0 : r[t.discriminator];
if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);
for (let t of e) {
if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`);
n.set(t, i);
}
}
return n;
});
e._zod.parse = (i, a) => {
let o = i.value;
if (!ne(o)) return i.issues.push({
code: "invalid_type",
expected: "object",
input: o,
inst: e
}), i;
let s = r.value.get(o == null ? void 0 : o[t.discriminator]);
return s ? s._zod.run(i, a) : t.unionFallback || a.direction === "backward" ? n(i, a) : (i.issues.push({
code: "invalid_union",
errors: [],
note: "No matching discriminator",
discriminator: t.discriminator,
options: Array.from(r.value.keys()),
input: o,
path: [t.discriminator],
inst: e
}), i);
};
}), jn = /*@__PURE__*/ c("$ZodIntersection", (e, t) => {
O.init(e, t), e._zod.parse = (e, n) => {
let r = e.value, i = t.left._zod.run({
value: r,
issues: []
}, n), a = t.right._zod.run({
value: r,
issues: []
}, n);
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Nn(e, t, n)) : Nn(e, i, a);
};
});
function Mn(e, t) {
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
valid: !0,
data: e
};
if (ie(e) && ie(t)) {
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
...e,
...t
};
for (let n of r) {
let r = Mn(e[n], t[n]);
if (!r.valid) return {
valid: !1,
mergeErrorPath: [n, ...r.mergeErrorPath]
};
i[n] = r.data;
}
return {
valid: !0,
data: i
};
}
if (Array.isArray(e) && Array.isArray(t)) {
if (e.length !== t.length) return {
valid: !1,
mergeErrorPath: []
};
let n = [];
for (let r = 0; r < e.length; r++) {
let i = e[r], a = t[r], o = Mn(i, a);
if (!o.valid) return {
valid: !1,
mergeErrorPath: [r, ...o.mergeErrorPath]
};
n.push(o.data);
}
return {
valid: !0,
data: n
};
}
return {
valid: !1,
mergeErrorPath: []
};
}
function Nn(e, t, n) {
let r = /* @__PURE__ */ new Map(), i;
for (let n of t.issues) if (n.code === "unrecognized_keys") {
i != null || (i = n);
for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
} else e.issues.push(n);
for (let t of n.issues) if (t.code === "unrecognized_keys") for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0;
else e.issues.push(t);
let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
if (a.length && i && e.issues.push({
...i,
keys: a
}), ge(e)) return e;
let o = Mn(t.value, n.value);
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
return e.value = o.data, e;
}
var Pn = /*@__PURE__*/ c("$ZodTuple", (e, t) => {
O.init(e, t);
let n = t.items;
e._zod.parse = (r, i) => {
let a = r.value;
if (!Array.isArray(a)) return r.issues.push({
input: a,
inst: e,
expected: "tuple",
code: "invalid_type"
}), r;
r.value = [];
let o = [], s = Fn(n, "optin"), c = Fn(n, "optout");
if (!t.rest) {
if (a.length < s) return r.issues.push({
code: "too_small",
minimum: s,
inclusive: !0,
input: a,
inst: e,
origin: "array"
}), r;
a.length > n.length && r.issues.push({
code: "too_big",
maximum: n.length,
inclusive: !0,
input: a,
inst: e,
origin: "array"
});
}
let l = Array(n.length);
for (let e = 0; e < n.length; e++) {
let t = n[e]._zod.run({
value: a[e],
issues: []
}, i);
t instanceof Promise ? o.push(t.then((t) => {
l[e] = t;
})) : l[e] = t;
}
if (t.rest) {
let e = n.length - 1, s = a.slice(n.length);
for (let n of s) {
e++;
let a = t.rest._zod.run({
value: n,
issues: []
}, i);
a instanceof Promise ? o.push(a.then((t) => In(t, r, e))) : In(a, r, e);
}
}
return o.length ? Promise.all(o).then(() => Ln(l, r, n, a, c)) : Ln(l, r, n, a, c);
};
});
function Fn(e, t) {
for (let n = e.length - 1; n >= 0; n--) if (e[n]._zod[t] !== "optional") return n + 1;
return 0;
}
function In(e, t, n) {
e.issues.length && t.issues.push(...ve(n, e.issues)), t.value[n] = e.value;
}
function Ln(e, t, n, r, i) {
for (let a = 0; a < n.length; a++) {
let n = e[a], o = a < r.length;
if (n.issues.length) {
if (!o && a >= i) {
t.value.length = a;
break;
}
t.issues.push(...ve(a, n.issues));
}
t.value[a] = n.value;
}
for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
return t;
}
var Rn = /*@__PURE__*/ c("$ZodRecord", (e, t) => {
O.init(e, t), e._zod.parse = (n, r) => {
let i = n.value;
if (!ie(i)) return n.issues.push({
expected: "record",
code: "invalid_type",
input: i,
inst: e
}), n;
let a = [], o = t.keyType._zod.values;
if (o) {
n.value = {};
let c = /* @__PURE__ */ new Set();
for (let s of o) if (typeof s == "string" || typeof s == "number" || typeof s == "symbol") {
c.add(typeof s == "number" ? s.toString() : s);
let o = t.keyType._zod.run({
value: s,
issues: []
}, r);
if (o instanceof Promise) throw Error("Async schemas not supported in object keys currently");
if (o.issues.length) {
n.issues.push({
code: "invalid_key",
origin: "record",
issues: o.issues.map((e) => be(e, r, f())),
input: s,
path: [s],
inst: e
});
continue;
}
let l = o.value, u = t.valueType._zod.run({
value: i[s],
issues: []
}, r);
u instanceof Promise ? a.push(u.then((e) => {
e.issues.length && n.issues.push(...ve(s, e.issues)), n.value[l] = e.value;
})) : (u.issues.length && n.issues.push(...ve(s, u.issues)), n.value[l] = u.value);
}
let l;
for (let e in i) if (!c.has(e)) {
var s;
l = (s = l) == null ? [] : s, l.push(e);
}
l && l.length > 0 && n.issues.push({
code: "unrecognized_keys",
input: i,
inst: e,
keys: l
});
} else {
n.value = {};
for (let o of Reflect.ownKeys(i)) {
if (o === "__proto__" || !Object.prototype.propertyIsEnumerable.call(i, o)) continue;
let s = t.keyType._zod.run({
value: o,
issues: []
}, r);
if (s instanceof Promise) throw Error("Async schemas not supported in object keys currently");
if (typeof o == "string" && _t.test(o) && s.issues.length) {
let e = t.keyType._zod.run({
value: Number(o),
issues: []
}, r);
if (e instanceof Promise) throw Error("Async schemas not supported in object keys currently");
e.issues.length === 0 && (s = e);
}
if (s.issues.length) {
t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
code: "invalid_key",
origin: "record",
issues: s.issues.map((e) => be(e, r, f())),
input: o,
path: [o],
inst: e
});
continue;
}
let c = t.valueType._zod.run({
value: i[o],
issues: []
}, r);
c instanceof Promise ? a.push(c.then((e) => {
e.issues.length && n.issues.push(...ve(o, e.issues)), n.value[s.value] = e.value;
})) : (c.issues.length && n.issues.push(...ve(o, c.issues)), n.value[s.value] = c.value);
}
}
return a.length ? Promise.all(a).then(() => n) : n;
};
}), zn = /*@__PURE__*/ c("$ZodEnum", (e, t) => {
O.init(e, t);
let n = p(t.entries), r = new Set(n);
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => oe.has(typeof e)).map((e) => typeof e == "string" ? w(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
let a = t.value;
return r.has(a) || t.issues.push({
code: "invalid_value",
values: n,
input: a,
inst: e
}), t;
};
}), Bn = /*@__PURE__*/ c("$ZodLiteral", (e, t) => {
if (O.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
let n = new Set(t.values);
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? w(e) : e ? w(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
let a = r.value;
return n.has(a) || r.issues.push({
code: "invalid_value",
values: t.values,
input: a,
inst: e
}), r;
};
}), Vn = /*@__PURE__*/ c("$ZodTransform", (e, t) => {
O.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
if (r.direction === "backward") throw new u(e.constructor.name);
let i = t.transform(n.value, n);
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
if (i instanceof Promise) throw new l();
return n.value = i, n.fallback = !0, n;
};
});
function Hn(e, t) {
return t === void 0 && (e.issues.length || e.fallback) ? {
issues: [],
value: void 0
} : e;
}
var Un = /*@__PURE__*/ c("$ZodOptional", (e, t) => {
O.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), b(e._zod, "pattern", () => {
let e = t.innerType._zod.pattern;
return e ? RegExp(`^(${_(e.source)})?$`) : void 0;
}), e._zod.parse = (e, n) => {
if (t.innerType._zod.optin === "optional") {
let r = e.value, i = t.innerType._zod.run(e, n);
return i instanceof Promise ? i.then((e) => Hn(e, r)) : Hn(i, r);
}
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
};
}), Wn = /*@__PURE__*/ c("$ZodExactOptional", (e, t) => {
Un.init(e, t), b(e._zod, "values", () => t.innerType._zod.values), b(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
}), Gn = /*@__PURE__*/ c("$ZodNullable", (e, t) => {
O.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "pattern", () => {
let e = t.innerType._zod.pattern;
return e ? RegExp(`^(${_(e.source)}|null)$`) : void 0;
}), b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
}), Kn = /*@__PURE__*/ c("$ZodDefault", (e, t) => {
O.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
if (n.direction === "backward") return t.innerType._zod.run(e, n);
if (e.value === void 0) return e.value = t.defaultValue, e;
let r = t.innerType._zod.run(e, n);
return r instanceof Promise ? r.then((e) => qn(e, t)) : qn(r, t);
};
});
function qn(e, t) {
return e.value === void 0 && (e.value = t.defaultValue), e;
}
var Jn = /*@__PURE__*/ c("$ZodPrefault", (e, t) => {
O.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
}), Yn = /*@__PURE__*/ c("$ZodNonOptional", (e, t) => {
O.init(e, t), b(e._zod, "values", () => {
let e = t.innerType._zod.values;
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
}), e._zod.parse = (n, r) => {
let i = t.innerType._zod.run(n, r);
return i instanceof Promise ? i.then((t) => Xn(t, e)) : Xn(i, e);
};
});
function Xn(e, t) {
return !e.issues.length && e.value === void 0 && e.issues.push({
code: "invalid_type",
expected: "nonoptional",
input: e.value,
inst: t
}), e;
}
var Zn = /*@__PURE__*/ c("$ZodCatch", (e, t) => {
O.init(e, t), e._zod.optin = "optional", b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
if (n.direction === "backward") return t.innerType._zod.run(e, n);
let r = t.innerType._zod.run(e, n);
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
...e,
error: { issues: r.issues.map((e) => be(e, n, f())) },
input: e.value
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
...e,
error: { issues: r.issues.map((e) => be(e, n, f())) },
input: e.value
}), e.issues = [], e.fallback = !0), e);
};
}), Qn = /*@__PURE__*/ c("$ZodPipe", (e, t) => {
O.init(e, t), b(e._zod, "values", () => t.in._zod.values), b(e._zod, "optin", () => t.in._zod.optin), b(e._zod, "optout", () => t.out._zod.optout), b(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
if (n.direction === "backward") {
let r = t.out._zod.run(e, n);
return r instanceof Promise ? r.then((e) => $n(e, t.in, n)) : $n(r, t.in, n);
}
let r = t.in._zod.run(e, n);
return r instanceof Promise ? r.then((e) => $n(e, t.out, n)) : $n(r, t.out, n);
};
});
function $n(e, t, n) {
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
value: e.value,
issues: e.issues,
fallback: e.fallback
}, n);
}
var er = /*@__PURE__*/ c("$ZodReadonly", (e, t) => {
O.init(e, t), b(e._zod, "propValues", () => t.innerType._zod.propValues), b(e._zod, "values", () => t.innerType._zod.values), b(e._zod, "optin", () => {
var e;
return (e = t.innerType) == null || (e = e._zod) == null ? void 0 : e.optin;
}), b(e._zod, "optout", () => {
var e;
return (e = t.innerType) == null || (e = e._zod) == null ? void 0 : e.optout;
}), e._zod.parse = (e, n) => {
if (n.direction === "backward") return t.innerType._zod.run(e, n);
let r = t.innerType._zod.run(e, n);
return r instanceof Promise ? r.then(tr) : tr(r);
};
});
function tr(e) {
return e.value = Object.freeze(e.value), e;
}
var nr = /*@__PURE__*/ c("$ZodCustom", (e, t) => {
D.init(e, t), O.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
let r = n.value, i = t.fn(r);
if (i instanceof Promise) return i.then((t) => rr(t, n, r, e));
rr(i, n, r, e);
};
});
function rr(e, t, n, r) {
if (!e) {
var i;
let e = {
code: "custom",
input: n,
inst: r,
path: [...(i = r._zod.def.path) == null ? [] : i],
continue: !r._zod.def.abort
};
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(Se(e));
}
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
var ir, ar = class {
constructor() {
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
}
add(e, ...t) {
let n = t[0];
return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
}
clear() {
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
}
remove(e) {
let t = this._map.get(e);
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
}
get(e) {
let t = e._zod.parent;
if (t) {
var n;
let r = { ...(n = this.get(t)) == null ? {} : n };
delete r.id;
let i = {
...r,
...this._map.get(e)
};
return Object.keys(i).length ? i : void 0;
}
return this._map.get(e);
}
has(e) {
return this._map.has(e);
}
};
function or() {
return new ar();
}
(ir = globalThis).__zod_globalRegistry != null || (ir.__zod_globalRegistry = or());
var sr = globalThis.__zod_globalRegistry;
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
// @__NO_SIDE_EFFECTS__
function cr(e, t) {
return new e({
type: "string",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function lr(e, t) {
return new e({
type: "string",
format: "email",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function ur(e, t) {
return new e({
type: "string",
format: "guid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function dr(e, t) {
return new e({
type: "string",
format: "uuid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function fr(e, t) {
return new e({
type: "string",
format: "uuid",
check: "string_format",
abort: !1,
version: "v4",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function pr(e, t) {
return new e({
type: "string",
format: "uuid",
check: "string_format",
abort: !1,
version: "v6",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function mr(e, t) {
return new e({
type: "string",
format: "uuid",
check: "string_format",
abort: !1,
version: "v7",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function hr(e, t) {
return new e({
type: "string",
format: "url",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function gr(e, t) {
return new e({
type: "string",
format: "emoji",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function _r(e, t) {
return new e({
type: "string",
format: "nanoid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function vr(e, t) {
return new e({
type: "string",
format: "cuid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function yr(e, t) {
return new e({
type: "string",
format: "cuid2",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function br(e, t) {
return new e({
type: "string",
format: "ulid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function xr(e, t) {
return new e({
type: "string",
format: "xid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Sr(e, t) {
return new e({
type: "string",
format: "ksuid",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Cr(e, t) {
return new e({
type: "string",
format: "ipv4",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function wr(e, t) {
return new e({
type: "string",
format: "ipv6",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Tr(e, t) {
return new e({
type: "string",
format: "cidrv4",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Er(e, t) {
return new e({
type: "string",
format: "cidrv6",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Dr(e, t) {
return new e({
type: "string",
format: "base64",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Or(e, t) {
return new e({
type: "string",
format: "base64url",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function kr(e, t) {
return new e({
type: "string",
format: "e164",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Ar(e, t) {
return new e({
type: "string",
format: "jwt",
check: "string_format",
abort: !1,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function jr(e, t) {
return new e({
type: "string",
format: "datetime",
check: "string_format",
offset: !1,
local: !1,
precision: null,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Mr(e, t) {
return new e({
type: "string",
format: "date",
check: "string_format",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Nr(e, t) {
return new e({
type: "string",
format: "time",
check: "string_format",
precision: null,
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Pr(e, t) {
return new e({
type: "string",
format: "duration",
check: "string_format",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Fr(e, t) {
return new e({
type: "number",
checks: [],
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Ir(e, t) {
return new e({
type: "number",
check: "number_format",
abort: !1,
format: "safeint",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Lr(e, t) {
return new e({
type: "boolean",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Rr(e, t) {
return new e({
type: "null",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function zr(e) {
return new e({ type: "any" });
}
// @__NO_SIDE_EFFECTS__
function Br(e) {
return new e({ type: "unknown" });
}
// @__NO_SIDE_EFFECTS__
function Vr(e, t) {
return new e({
type: "never",
...E(t)
});
}
// @__NO_SIDE_EFFECTS__
function Hr(e, t) {
return new Ct({
check: "less_than",
...E(t),
value: e,
inclusive: !1
});
}
// @__NO_SIDE_EFFECTS__
function Ur(e, t) {
return new Ct({
check: "less_than",
...E(t),
value: e,
inclusive: !0
});
}
// @__NO_SIDE_EFFECTS__
function Wr(e, t) {
return new wt({
check: "greater_than",
...E(t),
value: e,
inclusive: !1
});
}
// @__NO_SIDE_EFFECTS__
function Gr(e, t) {
return new wt({
check: "greater_than",
...E(t),
value: e,
inclusive: !0
});
}
// @__NO_SIDE_EFFECTS__
function Kr(e, t) {
return new Tt({
check: "multiple_of",
...E(t),
value: e
});
}
// @__NO_SIDE_EFFECTS__
function qr(e, t) {
return new Dt({
check: "max_length",
...E(t),
maximum: e
});
}
// @__NO_SIDE_EFFECTS__
function Jr(e, t) {
return new Ot({
check: "min_length",
...E(t),
minimum: e
});
}
// @__NO_SIDE_EFFECTS__
function Yr(e, t) {
return new kt({
check: "length_equals",
...E(t),
length: e
});
}
// @__NO_SIDE_EFFECTS__
function Xr(e, t) {
return new jt({
check: "string_format",
format: "regex",
...E(t),
pattern: e
});
}
// @__NO_SIDE_EFFECTS__
function Zr(e) {
return new Mt({
check: "string_format",
format: "lowercase",
...E(e)
});
}
// @__NO_SIDE_EFFECTS__
function Qr(e) {
return new Nt({
check: "string_format",
format: "uppercase",
...E(e)
});
}
// @__NO_SIDE_EFFECTS__
function $r(e, t) {
return new Pt({
check: "string_format",
format: "includes",
...E(t),
includes: e
});
}
// @__NO_SIDE_EFFECTS__
function ei(e, t) {
return new Ft({
check: "string_format",
format: "starts_with",
...E(t),
prefix: e
});
}
// @__NO_SIDE_EFFECTS__
function ti(e, t) {
return new It({
check: "string_format",
format: "ends_with",
...E(t),
suffix: e
});
}
// @__NO_SIDE_EFFECTS__
function ni(e) {
return new Lt({
check: "overwrite",
tx: e
});
}
// @__NO_SIDE_EFFECTS__
function ri(e) {
return /* @__PURE__ */ ni((t) => t.normalize(e));
}
// @__NO_SIDE_EFFECTS__
function ii() {
return /* @__PURE__ */ ni((e) => e.trim());
}
// @__NO_SIDE_EFFECTS__
function ai() {
return /* @__PURE__ */ ni((e) => e.toLowerCase());
}
// @__NO_SIDE_EFFECTS__
function oi() {
return /* @__PURE__ */ ni((e) => e.toUpperCase());
}
// @__NO_SIDE_EFFECTS__
function si() {
return /* @__PURE__ */ ni((e) => ee(e));
}
// @__NO_SIDE_EFFECTS__
function ci(e, t, n) {
return new e({
type: "array",
element: t,
...E(n)
});
}
// @__NO_SIDE_EFFECTS__
function li(e, t, n) {
return new e({
type: "custom",
check: "custom",
fn: t,
...E(n)
});
}
// @__NO_SIDE_EFFECTS__
function ui(e, t) {
let n = /* @__PURE__ */ di((t) => (t.addIssue = (e) => {
if (typeof e == "string") t.issues.push(Se(e, t.value, n._zod.def));
else {
let r = e;
r.fatal && (r.continue = !1), r.code != null || (r.code = "custom"), r.input != null || (r.input = t.value), r.inst != null || (r.inst = n), r.continue != null || (r.continue = !n._zod.def.abort), t.issues.push(Se(r));
}
}, e(t.value, t)), t);
return n;
}
// @__NO_SIDE_EFFECTS__
function di(e, t) {
let n = new D({
check: "custom",
...E(t)
});
return n._zod.check = e, n;
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
function fi(e) {
var t, n, r, i, a, o, s, c, l;
let u = (t = e == null ? void 0 : e.target) == null ? "draft-2020-12" : t;
return u === "draft-4" && (u = "draft-04"), u === "draft-7" && (u = "draft-07"), {
processors: (n = e.processors) == null ? {} : n,
metadataRegistry: (r = e == null ? void 0 : e.metadata) == null ? sr : r,
target: u,
unrepresentable: (i = e == null ? void 0 : e.unrepresentable) == null ? "throw" : i,
override: (a = e == null ? void 0 : e.override) == null ? (() => {}) : a,
io: (o = e == null ? void 0 : e.io) == null ? "output" : o,
counter: 0,
seen: /* @__PURE__ */ new Map(),
cycles: (s = e == null ? void 0 : e.cycles) == null ? "ref" : s,
reused: (c = e == null ? void 0 : e.reused) == null ? "inline" : c,
external: (l = e == null ? void 0 : e.external) == null ? void 0 : l
};
}
function A(e, t, n = {
path: [],
schemaPath: []
}) {
var r, i, a;
let o = e._zod.def, s = t.seen.get(e);
if (s) return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
let c = {
schema: {},
count: 1,
cycle: void 0,
path: n.path
};
t.seen.set(e, c);
let l = (r = (i = e._zod).toJSONSchema) == null ? void 0 : r.call(i);
if (l) c.schema = l;
else {
let r = {
...n,
schemaPath: [...n.schemaPath, e],
path: n.path
};
if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, c.schema, r);
else {
let n = c.schema, i = t.processors[o.type];
if (!i) throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
i(e, t, n, r);
}
let i = e._zod.parent;
i && (c.ref || (c.ref = i), A(i, t, r), t.seen.get(i).isParent = !0);
}
let u = t.metadataRegistry.get(e);
return u && Object.assign(c.schema, u), t.io === "input" && j(e) && (delete c.schema.examples, delete c.schema.default), t.io === "input" && "_prefault" in c.schema && ((a = c.schema).default != null || (a.default = c.schema._prefault)), delete c.schema._prefault, t.seen.get(e).schema;
}
function pi(e, t) {
let n = e.seen.get(t);
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
let r = /* @__PURE__ */ new Map();
for (let t of e.seen.entries()) {
var i;
let n = (i = e.metadataRegistry.get(t[0])) == null ? void 0 : i.id;
if (n) {
let e = r.get(n);
if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
r.set(n, t[0]);
}
}
let a = (t) => {
var r;
let i = e.target === "draft-2020-12" ? "$defs" : "definitions";
if (e.external) {
var a, o, s, c;
let n = (a = e.external.registry.get(t[0])) == null ? void 0 : a.id, r = (o = e.external.uri) == null ? ((e) => e) : o;
if (n) return { ref: r(n) };
let l = (s = (c = t[1].defId) == null ? t[1].schema.id : c) == null ? `schema${e.counter++}` : s;
return t[1].defId = l, {
defId: l,
ref: `${r("__shared")}#/${i}/${l}`
};
}
if (t[1] === n) return { ref: "#" };
let l = `#/${i}/`, u = (r = t[1].schema.id) == null ? `__schema${e.counter++}` : r;
return {
defId: u,
ref: l + u
};
}, o = (e) => {
if (e[1].schema.$ref) return;
let t = e[1], { ref: n, defId: r } = a(e);
t.def = { ...t.schema }, r && (t.defId = r);
let i = t.schema;
for (let e in i) delete i[e];
i.$ref = n;
};
if (e.cycles === "throw") for (let t of e.seen.entries()) {
let e = t[1];
if (e.cycle) {
var s;
throw Error(`Cycle detected: #/${(s = e.cycle) == null ? void 0 : s.join("/")}/<root>
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
}
}
for (let n of e.seen.entries()) {
var c;
let r = n[1];
if (t === n[0]) {
o(n);
continue;
}
if (e.external) {
var l;
let r = (l = e.external.registry.get(n[0])) == null ? void 0 : l.id;
if (t !== n[0] && r) {
o(n);
continue;
}
}
if ((c = e.metadataRegistry.get(n[0])) != null && c.id) {
o(n);
continue;
}
if (r.cycle) {
o(n);
continue;
}
if (r.count > 1 && e.reused === "ref") {
o(n);
continue;
}
}
}
function mi(e, t) {
var n, r, i, a, o;
let s = e.seen.get(t);
if (!s) throw Error("Unprocessed schema. This is a bug in Zod.");
let c = (t) => {
var n, r;
let i = e.seen.get(t);
if (i.ref === null) return;
let a = (n = i.def) == null ? i.schema : n, o = { ...a }, s = i.ref;
if (i.ref = null, s) {
c(s);
let n = e.seen.get(s), r = n.schema;
if (r.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0")) {
var l;
a.allOf = (l = a.allOf) == null ? [] : l, a.allOf.push(r);
} else Object.assign(a, r);
if (Object.assign(a, o), t._zod.parent === s) for (let e in a) e === "$ref" || e === "allOf" || e in o || delete a[e];
if (r.$ref && n.def) for (let e in a) e === "$ref" || e === "allOf" || e in n.def && JSON.stringify(a[e]) === JSON.stringify(n.def[e]) && delete a[e];
}
let u = t._zod.parent;
if (u && u !== s) {
c(u);
let t = e.seen.get(u);
if (t != null && t.schema.$ref && (a.$ref = t.schema.$ref, t.def)) for (let e in a) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(a[e]) === JSON.stringify(t.def[e]) && delete a[e];
}
e.override({
zodSchema: t,
jsonSchema: a,
path: (r = i.path) == null ? [] : r
});
};
for (let t of [...e.seen.entries()].reverse()) c(t[0]);
let l = {};
if (e.target === "draft-2020-12" ? l.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? l.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? l.$schema = "http://json-schema.org/draft-04/schema#" : e.target, (n = e.external) != null && n.uri) {
var u;
let n = (u = e.external.registry.get(t)) == null ? void 0 : u.id;
if (!n) throw Error("Schema is missing an `id` property");
l.$id = e.external.uri(n);
}
Object.assign(l, (r = s.def) == null ? s.schema : r);
let d = (i = e.metadataRegistry.get(t)) == null ? void 0 : i.id;
d !== void 0 && l.id === d && delete l.id;
let f = (a = (o = e.external) == null ? void 0 : o.defs) == null ? {} : a;
for (let t of e.seen.entries()) {
let e = t[1];
e.def && e.defId && (e.def.id === e.defId && delete e.def.id, f[e.defId] = e.def);
}
e.external || Object.keys(f).length > 0 && (e.target === "draft-2020-12" ? l.$defs = f : l.definitions = f);
try {
let n = JSON.parse(JSON.stringify(l));
return Object.defineProperty(n, "~standard", {
value: {
...t["~standard"],
jsonSchema: {
input: gi(t, "input", e.processors),
output: gi(t, "output", e.processors)
}
},
enumerable: !1,
writable: !1
}), n;
} catch {
throw Error("Error converting schema to JSON.");
}
}
function j(e, t) {
let n = t == null ? { seen: /* @__PURE__ */ new Set() } : t;
if (n.seen.has(e)) return !1;
n.seen.add(e);
let r = e._zod.def;
if (r.type === "transform") return !0;
if (r.type === "array") return j(r.element, n);
if (r.type === "set") return j(r.valueType, n);
if (r.type === "lazy") return j(r.getter(), n);
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return j(r.innerType, n);
if (r.type === "intersection") return j(r.left, n) || j(r.right, n);
if (r.type === "record" || r.type === "map") return j(r.keyType, n) || j(r.valueType, n);
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : j(r.in, n) || j(r.out, n);
if (r.type === "object") {
for (let e in r.shape) if (j(r.shape[e], n)) return !0;
return !1;
}
if (r.type === "union") {
for (let e of r.options) if (j(e, n)) return !0;
return !1;
}
if (r.type === "tuple") {
for (let e of r.items) if (j(e, n)) return !0;
return !!(r.rest && j(r.rest, n));
}
return !1;
}
var hi = (e, t = {}) => (n) => {
let r = fi({
...n,
processors: t
});
return A(e, r), pi(r, e), mi(r, e);
}, gi = (e, t, n = {}) => (r) => {
let { libraryOptions: i, target: a } = r == null ? {} : r, o = fi({
...i == null ? {} : i,
target: a,
io: t,
processors: n
});
return A(e, o), pi(o, e), mi(o, e);
}, _i = {
guid: "uuid",
url: "uri",
datetime: "date-time",
json_string: "json-string",
regex: ""
}, vi = (e, t, n, r) => {
let i = n;
i.type = "string";
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s) {
var u;
i.format = (u = _i[s]) == null ? s : u, i.format === "" && delete i.format, s === "time" && delete i.format;
}
if (l && (i.contentEncoding = l), c && c.size > 0) {
let e = [...c];
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
pattern: e.source
}))]);
}
}, yi = (e, t, n, r) => {
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
let d = typeof u == "number" && u >= (a == null ? -Infinity : a), f = typeof l == "number" && l <= (o == null ? Infinity : o), p = t.target === "draft-04" || t.target === "openapi-3.0";
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
}, bi = (e, t, n, r) => {
n.type = "boolean";
}, xi = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("BigInt cannot be represented in JSON Schema");
}, Si = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Symbols cannot be represented in JSON Schema");
}, Ci = (e, t, n, r) => {
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
}, wi = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Undefined cannot be represented in JSON Schema");
}, Ti = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Void cannot be represented in JSON Schema");
}, Ei = (e, t, n, r) => {
n.not = {};
}, Di = (e, t, n, r) => {}, Oi = (e, t, n, r) => {}, ki = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Date cannot be represented in JSON Schema");
}, Ai = (e, t, n, r) => {
let i = e._zod.def, a = p(i.entries);
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
}, ji = (e, t, n, r) => {
let i = e._zod.def, a = [];
for (let e of i.values) if (e === void 0) {
if (t.unrepresentable === "throw") throw Error("Literal `undefined` cannot be represented in JSON Schema");
} else if (typeof e == "bigint") {
if (t.unrepresentable === "throw") throw Error("BigInt literals cannot be represented in JSON Schema");
a.push(Number(e));
} else a.push(e);
if (a.length !== 0) if (a.length === 1) {
let e = a[0];
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
} else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
}, Mi = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("NaN cannot be represented in JSON Schema");
}, Ni = (e, t, n, r) => {
let i = n, a = e._zod.pattern;
if (!a) throw Error("Pattern not found in template literal");
i.type = "string", i.pattern = a.source;
}, Pi = (e, t, n, r) => {
let i = n, a = {
type: "string",
format: "binary",
contentEncoding: "binary"
}, { minimum: o, maximum: s, mime: c } = e._zod.bag;
o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
}, Fi = (e, t, n, r) => {
n.type = "boolean";
}, Ii = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
}, Li = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Function types cannot be represented in JSON Schema");
}, Ri = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
}, zi = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Map cannot be represented in JSON Schema");
}, Bi = (e, t, n, r) => {
if (t.unrepresentable === "throw") throw Error("Set cannot be represented in JSON Schema");
}, Vi = (e, t, n, r) => {
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = A(a.element, t, {
...r,
path: [...r.path, "items"]
});
}, Hi = (e, t, n, r) => {
var i;
let a = n, o = e._zod.def;
a.type = "object", a.properties = {};
let s = o.shape;
for (let e in s) a.properties[e] = A(s[e], t, {
...r,
path: [
...r.path,
"properties",
e
]
});
let c = new Set(Object.keys(s)), l = new Set([...c].filter((e) => {
let n = o.shape[e]._zod;
return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
}));
l.size > 0 && (a.required = Array.from(l)), ((i = o.catchall) == null ? void 0 : i._zod.def.type) === "never" ? a.additionalProperties = !1 : o.catchall ? o.catchall && (a.additionalProperties = A(o.catchall, t, {
...r,
path: [...r.path, "additionalProperties"]
})) : t.io === "output" && (a.additionalProperties = !1);
}, Ui = (e, t, n, r) => {
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => A(e, t, {
...r,
path: [
...r.path,
a ? "oneOf" : "anyOf",
n
]
}));
a ? n.oneOf = o : n.anyOf = o;
}, Wi = (e, t, n, r) => {
let i = e._zod.def, a = A(i.left, t, {
...r,
path: [
...r.path,
"allOf",
0
]
}), o = A(i.right, t, {
...r,
path: [
...r.path,
"allOf",
1
]
}), s = (e) => "allOf" in e && Object.keys(e).length === 1;
n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
}, Gi = (e, t, n, r) => {
let i = n, a = e._zod.def;
i.type = "array";
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => A(e, t, {
...r,
path: [
...r.path,
o,
n
]
})), l = a.rest ? A(a.rest, t, {
...r,
path: [
...r.path,
s,
...t.target === "openapi-3.0" ? [a.items.length] : []
]
}) : null;
t.target === "draft-2020-12" ? (i.prefixItems = c, l && (i.items = l)) : t.target === "openapi-3.0" ? (i.items = { anyOf: c }, l && i.items.anyOf.push(l), i.minItems = c.length, l || (i.maxItems = c.length)) : (i.items = c, l && (i.additionalItems = l));
let { minimum: u, maximum: d } = e._zod.bag;
typeof u == "number" && (i.minItems = u), typeof d == "number" && (i.maxItems = d);
}, Ki = (e, t, n, r) => {
let i = n, a = e._zod.def;
i.type = "object";
let o = a.keyType, s = o._zod.bag, c = s == null ? void 0 : s.patterns;
if (a.mode === "loose" && c && c.size > 0) {
let e = A(a.valueType, t, {
...r,
path: [
...r.path,
"patternProperties",
"*"
]
});
i.patternProperties = {};
for (let t of c) i.patternProperties[t.source] = e;
} else (t.target === "draft-07" || t.target === "draft-2020-12") && (i.propertyNames = A(a.keyType, t, {
...r,
path: [...r.path, "propertyNames"]
})), i.additionalProperties = A(a.valueType, t, {
...r,
path: [...r.path, "additionalProperties"]
});
let l = o._zod.values;
if (l) {
let e = [...l].filter((e) => typeof e == "string" || typeof e == "number");
e.length > 0 && (i.required = e);
}
}, qi = (e, t, n, r) => {
let i = e._zod.def, a = A(i.innerType, t, r), o = t.seen.get(e);
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
}, Ji = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType;
}, Yi = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
}, Xi = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
}, Zi = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType;
let o;
try {
o = i.catchValue(void 0);
} catch {
throw Error("Dynamic catch values are not supported in JSON Schema");
}
n.default = o;
}, Qi = (e, t, n, r) => {
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
A(o, t, r);
let s = t.seen.get(e);
s.ref = o;
}, $i = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType, n.readOnly = !0;
}, ea = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType;
}, ta = (e, t, n, r) => {
let i = e._zod.def;
A(i.innerType, t, r);
let a = t.seen.get(e);
a.ref = i.innerType;
}, na = {
string: vi,
number: yi,
boolean: bi,
bigint: xi,
symbol: Si,
null: Ci,
undefined: wi,
void: Ti,
never: Ei,
any: Di,
unknown: Oi,
date: ki,
enum: Ai,
literal: ji,
nan: Mi,
template_literal: Ni,
file: Pi,
success: Fi,
custom: Ii,
function: Li,
transform: Ri,
map: zi,
set: Bi,
array: Vi,
object: Hi,
union: Ui,
intersection: Wi,
tuple: Gi,
record: Ki,
nullable: qi,
nonoptional: Ji,
default: Yi,
prefault: Xi,
catch: Zi,
pipe: Qi,
readonly: $i,
promise: ea,
optional: ta,
lazy: (e, t, n, r) => {
let i = e._zod.innerType;
A(i, t, r);
let a = t.seen.get(e);
a.ref = i;
}
};
function ra(e, t) {
if ("_idmap" in e) {
let n = e, r = fi({
...t,
processors: na
}), i = {};
for (let e of n._idmap.entries()) {
let [t, n] = e;
A(n, r);
}
let a = {};
r.external = {
registry: n,
uri: t == null ? void 0 : t.uri,
defs: i
};
for (let e of n._idmap.entries()) {
let [t, n] = e;
pi(r, n), a[t] = mi(r, n);
}
return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
}
let n = fi({
...t,
processors: na
});
return A(e, n), pi(n, e), mi(n, e);
}
//#endregion
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
var ia = /*@__PURE__*/ c("ZodISODateTime", (e, t) => {
Qt.init(e, t), F.init(e, t);
});
function aa(e) {
return /* @__PURE__ */ jr(ia, e);
}
var oa = /*@__PURE__*/ c("ZodISODate", (e, t) => {
$t.init(e, t), F.init(e, t);
});
function sa(e) {
return /* @__PURE__ */ Mr(oa, e);
}
var ca = /*@__PURE__*/ c("ZodISOTime", (e, t) => {
en.init(e, t), F.init(e, t);
});
function la(e) {
return /* @__PURE__ */ Nr(ca, e);
}
var ua = /*@__PURE__*/ c("ZodISODuration", (e, t) => {
tn.init(e, t), F.init(e, t);
});
function da(e) {
return /* @__PURE__ */ Pr(ua, e);
}
var M = /*@__PURE__*/ c("ZodError", (e, t) => {
we.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
format: { value: (t) => De(e, t) },
flatten: { value: (t) => Ee(e, t) },
addIssue: { value: (t) => {
e.issues.push(t), e.message = JSON.stringify(e.issues, m, 2);
} },
addIssues: { value: (t) => {
e.issues.push(...t), e.message = JSON.stringify(e.issues, m, 2);
} },
isEmpty: { get() {
return e.issues.length === 0;
} }
});
}, { Parent: Error }), fa = /* @__PURE__ */ Oe(M), pa = /* @__PURE__ */ Ae(M), ma = /* @__PURE__ */ Me(M), ha = /* @__PURE__ */ Pe(M), ga = /* @__PURE__ */ Ie(M), _a = /* @__PURE__ */ Le(M), va = /* @__PURE__ */ Re(M), ya = /* @__PURE__ */ ze(M), ba = /* @__PURE__ */ Be(M), xa = /* @__PURE__ */ Ve(M), Sa = /* @__PURE__ */ He(M), Ca = /* @__PURE__ */ Ue(M), wa = /* @__PURE__ */ new WeakMap();
function Ta(e, t, n) {
let r = Object.getPrototypeOf(e), i = wa.get(r);
if (i || (i = /* @__PURE__ */ new Set(), wa.set(r, i)), !i.has(t)) {
i.add(t);
for (let e in n) {
let t = n[e];
Object.defineProperty(r, e, {
configurable: !0,
enumerable: !1,
get() {
let n = t.bind(this);
return Object.defineProperty(this, e, {
configurable: !0,
writable: !0,
enumerable: !0,
value: n
}), n;
},
set(t) {
Object.defineProperty(this, e, {
configurable: !0,
writable: !0,
enumerable: !0,
value: t
});
}
});
}
}
}
var N = /*@__PURE__*/ c("ZodType", (e, t) => (O.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
input: gi(e, "input"),
output: gi(e, "output")
} }), e.toJSONSchema = hi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => fa(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => ma(e, t, n), e.parseAsync = async (t, n) => pa(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => ha(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ga(e, t, n), e.decode = (t, n) => _a(e, t, n), e.encodeAsync = async (t, n) => va(e, t, n), e.decodeAsync = async (t, n) => ya(e, t, n), e.safeEncode = (t, n) => ba(e, t, n), e.safeDecode = (t, n) => xa(e, t, n), e.safeEncodeAsync = async (t, n) => Sa(e, t, n), e.safeDecodeAsync = async (t, n) => Ca(e, t, n), Ta(e, "ZodType", {
check(...e) {
var t;
let n = this.def;
return this.clone(S(n, { checks: [...(t = n.checks) == null ? [] : t, ...e.map((e) => typeof e == "function" ? { _zod: {
check: e,
def: { check: "custom" },
onattach: []
} } : e)] }), { parent: !0 });
},
with(...e) {
return this.check(...e);
},
clone(e, t) {
return T(this, e, t);
},
brand() {
return this;
},
register(e, t) {
return e.add(this, t), this;
},
refine(e, t) {
return this.check(Vo(e, t));
},
superRefine(e, t) {
return this.check(Ho(e, t));
},
overwrite(e) {
return this.check(/* @__PURE__ */ ni(e));
},
optional() {
return Co(this);
},
exactOptional() {
return To(this);
},
nullable() {
return Do(this);
},
nullish() {
return Co(Do(this));
},
nonoptional(e) {
return No(this, e);
},
array() {
return R(this);
},
or(e) {
return co([this, e]);
},
and(e) {
return po(this, e);
},
transform(e) {
return Lo(this, xo(e));
},
default(e) {
return ko(this, e);
},
prefault(e) {
return jo(this, e);
},
catch(e) {
return Fo(this, e);
},
pipe(e) {
return Lo(this, e);
},
readonly() {
return zo(this);
},
describe(e) {
let t = this.clone();
return sr.add(t, { description: e }), t;
},
meta(...e) {
if (e.length === 0) return sr.get(this);
let t = this.clone();
return sr.add(t, e[0]), t;
},
isOptional() {
return this.safeParse(void 0).success;
},
isNullable() {
return this.safeParse(null).success;
},
apply(e) {
return e(this);
}
}), Object.defineProperty(e, "description", {
get() {
var t;
return (t = sr.get(e)) == null ? void 0 : t.description;
},
configurable: !0
}), e)), Ea = /*@__PURE__*/ c("_ZodString", (e, t) => {
var n, r, i;
Bt.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => vi(e, t, n, r);
let a = e._zod.bag;
e.format = (n = a.format) == null ? null : n, e.minLength = (r = a.minimum) == null ? null : r, e.maxLength = (i = a.maximum) == null ? null : i, Ta(e, "_ZodString", {
regex(...e) {
return this.check(/* @__PURE__ */ Xr(...e));
},
includes(...e) {
return this.check(/* @__PURE__ */ $r(...e));
},
startsWith(...e) {
return this.check(/* @__PURE__ */ ei(...e));
},
endsWith(...e) {
return this.check(/* @__PURE__ */ ti(...e));
},
min(...e) {
return this.check(/* @__PURE__ */ Jr(...e));
},
max(...e) {
return this.check(/* @__PURE__ */ qr(...e));
},
length(...e) {
return this.check(/* @__PURE__ */ Yr(...e));
},
nonempty(...e) {
return this.check(/* @__PURE__ */ Jr(1, ...e));
},
lowercase(e) {
return this.check(/* @__PURE__ */ Zr(e));
},
uppercase(e) {
return this.check(/* @__PURE__ */ Qr(e));
},
trim() {
return this.check(/* @__PURE__ */ ii());
},
normalize(...e) {
return this.check(/* @__PURE__ */ ri(...e));
},
toLowerCase() {
return this.check(/* @__PURE__ */ ai());
},
toUpperCase() {
return this.check(/* @__PURE__ */ oi());
},
slugify() {
return this.check(/* @__PURE__ */ si());
}
});
}), Da = /*@__PURE__*/ c("ZodString", (e, t) => {
Bt.init(e, t), Ea.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ lr(Oa, t)), e.url = (t) => e.check(/* @__PURE__ */ hr(ja, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Ar(Ka, t)), e.emoji = (t) => e.check(/* @__PURE__ */ gr(Ma, t)), e.guid = (t) => e.check(/* @__PURE__ */ ur(ka, t)), e.uuid = (t) => e.check(/* @__PURE__ */ dr(Aa, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ fr(Aa, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ pr(Aa, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ mr(Aa, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ _r(Na, t)), e.guid = (t) => e.check(/* @__PURE__ */ ur(ka, t)), e.cuid = (t) => e.check(/* @__PURE__ */ vr(Pa, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ yr(Fa, t)), e.ulid = (t) => e.check(/* @__PURE__ */ br(Ia, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Dr(Ua, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Or(Wa, t)), e.xid = (t) => e.check(/* @__PURE__ */ xr(La, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Sr(Ra, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Cr(za, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ wr(Ba, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ Tr(Va, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Er(Ha, t)), e.e164 = (t) => e.check(/* @__PURE__ */ kr(Ga, t)), e.datetime = (t) => e.check(aa(t)), e.date = (t) => e.check(sa(t)), e.time = (t) => e.check(la(t)), e.duration = (t) => e.check(da(t));
});
function P(e) {
return /* @__PURE__ */ cr(Da, e);
}
var F = /*@__PURE__*/ c("ZodStringFormat", (e, t) => {
k.init(e, t), Ea.init(e, t);
}), Oa = /*@__PURE__*/ c("ZodEmail", (e, t) => {
Ut.init(e, t), F.init(e, t);
}), ka = /*@__PURE__*/ c("ZodGUID", (e, t) => {
Vt.init(e, t), F.init(e, t);
}), Aa = /*@__PURE__*/ c("ZodUUID", (e, t) => {
Ht.init(e, t), F.init(e, t);
}), ja = /*@__PURE__*/ c("ZodURL", (e, t) => {
Wt.init(e, t), F.init(e, t);
}), Ma = /*@__PURE__*/ c("ZodEmoji", (e, t) => {
Gt.init(e, t), F.init(e, t);
}), Na = /*@__PURE__*/ c("ZodNanoID", (e, t) => {
Kt.init(e, t), F.init(e, t);
}), Pa = /*@__PURE__*/ c("ZodCUID", (e, t) => {
qt.init(e, t), F.init(e, t);
}), Fa = /*@__PURE__*/ c("ZodCUID2", (e, t) => {
Jt.init(e, t), F.init(e, t);
}), Ia = /*@__PURE__*/ c("ZodULID", (e, t) => {
Yt.init(e, t), F.init(e, t);
}), La = /*@__PURE__*/ c("ZodXID", (e, t) => {
Xt.init(e, t), F.init(e, t);
}), Ra = /*@__PURE__*/ c("ZodKSUID", (e, t) => {
Zt.init(e, t), F.init(e, t);
}), za = /*@__PURE__*/ c("ZodIPv4", (e, t) => {
nn.init(e, t), F.init(e, t);
}), Ba = /*@__PURE__*/ c("ZodIPv6", (e, t) => {
rn.init(e, t), F.init(e, t);
}), Va = /*@__PURE__*/ c("ZodCIDRv4", (e, t) => {
an.init(e, t), F.init(e, t);
}), Ha = /*@__PURE__*/ c("ZodCIDRv6", (e, t) => {
on.init(e, t), F.init(e, t);
}), Ua = /*@__PURE__*/ c("ZodBase64", (e, t) => {
cn.init(e, t), F.init(e, t);
}), Wa = /*@__PURE__*/ c("ZodBase64URL", (e, t) => {
un.init(e, t), F.init(e, t);
}), Ga = /*@__PURE__*/ c("ZodE164", (e, t) => {
dn.init(e, t), F.init(e, t);
}), Ka = /*@__PURE__*/ c("ZodJWT", (e, t) => {
pn.init(e, t), F.init(e, t);
}), qa = /*@__PURE__*/ c("ZodNumber", (e, t) => {
var n, r, i, a, o, s, c, l, u;
mn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => yi(e, t, n, r), Ta(e, "ZodNumber", {
gt(e, t) {
return this.check(/* @__PURE__ */ Wr(e, t));
},
gte(e, t) {
return this.check(/* @__PURE__ */ Gr(e, t));
},
min(e, t) {
return this.check(/* @__PURE__ */ Gr(e, t));
},
lt(e, t) {
return this.check(/* @__PURE__ */ Hr(e, t));
},
lte(e, t) {
return this.check(/* @__PURE__ */ Ur(e, t));
},
max(e, t) {
return this.check(/* @__PURE__ */ Ur(e, t));
},
int(e) {
return this.check(Ya(e));
},
safe(e) {
return this.check(Ya(e));
},
positive(e) {
return this.check(/* @__PURE__ */ Wr(0, e));
},
nonnegative(e) {
return this.check(/* @__PURE__ */ Gr(0, e));
},
negative(e) {
return this.check(/* @__PURE__ */ Hr(0, e));
},
nonpositive(e) {
return this.check(/* @__PURE__ */ Ur(0, e));
},
multipleOf(e, t) {
return this.check(/* @__PURE__ */ Kr(e, t));
},
step(e, t) {
return this.check(/* @__PURE__ */ Kr(e, t));
},
finite() {
return this;
}
});
let d = e._zod.bag;
e.minValue = (n = Math.max((r = d.minimum) == null ? -Infinity : r, (i = d.exclusiveMinimum) == null ? -Infinity : i)) == null ? null : n, e.maxValue = (a = Math.min((o = d.maximum) == null ? Infinity : o, (s = d.exclusiveMaximum) == null ? Infinity : s)) == null ? null : a, e.isInt = ((c = d.format) == null ? "" : c).includes("int") || Number.isSafeInteger((l = d.multipleOf) == null ? .5 : l), e.isFinite = !0, e.format = (u = d.format) == null ? null : u;
});
function I(e) {
return /* @__PURE__ */ Fr(qa, e);
}
var Ja = /*@__PURE__*/ c("ZodNumberFormat", (e, t) => {
hn.init(e, t), qa.init(e, t);
});
function Ya(e) {
return /* @__PURE__ */ Ir(Ja, e);
}
var Xa = /*@__PURE__*/ c("ZodBoolean", (e, t) => {
gn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => bi(e, t, n, r);
});
function L(e) {
return /* @__PURE__ */ Lr(Xa, e);
}
var Za = /*@__PURE__*/ c("ZodNull", (e, t) => {
_n.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r);
});
function Qa(e) {
return /* @__PURE__ */ Rr(Za, e);
}
var $a = /*@__PURE__*/ c("ZodAny", (e, t) => {
vn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
});
function eo() {
return /* @__PURE__ */ zr($a);
}
var to = /*@__PURE__*/ c("ZodUnknown", (e, t) => {
yn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
});
function no() {
return /* @__PURE__ */ Br(to);
}
var ro = /*@__PURE__*/ c("ZodNever", (e, t) => {
bn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ei(e, t, n, r);
});
function io(e) {
return /* @__PURE__ */ Vr(ro, e);
}
var ao = /*@__PURE__*/ c("ZodArray", (e, t) => {
Sn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vi(e, t, n, r), e.element = t.element, Ta(e, "ZodArray", {
min(e, t) {
return this.check(/* @__PURE__ */ Jr(e, t));
},
nonempty(e) {
return this.check(/* @__PURE__ */ Jr(1, e));
},
max(e, t) {
return this.check(/* @__PURE__ */ qr(e, t));
},
length(e, t) {
return this.check(/* @__PURE__ */ Yr(e, t));
},
unwrap() {
return this.element;
}
});
});
function R(e, t) {
return /* @__PURE__ */ ci(ao, e, t);
}
var oo = /*@__PURE__*/ c("ZodObject", (e, t) => {
Dn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hi(e, t, n, r), b(e, "shape", () => t.shape), Ta(e, "ZodObject", {
keyof() {
return vo(Object.keys(this._zod.def.shape));
},
catchall(e) {
return this.clone({
...this._zod.def,
catchall: e
});
},
passthrough() {
return this.clone({
...this._zod.def,
catchall: no()
});
},
loose() {
return this.clone({
...this._zod.def,
catchall: no()
});
},
strict() {
return this.clone({
...this._zod.def,
catchall: io()
});
},
strip() {
return this.clone({
...this._zod.def,
catchall: void 0
});
},
extend(e) {
return de(this, e);
},
safeExtend(e) {
return fe(this, e);
},
merge(e) {
return pe(this, e);
},
pick(e) {
return le(this, e);
},
omit(e) {
return ue(this, e);
},
partial(...e) {
return me(So, this, e[0]);
},
required(...e) {
return he(Mo, this, e[0]);
}
});
});
function z(e, t) {
return new oo({
type: "object",
shape: e == null ? {} : e,
...E(t)
});
}
function B(e, t) {
return new oo({
type: "object",
shape: e,
catchall: no(),
...E(t)
});
}
var so = /*@__PURE__*/ c("ZodUnion", (e, t) => {
kn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ui(e, t, n, r), e.options = t.options;
});
function co(e, t) {
return new so({
type: "union",
options: e,
...E(t)
});
}
var lo = /*@__PURE__*/ c("ZodDiscriminatedUnion", (e, t) => {
so.init(e, t), An.init(e, t);
});
function uo(e, t, n) {
return new lo({
type: "union",
options: t,
discriminator: e,
...E(n)
});
}
var fo = /*@__PURE__*/ c("ZodIntersection", (e, t) => {
jn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wi(e, t, n, r);
});
function po(e, t) {
return new fo({
type: "intersection",
left: e,
right: t
});
}
var mo = /*@__PURE__*/ c("ZodTuple", (e, t) => {
Pn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gi(e, t, n, r), e.rest = (t) => e.clone({
...e._zod.def,
rest: t
});
});
function V(e, t, n) {
let r = t instanceof O;
return new mo({
type: "tuple",
items: e,
rest: r ? t : null,
...E(r ? n : t)
});
}
var ho = /*@__PURE__*/ c("ZodRecord", (e, t) => {
Rn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ki(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
});
function go(e, t, n) {
return !t || !t._zod ? new ho({
type: "record",
keyType: P(),
valueType: e,
...E(t)
}) : new ho({
type: "record",
keyType: e,
valueType: t,
...E(n)
});
}
var _o = /*@__PURE__*/ c("ZodEnum", (e, t) => {
zn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ai(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
let n = new Set(Object.keys(t.entries));
e.extract = (e, r) => {
let i = {};
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
else throw Error(`Key ${r} not found in enum`);
return new _o({
...t,
checks: [],
...E(r),
entries: i
});
}, e.exclude = (e, r) => {
let i = { ...t.entries };
for (let t of e) if (n.has(t)) delete i[t];
else throw Error(`Key ${t} not found in enum`);
return new _o({
...t,
checks: [],
...E(r),
entries: i
});
};
});
function vo(e, t) {
return new _o({
type: "enum",
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
...E(t)
});
}
var yo = /*@__PURE__*/ c("ZodLiteral", (e, t) => {
Bn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ji(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
return t.values[0];
} });
});
function H(e, t) {
return new yo({
type: "literal",
values: Array.isArray(e) ? e : [e],
...E(t)
});
}
var bo = /*@__PURE__*/ c("ZodTransform", (e, t) => {
Vn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ri(e, t, n, r), e._zod.parse = (n, r) => {
if (r.direction === "backward") throw new u(e.constructor.name);
n.addIssue = (r) => {
if (typeof r == "string") n.issues.push(Se(r, n.value, t));
else {
let t = r;
t.fatal && (t.continue = !1), t.code != null || (t.code = "custom"), t.input != null || (t.input = n.value), t.inst != null || (t.inst = e), n.issues.push(Se(t));
}
};
let i = t.transform(n.value, n);
return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
};
});
function xo(e) {
return new bo({
type: "transform",
transform: e
});
}
var So = /*@__PURE__*/ c("ZodOptional", (e, t) => {
Un.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function Co(e) {
return new So({
type: "optional",
innerType: e
});
}
var wo = /*@__PURE__*/ c("ZodExactOptional", (e, t) => {
Wn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function To(e) {
return new wo({
type: "optional",
innerType: e
});
}
var Eo = /*@__PURE__*/ c("ZodNullable", (e, t) => {
Gn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function Do(e) {
return new Eo({
type: "nullable",
innerType: e
});
}
var Oo = /*@__PURE__*/ c("ZodDefault", (e, t) => {
Kn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
});
function ko(e, t) {
return new Oo({
type: "default",
innerType: e,
get defaultValue() {
return typeof t == "function" ? t() : ae(t);
}
});
}
var Ao = /*@__PURE__*/ c("ZodPrefault", (e, t) => {
Jn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function jo(e, t) {
return new Ao({
type: "prefault",
innerType: e,
get defaultValue() {
return typeof t == "function" ? t() : ae(t);
}
});
}
var Mo = /*@__PURE__*/ c("ZodNonOptional", (e, t) => {
Yn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function No(e, t) {
return new Mo({
type: "nonoptional",
innerType: e,
...E(t)
});
}
var Po = /*@__PURE__*/ c("ZodCatch", (e, t) => {
Zn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
});
function Fo(e, t) {
return new Po({
type: "catch",
innerType: e,
catchValue: typeof t == "function" ? t : () => t
});
}
var Io = /*@__PURE__*/ c("ZodPipe", (e, t) => {
Qn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r), e.in = t.in, e.out = t.out;
});
function Lo(e, t) {
return new Io({
type: "pipe",
in: e,
out: t
});
}
var Ro = /*@__PURE__*/ c("ZodReadonly", (e, t) => {
er.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
});
function zo(e) {
return new Ro({
type: "readonly",
innerType: e
});
}
var Bo = /*@__PURE__*/ c("ZodCustom", (e, t) => {
nr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r);
});
function Vo(e, t = {}) {
return /* @__PURE__ */ li(Bo, e, t);
}
function Ho(e, t) {
return /* @__PURE__ */ ui(e, t);
}
//#endregion
//#region ../config/src/lib/json-schema.ts
var Uo = /* @__PURE__ */ e(n(), 1), Wo = /* @__PURE__ */ new WeakMap(), Go = /* @__PURE__ */ new Map(), Ko = 0;
function qo(e) {
let t = Wo.get(e);
return t || (t = ra(e, {
io: "input",
override: ({ zodSchema: e, jsonSchema: t }) => {
var n;
let r = (n = sr.get(e)) == null ? void 0 : n.refSchema;
if (r) {
let e = String(Ko++);
Go.set(e, r), t.refSchemaId = e;
}
}
}), Wo.set(e, t)), t;
}
function Jo(e) {
return e.refSchemaId === void 0 ? void 0 : Go.get(e.refSchemaId);
}
function Yo(e, t) {
switch (e.type) {
case "object": return typeof t == "object" && !!t && !Array.isArray(t);
case "array": return Array.isArray(t);
case "string": return typeof t == "string";
case "number":
case "integer": return typeof t == "number";
case "boolean": return typeof t == "boolean";
default: return !0;
}
}
function Xo(e, t) {
var n;
if (t === void 0) return;
let r = (n = e.anyOf) == null ? e.oneOf : n;
if (r) {
let e = Zo(r, t);
return e ? Xo(e, t) : t;
}
if (e.type === "object" && e.properties) {
if (typeof t != "object" || !t || Array.isArray(t)) return t;
let n = t, r = {};
for (let [t, i] of Object.entries(e.properties)) t in n && (r[t] = Xo(i, n[t]));
return r;
}
if (e.type === "array") {
var i;
let n = Array.isArray(t) ? t : [t], r = e.prefixItems;
if (r) return n.map((t, n) => {
var i, a;
return Xo((i = (a = r[n]) == null ? e.items : a) == null ? {} : i, t);
});
let a = (i = e.items) == null ? {} : i;
return n.map((e) => Xo(a, e));
}
return typeof t == "string" ? Qo(t, e.type) : t;
}
function Zo(e, t) {
if (typeof t != "object" || !t || Array.isArray(t)) return;
let n = t, r = e.filter((e) => {
var t;
let r = Object.entries((t = e.properties) == null ? {} : t).filter(([, e]) => e.const !== void 0);
return r.length > 0 && r.every(([e, t]) => {
let r = n[e];
return r === t.const || r === String(t.const);
});
});
return r.length === 1 ? r[0] : void 0;
}
function Qo(e, t) {
return t === "number" || t === "integer" ? e.trim() === "" ? e : Number(e) : t === "boolean" ? /^(1|true|yes|on)$/i.test(e) : e;
}
//#endregion
//#region ../config/src/lib/local-storage-codec.ts
var $o = "efp-";
function es(e, t, n = {}) {
var r;
return e.parse(ts(e, t, (r = n.prefix) == null ? $o : r));
}
function ts(e, t, n) {
var r;
let i = {};
for (let [a, o] of Object.entries((r = qo(e).properties) == null ? {} : r)) {
let e = t.getItem(n + a);
e !== null && (i[a] = ns(o, e));
}
return i;
}
function ns(e, t) {
if (e.type === "object" || e.type === "array" || e.anyOf || e.oneOf) try {
return JSON.parse(t);
} catch {
return t;
}
return Qo(t, e.type);
}
//#endregion
//#region ../config/src/lib/debug-settings.ts
var rs = (0, Uo.default)("efp:config");
function is(e, t = {}) {
var n, r, i;
let a = (n = t.prefix) == null ? $o : n, o = qo(e), s = new Set((r = o.required) == null ? [] : r), c = {};
for (let [e, t] of Object.entries((i = o.properties) == null ? {} : i)) {
let n = as(t, !s.has(e));
if (!n) {
rs("toDebugSettings", "no editor for field, skipping", e, t.type);
continue;
}
c[a + e] = n;
}
return c;
}
function as(e, t) {
if (e.type === "string" && e.enum) return {
type: "enum",
values: e.enum,
optional: t
};
if (e.type === "boolean" || e.type === "string") return {
type: e.type,
optional: t
};
}
//#endregion
//#region ../schema/src/lib/booth.ts
var os = B({
id: I(),
name: P(),
title: P().optional(),
externalId: P().optional(),
exhibitors: R(I()).optional(),
meta: go(P(), P()).optional(),
poiTypeId: I().optional()
}), ss = os.extend({
status: vo(["onhold", "reserved"]).optional(),
size: P().optional(),
price: P().optional(),
availColor: P().optional(),
soldColor: P().optional(),
holdColor: P().optional(),
buyUrl: P().optional(),
reserveUrl: P().optional(),
type: P().optional(),
labelColor: P().optional()
}), cs = co([os.extend({
description: P().optional(),
color: P().optional(),
special: H(!0)
}), ss]), ls = z({
x: I().optional(),
y: I().optional(),
lat: I().optional(),
lng: I().optional(),
floor: P().optional(),
bearing: I().optional(),
zoomTime: I().optional(),
pitchTime: I().optional(),
pitchDegrees: I().optional()
}), us = B({
id: I(),
name: P(),
sponsorship: L().optional()
}), ds = B({
fileName: P(),
path: P().meta({ asset: !0 })
}), fs = P().meta({ asset: !0 }), ps = z({
url: P().meta({ asset: !0 }),
smallUrl: P().optional().meta({
asset: !0,
optionalAsset: !0
}),
tinyUrl: P().optional().meta({
asset: !0,
optionalAsset: !0
})
}), ms = fs.or(ps), hs = B({
id: I(),
name: P(),
externalId: P(),
featured: L(),
advertise: L(),
description: P(),
address: P(),
address2: P(),
city: P(),
state: P(),
zip: P(),
country: P(),
phone1: P(),
website: P(),
facebook: P(),
instagram: P(),
linkedin: P(),
twitter: P(),
googlePlus: P(),
xing: P(),
youtube: P(),
email: P(),
privateEmail: P(),
order: I(),
logo: ms,
logoInBooth: L(),
logoAspectRatio: I(),
gallery: R(fs),
marketMaterials: R(ds),
categories: R(I()),
leadingImageUrl: P().meta({ asset: !0 }),
videoUrl: P(),
rebookingState: I(),
rebookingNote: P()
}).partial().required({
id: !0,
name: !0
}), gs = z({
categories: R(P()).optional(),
poiType: P().optional(),
poiTypes: R(P()).optional(),
exhibitors: L().optional()
}), _s = B({
enableExperimentalMaplibre: L().optional(),
enableExperimentalOutdoorMarkers: L().optional(),
customSetKiosk: P().optional(),
hideBoothBadges: L().optional(),
busRoutes: L().optional()
}), vs = B({
styleUrl: P(),
style: eo(),
offline: L()
}).partial(), ys = vo(["light", "dark"]), bs = z({
lat: I(),
lng: I(),
x: I(),
y: I()
}), xs = B({
p0: bs.optional(),
p1: bs.optional(),
p2: bs.optional(),
p3: bs.optional(),
bearing: I().optional(),
snapThreshold: I().optional(),
style: ys.optional(),
type: H("maplibre").optional()
}), Ss = B({
layer: P(),
data: P(),
points: R(R(no()))
}), Cs = B({
properties: B({
config: xs.optional(),
mpViewbox: R(I()).optional(),
useMaplibre: L().optional()
}).optional(),
images: R(Ss).optional()
}), ws = V([
I(),
I(),
I().optional()
]), Ts = V([
I(),
I(),
I()
]), Es = z({
positions: R(ws),
cells: R(Ts)
}), Ds = B({
boothLabelColor: P().optional(),
boothBorderColor: P().optional(),
backgroundColor: P().optional(),
boothBorderWidth: I().optional(),
heatmapColors: R(P()).optional(),
maxZoom: I().optional(),
fpVer: P().optional()
}), Os = B({ dataSize: I().optional() }), ks = B({
x: I(),
y: I(),
width: I(),
height: I(),
angle: I().optional()
}), As = B({
x1: I(),
y1: I(),
x2: I(),
y2: I(),
angle: I().optional()
}), js = B({
name: P(),
description: P().optional(),
frozen: L().optional(),
mode: I().nullish(),
rect: As.nullish(),
viewbox: As.nullish(),
floorIndex: I().nullish()
}), Ms = {
__fp: P().optional().meta({ svgAsset: !0 }),
__fpPaths: R(Es).optional(),
__fpGeo: Cs.optional(),
__fpSettings: Ds.optional(),
__fpStat: Os.optional(),
__fpVersion: I().optional()
}, Ns = B({ ...Ms }), Ps = z({ $ref: P() }).meta({ refSchema: Ns }), Fs = B({
...Ms,
__fpPending: L().optional(),
__viewbox: ks.optional(),
__fpLayers: R(js).optional(),
__fpLayersMode: I().optional(),
__fpDefaultLayer: P().optional()
}), Is = z({ $ref: P() }).meta({ refSchema: Fs }), Ls = z({
enabled: L().optional(),
variant: vo(["booths", "yah"]).optional(),
kiosk: L().optional()
}), Rs = z({
controls: L().optional(),
levels: L().optional(),
header: L().optional(),
overlay: L().optional(),
searchButtons: L().optional()
}), zs = vo([
"bookmarks",
"visited",
"sessions",
"exhibitors",
"speakers",
"tours",
"language"
]), Bs = z({
items: R(P()).optional(),
from: P().optional(),
fromBookmarks: L().optional()
}), Vs = z({
x: I(),
y: I(),
z: co([I(), P()]).optional(),
angle: I().optional(),
lat: I().optional(),
lng: I().optional()
}), Hs = uo("name", [
z({
name: H("selectBooth"),
args: V([P()])
}),
z({
name: H("selectExhibitor"),
args: V([P()])
}),
z({
name: H("changeLanguage"),
args: V([P()])
}),
z({
name: H("selectCategory"),
args: V([P()])
}),
z({
name: H("select"),
args: V([P()])
}),
z({
name: H("showList"),
args: V([zs])
}),
z({
name: H("selectTour"),
args: V([P()])
}),
z({
name: H("openPlanner"),
args: V([Bs])
}),
z({
name: H("startBuildRoute"),
args: V([])
}),
z({
name: H("setCamera"),
args: V([ls])
}),
z({
name: H("setVisibility"),
args: V([Rs.refine((e) => Object.keys(e).length > 0)])
}),
z({
name: H("selectRoute"),
args: V([R(P()).min(2)])
}),
z({
name: H("selectAccessibleRoute"),
args: V([R(P()).min(2)])
}),
z({
name: H("showPathway"),
args: V([P(), R(P())])
}),
z({
name: H("selectCurrentPosition"),
args: V([
Vs,
L(),
I().optional()
])
})
]), Us = z({
x: I().optional(),
y: I().optional(),
z: co([P(), I()]).nullish(),
heading: I().optional(),
lat: I().optional(),
lng: I().optional(),
iconSizePercent: I().optional(),
uiScale: I().optional(),
mapRollDegrees: I().optional(),
mapInitialPtScale: I().optional(),
mapPtScale: I().optional(),
mapCenterX: I().optional(),
mapCenterY: I().optional(),
mapPitch: I().optional(),
mapCenterLng: I().optional(),
mapCenterLat: I().optional(),
mapZoom: I().optional(),
mapBearingDegrees: I().optional(),
mapPitchDegrees: I().optional()
}), Ws = B({
id: I(),
name: P(),
parentId: I().optional(),
iconUrl: P().optional().meta({
asset: !0,
optionalAsset: !0
})
}), Gs = B({ photoFile: P().optional().meta({ asset: !0 }) }), Ks = B({
id: I(),
name: P(),
externalId: P().optional(),
description: P().optional(),
exhibitorId: I().optional(),
boothId: I().optional(),
startDate: P().optional(),
endDate: P().optional(),
link: P().optional(),
logoFile: P().optional().meta({ asset: !0 }),
speakers: R(Gs).optional(),
tracks: R(no()).optional()
}), qs = B({
id: co([I(), P()]).optional(),
type: P(),
name: P().optional(),
visible: L().optional(),
count: I().optional(),
linkUrl: P().optional()
}), Js = B({
id: P().optional(),
type: P(),
name: P(),
visible: L().optional(),
builtIn: L().optional(),
order: I().optional(),
children: R(qs).optional()
}), Ys = B({
isExplicit: L().optional(),
sortType: vo(["custom", "alphabetical"]).optional(),
searchButtons: R(Js).optional()
}), Xs = B({
x: I(),
y: I(),
layer: P().optional()
}), Zs = B({ __wfData: B({
lines: R(B({
p0: Xs,
p1: Xs,
weight: I().optional(),
virtual: L().optional(),
unaccessible: L().optional(),
unidirection: L().optional(),
virtualLength: I().optional()
})).optional(),
lineEnds: R(Xs).optional(),
walls: R(no()).optional()
}).optional() }), Qs = z({ $ref: P() }).meta({ refSchema: Zs }), $s = B({
weight: co([P(), I()]).optional(),
style: P().optional(),
url: P().meta({ asset: !0 }).optional()
}), ec = vo([
"ask",
"granted",
"denied"
]), tc = z({
expo: P(),
intents: R(Hs),
fpSvgJsRef: Is.nullable(),
fpSvgLayerJsRefs: go(P(), Ps),
wfDataJsRef: Qs.nullable(),
noFeatured: L(),
isTrial: L(),
expoFpAd: L(),
free: L(),
trialExpiresAt: P(),
title: P(),
subtitle: P(),
homeUrl: P(),
registerUrl: P(),
startDate: P(),
endDate: P(),
logo: P().meta({
asset: !0,
optionalAsset: !0
}),
gallery: R(fs),
gtag: P(),
boothTerm: P(),
levelTerm: P(),
reserveButtonTerm: P(),
exhibitorTerm: P(),
exhibitorTermPlural: P(),
locale: P(),
booths: R(cs),
exhibitors: R(hs),
categories: R(us),
poiTypes: R(Ws),
reserveInstructions: P(),
sendLoginLinkUrl: P(),
trackerUrl: P(),
hideWayInformation: L(),
hideDirections: L(),
hideExhibitors: L(),
onlyFeaturedExhibitors: L(),
hideExhibitorBoothNumber: L(),
dimensionless: L(),
hideCategoriesLink: L(),
hideEventHomeLink: L(),
hideRegisterToAttendLink: L(),
hideDownloadPdfLink: L(),
hideBookmarksLink: L(),
hideBookmarks: L(),
hideLanguage: L(),
hideLanguageLink: L(),
autoTrackingGps: L(),
enableIPS: L(),
allow3dView: L(),
hide3dMapDefault: L(),
hideModeSwitchButton: L(),
isRebooking: L(),
events: R(Ks),
customCss: P().meta({ cssAsset: !0 }),
customCssFonts: R($s),
showLevelLabel: L(),
showCategories: L(),
showCompaniesAndBooths: L(),
showOtherSpaces: L(),
hideShareButton: L(),
viewOptimizationLevel: I(),
shortLevelName: L(),
searchText: P(),
filterButtonsConfig: Ys,
enableRotation: L(),
alwaysShowSidebar: L(),
customKioskQrCodeUrl: P(),
mobileLocationProvider: P().nullable(),
..._s.shape,
debugMode: L(),
debugPattern: P(),
showDebugButton: L(),
previewMode: L(),
noOverlay: L(),
offHistory: L(),
ignoreQuery: L(),
consent: ec,
viewerMode: L(),
disableRuntimeAlerts: L(),
maplibre: vs,
monochrome: L(),
hideHeaderLogo: L(),
hideLogoInBooth: L(),
disableFeatured: L(),
disableBookmarked: L(),
disableGps: L(),
camera: ls,
visibility: Rs,
filters: gs,
heatmap: Ls,
kiosk: Us
}), nc = { allowConsent: L().optional() }, rc = { validateSchema: L().optional() }, ic = B({ __data: B({
...tc.partial().shape,
...nc,
flags: _s.optional().meta({ description: "deprecated, use root-level fields" })
}).optional() }), ac = B({
...tc.partial().required({ expo: !0 }).shape,
...nc,
legacyDataUrlBase: P().optional(),
legacyDataVersion: co([
P(),
Qa(),
z({ $ref: P() })
]).optional()
}), oc = tc.partial().pick({
previewMode: !0,
noOverlay: !0,
offHistory: !0,
ignoreQuery: !0,
consent: !0,
viewerMode: !0,
disableRuntimeAlerts: !0,
maplibre: !0
}).extend(nc), sc = tc.partial().pick({
enableExperimentalMaplibre: !0,
enableExperimentalOutdoorMarkers: !0,
intents: !0,
consent: !0,
monochrome: !0,
hideHeaderLogo: !0,
hideLogoInBooth: !0,
disableFeatured: !0,
disableBookmarked: !0,
disableGps: !0,
camera: !0,
visibility: !0,
filters: !0,
heatmap: !0,
kiosk: !0
}).extend(rc), cc = tc.partial().pick({
enableExperimentalMaplibre: !0,
enableExperimentalOutdoorMarkers: !0,
debugMode: !0,
debugPattern: !0,
showDebugButton: !0,
viewerMode: !0,
previewMode: !0
}).extend({ uiScale: I().min(.8).max(1.4).optional().catch(void 0) }).extend(rc), lc = {
expo: "",
noFeatured: !1,
isTrial: !1,
expoFpAd: !1,
free: !1,
trialExpiresAt: "",
title: "",
subtitle: "",
homeUrl: "",
registerUrl: "",
startDate: "",
endDate: "",
logo: "",
gallery: [],
gtag: "",
boothTerm: "",
levelTerm: "",
reserveButtonTerm: "",
exhibitorTerm: "",
exhibitorTermPlural: "",
locale: "",
booths: [],
exhibitors: [],
categories: [],
poiTypes: [],
events: [],
reserveInstructions: "",
sendLoginLinkUrl: "",
trackerUrl: "",
hideWayInformation: !1,
hideDirections: !1,
hideExhibitors: !1,
onlyFeaturedExhibitors: !1,
hideExhibitorBoothNumber: !1,
dimensionless: !1,
hideCategoriesLink: !1,
hideEventHomeLink: !1,
hideRegisterToAttendLink: !1,
hideDownloadPdfLink: !1,
hideBookmarksLink: !1,
hideBookmarks: !1,
hideLanguage: !1,
hideLanguageLink: !1,
autoTrackingGps: !1,
enableIPS: !1,
allow3dView: !1,
hide3dMapDefault: !1,
hideModeSwitchButton: !1,
isRebooking: !1,
customCss: "",
customCssFonts: [],
showLevelLabel: !1,
showCategories: !1,
showCompaniesAndBooths: !1,
showOtherSpaces: !1,
hideShareButton: !1,
viewOptimizationLevel: 0,
shortLevelName: !1,
searchText: "",
filterButtonsConfig: {},
enableRotation: !1,
alwaysShowSidebar: !1,
customKioskQrCodeUrl: "",
mobileLocationProvider: null,
enableExperimentalMaplibre: void 0,
enableExperimentalOutdoorMarkers: !1,
customSetKiosk: "",
hideBoothBadges: !1,
busRoutes: !1,
debugMode: !1,
debugPattern: "",
showDebugButton: !1,
previewMode: !1,
noOverlay: !1,
offHistory: !1,
ignoreQuery: !1,
consent: "ask",
viewerMode: !1,
disableRuntimeAlerts: !0,
monochrome: !1,
hideHeaderLogo: !1,
hideLogoInBooth: !1,
disableFeatured: !1,
disableBookmarked: !1,
disableGps: !1,
camera: {},
visibility: {},
filters: {},
heatmap: {},
kiosk: {},
maplibre: {},
intents: [],
fpSvgJsRef: null,
fpSvgLayerJsRefs: {},
wfDataJsRef: null
};
//#endregion
//#region ../config/src/lib/url-codec.ts
function uc(e, t) {
let n = dc(e, t), r = [], i = e.safeParse(n);
for (; !i.success;) {
let t = /* @__PURE__ */ new Set();
for (let e of i.error.issues) {
var a;
let r = String((a = e.path[0]) == null ? "" : a);
r in n && t.add(r);
}
if (!t.size) throw i.error;
for (let e of t) delete n[e], r.push(e);
i = e.safeParse(n);
}
return {
value: i.data,
invalidKeys: r
};
}
function dc(e, t) {
return Xo(qo(e), pc(bc(t)));
}
function fc(e) {
return pc(bc(e));
}
function pc(e) {
let t = {};
for (let [n, r] of e) vc(t, mc(n), r);
return t;
}
function mc(e) {
return e.replace(/\]/g, "").split("[");
}
var hc = /* @__PURE__ */ new Set([
"__proto__",
"constructor",
"prototype"
]), gc = 20;
function _c(e) {
return /^\d+$/.test(e) && Number(e) <= gc;
}
function vc(e, t, n) {
let r = e, i = "", a = e;
for (let e = 0; e < t.length; e++) {
let o = t[e];
if (hc.has(o)) return;
let s = e === t.length - 1, c = o === "";
if (Array.isArray(a) && !c && !_c(o) && (a = yc(a, r, i)), s) {
c && Array.isArray(a) ? a.push(n) : a[o] = n;
return;
}
let l = t[e + 1], u = l === "" || _c(l);
if (c && Array.isArray(a)) {
let e = u ? [] : {};
a.push(e), r = a, i = String(a.length - 1), a = e;
} else {
let e = a, t = e[o];
(typeof t != "object" || !t) && (e[o] = u ? [] : {}), r = a, i = o, a = e[o];
}
}
}
function yc(e, t, n) {
let r = {};
return e.forEach((e, t) => {
r[t] = e;
}), t[n] = r, r;
}
function bc(e) {
if (e instanceof URL) return e.searchParams;
let t = e.indexOf("?"), n = t >= 0 ? e.slice(t + 1) : e, r = n.indexOf("#");
return new URLSearchParams(r >= 0 ? n.slice(0, r) : n);
}
//#endregion
//#region ../config/src/lib/url-intents.ts
var xc = new Set(Hs.options.map((e) => e.shape.name.value));
function Sc(e) {
let t = [], n = [];
for (let [r, i] of Object.entries(fc(e))) {
if (!xc.has(r)) continue;
let e = Array.isArray(i) ? i : [i], a = (i === "" ? [[]] : [e, [e]]).map((e) => Hs.safeParse(Xo(qo(Hs), {
name: r,
args: e
}))).find((e) => e.success);
a ? t.push(a.data) : n.push(r);
}
return {
intents: t,
invalidKeys: n
};
}
//#endregion
//#region ../config/src/lib/deprecated-url-params.ts
var Cc = z({
noOverlay: L().optional(),
allowConsent: L().optional(),
agenda: P().optional()
}), wc = Object.keys(Cc.shape);
function Tc(e, t = Oc(e)) {
var n;
let { value: r } = uc(Cc, e), i = {};
return r.noOverlay !== void 0 && ((n = t.visibility) == null ? void 0 : n.overlay) === void 0 && (i.noOverlay = r.noOverlay), r.allowConsent !== void 0 && t.consent === void 0 && (i.consent = r.allowConsent ? "granted" : "denied"), r.agenda !== void 0 && !Ec(t.intents) && (i.intents = [{
name: "showList",
args: ["sessions"]
}]), i;
}
function Ec(e) {
return (e == null ? [] : e).some((e) => e.name === "showList");
}
var Dc = sc.pick({
visibility: !0,
consent: !0,
intents: !0
});
function Oc(e) {
var t;
let { value: n } = uc(Dc, e);
return {
visibility: n.visibility,
consent: n.consent,
intents: [...(t = n.intents) == null ? [] : t, ...Sc(e).intents]
};
}
//#endregion
//#region ../utils/src/lib/clone.ts
function kc(e) {
return "structuredClone" in globalThis ? globalThis.structuredClone(e) : JSON.parse(JSON.stringify(e));
}
//#endregion
//#region ../utils/src/lib/deep-freeze.ts
function Ac(e) {
return typeof e != "object" || !e ? e : (Object.getOwnPropertyNames(e).forEach((t) => {
let n = e[t];
n && typeof n == "object" && Ac(n);
}), Object.freeze(e));
}
//#endregion
//#region ../utils/src/lib/fetch-with-retry.ts
var jc, Mc = async function(...t) {
return jc || (jc = typeof window < "u" && typeof document < "u" ? window.fetch.bind(window) : (await import("./fetch-retry.umd-Df7tkVK1.js").then((t) => /* @__PURE__ */ e(t.default, 1))).default(globalThis.fetch)), jc(...t);
};
//#endregion
//#region ../utils/src/lib/import-node-module.ts
async function Nc(e) {
var t;
if (typeof process > "u" || !((t = process.versions) != null && t.node)) throw Error("importNodeModule can only be used in Node.js environments");
try {
return await Function("moduleName", "return import(moduleName)")(e);
} catch {
return await import(
/* @vite-ignore */
/* webpackIgnore: true */
e
);
}
}
//#endregion
//#region ../utils/src/lib/import-fs-promises.ts
async function Pc() {
return Nc("node:fs/promises");
}
//#endregion
//#region ../utils/src/lib/import-js-as-json.ts
var Fc = (0, Uo.default)("efp:utils:importJsAsJson");
async function Ic(e) {
return await import(
/* @vite-ignore */
e
);
}
var Lc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : {}, Rc = [
"window",
"self",
"globalThis"
];
function zc(e, t) {
var n;
if (typeof Proxy > "u") throw Error("evalJsToJson requires Proxy, which is unavailable in this environment");
let r = (n = t == null ? void 0 : t.globals) == null ? {} : n, i = { ...r }, a = new Proxy(i, {
has: () => !0,
get: (e, t) => {
if (t !== Symbol.unscopables) return typeof t == "string" && Rc.includes(t) ? a : t in e ? e[t] : Lc[t];
},
set: (e, t, n) => (e[t] = n, !0)
});
return Function("__scope__", `with(__scope__){${e}\n}`)(a), Hc(i, /* @__PURE__ */ new Set([...Rc, ...Object.keys(r)]), t == null ? void 0 : t.pick);
}
async function Bc(e, t) {
var n;
return Fc("Loading JS from", e), zc(await Vc(e, (n = t == null ? void 0 : t.signal) == null ? null : n), t);
}
async function Vc(e, t) {
let n = new URL(e);
if (n.protocol === "file:") {
Fc("Read from file system", e);
let { readFile: r } = await Ic("node:fs/promises");
return r(n, {
encoding: "utf-8",
signal: t == null ? void 0 : t
});
}
Fc("Fetch", e);
let r = await Mc(e, { signal: t });
if (!r.ok) throw Error(`Failed to fetch JS from ${e} (HTTP ${r.status})`);
return r.text();
}
function Hc(e, t, n) {
let r = {}, i = n == null ? Object.keys(e).filter((e) => !t.has(e)) : n;
for (let t of i) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = e[t]);
return r;
}
//#endregion
//#region ../utils/src/lib/import-json.ts
var Uc = (0, Uo.default)("efp:utils:importJson"), Wc = /* @__PURE__ */ new WeakSet(), Gc;
function Kc() {
var e;
if (Gc === void 0) try {
Gc = Function("url", "return import(url, { with: { type: \"json\" } });");
} catch {
Uc("Dynamic import not available"), Gc = null;
}
return (e = Gc) == null ? void 0 : e;
}
async function qc(e, t) {
var n, r, i, a;
let o = (n = t == null ? void 0 : t.forceFetch) != null && n, s = (r = t == null ? void 0 : t.fetchCache) == null ? /* @__PURE__ */ new Map() : r, c = (i = t == null ? void 0 : t.signal) == null ? null : i, l, u = o ? void 0 : Kc();
if (u) try {
Uc("Dynamic import", e), l = (await u(e)).default;
} catch {
Uc("Dynamic import not available"), Gc = null;
}
return l === void 0 && (e.startsWith("file:") && !o ? (Uc("Read from file system", e), l = await Yc(new URL(e))) : (Uc("Fetch", e), l = await Jc(e, s, c))), t == null || (a = t.importCallback) == null || a.call(t, e), typeof l == "object" && l && !Wc.has(l) && (Ac(l), Wc.add(l)), l;
}
async function Jc(e, t, n) {
let r = "__loadJson__" + e;
if (t.has(r)) return t.get(r);
let i = (async () => {
let t = await Mc(e, { signal: n });
if (!t.ok) throw Error(`Failed to fetch JSON from ${e}`);
return await t.json();
})();
return t.set(r, i), i.catch(() => {
t.get(r) === i && t.delete(r);
}), i;
}
async function Yc(e) {
if (e.protocol !== "file:") throw Error(`readJsonFromFs only supports file: URLs, got ${e.href}`);
let t = await (await Pc()).readFile(e, { encoding: "utf-8" });
return JSON.parse(t);
}
//#endregion
//#region ../utils/src/lib/safe-decode.ts
function Xc(e) {
try {
return decodeURIComponent(e);
} catch {
return e;
}
}
//#endregion
//#region ../config/src/lib/legacy-url.ts
var Zc = /* @__PURE__ */ new Set([...Object.keys(sc.shape), ...Hs.options.map((e) => e.shape.name.value)]), Qc = /* @__PURE__ */ new Set([
"blue-dot",
"viewermode",
"previewMode",
"uiscale",
"resetuiscale"
]), $c = /* @__PURE__ */ new Set(/* @__PURE__ */ "centerxy.center.z.bearing.zoomtime.roll.hide.lang.preview.copy_exh.pathway.booths.b.ba.sw.yah.k.kiosk_heading.kiosk_lat.kiosk_lng.kiosk_iconSizePercent.kiosk_uiScale.kiosk_mapRollDegrees.kiosk_mapInitialPtScale.kiosk_mapPtScale.kiosk_mapCenterX.kiosk_mapCenterY.kiosk_mapPitch".split(".")), el = /* @__PURE__ */ new Set(["-pdf", "build-route"]), tl = new Set(wc), nl = /* @__PURE__ */ new Set(["expo"]), rl = /* @__PURE__ */ new Set([
"layer",
"kiosk_x",
"kiosk_y",
"kiosk_z"
]), il = /* @__PURE__ */ new Set(["title"]);
function al(e) {
let t = Xc(e.startsWith("?") ? e.slice(1) : e), n = new URLSearchParams(t);
return {
primary: ol(dl(t), n, ul(t)),
oneShots: sl(n)
};
}
function ol(e, t, n) {
if (t.has("kiosk")) {
let e = t.get("kiosk");
return {
type: "kiosk",
enabled: e === "1" || e !== "0" && null
};
}
if (e === "tours") return {
type: "list",
list: "tours"
};
if (e.startsWith("tour=")) return {
type: "tour",
tourId: e.split("=")[1]
};
if (t.has("planner")) {
var r, i;
return {
type: "planner",
fromBookmarks: t.get("source") === "bookmarks",
items: ((r = t.get("planner")) == null ? "" : r).split(":").filter(Boolean),
from: (i = t.get("from")) == null ? void 0 : i
};
}
if (e.startsWith("route")) {
var a;
let n = e.split(":");
return {
type: "route",
to: n[1],
from: n[2],
accessible: n[3] === "true",
waypoints: n.slice(4),
title: (a = t.get("title")) == null ? void 0 : a
};
}
if (e === "bookmarks") return {
type: "list",
list: "bookmarks"
};
if (e === "visited") return {
type: "list",
list: "visited"
};
if (e === "language") return {
type: "list",
list: "language"
};
if (e === "sessions") return {
type: "list",
list: "sessions"
};
if (e === "exhibitors") return {
type: "list",
list: "exhibitors"
};
if (e === "speakers") return {
type: "list",
list: "speakers"
};
if (e.startsWith("exhibitors=")) {
let t = e.slice(11);
return t === "" || t === "true" ? { type: "ownedByFilters" } : {
type: "selectExhibitors",
values: t.split(",")
};
}
return e.includes("=") && (e.startsWith("categories=") || /^poiTypes?=/.test(e)) ? { type: "ownedByFilters" } : !e && n ? { type: "ownedByConfig" } : {
type: "select",
slug: e
};
}
function sl(e) {
let t = [];
e.get("heatmap") === "true" && t.push({
type: "heatmap",
yah: e.get("type") === "yah",
kiosk: e.get("subtype") === "kiosk"
});
let n = e.get("blue-dot");
if (n !== null) {
let e = n.split(","), r = Number(e[0]), i = Number(e[1]);
e.length > 1 && Number.isFinite(r) && Number.isFinite(i) && t.push({
type: "blueDot",
x: r,
y: i,
layer: e[2],
lat: Number(e[3]) || void 0,
lng: Number(e[4]) || void 0
});
}
let r = e.get("viewermode");
r === "1" || r === "true" ? t.push({
type: "viewerMode",
enabled: !0
}) : (r === "0" || r === "false") && t.push({
type: "viewerMode",
enabled: !1
});
let i = e.get("previewMode");
i === "true" ? t.push({
type: "previewMode",
enabled: !0
}) : i === "false" && t.push({
type: "previewMode",
enabled: !1
}), e.has("resetuiscale") && t.push({ type: "resetUiScale" });
let a = e.get("uiscale");
if (a) {
let e = parseFloat(a.replace(",", ".")), n = !Number.isNaN(e) && e >= .8 && e <= 1.4;
t.push({
type: "uiScale",
scale: n ? e : null,
raw: a
});
}
return t;
}
function cl(e) {
return el.has(e) ? !0 : $c.has(e.split("=")[0]) && e.includes("=");
}
function ll(e) {
let t = e.split("=")[0];
if (t === "heatmap") return !1;
let n = t.split("[")[0];
return Zc.has(n) || tl.has(n);
}
function ul(e) {
return e.split("&").some((e) => !!e && ll(e));
}
function dl(e) {
return e.split("&").filter((e) => {
if (!e || cl(e)) return !1;
let t = e.split("=")[0].split("[")[0];
return (nl.has(t) || rl.has(t) || il.has(t)) && e.includes("=") || ll(e) ? !1 : !Qc.has(t);
}).join("&");
}
function fl(e) {
let t = e.startsWith("?") ? e.slice(1) : e;
if (!t) return {
search: e,
platform: ""
};
let n = t.split("&"), r = n.filter(pl);
if (!r.length) return {
search: e,
platform: ""
};
let i = n.filter((e) => !pl(e));
return {
search: i.length ? "?" + i.join("&") : "",
platform: r.join("&")
};
}
function pl(e) {
let t = e.indexOf("=");
return t > 0 && nl.has(e.slice(0, t));
}
function ml(e) {
let t = hl(e);
return t ? "?" + encodeURIComponent(t) : "";
}
function hl(e) {
switch (e.type) {
case "none": return "";
case "slug": return e.slug;
case "route":
var t;
return `route${e.to ? `:${e.to}` : ""}${e.from ? `:${e.from}` : ""}${e.accessible ? ":true" : ":false"}${((t = e.waypoints) == null ? [] : t).map((e) => `:${e}`).join("")}`;
case "planner": {
var n;
let t = e.fromBookmarks ? "planner&source=bookmarks" : `planner=${((n = e.items) == null ? [] : n).join(":")}`;
return e.from ? `${t}&from=${e.from}` : t;
}
case "list": return e.list;
case "tour": return `tour=${e.tourId}`;
case "filter": return `${e.key}=${e.value}`;
}
}
//#endregion
//#region ../resolve/src/resolve.ts
var gl = /* @__PURE__ */ new Map(), _l = /* @__PURE__ */ new Map();
async function vl(e, t) {
var n;
if (!xl(e)) return e;
let r = e.$ref, i = await (Sl(r) ? Cl(r, t) : qc(r, {
fetchCache: (n = t == null ? void 0 : t.refCache) == null ? gl : n,
forceFetch: t == null ? void 0 : t.forceFetch,
signal: t == null ? void 0 : t.signal,
importCallback: t == null ? void 0 : t.importCallback
})), a = e.process ? await e.process(i, r) : i;
return Ac(a), _l.set(r, a), a;
}
function yl(e) {
if (!xl(e)) return e;
if (!_l.has(e.$ref)) throw Error(`resolve: $ref not resolved yet: ${e.$ref}`);
return _l.get(e.$ref);
}
function bl(e) {
return !xl(e) || _l.has(e.$ref);
}
function xl(e) {
return typeof e == "object" && !!e && "$ref" in e && typeof e.$ref == "string";
}
function Sl(e) {
return /\.js(\?|#|$)/i.test(e);
}
function Cl(e, t) {
var n;
let r = (n = t == null ? void 0 : t.refCache) == null ? gl : n, i = "__loadJs__" + e, a = t != null && t.forceFetch ? void 0 : r.get(i);
if (!a) {
let n = Bc(e, { signal: t == null ? void 0 : t.signal });
r.set(i, n), n.catch(() => {
r.get(i) === n && r.delete(i);
}), a = n;
}
return a.then((n) => {
var r;
return t == null || (r = t.importCallback) == null || r.call(t, e), n;
});
}
//#endregion
//#region ../config/src/lib/normalize-fp-svg.ts
function wl(e, t) {
if (e.__fp === void 0) {
let n = e[`__fp${t}`];
typeof n == "string" && (e.__fp = n);
}
if (e.__fpPaths === void 0) {
let n = e[`__fpPaths${t}`];
Array.isArray(n) && (e.__fpPaths = n);
}
}
//#endregion
//#region ../config/src/lib/resource-urls.ts
function Tl(e, t) {
return e === "" || El(e) ? e : `${t.replace(/\/+$/, "")}/${e}`;
}
function El(e) {
return e.startsWith("/") || /^[a-z][a-z0-9+.-]*:/i.test(e);
}
function Dl(e) {
let t = e.split(/[?#]/, 1)[0];
return t.slice(0, t.lastIndexOf("/") + 1);
}
function Ol(e, t) {
let n = [];
e.lastIndex = 0;
for (let r = e.exec(t); r; r = e.exec(t)) n.push(r), r[0] === "" && e.lastIndex++;
return n;
}
var kl = /<image\b[^>]*>/g, Al = /(\b(?:(?:xlink:)?href|data-model-3d)\s*=\s*)(?:"([^"]*)"|'([^']*)')/g;
function jl(e) {
return !!e && !e.startsWith("#");
}
function Ml(e) {
var t;
let n = /* @__PURE__ */ new Set();
if (!e.includes("<image")) return [];
for (let i of (t = e.match(kl)) == null ? [] : t) for (let e of Ol(Al, i)) {
var r;
let t = (r = e[2]) == null ? e[3] : r;
jl(t) && n.add(t);
}
return [...n];
}
function Nl(e, t) {
return e.includes("<image") ? e.replace(kl, (e) => e.replace(Al, (e, n, r, i) => {
var a;
let o = (a = r == null ? i : r) == null ? "" : a;
if (!jl(o)) return e;
let s = r === void 0 ? "'" : "\"";
return `${n}${s}${t(o)}${s}`;
})) : e;
}
var Pl = /url\(\s*(['"]?)(.*?)\1\s*\)/g;
function Fl(e) {
let t = /* @__PURE__ */ new Set();
for (let n of Ol(Pl, e)) {
let e = n[2];
e && !e.startsWith("data:") && t.add(e);
}
return [...t];
}
function Il(e, t) {
return e.replace(Pl, (e, n, r) => !r || r.startsWith("data:") ? e : `url(${n}${t(r)}${n})`);
}
var Ll = /@import\s+(?:url\(\s*(['"]?)(.*?)\1\s*\)|(["'])(.*?)\3)\s*([^;]*);/gi;
async function Rl(e, t, n, r = []) {
let i = /* @__PURE__ */ new Set(), a = [...e.matchAll(Ll)], o = await Promise.all(a.map(async (e) => {
var a, o;
let s = (a = (o = e[2]) == null ? e[4] : o) == null ? "" : a, c = e[5].trim(), l = Bl(s, n);
if (!l || c) return console.warn(c ? `Keeping conditional CSS import remote: @import ${s} ${c}` : `Keeping unresolvable relative CSS import: @import ${s}`), i.add(s), e[0];
if (r.includes(l)) throw Error(`CSS @import cycle: ${[...r, l].join(" -> ")}`);
let u = await t(l);
if (!zl(u)) return console.warn(`Dropping non-stylesheet CSS @import (not parseable as CSS): @import ${s}`), "";
let d = await Rl(u, t, l, [...r, l]);
for (let e of d.external) {
var f;
i.add(e), i.add((f = Bl(e, l)) == null ? e : f);
}
return Il(d.css, (e) => {
var t;
return (t = Bl(e, l)) == null ? e : t;
});
})), s = 0;
return {
css: e.replace(Ll, () => o[s++]),
external: i
};
}
function zl(e) {
return !e.includes("\0");
}
function Bl(e, t) {
if (e) try {
return t ? new URL(e, t).href : new URL(e).href;
} catch {
return;
}
}
function Vl(e, t) {
let [n, r] = Hl(e, /[?#]/), i = n.lastIndexOf("/"), a = n.slice(0, i + 1), o = n.slice(i + 1), s = o.lastIndexOf(".");
return `${a}${s > 0 ? `${o.slice(0, s)}${t}${o.slice(s)}` : `${o}${t}`}${r}`;
}
function Hl(e, t) {
let n = e.search(t);
return n === -1 ? [e, ""] : [e.slice(0, n), e.slice(n)];
}
//#endregion
//#region ../config/src/lib/normalize-legacy-data.ts
var Ul = [
2567,
2704,
2681,
2592,
2740,
2709,
2482,
2609,
2734,
2696,
2840,
2566,
2736
];
function Wl(e, t) {
var n, r;
let i = e.expo, a = (n = e.booths) == null ? [] : n, o = (r = e.exhibitors) == null ? [] : r;
if (e.booths = a, e.exhibitors = o, e.categories != null || (e.categories = []), e.free && (e.noFeatured = !0, e.expoFpAd = !0), e.trialExpiresAt) {
let t = new Date(e.trialExpiresAt).getTime();
Date.now() < t && (e.isTrial = !0);
}
if (o.length > 0) for (let e of a) delete e.reserved;
for (let e of o) typeof e.logo == "string" && (e.logo = e.logo ? {
url: e.logo,
smallUrl: Vl(e.logo, "__small"),
tinyUrl: Vl(e.logo, "__tiny")
} : { url: e.logo });
!e.logo && i === "expo" && (e.logo = Gl("../logo.svg", t)), e.logo || (e.logo = Gl(`../${i}-logo.png`, t)), !e.homeUrl && i === "jtrade19" && (e.homeUrl = "https://www.jtrade.co.uk/"), e.boothTerm || (e.boothTerm = "Booth"), e.exhibitorTermPlural || (e.exhibitorTermPlural = "Exhibitors"), i === "expo" && o.filter((e) => {
var t;
return ((t = e.logo) == null ? void 0 : t.url) && Ul.includes(e.id);
}).forEach((e) => e.advertise = !0);
for (let e of a) {
var s;
e.special || (e.onHold === void 0 && (e.onHold = e.isOnHold), e.availColor === void 0 && (e.availColor = e.availableColor), e.type === void 0 && (e.type = e.boothTypeName)), e.exhibitors = (s = e.exhibitors) == null ? [] : s;
}
for (let e of o) {
var c;
e.featured === void 0 && (e.featured = e.isFeatured), e.email === void 0 && (e.email = e.publicEmail), e.categories = (c = e.categories) == null ? [] : c;
}
e.noFeatured && o.forEach((e) => e.featured = !1);
}
function Gl(e, t) {
return t ? `${t.replace(/\/+$/, "")}/${e}` : e;
}
//#endregion
//#region ../config/src/lib/rebooking.ts
var Kl = "rt", ql = "https://app.expofp.com/";
async function Jl(e, t) {
try {
let r = Yl(t);
if (!r) {
e.isRebooking = !1;
return;
}
Xl(r);
let i = new URL("api/rebooking-data", ql);
i.searchParams.set(Kl, r), i.searchParams.set("expoKey", e.expo);
let a = await fetch(i.href);
if (a.ok) {
var n;
Zl(e, (n = (await a.json()).exhibitors) == null ? [] : n);
}
e.isRebooking = a.ok;
} catch (e) {
console.error(e);
}
}
function Yl(e) {
return (e ? new URLSearchParams(decodeURIComponent(e)).get(Kl) : null) || (typeof sessionStorage < "u" ? sessionStorage.getItem(Kl) : null);
}
function Xl(e) {
typeof sessionStorage < "u" && sessionStorage.setItem(Kl, e);
}
function Zl(e, t) {
var n;
let r = (n = e.exhibitors) == null ? [] : n;
for (let e of t) {
let t = r.find((t) => t.id === e.id);
t && (t.rebookingState = e.rebookingState, t.rebookingNote = e.rebookingNote);
}
}
//#endregion
//#region ../config/src/lib/store-ref.ts
var Ql = "$/", $l = /^\$\/([a-z0-9-]+)\/(.+)$/;
function eu(e) {
return e.startsWith(Ql);
}
function tu(e) {
if (!eu(e)) return e;
let t = $l.exec(e);
if (!t) throw Error(`resolveUrl: malformed store ref ${JSON.stringify(e)}`);
return `https://${t[1]}.expofp.com/immutable/${t[2]}`;
}
//#endregion
//#region ../config/src/lib/validate-flag.ts
function nu(e, t) {
var n;
let r = e === void 0 ? void 0 : uc(sc, e).value.validateSchema, i = t ? es(cc, t).validateSchema : void 0;
return (n = r == null ? i : r) != null && n;
}
//#endregion
//#region ../config/src/lib/validate-timing.ts
var ru = (0, Uo.default)("efp:config:validate"), iu = 0, au = 0, ou = -Infinity, su = !1;
function cu() {
ou = performance.now(), ru("%d validations, %sms total since page load", au, iu.toFixed(1));
}
function lu(e) {
if (!ru.enabled) return e();
let t = performance.now();
try {
return e();
} finally {
iu += performance.now() - t, au++;
let e = performance.now() - ou;
if (e >= 1e3) cu();
else if (!su) {
var n;
su = !0;
let t = setTimeout(() => {
su = !1, cu();
}, 1e3 - e);
(n = t.unref) == null || n.call(t);
}
}
}
//#endregion
//#region ../config/src/lib/visit-resources.ts
var uu = !1;
function du(e) {
uu = e;
}
function fu(e, t) {
return uu ? lu(() => e.parse(t)) : kc(t);
}
function pu(e, t, n) {
let r = async (e, r) => {
let i = fu(t, e);
n == null || n(i);
let a = Dl(r), o = El(a);
return await mu(t, i, { asset: (e) => eu(e) ? tu(e) : o ? Tl(e, a) : e }), i;
};
return {
...e,
process: r
};
}
async function mu(e, t, n, r) {
await hu(qo(e), t, _u, n, r);
}
async function hu(e, t, n, r, i) {
var a;
if (t == null) return;
let o = (a = e == null ? void 0 : e.anyOf) == null ? e == null ? void 0 : e.oneOf : a;
if (o) return hu(o.find((e) => Yo(e, t)), t, n, r, i);
if (gu(t)) {
if (r.ref) {
n({ $ref: await r.ref(t.$ref) });
return;
}
if (!r.document || t.$ref.startsWith("/")) return;
let a = t.$ref;
try {
let o = e ? Jo(e) : void 0, s = { document: kc(bl(t) ? yl(t) : await vl(o ? pu({ $ref: a }, o) : { $ref: a }, { signal: i == null ? void 0 : i.signal })) };
o && await hu(qo(o), s.document, (e) => {
s.document = e;
}, r, i), n({ $ref: await r.document(a, s.document) });
} catch (e) {
if (!r.documentError) throw e;
r.documentError(a, e), n(void 0);
}
return;
}
if (typeof t == "string") {
if (e != null && e.asset && t) n(await r.asset(t, e.optionalAsset));
else if (e != null && e.svgAsset) {
let e = /* @__PURE__ */ new Map();
for (let n of Ml(t)) e.set(n, await r.asset(n));
n(Nl(t, (t) => {
var n;
return (n = e.get(t)) == null ? t : n;
}));
} else if (e != null && e.cssAsset) {
let e = t, i = /* @__PURE__ */ new Set();
r.stylesheetText && ({css: e, external: i} = await Rl(e, r.stylesheetText.bind(r)));
let a = /* @__PURE__ */ new Map();
for (let t of Fl(e)) i.has(t) || (eu(t) || /^[a-z][a-z0-9+.-]*:/i.test(t)) && a.set(t, await r.asset(t));
n(Il(e, (e) => {
var t;
return (t = a.get(e)) == null ? e : t;
}));
}
return;
}
if (Array.isArray(t)) {
for (let n = 0; n < t.length; n++) await hu(e == null ? void 0 : e.items, t[n], (e) => {
t[n] = e;
}, r, i);
return;
}
if (typeof t == "object") {
let n = t, a = typeof (e == null ? void 0 : e.additionalProperties) == "object" ? e.additionalProperties : void 0;
for (let t of Object.keys(n)) {
var s, c;
await hu((s = e == null || (c = e.properties) == null ? void 0 : c[t]) == null ? a : s, n[t], (e) => {
e === void 0 ? delete n[t] : n[t] = e;
}, r, i);
}
}
}
function gu(e) {
return typeof e == "object" && !!e && "$ref" in e && typeof e.$ref == "string";
}
function _u() {
throw Error("visitResources: the top-level value must be an object or array");
}
//#endregion
//#region ../config/src/lib/load-config.ts
var vu = (0, Uo.default)("efp:config");
async function yu(e, t, n, r) {
let i = { ...lc };
du(nu(n, r)), e = fu(ac, await xu(e)), await Su(e);
let { legacyDataUrlBase: a, legacyDataVersion: o, ...s } = e;
Mu(s), Nu(i, s), t = oc.parse(t), Mu(t);
let c = String(Date.now());
if (a) {
if (ku()) vu("loadConfig", "designer referrer — cache-busting with a timestamp");
else if (typeof o == "string" && o) c = o;
else if (o === null) vu("loadConfig", "manifest pins \"no version\" — cache-busting with a timestamp");
else try {
c = (await vl({ $ref: `${a}version.json` })).version;
} catch {
vu("loadConfig", "no version.json found at", a);
}
i.fpSvgJsRef != null || (i.fpSvgJsRef = Au(a, "fp.svg.js", c)), i.wfDataJsRef != null || (i.wfDataJsRef = Au(a, "wf.data.js", c));
}
i.fpSvgJsRef && (i.fpSvgJsRef = pu(i.fpSvgJsRef, Fs)), i.wfDataJsRef && (i.wfDataJsRef = pu(i.wfDataJsRef, Zs));
let l = {};
for (let [e, t] of Object.entries(i.fpSvgLayerJsRefs)) l[e] = Du(t, e);
i.fpSvgLayerJsRefs = l;
let [u, d] = await Promise.all([
a ? Cu(a, c) : null,
i.fpSvgJsRef ? Tu(i.fpSvgJsRef, a) : null,
Eu(i.wfDataJsRef)
]);
if (u) {
let { flags: e, legacyDataUrlBase: t, legacyDataVersion: n, fpSvgJsRef: r, wfDataJsRef: a, fpSvgLayerJsRefs: o, ...s } = u;
e && (Mu(e), Nu(i, e)), Mu(s), Nu(i, s);
}
if (d && (i.fpSvgJsRef = d.ref, !Object.keys(i.fpSvgLayerJsRefs).length && a && (i.fpSvgLayerJsRefs = Ou(d.payload, a, c))), Nu(i, t), r) {
let { viewerMode: e, previewMode: t, uiScale: n, ...a } = es(cc, r);
Nu(i, a);
}
if (n !== void 0 && !i.ignoreQuery) {
var f;
let { value: e, invalidKeys: t } = uc(sc, n), r = Sc(n), a = [...(f = e.intents) == null ? [] : f, ...r.intents], { intents: o = [], ...s } = Tc(n, {
visibility: e.visibility,
consent: e.consent,
intents: a
}), c = [...a, ...o];
c.length && (e.intents = c), t.push(...r.invalidKeys), t.length && vu("loadConfig", "ignoring invalid URL config params:", t), Nu(i, s), Nu(i, e);
}
return Wl(i, a), await Jl(i, i.ignoreQuery ? void 0 : n), delete i.validateSchema, Ac(i), i;
}
var bu = 3;
async function xu(e) {
let t = e;
for (let e = 0;; e++) {
gu(t) && (t = {
...t,
$ref: tu(t.$ref)
});
let n = await vl(t);
if (!gu(n)) return n;
if (e >= bu) throw Error(`loadConfig: manifest pointer chain deeper than ${bu} at ${n.$ref}`);
vu("loadConfig", "manifest is a pointer, following it to", n.$ref), t = { $ref: n.$ref };
}
}
async function Su(e) {
let t = (e) => tu(e);
await mu(ac, e, {
asset: t,
ref: t
});
}
async function Cu(e, t) {
var n;
let r = await vl(pu(Au(e, "data.js", t), ic));
return r.__data || vu("loadLegacyDataJs", "no __data global in data.js at", e), kc((n = r.__data) == null ? {} : n);
}
var wu = 2e3;
async function Tu(e, t) {
let n = e, r = await vl(n);
for (let i = 1; r.__fpPending && !r.__fp; i++) vu("loadLegacyFpSvgJs", "plan is still generating, retry", i), await ju(wu), n = t ? pu(Au(t, "fp.svg.js", String(i)), Fs) : e, r = await vl(n, { forceFetch: !0 });
return {
payload: r,
ref: n
};
}
async function Eu(e) {
if (e) try {
await vl(e);
} catch (e) {
vu("prefetchWfData", "wf.data.js not loaded, wayfinding stays off", e);
}
}
function Du(e, t) {
return pu(e, Ns, (e) => wl(e, t));
}
function Ou(e, t, n) {
var r;
let i = {};
for (let a of (r = e.__fpLayers) == null ? [] : r) a.name !== e.__fpDefaultLayer && (i[a.name] = Du(Au(t, `fp.svg.${a.name}.js`, n), a.name));
return i;
}
function ku() {
return typeof document > "u" || !document.referrer ? !1 : document.referrer.includes("app.expofp.com") || document.referrer.includes("app-show.expofp.com");
}
function Au(e, t, n) {
let r = `${e}${t}`;
return { $ref: n ? `${r}?v=${n}` : r };
}
function ju(e) {
return new Promise((t) => setTimeout(t, e));
}
function Mu(e) {
e.allowConsent !== void 0 && (e.consent != null || (e.consent = e.allowConsent ? "granted" : "denied"), delete e.allowConsent);
}
function Nu(e, t) {
for (let [n, r] of Object.entries(t)) r !== void 0 && (e[n] = r);
}
//#endregion
//#region src/constants.ts
var Pu = "___visibility", Fu = "data-preview-mode", Iu = "booths", Lu = "Outdoor", Ru = "#ea4236", zu = "rgba(234, 66, 54, 0.85)", Bu = "#ffffff", Vu = "kiosk", Hu = "setkiosk", Uu = "debug", Wu = "efp-debugMode", Gu = "pathway", Ku = 1e3, qu = "language", Ju = "efp-viewerMode", Yu = "___viewer_mode", Xu = "efp-previewMode", Zu = "___preview_mode", Qu = "efp-uiScale", $u = "___ui-scale", ed = "--expofp-font-face", td = "--expofp-booth-main-weight", nd = "--expofp-booth-details-weight", rd = "--expofp-exhibitor-main-weight", id = "--expofp-exhibitor-details-weight", ad = "--expofp-booth-special-weight", od = "efp-compass-permission-granted", sd = new URL(
/* @vite-ignore */
".",
import.meta.url
).href;
sd.endsWith("/") || (sd += "/");
var cd = sd, ld = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
(function() {
function e(e, t) {
document.addEventListener ? e.addEventListener("scroll", t, !1) : e.attachEvent("scroll", t);
}
function n(e) {
document.body ? e() : document.addEventListener ? document.addEventListener("DOMContentLoaded", function t() {
document.removeEventListener("DOMContentLoaded", t), e();
}) : document.attachEvent("onreadystatechange", function t() {
(document.readyState == "interactive" || document.readyState == "complete") && (document.detachEvent("onreadystatechange", t), e());
});
}
function r(e) {
this.g = document.createElement("div"), this.g.setAttribute("aria-hidden", "true"), this.g.appendChild(document.createTextNode(e)), this.h = document.createElement("span"), this.i = document.createElement("span"), this.m = document.createElement("span"), this.j = document.createElement("span"), this.l = -1, this.h.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.i.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.j.style.cssText = "max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;", this.m.style.cssText = "display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;", this.h.appendChild(this.m), this.i.appendChild(this.j), this.g.appendChild(this.h), this.g.appendChild(this.i);
}
function i(e, t) {
e.g.style.cssText = "max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:" + t + ";";
}
function a(e) {
var t = e.g.offsetWidth, n = t + 100;
return e.j.style.width = n + "px", e.i.scrollLeft = n, e.h.scrollLeft = e.h.scrollWidth + 100, e.l === t ? !1 : (e.l = t, !0);
}
function o(t, n) {
function r() {
var e = i;
a(e) && e.g.parentNode !== null && n(e.l);
}
var i = t;
e(t.h, r), e(t.i, r), a(t);
}
function s(e, t, n) {
t = t || {}, n = n || window, this.family = e, this.style = t.style || "normal", this.weight = t.weight || "normal", this.stretch = t.stretch || "normal", this.context = n;
}
var c = null, l = null, u = null, d = null;
function f(e) {
return l === null && (p(e) && /Apple/.test(window.navigator.vendor) ? (e = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent), l = !!e && 603 > parseInt(e[1], 10)) : l = !1), l;
}
function p(e) {
return d === null && (d = !!e.document.fonts), d;
}
function m(e, t) {
var n = e.style, r = e.weight;
if (u === null) {
var i = document.createElement("div");
try {
i.style.font = "condensed 100px sans-serif";
} catch {}
u = i.style.font !== "";
}
return [
n,
r,
u ? e.stretch : "",
"100px",
t
].join(" ");
}
s.prototype.load = function(e, t) {
var a = this, s = e || "BESbswy", l = 0, u = t || 3e3, d = (/* @__PURE__ */ new Date()).getTime();
return new Promise(function(e, t) {
if (p(a.context) && !f(a.context)) {
var h = new Promise(function(e, t) {
function n() {
(/* @__PURE__ */ new Date()).getTime() - d >= u ? t(Error("" + u + "ms timeout exceeded")) : a.context.document.fonts.load(m(a, "\"" + a.family + "\""), s).then(function(t) {
1 <= t.length ? e() : setTimeout(n, 25);
}, t);
}
n();
}), g = new Promise(function(e, t) {
l = setTimeout(function() {
t(Error("" + u + "ms timeout exceeded"));
}, u);
});
Promise.race([g, h]).then(function() {
clearTimeout(l), e(a);
}, t);
} else n(function() {
function n() {
var t;
(t = _ != -1 && v != -1 || _ != -1 && y != -1 || v != -1 && y != -1) && ((t = _ != v && _ != y && v != y) || (c === null && (t = /AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent), c = !!t && (536 > parseInt(t[1], 10) || parseInt(t[1], 10) === 536 && 11 >= parseInt(t[2], 10))), t = c && (_ == b && v == b && y == b || _ == x && v == x && y == x || _ == S && v == S && y == S)), t = !t), t && (C.parentNode !== null && C.parentNode.removeChild(C), clearTimeout(l), e(a));
}
function f() {
if ((/* @__PURE__ */ new Date()).getTime() - d >= u) C.parentNode !== null && C.parentNode.removeChild(C), t(Error("" + u + "ms timeout exceeded"));
else {
var e = a.context.document.hidden;
(!0 === e || e === void 0) && (_ = p.g.offsetWidth, v = h.g.offsetWidth, y = g.g.offsetWidth, n()), l = setTimeout(f, 50);
}
}
var p = new r(s), h = new r(s), g = new r(s), _ = -1, v = -1, y = -1, b = -1, x = -1, S = -1, C = document.createElement("div");
C.dir = "ltr", i(p, m(a, "sans-serif")), i(h, m(a, "serif")), i(g, m(a, "monospace")), C.appendChild(p.g), C.appendChild(h.g), C.appendChild(g.g), a.context.document.body.appendChild(C), b = p.g.offsetWidth, x = h.g.offsetWidth, S = g.g.offsetWidth, f(), o(p, function(e) {
_ = e, n();
}), i(p, m(a, "\"" + a.family + "\",sans-serif")), o(h, function(e) {
v = e, n();
}), i(h, m(a, "\"" + a.family + "\",serif")), o(g, function(e) {
y = e, n();
}), i(g, m(a, "\"" + a.family + "\",monospace"));
});
});
}, typeof t == "object" ? t.exports = s : (window.FontFaceObserver = s, window.FontFaceObserver.prototype.load = s.prototype.load);
})();
})))(), 1), ud = /* @__PURE__ */ e(r(), 1), dd = window.navigator.userAgent, fd = ud.default.getParser(dd);
//#endregion
//#region src/tools/loaders.ts
async function pd(e) {
return await (await fetch(e, { credentials: "same-origin" })).json();
}
function md(e, t) {
let n = document.createElement("link");
n.rel = "stylesheet", n.href = e, n.setAttribute("fetchpriority", "high"), t.appendChild(n);
}
async function hd(e, t, n) {
var r;
n = {
style: "normal",
weight: "normal",
...n || {}
};
let i = `url("${t}")`;
if (!window.FontFace) return e.startsWith("Font Awesome") || gd(e, i, n), Promise.resolve();
e.indexOf(" ") !== -1 && ((r = fd.getEngine()) == null ? void 0 : r.name) === "Gecko" && (e = `'${e}'`);
let a;
try {
a = new FontFace(e, i, n);
} catch {
a = new FontFace(`'${e}'`, i, n);
}
return document.fonts.add(a), a.load();
}
function gd(e, t, n) {
let r = document.createElement("style");
r.appendChild(document.createTextNode(`@font-face { font-family: ${e}; font-weight: ${n.weight}; font-style: ${n.style}; src: ${t} format('woff2'); font-display: swap; }`)), document.head.appendChild(r);
let i = document.createElement("div");
i.setAttribute("style", `font-family: oswald; font-weight: ${n.weight}; position: fixed; left: -1000px; top: 0; visibility: hidden`), i.innerHTML = "Oswald", document.body.appendChild(i);
}
async function _d(e) {
var t;
let n = getComputedStyle(document.documentElement).getPropertyValue("--expofp-font-face") || ((t = e.match(/--expofp-font-face:\s*([^;]*)/)) == null ? void 0 : t[1]);
if (!n) return;
let r = n.replace(/"/g, "").split(", ").map((e) => e.trim()).map((e) => new ld.default(e).load());
return Promise.allSettled(r);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/typeof.js
function U(e) {
"@babel/helpers - typeof";
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
return typeof e;
} : function(e) {
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
}, U(e);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function vd(e, t) {
if (U(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t || "default");
if (U(r) != "object") return r;
throw TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function yd(e) {
var t = vd(e, "string");
return U(t) == "symbol" ? t : t + "";
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/defineProperty.js
function bd(e, t, n) {
return (t = yd(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectSpread.js
function W(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : Object(arguments[t]), r = Object.keys(n);
typeof Object.getOwnPropertySymbols == "function" && r.push.apply(r, Object.getOwnPropertySymbols(n).filter(function(e) {
return Object.getOwnPropertyDescriptor(n, e).enumerable;
})), r.forEach(function(t) {
bd(e, t, n[t]);
});
}
return e;
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
function xd(e, t) {
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/createClass.js
function Sd(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, yd(r.key), r);
}
}
function Cd(e, t, n) {
return t && Sd(e.prototype, t), n && Sd(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function wd(e) {
if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
function Td(e, t) {
if (t && (U(t) == "object" || typeof t == "function")) return t;
if (t !== void 0) throw TypeError("Derived constructors may only return object or undefined");
return wd(e);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function Ed(e) {
return Ed = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
return e.__proto__ || Object.getPrototypeOf(e);
}, Ed(e);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function Dd(e, t) {
return Dd = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
return e.__proto__ = t, e;
}, Dd(e, t);
}
//#endregion
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inherits.js
function Od(e, t) {
if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function");
e.prototype = Object.create(t && t.prototype, { constructor: {
value: e,
writable: !0,
configurable: !0
} }), Object.defineProperty(e, "prototype", { writable: !1 }), t && Dd(e, t);
}
//#endregion
//#region ../../node_modules/.pnpm/i18next@19.9.2/node_modules/i18next/dist/esm/i18next.js
var kd = {
type: "logger",
log: function(e) {
this.output("log", e);
},
warn: function(e) {
this.output("warn", e);
},
error: function(e) {
this.output("error", e);
},
output: function(e, t) {
console && console[e] && console[e].apply(console, t);
}
}, Ad = new (function() {
function e(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
xd(this, e), this.init(t, n);
}
return Cd(e, [
{
key: "init",
value: function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
this.prefix = t.prefix || "i18next:", this.logger = e || kd, this.options = t, this.debug = t.debug;
}
},
{
key: "setDebug",
value: function(e) {
this.debug = e;
}
},
{
key: "log",
value: function() {
var e = [...arguments];
return this.forward(e, "log", "", !0);
}
},
{
key: "warn",
value: function() {
var e = [...arguments];
return this.forward(e, "warn", "", !0);
}
},
{
key: "error",
value: function() {
var e = [...arguments];
return this.forward(e, "error", "");
}
},
{
key: "deprecate",
value: function() {
var e = [...arguments];
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
}
},
{
key: "forward",
value: function(e, t, n, r) {
return r && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
}
},
{
key: "create",
value: function(t) {
return new e(this.logger, W({}, { prefix: `${this.prefix}:${t}:` }, this.options));
}
}
]), e;
}())(), jd = function() {
function e() {
xd(this, e), this.observers = {};
}
return Cd(e, [
{
key: "on",
value: function(e, t) {
var n = this;
return e.split(" ").forEach(function(e) {
n.observers[e] = n.observers[e] || [], n.observers[e].push(t);
}), this;
}
},
{
key: "off",
value: function(e, t) {
if (this.observers[e]) {
if (!t) {
delete this.observers[e];
return;
}
this.observers[e] = this.observers[e].filter(function(e) {
return e !== t;
});
}
}
},
{
key: "emit",
value: function(e) {
var t = [...arguments].slice(1);
this.observers[e] && [].concat(this.observers[e]).forEach(function(e) {
e.apply(void 0, t);
}), this.observers["*"] && [].concat(this.observers["*"]).forEach(function(n) {
n.apply(n, [e].concat(t));
});
}
}
]), e;
}();
function Md() {
var e, t, n = new Promise(function(n, r) {
e = n, t = r;
});
return n.resolve = e, n.reject = t, n;
}
function Nd(e) {
return e == null ? "" : "" + e;
}
function Pd(e, t, n) {
e.forEach(function(e) {
t[e] && (n[e] = t[e]);
});
}
function Fd(e, t, n) {
function r(e) {
return e && e.indexOf("###") > -1 ? e.replace(/###/g, ".") : e;
}
function i() {
return !e || typeof e == "string";
}
for (var a = typeof t == "string" ? t.split(".") : [].concat(t); a.length > 1;) {
if (i()) return {};
var o = r(a.shift());
!e[o] && n && (e[o] = new n()), e = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : {};
}
return i() ? {} : {
obj: e,
k: r(a.shift())
};
}
function Id(e, t, n) {
var r = Fd(e, t, Object), i = r.obj, a = r.k;
i[a] = n;
}
function Ld(e, t, n, r) {
var i = Fd(e, t, Object), a = i.obj, o = i.k;
a[o] = a[o] || [], r && (a[o] = a[o].concat(n)), r || a[o].push(n);
}
function Rd(e, t) {
var n = Fd(e, t), r = n.obj, i = n.k;
if (r) return r[i];
}
function zd(e, t, n) {
var r = Rd(e, n);
return r === void 0 ? Rd(t, n) : r;
}
function Bd(e, t, n) {
for (var r in t) r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : Bd(e[r], t[r], n) : e[r] = t[r]);
return e;
}
function Vd(e) {
return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
var Hd = {
"&": "&",
"<": "<",
">": ">",
"\"": """,
"'": "'",
"/": "/"
};
function Ud(e) {
return typeof e == "string" ? e.replace(/[&<>"'\/]/g, function(e) {
return Hd[e];
}) : e;
}
var Wd = typeof window < "u" && window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, Gd = function(e) {
Od(t, e);
function t(e) {
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
ns: ["translation"],
defaultNS: "translation"
};
return xd(this, t), n = Td(this, Ed(t).call(this)), Wd && jd.call(wd(n)), n.data = e || {}, n.options = r, n.options.keySeparator === void 0 && (n.options.keySeparator = "."), n;
}
return Cd(t, [
{
key: "addNamespaces",
value: function(e) {
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
}
},
{
key: "removeNamespaces",
value: function(e) {
var t = this.options.ns.indexOf(e);
t > -1 && this.options.ns.splice(t, 1);
}
},
{
key: "getResource",
value: function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = [e, t];
return n && typeof n != "string" && (a = a.concat(n)), n && typeof n == "string" && (a = a.concat(i ? n.split(i) : n)), e.indexOf(".") > -1 && (a = e.split(".")), Rd(this.data, a);
}
},
{
key: "addResource",
value: function(e, t, n, r) {
var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }, a = this.options.keySeparator;
a === void 0 && (a = ".");
var o = [e, t];
n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), Id(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
}
},
{
key: "addResources",
value: function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 };
for (var i in n) (typeof n[i] == "string" || Object.prototype.toString.apply(n[i]) === "[object Array]") && this.addResource(e, t, i, n[i], { silent: !0 });
r.silent || this.emit("added", e, t, n);
}
},
{
key: "addResourceBundle",
value: function(e, t, n, r, i) {
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1 }, o = [e, t];
e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
var s = Rd(this.data, o) || {};
r ? Bd(s, n, i) : s = W({}, s, n), Id(this.data, o, s), a.silent || this.emit("added", e, t, n);
}
},
{
key: "removeResourceBundle",
value: function(e, t) {
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
}
},
{
key: "hasResourceBundle",
value: function(e, t) {
return this.getResource(e, t) !== void 0;
}
},
{
key: "getResourceBundle",
value: function(e, t) {
return t || (t = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? W({}, {}, this.getResource(e, t)) : this.getResource(e, t);
}
},
{
key: "getDataByLanguage",
value: function(e) {
return this.data[e];
}
},
{
key: "toJSON",
value: function() {
return this.data;
}
}
]), t;
}(jd), Kd = {
processors: {},
addPostProcessor: function(e) {
this.processors[e.name] = e;
},
handle: function(e, t, n, r, i) {
var a = this;
return e.forEach(function(e) {
a.processors[e] && (t = a.processors[e].process(t, n, r, i));
}), t;
}
}, qd = {}, Jd = function(e) {
Od(t, e);
function t(e) {
var n, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
return xd(this, t), n = Td(this, Ed(t).call(this)), Wd && jd.call(wd(n)), Pd([
"resourceStore",
"languageUtils",
"pluralResolver",
"interpolator",
"backendConnector",
"i18nFormat",
"utils"
], e, wd(n)), n.options = r, n.options.keySeparator === void 0 && (n.options.keySeparator = "."), n.logger = Ad.create("translator"), n;
}
return Cd(t, [
{
key: "changeLanguage",
value: function(e) {
e && (this.language = e);
}
},
{
key: "exists",
value: function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }, n = this.resolve(e, t);
return n && n.res !== void 0;
}
},
{
key: "extractFromKey",
value: function(e, t) {
var n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
n === void 0 && (n = ":");
var r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS;
if (n && e.indexOf(n) > -1) {
var a = e.match(this.interpolator.nestingRegexp);
if (a && a.length > 0) return {
key: e,
namespaces: i
};
var o = e.split(n);
(n !== r || n === r && this.options.ns.indexOf(o[0]) > -1) && (i = o.shift()), e = o.join(r);
}
return typeof i == "string" && (i = [i]), {
key: e,
namespaces: i
};
}
},
{
key: "translate",
value: function(e, n, r) {
var i = this;
if (U(n) !== "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), n || (n = {}), e == null) return "";
Array.isArray(e) || (e = [String(e)]);
var a = n.keySeparator === void 0 ? this.options.keySeparator : n.keySeparator, o = this.extractFromKey(e[e.length - 1], n), s = o.key, c = o.namespaces, l = c[c.length - 1], u = n.lng || this.language, d = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
if (u && u.toLowerCase() === "cimode") return d ? l + (n.nsSeparator || this.options.nsSeparator) + s : s;
var f = this.resolve(e, n), p = f && f.res, m = f && f.usedKey || s, h = f && f.exactUsedKey || s, g = Object.prototype.toString.apply(p), _ = [
"[object Number]",
"[object Function]",
"[object RegExp]"
], v = n.joinArrays === void 0 ? this.options.joinArrays : n.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject;
if (y && p && typeof p != "string" && typeof p != "boolean" && typeof p != "number" && _.indexOf(g) < 0 && !(typeof v == "string" && g === "[object Array]")) {
if (!n.returnObjects && !this.options.returnObjects) return this.logger.warn("accessing an object - but returnObjects options is not enabled!"), this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, p, n) : `key '${s} (${this.language})' returned an object instead of string.`;
if (a) {
var b = g === "[object Array]", x = b ? [] : {}, S = b ? h : m;
for (var C in p) if (Object.prototype.hasOwnProperty.call(p, C)) {
var ee = `${S}${a}${C}`;
x[C] = this.translate(ee, W({}, n, {
joinArrays: !1,
ns: c
})), x[C] === ee && (x[C] = p[C]);
}
p = x;
}
} else if (y && typeof v == "string" && g === "[object Array]") p = p.join(v), p && (p = this.extendTranslation(p, e, n, r));
else {
var te = !1, ne = !1, re = n.count !== void 0 && typeof n.count != "string", ie = t.hasDefaultValue(n), ae = re ? this.pluralResolver.getSuffix(u, n.count) : "", oe = n[`defaultValue${ae}`] || n.defaultValue;
!this.isValidLookup(p) && ie && (te = !0, p = oe), this.isValidLookup(p) || (ne = !0, p = s);
var w = ie && oe !== p && this.options.updateMissing;
if (ne || te || w) {
if (this.logger.log(w ? "updateKey" : "missingKey", u, l, s, w ? oe : p), a) {
var T = this.resolve(s, W({}, n, { keySeparator: !1 }));
T && T.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
}
var E = [], se = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language);
if (this.options.saveMissingTo === "fallback" && se && se[0]) for (var ce = 0; ce < se.length; ce++) E.push(se[ce]);
else this.options.saveMissingTo === "all" ? E = this.languageUtils.toResolveHierarchy(n.lng || this.language) : E.push(n.lng || this.language);
var le = function(e, t, r) {
i.options.missingKeyHandler ? i.options.missingKeyHandler(e, l, t, w ? r : p, w, n) : i.backendConnector && i.backendConnector.saveMissing && i.backendConnector.saveMissing(e, l, t, w ? r : p, w, n), i.emit("missingKey", e, l, t, p);
};
this.options.saveMissing && (this.options.saveMissingPlurals && re ? E.forEach(function(e) {
i.pluralResolver.getSuffixes(e).forEach(function(t) {
le([e], s + t, n[`defaultValue${t}`] || oe);
});
}) : le(E, s, oe));
}
p = this.extendTranslation(p, e, n, f, r), ne && p === s && this.options.appendNamespaceToMissingKey && (p = `${l}:${s}`), ne && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(p));
}
return p;
}
},
{
key: "extendTranslation",
value: function(e, t, n, r, i) {
var a = this;
if (this.i18nFormat && this.i18nFormat.parse) e = this.i18nFormat.parse(e, n, r.usedLng, r.usedNS, r.usedKey, { resolved: r });
else if (!n.skipInterpolation) {
n.interpolation && this.interpolator.init(W({}, n, { interpolation: W({}, this.options.interpolation, n.interpolation) }));
var o = n.interpolation && n.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables, s;
if (o) {
var c = e.match(this.interpolator.nestingRegexp);
s = c && c.length;
}
var l = n.replace && typeof n.replace != "string" ? n.replace : n;
if (this.options.interpolation.defaultVariables && (l = W({}, this.options.interpolation.defaultVariables, l)), e = this.interpolator.interpolate(e, l, n.lng || this.language, n), o) {
var u = e.match(this.interpolator.nestingRegexp), d = u && u.length;
s < d && (n.nest = !1);
}
n.nest !== !1 && (e = this.interpolator.nest(e, function() {
var e = [...arguments];
return i && i[0] === e[0] && !n.context ? (a.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : a.translate.apply(a, e.concat([t]));
}, n)), n.interpolation && this.interpolator.reset();
}
var f = n.postProcess || this.options.postProcess, p = typeof f == "string" ? [f] : f;
return e != null && p && p.length && n.applyPostProcessor !== !1 && (e = Kd.handle(p, e, t, this.options && this.options.postProcessPassResolved ? W({ i18nResolved: r }, n) : n, this)), e;
}
},
{
key: "resolve",
value: function(e) {
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, a, o, s;
return typeof e == "string" && (e = [e]), e.forEach(function(e) {
if (!t.isValidLookup(r)) {
var c = t.extractFromKey(e, n), l = c.key;
i = l;
var u = c.namespaces;
t.options.fallbackNS && (u = u.concat(t.options.fallbackNS));
var d = n.count !== void 0 && typeof n.count != "string", f = n.context !== void 0 && typeof n.context == "string" && n.context !== "", p = n.lngs ? n.lngs : t.languageUtils.toResolveHierarchy(n.lng || t.language, n.fallbackLng);
u.forEach(function(e) {
t.isValidLookup(r) || (s = e, !qd[`${p[0]}-${e}`] && t.utils && t.utils.hasLoadedNamespace && !t.utils.hasLoadedNamespace(s) && (qd[`${p[0]}-${e}`] = !0, t.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach(function(i) {
if (!t.isValidLookup(r)) {
o = i;
var s = l, c = [s];
if (t.i18nFormat && t.i18nFormat.addLookupKeys) t.i18nFormat.addLookupKeys(c, l, i, e, n);
else {
var u;
d && (u = t.pluralResolver.getSuffix(i, n.count)), d && f && c.push(s + u), f && c.push(s += `${t.options.contextSeparator}${n.context}`), d && c.push(s += u);
}
for (var p; p = c.pop();) t.isValidLookup(r) || (a = p, r = t.getResource(i, e, p, n));
}
}));
});
}
}), {
res: r,
usedKey: i,
exactUsedKey: a,
usedLng: o,
usedNS: s
};
}
},
{
key: "isValidLookup",
value: function(e) {
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
}
},
{
key: "getResource",
value: function(e, t, n) {
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
}
}
], [{
key: "hasDefaultValue",
value: function(e) {
var t = "defaultValue";
for (var n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t === n.substring(0, t.length) && e[n] !== void 0) return !0;
return !1;
}
}]), t;
}(jd);
function Yd(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
var Xd = function() {
function e(t) {
xd(this, e), this.options = t, this.whitelist = this.options.supportedLngs || !1, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Ad.create("languageUtils");
}
return Cd(e, [
{
key: "getScriptPartFromCode",
value: function(e) {
if (!e || e.indexOf("-") < 0) return null;
var t = e.split("-");
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
}
},
{
key: "getLanguagePartFromCode",
value: function(e) {
if (!e || e.indexOf("-") < 0) return e;
var t = e.split("-");
return this.formatLanguageCode(t[0]);
}
},
{
key: "formatLanguageCode",
value: function(e) {
if (typeof e == "string" && e.indexOf("-") > -1) {
var t = [
"hans",
"hant",
"latn",
"cyrl",
"cans",
"mong",
"arab"
], n = e.split("-");
return this.options.lowerCaseLng ? n = n.map(function(e) {
return e.toLowerCase();
}) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Yd(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), t.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Yd(n[1].toLowerCase())), t.indexOf(n[2].toLowerCase()) > -1 && (n[2] = Yd(n[2].toLowerCase()))), n.join("-");
}
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
}
},
{
key: "isWhitelisted",
value: function(e) {
return this.logger.deprecate("languageUtils.isWhitelisted", "function \"isWhitelisted\" will be renamed to \"isSupportedCode\" in the next major - please make sure to rename it's usage asap."), this.isSupportedCode(e);
}
},
{
key: "isSupportedCode",
value: function(e) {
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
}
},
{
key: "getBestMatchFromCodes",
value: function(e) {
var t = this;
if (!e) return null;
var n;
return e.forEach(function(e) {
if (!n) {
var r = t.formatLanguageCode(e);
(!t.options.supportedLngs || t.isSupportedCode(r)) && (n = r);
}
}), !n && this.options.supportedLngs && e.forEach(function(e) {
if (!n) {
var r = t.getLanguagePartFromCode(e);
if (t.isSupportedCode(r)) return n = r;
n = t.options.supportedLngs.find(function(e) {
if (e.indexOf(r) === 0) return e;
});
}
}), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n;
}
},
{
key: "getFallbackCodes",
value: function(e, t) {
if (!e) return [];
if (typeof e == "function" && (e = e(t)), typeof e == "string" && (e = [e]), Object.prototype.toString.apply(e) === "[object Array]") return e;
if (!t) return e.default || [];
var n = e[t];
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
}
},
{
key: "toResolveHierarchy",
value: function(e, t) {
var n = this, r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], a = function(e) {
e && (n.isSupportedCode(e) ? i.push(e) : n.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
};
return typeof e == "string" && e.indexOf("-") > -1 ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : typeof e == "string" && a(this.formatLanguageCode(e)), r.forEach(function(e) {
i.indexOf(e) < 0 && a(n.formatLanguageCode(e));
}), i;
}
}
]), e;
}(), Zd = [
{
lngs: [
"ach",
"ak",
"am",
"arn",
"br",
"fil",
"gun",
"ln",
"mfe",
"mg",
"mi",
"oc",
"pt",
"pt-BR",
"tg",
"tl",
"ti",
"tr",
"uz",
"wa"
],
nr: [1, 2],
fc: 1
},
{
lngs: /* @__PURE__ */ "af.an.ast.az.bg.bn.ca.da.de.dev.el.en.eo.es.et.eu.fi.fo.fur.fy.gl.gu.ha.hi.hu.hy.ia.it.kn.ku.lb.mai.ml.mn.mr.nah.nap.nb.ne.nl.nn.no.nso.pa.pap.pms.ps.pt-PT.rm.sco.se.si.so.son.sq.sv.sw.ta.te.tk.ur.yo".split("."),
nr: [1, 2],
fc: 2
},
{
lngs: [
"ay",
"bo",
"cgg",
"fa",
"ht",
"id",
"ja",
"jbo",
"ka",
"kk",
"km",
"ko",
"ky",
"lo",
"ms",
"sah",
"su",
"th",
"tt",
"ug",
"vi",
"wo",
"zh"
],
nr: [1],
fc: 3
},
{
lngs: [
"be",
"bs",
"cnr",
"dz",
"hr",
"ru",
"sr",
"uk"
],
nr: [
1,
2,
5
],
fc: 4
},
{
lngs: ["ar"],
nr: [
0,
1,
2,
3,
11,
100
],
fc: 5
},
{
lngs: ["cs", "sk"],
nr: [
1,
2,
5
],
fc: 6
},
{
lngs: ["csb", "pl"],
nr: [
1,
2,
5
],
fc: 7
},
{
lngs: ["cy"],
nr: [
1,
2,
3,
8
],
fc: 8
},
{
lngs: ["fr"],
nr: [1, 2],
fc: 9
},
{
lngs: ["ga"],
nr: [
1,
2,
3,
7,
11
],
fc: 10
},
{
lngs: ["gd"],
nr: [
1,
2,
3,
20
],
fc: 11
},
{
lngs: ["is"],
nr: [1, 2],
fc: 12
},
{
lngs: ["jv"],
nr: [0, 1],
fc: 13
},
{
lngs: ["kw"],
nr: [
1,
2,
3,
4
],
fc: 14
},
{
lngs: ["lt"],
nr: [
1,
2,
10
],
fc: 15
},
{
lngs: ["lv"],
nr: [
1,
2,
0
],
fc: 16
},
{
lngs: ["mk"],
nr: [1, 2],
fc: 17
},
{
lngs: ["mnk"],
nr: [
0,
1,
2
],
fc: 18
},
{
lngs: ["mt"],
nr: [
1,
2,
11,
20
],
fc: 19
},
{
lngs: ["or"],
nr: [2, 1],
fc: 2
},
{
lngs: ["ro"],
nr: [
1,
2,
20
],
fc: 20
},
{
lngs: ["sl"],
nr: [
5,
1,
2,
3
],
fc: 21
},
{
lngs: ["he", "iw"],
nr: [
1,
2,
20,
21
],
fc: 22
}
], Qd = {
1: function(e) {
return Number(e > 1);
},
2: function(e) {
return Number(e != 1);
},
3: function(e) {
return 0;
},
4: function(e) {
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
},
5: function(e) {
return Number(e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5);
},
6: function(e) {
return Number(e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2);
},
7: function(e) {
return Number(e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
},
8: function(e) {
return Number(e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3);
},
9: function(e) {
return Number(e >= 2);
},
10: function(e) {
return Number(e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4);
},
11: function(e) {
return Number(e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3);
},
12: function(e) {
return Number(e % 10 != 1 || e % 100 == 11);
},
13: function(e) {
return Number(e !== 0);
},
14: function(e) {
return Number(e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3);
},
15: function(e) {
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2);
},
16: function(e) {
return Number(e % 10 == 1 && e % 100 != 11 ? 0 : e === 0 ? 2 : 1);
},
17: function(e) {
return Number(e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1);
},
18: function(e) {
return Number(e == 0 ? 0 : e == 1 ? 1 : 2);
},
19: function(e) {
return Number(e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3);
},
20: function(e) {
return Number(e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2);
},
21: function(e) {
return Number(e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0);
},
22: function(e) {
return Number(e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3);
}
};
function $d() {
var e = {};
return Zd.forEach(function(t) {
t.lngs.forEach(function(n) {
e[n] = {
numbers: t.nr,
plurals: Qd[t.fc]
};
});
}), e;
}
var ef = function() {
function e(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
xd(this, e), this.languageUtils = t, this.options = n, this.logger = Ad.create("pluralResolver"), this.rules = $d();
}
return Cd(e, [
{
key: "addRule",
value: function(e, t) {
this.rules[e] = t;
}
},
{
key: "getRule",
value: function(e) {
return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)];
}
},
{
key: "needsPlural",
value: function(e) {
var t = this.getRule(e);
return t && t.numbers.length > 1;
}
},
{
key: "getPluralFormsOfKey",
value: function(e, t) {
return this.getSuffixes(e).map(function(e) {
return t + e;
});
}
},
{
key: "getSuffixes",
value: function(e) {
var t = this, n = this.getRule(e);
return n ? n.numbers.map(function(n) {
return t.getSuffix(e, n);
}) : [];
}
},
{
key: "getSuffix",
value: function(e, t) {
var n = this, r = this.getRule(e);
if (r) {
var i = r.noAbs ? r.plurals(t) : r.plurals(Math.abs(t)), a = r.numbers[i];
this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 && (a === 2 ? a = "plural" : a === 1 && (a = ""));
var o = function() {
return n.options.prepend && a.toString() ? n.options.prepend + a.toString() : a.toString();
};
return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && r.numbers.length === 2 && r.numbers[0] === 1 ? o() : this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
}
return this.logger.warn(`no plural rule found for: ${e}`), "";
}
}
]), e;
}(), tf = function() {
function e() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
xd(this, e), this.logger = Ad.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || function(e) {
return e;
}, this.init(t);
}
return Cd(e, [
{
key: "init",
value: function() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
e.interpolation || (e.interpolation = { escapeValue: !0 });
var t = e.interpolation;
this.escape = t.escape === void 0 ? Ud : t.escape, this.escapeValue = t.escapeValue === void 0 || t.escapeValue, this.useRawValueToEscape = t.useRawValueToEscape !== void 0 && t.useRawValueToEscape, this.prefix = t.prefix ? Vd(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? Vd(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? Vd(t.nestingPrefix) : t.nestingPrefixEscaped || Vd("$t("), this.nestingSuffix = t.nestingSuffix ? Vd(t.nestingSuffix) : t.nestingSuffixEscaped || Vd(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = t.alwaysFormat !== void 0 && t.alwaysFormat, this.resetRegExp();
}
},
{
key: "reset",
value: function() {
this.options && this.init(this.options);
}
},
{
key: "resetRegExp",
value: function() {
var e = `${this.prefix}(.+?)${this.suffix}`;
this.regexp = new RegExp(e, "g");
var t = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
this.regexpUnescape = new RegExp(t, "g");
var n = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
this.nestingRegexp = new RegExp(n, "g");
}
},
{
key: "interpolate",
value: function(e, t, n, r) {
var i = this, a, o, s, c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
function l(e) {
return e.replace(/\$/g, "$$$$");
}
var u = function(e) {
if (e.indexOf(i.formatSeparator) < 0) {
var a = zd(t, c, e);
return i.alwaysFormat ? i.format(a, void 0, n) : a;
}
var o = e.split(i.formatSeparator), s = o.shift().trim(), l = o.join(i.formatSeparator).trim();
return i.format(zd(t, c, s), l, n, r);
};
this.resetRegExp();
var d = r && r.missingInterpolationHandler || this.options.missingInterpolationHandler, f = r && r.interpolation && r.interpolation.skipOnVariables || this.options.interpolation.skipOnVariables;
return [{
regex: this.regexpUnescape,
safeValue: function(e) {
return l(e);
}
}, {
regex: this.regexp,
safeValue: function(e) {
return i.escapeValue ? l(i.escape(e)) : l(e);
}
}].forEach(function(t) {
for (s = 0; a = t.regex.exec(e);) {
if (o = u(a[1].trim()), o === void 0) if (typeof d == "function") {
var n = d(e, a, r);
o = typeof n == "string" ? n : "";
} else if (f) {
o = a[0];
continue;
} else i.logger.warn(`missed to pass in variable ${a[1]} for interpolating ${e}`), o = "";
else typeof o != "string" && !i.useRawValueToEscape && (o = Nd(o));
if (e = e.replace(a[0], t.safeValue(o)), t.regex.lastIndex = 0, s++, s >= i.maxReplaces) break;
}
}), e;
}
},
{
key: "nest",
value: function(e, t) {
var n = this, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, a, o = W({}, r);
o.applyPostProcessor = !1, delete o.defaultValue;
function s(e, t) {
var n = this.nestingOptionsSeparator;
if (e.indexOf(n) < 0) return e;
var r = e.split(RegExp(`${n}[ ]*{`)), i = `{${r[1]}`;
e = r[0], i = this.interpolate(i, o), i = i.replace(/'/g, "\"");
try {
o = JSON.parse(i), t && (o = W({}, t, o));
} catch (t) {
return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
}
return delete o.defaultValue, e;
}
for (; i = this.nestingRegexp.exec(e);) {
var c = [], l = !1;
if (i[0].includes(this.formatSeparator) && !/{.*}/.test(i[1])) {
var u = i[1].split(this.formatSeparator).map(function(e) {
return e.trim();
});
i[1] = u.shift(), c = u, l = !0;
}
if (a = t(s.call(this, i[1].trim(), o), o), a && i[0] === e && typeof a != "string") return a;
typeof a != "string" && (a = Nd(a)), a || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), a = ""), l && (a = c.reduce(function(e, t) {
return n.format(e, t, r.lng, r);
}, a.trim())), e = e.replace(i[0], a), this.regexp.lastIndex = 0;
}
return e;
}
}
]), e;
}();
function nf(e, t) {
for (var n = e.indexOf(t); n !== -1;) e.splice(n, 1), n = e.indexOf(t);
}
var rf = function(e) {
Od(t, e);
function t(e, n, r) {
var i, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
return xd(this, t), i = Td(this, Ed(t).call(this)), Wd && jd.call(wd(i)), i.backend = e, i.store = n, i.services = r, i.languageUtils = r.languageUtils, i.options = a, i.logger = Ad.create("backendConnector"), i.state = {}, i.queue = [], i.backend && i.backend.init && i.backend.init(r, a.backend, a), i;
}
return Cd(t, [
{
key: "queueLoad",
value: function(e, t, n, r) {
var i = this, a = [], o = [], s = [], c = [];
return e.forEach(function(e) {
var r = !0;
t.forEach(function(t) {
var s = `${e}|${t}`;
!n.reload && i.store.hasResourceBundle(e, t) ? i.state[s] = 2 : i.state[s] < 0 || (i.state[s] === 1 ? o.indexOf(s) < 0 && o.push(s) : (i.state[s] = 1, r = !1, o.indexOf(s) < 0 && o.push(s), a.indexOf(s) < 0 && a.push(s), c.indexOf(t) < 0 && c.push(t)));
}), r || s.push(e);
}), (a.length || o.length) && this.queue.push({
pending: o,
loaded: {},
errors: [],
callback: r
}), {
toLoad: a,
pending: o,
toLoadLanguages: s,
toLoadNamespaces: c
};
}
},
{
key: "loaded",
value: function(e, t, n) {
var r = e.split("|"), i = r[0], a = r[1];
t && this.emit("failedLoading", i, a, t), n && this.store.addResourceBundle(i, a, n), this.state[e] = t ? -1 : 2;
var o = {};
this.queue.forEach(function(n) {
Ld(n.loaded, [i], a), nf(n.pending, e), t && n.errors.push(t), n.pending.length === 0 && !n.done && (Object.keys(n.loaded).forEach(function(e) {
o[e] || (o[e] = []), n.loaded[e].length && n.loaded[e].forEach(function(t) {
o[e].indexOf(t) < 0 && o[e].push(t);
});
}), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
}), this.emit("loaded", o), this.queue = this.queue.filter(function(e) {
return !e.done;
});
}
},
{
key: "read",
value: function(e, t, n) {
var r = this, i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 350, o = arguments.length > 5 ? arguments[5] : void 0;
return e.length ? this.backend[n](e, t, function(s, c) {
if (s && c && i < 5) {
setTimeout(function() {
r.read.call(r, e, t, n, i + 1, a * 2, o);
}, a);
return;
}
o(s, c);
}) : o(null, {});
}
},
{
key: "prepareLoading",
value: function(e, t) {
var n = this, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
typeof e == "string" && (e = this.languageUtils.toResolveHierarchy(e)), typeof t == "string" && (t = [t]);
var a = this.queueLoad(e, t, r, i);
if (!a.toLoad.length) return a.pending.length || i(), null;
a.toLoad.forEach(function(e) {
n.loadOne(e);
});
}
},
{
key: "load",
value: function(e, t, n) {
this.prepareLoading(e, t, {}, n);
}
},
{
key: "reload",
value: function(e, t, n) {
this.prepareLoading(e, t, { reload: !0 }, n);
}
},
{
key: "loadOne",
value: function(e) {
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", r = e.split("|"), i = r[0], a = r[1];
this.read(i, a, "read", void 0, void 0, function(r, o) {
r && t.logger.warn(`${n}loading namespace ${a} for language ${i} failed`, r), !r && o && t.logger.log(`${n}loaded namespace ${a} for language ${i}`, o), t.loaded(e, r, o);
});
}
},
{
key: "saveMissing",
value: function(e, t, n, r, i) {
var a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
return;
}
n == null || n === "" || (this.backend && this.backend.create && this.backend.create(e, t, n, r, null, W({}, a, { isUpdate: i })), !(!e || !e[0]) && this.store.addResource(e[0], t, n, r));
}
}
]), t;
}(jd);
function af() {
return {
debug: !1,
initImmediate: !0,
ns: ["translation"],
defaultNS: ["translation"],
fallbackLng: ["dev"],
fallbackNS: !1,
whitelist: !1,
nonExplicitWhitelist: !1,
supportedLngs: !1,
nonExplicitSupportedLngs: !1,
load: "all",
preload: !1,
simplifyPluralSuffix: !0,
keySeparator: ".",
nsSeparator: ":",
pluralSeparator: "_",
contextSeparator: "_",
partialBundledLanguages: !1,
saveMissing: !1,
updateMissing: !1,
saveMissingTo: "fallback",
saveMissingPlurals: !0,
missingKeyHandler: !1,
missingInterpolationHandler: !1,
postProcess: !1,
postProcessPassResolved: !1,
returnNull: !0,
returnEmptyString: !0,
returnObjects: !1,
joinArrays: !1,
returnedObjectHandler: !1,
parseMissingKeyHandler: !1,
appendNamespaceToMissingKey: !1,
appendNamespaceToCIMode: !1,
overloadTranslationOptionHandler: function(e) {
var t = {};
if (U(e[1]) === "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), U(e[2]) === "object" || U(e[3]) === "object") {
var n = e[3] || e[2];
Object.keys(n).forEach(function(e) {
t[e] = n[e];
});
}
return t;
},
interpolation: {
escapeValue: !0,
format: function(e, t, n, r) {
return e;
},
prefix: "{{",
suffix: "}}",
formatSeparator: ",",
unescapePrefix: "-",
nestingPrefix: "$t(",
nestingSuffix: ")",
nestingOptionsSeparator: ",",
maxReplaces: 1e3,
skipOnVariables: !1
}
};
}
function of(e) {
return typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.whitelist && (e.whitelist && e.whitelist.indexOf("cimode") < 0 && (e.whitelist = e.whitelist.concat(["cimode"])), e.supportedLngs = e.whitelist), e.nonExplicitWhitelist && (e.nonExplicitSupportedLngs = e.nonExplicitWhitelist), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e;
}
function sf() {}
var cf = new (function(e) {
Od(t, e);
function t() {
var e, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
if (xd(this, t), e = Td(this, Ed(t).call(this)), Wd && jd.call(wd(e)), e.options = of(n), e.services = {}, e.logger = Ad, e.modules = { external: [] }, r && !e.isInitialized && !n.isClone) {
if (!e.options.initImmediate) return e.init(n, r), Td(e, wd(e));
setTimeout(function() {
e.init(n, r);
}, 0);
}
return e;
}
return Cd(t, [
{
key: "init",
value: function() {
var e = this, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
typeof t == "function" && (n = t, t = {}), t.whitelist && !t.supportedLngs && this.logger.deprecate("whitelist", "option \"whitelist\" will be renamed to \"supportedLngs\" in the next major - please make sure to rename this option asap."), t.nonExplicitWhitelist && !t.nonExplicitSupportedLngs && this.logger.deprecate("whitelist", "options \"nonExplicitWhitelist\" will be renamed to \"nonExplicitSupportedLngs\" in the next major - please make sure to rename this option asap."), this.options = W({}, af(), this.options, of(t)), this.format = this.options.interpolation.format, n || (n = sf);
function r(e) {
return e ? typeof e == "function" ? new e() : e : null;
}
if (!this.options.isClone) {
this.modules.logger ? Ad.init(r(this.modules.logger), this.options) : Ad.init(null, this.options);
var i = new Xd(this.options);
this.store = new Gd(this.options.resources, this.options);
var a = this.services;
a.logger = Ad, a.resourceStore = this.store, a.languageUtils = i, a.pluralResolver = new ef(i, {
prepend: this.options.pluralSeparator,
compatibilityJSON: this.options.compatibilityJSON,
simplifyPluralSuffix: this.options.simplifyPluralSuffix
}), a.interpolator = new tf(this.options), a.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, a.backendConnector = new rf(r(this.modules.backend), a.resourceStore, a, this.options), a.backendConnector.on("*", function(t) {
var n = [...arguments].slice(1);
e.emit.apply(e, [t].concat(n));
}), this.modules.languageDetector && (a.languageDetector = r(this.modules.languageDetector), a.languageDetector.init(a, this.options.detection, this.options)), this.modules.i18nFormat && (a.i18nFormat = r(this.modules.i18nFormat), a.i18nFormat.init && a.i18nFormat.init(this)), this.translator = new Jd(this.services, this.options), this.translator.on("*", function(t) {
var n = [...arguments].slice(1);
e.emit.apply(e, [t].concat(n));
}), this.modules.external.forEach(function(t) {
t.init && t.init(e);
});
}
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
var o = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
o.length > 0 && o[0] !== "dev" && (this.options.lng = o[0]);
}
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
"getResource",
"hasResourceBundle",
"getResourceBundle",
"getDataByLanguage"
].forEach(function(t) {
e[t] = function() {
var n;
return (n = e.store)[t].apply(n, arguments);
};
}), [
"addResource",
"addResources",
"addResourceBundle",
"removeResourceBundle"
].forEach(function(t) {
e[t] = function() {
var n;
return (n = e.store)[t].apply(n, arguments), e;
};
});
var s = Md(), c = function() {
var t = function(t, r) {
e.isInitialized && e.logger.warn("init: i18next is already initialized. You should call init just once!"), e.isInitialized = !0, e.options.isClone || e.logger.log("initialized", e.options), e.emit("initialized", e.options), s.resolve(r), n(t, r);
};
if (e.languages && e.options.compatibilityAPI !== "v1" && !e.isInitialized) return t(null, e.t.bind(e));
e.changeLanguage(e.options.lng, t);
};
return this.options.resources || !this.options.initImmediate ? c() : setTimeout(c, 0), s;
}
},
{
key: "loadResources",
value: function(e) {
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : sf, r = typeof e == "string" ? e : this.language;
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
if (r && r.toLowerCase() === "cimode") return n();
var i = [], a = function(e) {
e && t.services.languageUtils.toResolveHierarchy(e).forEach(function(e) {
i.indexOf(e) < 0 && i.push(e);
});
};
r ? a(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e) {
return a(e);
}), this.options.preload && this.options.preload.forEach(function(e) {
return a(e);
}), this.services.backendConnector.load(i, this.options.ns, n);
} else n(null);
}
},
{
key: "reloadResources",
value: function(e, t, n) {
var r = Md();
return e || (e = this.languages), t || (t = this.options.ns), n || (n = sf), this.services.backendConnector.reload(e, t, function(e) {
r.resolve(), n(e);
}), r;
}
},
{
key: "use",
value: function(e) {
if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Kd.addPostProcessor(e), e.type === "3rdParty" && this.modules.external.push(e), this;
}
},
{
key: "changeLanguage",
value: function(e, t) {
var n = this;
this.isLanguageChangingTo = e;
var r = Md();
this.emit("languageChanging", e);
var i = function(e, i) {
i ? (n.language = i, n.languages = n.services.languageUtils.toResolveHierarchy(i), n.translator.changeLanguage(i), n.isLanguageChangingTo = void 0, n.emit("languageChanged", i), n.logger.log("languageChanged", i)) : n.isLanguageChangingTo = void 0, r.resolve(function() {
return n.t.apply(n, arguments);
}), t && t(e, function() {
return n.t.apply(n, arguments);
});
}, a = function(e) {
var t = typeof e == "string" ? e : n.services.languageUtils.getBestMatchFromCodes(e);
t && (n.language || (n.language = t, n.languages = n.services.languageUtils.toResolveHierarchy(t)), n.translator.language || n.translator.changeLanguage(t), n.services.languageDetector && n.services.languageDetector.cacheUserLanguage(t)), n.loadResources(t, function(e) {
i(e, t);
});
};
return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect(a) : a(e), r;
}
},
{
key: "getFixedT",
value: function(e, t) {
var n = this, r = function e(t, r) {
var i;
if (U(r) !== "object") {
var a = [...arguments].slice(2);
i = n.options.overloadTranslationOptionHandler([t, r].concat(a));
} else i = W({}, r);
return i.lng = i.lng || e.lng, i.lngs = i.lngs || e.lngs, i.ns = i.ns || e.ns, n.t(t, i);
};
return typeof e == "string" ? r.lng = e : r.lngs = e, r.ns = t, r;
}
},
{
key: "t",
value: function() {
var e;
return this.translator && (e = this.translator).translate.apply(e, arguments);
}
},
{
key: "exists",
value: function() {
var e;
return this.translator && (e = this.translator).exists.apply(e, arguments);
}
},
{
key: "setDefaultNamespace",
value: function(e) {
this.options.defaultNS = e;
}
},
{
key: "hasLoadedNamespace",
value: function(e) {
var t = this, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
var r = this.languages[0], i = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
if (r.toLowerCase() === "cimode") return !0;
var o = function(e, n) {
var r = t.services.backendConnector.state[`${e}|${n}`];
return r === -1 || r === 2;
};
if (n.precheck) {
var s = n.precheck(this, o);
if (s !== void 0) return s;
}
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || o(r, e) && (!i || o(a, e)));
}
},
{
key: "loadNamespaces",
value: function(e, t) {
var n = this, r = Md();
return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach(function(e) {
n.options.ns.indexOf(e) < 0 && n.options.ns.push(e);
}), this.loadResources(function(e) {
r.resolve(), t && t(e);
}), r) : (t && t(), Promise.resolve());
}
},
{
key: "loadLanguages",
value: function(e, t) {
var n = Md();
typeof e == "string" && (e = [e]);
var r = this.options.preload || [], i = e.filter(function(e) {
return r.indexOf(e) < 0;
});
return i.length ? (this.options.preload = r.concat(i), this.loadResources(function(e) {
n.resolve(), t && t(e);
}), n) : (t && t(), Promise.resolve());
}
},
{
key: "dir",
value: function(e) {
return e || (e = this.languages && this.languages.length > 0 ? this.languages[0] : this.language), e ? (/* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam".split(".")).indexOf(this.services.languageUtils.getLanguagePartFromCode(e)) >= 0 ? "rtl" : "ltr" : "rtl";
}
},
{
key: "createInstance",
value: function() {
return new t(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, arguments.length > 1 ? arguments[1] : void 0);
}
},
{
key: "cloneInstance",
value: function() {
var e = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : sf, i = W({}, this.options, n, { isClone: !0 }), a = new t(i);
return [
"store",
"services",
"language"
].forEach(function(t) {
a[t] = e[t];
}), a.services = W({}, this.services), a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a.translator = new Jd(a.services, a.options), a.translator.on("*", function(e) {
var t = [...arguments].slice(1);
a.emit.apply(a, [e].concat(t));
}), a.init(i, r), a.translator.options = a.options, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
}
}
]), t;
}(jd))(), lf = "An invariant failed, however the error is obfuscated because this is a production build.", uf = [];
Object.freeze(uf);
var df = {};
Object.freeze(df);
function G() {
return ++X.mobxGuid;
}
function K(e) {
throw ff(!1, e), "X";
}
function ff(e, t) {
if (!e) throw Error("[mobx] " + (t || lf));
}
function pf(e) {
var t = !1;
return function() {
if (!t) return t = !0, e.apply(this, arguments);
};
}
var mf = function() {};
function hf(e) {
var t = [];
return e.forEach(function(e) {
t.indexOf(e) === -1 && t.push(e);
}), t;
}
function gf(e) {
return typeof e == "object" && !!e;
}
function _f(e) {
if (typeof e != "object" || !e) return !1;
var t = Object.getPrototypeOf(e);
return t === Object.prototype || t === null;
}
function vf(e) {
if (Cf(e) || ph(e)) return e;
if (Array.isArray(e)) return new Map(e);
if (_f(e)) {
var t = /* @__PURE__ */ new Map();
for (var n in e) t.set(n, e[n]);
return t;
} else return K("Cannot convert to map from '" + e + "'");
}
function yf(e, t, n) {
Object.defineProperty(e, t, {
enumerable: !1,
writable: !0,
configurable: !0,
value: n
});
}
function bf(e, t, n) {
Object.defineProperty(e, t, {
enumerable: !1,
writable: !1,
configurable: !0,
value: n
});
}
function xf(e, t) {
var n = Object.getOwnPropertyDescriptor(e, t);
return !n || n.configurable !== !1 && n.writable !== !1;
}
function Sf(e, t) {
var n = "isMobX" + e;
return t.prototype[n] = !0, function(e) {
return gf(e) && e[n] === !0;
};
}
function Cf(e) {
return e instanceof Map;
}
function wf(e) {
return e instanceof Set;
}
function Tf(e) {
var t = /* @__PURE__ */ new Set();
for (var n in e) t.add(n);
return Object.getOwnPropertySymbols(e).forEach(function(n) {
Object.getOwnPropertyDescriptor(e, n).enumerable && t.add(n);
}), Array.from(t);
}
function Ef(e) {
return e && e.toString ? e.toString() : new String(e).toString();
}
function Df(e) {
return e === null ? null : typeof e == "object" ? "" + e : e;
}
var Of = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols ? function(e) {
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
} : /* istanbul ignore next */ Object.getOwnPropertyNames, q = Symbol("mobx administration"), kf = function() {
function e(e) {
e === void 0 && (e = "Atom@" + G()), this.name = e, this.isPendingUnobservation = !1, this.isBeingObserved = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.lastAccessedBy = 0, this.lowestObserverState = Y.NOT_TRACKING;
}
return e.prototype.onBecomeObserved = function() {
this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) {
return e();
});
}, e.prototype.onBecomeUnobserved = function() {
this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) {
return e();
});
}, e.prototype.reportObserved = function() {
return Zp(this);
}, e.prototype.reportChanged = function() {
Z(), Qp(this), Q();
}, e.prototype.toString = function() {
return this.name;
}, e;
}(), Af = Sf("Atom", kf);
function jf(e, t, n) {
t === void 0 && (t = mf), n === void 0 && (n = mf);
var r = new kf(e);
return t !== mf && Cm(r, t), n !== mf && wm(r, n), r;
}
function Mf(e, t) {
return e === t;
}
function Nf(e, t) {
return jh(e, t);
}
function Pf(e, t) {
return jh(e, t, 1);
}
function Ff(e, t) {
return Object.is(e, t);
}
var If = {
identity: Mf,
structural: Nf,
default: Ff,
shallow: Pf
}, Lf = function(e, t) {
return Lf = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
}, Lf(e, t);
};
function Rf(e, t) {
Lf(e, t);
function n() {
this.constructor = e;
}
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
var zf = function() {
return zf = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
return e;
}, zf.apply(this, arguments);
};
function Bf(e) {
var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
return t ? t.call(e) : { next: function() {
return e && n >= e.length && (e = void 0), {
value: e && e[n++],
done: !e
};
} };
}
function Vf(e, t) {
var n = typeof Symbol == "function" && e[Symbol.iterator];
if (!n) return e;
var r = n.call(e), i, a = [], o;
try {
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
} catch (e) {
o = { error: e };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (o) throw o.error;
}
}
return a;
}
function Hf() {
for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Vf(arguments[t]));
return e;
}
var Uf = Symbol("mobx did run lazy initializers"), Wf = Symbol("mobx pending decorators"), Gf = {}, Kf = {};
function qf(e, t) {
var n = t ? Gf : Kf;
return n[e] || (n[e] = {
configurable: !0,
enumerable: t,
get: function() {
return Jf(this), this[e];
},
set: function(t) {
Jf(this), this[e] = t;
}
});
}
function Jf(e) {
var t, n;
if (e[Uf] !== !0) {
var r = e[Wf];
if (r) {
yf(e, Uf, !0);
var i = Hf(Object.getOwnPropertySymbols(r), Object.keys(r));
try {
for (var a = Bf(i), o = a.next(); !o.done; o = a.next()) {
var s = r[o.value];
s.propertyCreator(e, s.prop, s.descriptor, s.decoratorTarget, s.decoratorArguments);
}
} catch (e) {
t = { error: e };
} finally {
try {
o && !o.done && (n = a.return) && n.call(a);
} finally {
if (t) throw t.error;
}
}
}
}
}
function Yf(e, t) {
return function() {
var n, r = function(r, i, a, o) {
if (o === !0) return t(r, i, a, r, n), null;
if (!Object.prototype.hasOwnProperty.call(r, Wf)) {
var s = r[Wf];
yf(r, Wf, zf({}, s));
}
return r[Wf][i] = {
prop: i,
propertyCreator: t,
descriptor: a,
decoratorTarget: r,
decoratorArguments: n
}, qf(i, e);
};
return Xf(arguments) ? (n = uf, r.apply(null, arguments)) : (n = Array.prototype.slice.call(arguments), r);
};
}
function Xf(e) {
return (e.length === 2 || e.length === 3) && (typeof e[1] == "string" || typeof e[1] == "symbol") || e.length === 4 && e[3] === !0;
}
function Zf(e, t, n) {
return Pm(e) ? e : Array.isArray(e) ? J.array(e, { name: n }) : _f(e) ? J.object(e, void 0, { name: n }) : Cf(e) ? J.map(e, { name: n }) : wf(e) ? J.set(e, { name: n }) : e;
}
function Qf(e, t, n) {
return e == null || Eh(e) || lh(e) || ph(e) || _h(e) ? e : Array.isArray(e) ? J.array(e, {
name: n,
deep: !1
}) : _f(e) ? J.object(e, void 0, {
name: n,
deep: !1
}) : Cf(e) ? J.map(e, {
name: n,
deep: !1
}) : wf(e) ? J.set(e, {
name: n,
deep: !1
}) : K(!1);
}
function $f(e) {
return e;
}
function ep(e, t, n) {
return jh(e, t) ? t : e;
}
function tp(e) {
ff(e);
var t = Yf(!0, function(t, n, r, i, a) {
var o = r ? r.initializer ? r.initializer.call(t) : r.value : void 0;
yh(t).addObservableProp(n, o, e);
}), n = (typeof process < "u" && process.env, t);
return n.enhancer = e, n;
}
var np = {
deep: !0,
name: void 0,
defaultDecorator: void 0,
proxy: !0
};
Object.freeze(np);
function rp(e) {
return e == null ? np : typeof e == "string" ? {
name: e,
deep: !0,
proxy: !0
} : e;
}
var ip = tp(Zf), ap = tp(Qf), op = tp($f), sp = tp(ep);
function cp(e) {
return e.defaultDecorator ? e.defaultDecorator.enhancer : e.deep === !1 ? $f : Zf;
}
function lp(e, t, n) {
if (typeof arguments[1] == "string" || typeof arguments[1] == "symbol") return ip.apply(null, arguments);
if (Pm(e)) return e;
var r = _f(e) ? J.object(e, t, n) : Array.isArray(e) ? J.array(e, t) : Cf(e) ? J.map(e, t) : wf(e) ? J.set(e, t) : e;
if (r !== e) return r;
K(!1);
}
var up = {
box: function(e, t) {
arguments.length > 2 && dp("box");
var n = rp(t);
return new Rp(e, cp(n), n.name, !0, n.equals);
},
array: function(e, t) {
arguments.length > 2 && dp("array");
var n = rp(t);
return ah(e, cp(n), n.name);
},
map: function(e, t) {
arguments.length > 2 && dp("map");
var n = rp(t);
return new fh(e, cp(n), n.name);
},
set: function(e, t) {
arguments.length > 2 && dp("set");
var n = rp(t);
return new gh(e, cp(n), n.name);
},
object: function(e, t, n) {
typeof arguments[1] == "string" && dp("object");
var r = rp(n);
if (r.proxy === !1) return Dm({}, e, t, r);
var i = Om(r), a = Xm(Dm({}, void 0, void 0, r));
return km(a, e, t, i), a;
},
ref: op,
shallow: ap,
deep: ip,
struct: sp
}, J = lp;
Object.keys(up).forEach(function(e) {
return J[e] = up[e];
});
function dp(e) {
K("Expected one or two arguments to observable." + e + ". Did you accidentally try to use observable." + e + " as decorator?");
}
var fp = Yf(!1, function(e, t, n, r, i) {
var a = n.get, o = n.set, s = i[0] || {};
yh(e).addComputedProp(e, t, zf({
get: a,
set: o,
context: e
}, s));
}), pp = fp({ equals: If.structural }), mp = function(e, t, n) {
if (typeof t == "string" || typeof e == "object" && e && arguments.length === 1) return fp.apply(null, arguments);
var r = typeof t == "object" ? t : {};
return r.get = e, r.set = typeof t == "function" ? t : r.set, r.name = r.name || e.name || "", new Bp(r);
};
mp.struct = pp;
var Y;
(function(e) {
e[e.NOT_TRACKING = -1] = "NOT_TRACKING", e[e.UP_TO_DATE = 0] = "UP_TO_DATE", e[e.POSSIBLY_STALE = 1] = "POSSIBLY_STALE", e[e.STALE = 2] = "STALE";
})(Y || (Y = {}));
var hp;
(function(e) {
e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK";
})(hp || (hp = {}));
var gp = function() {
function e(e) {
this.cause = e;
}
return e;
}();
function _p(e) {
return e instanceof gp;
}
function vp(e) {
switch (e.dependenciesState) {
case Y.UP_TO_DATE: return !1;
case Y.NOT_TRACKING:
case Y.STALE: return !0;
case Y.POSSIBLY_STALE:
for (var t = Ep(!0), n = wp(), r = e.observing, i = r.length, a = 0; a < i; a++) {
var o = r[a];
if (Vp(o)) {
if (X.disableErrorBoundaries) o.get();
else try {
o.get();
} catch {
return Tp(n), Dp(t), !0;
}
if (e.dependenciesState === Y.STALE) return Tp(n), Dp(t), !0;
}
}
return Op(e), Tp(n), Dp(t), !1;
}
}
function yp(e) {
var t = e.observers.size > 0;
X.computationDepth > 0 && t && K(!1), !X.allowStateChanges && (t || X.enforceActions === "strict") && K(!1);
}
function bp(e, t, n) {
var r = Ep(!0);
Op(e), e.newObserving = Array(e.observing.length + 100), e.unboundDepsCount = 0, e.runId = ++X.runId;
var i = X.trackingDerivation;
X.trackingDerivation = e;
var a;
if (X.disableErrorBoundaries === !0) a = t.call(n);
else try {
a = t.call(n);
} catch (e) {
a = new gp(e);
}
return X.trackingDerivation = i, xp(e), Dp(r), a;
}
function xp(e) {
for (var t = e.observing, n = e.observing = e.newObserving, r = Y.UP_TO_DATE, i = 0, a = e.unboundDepsCount, o = 0; o < a; o++) {
var s = n[o];
s.diffValue === 0 && (s.diffValue = 1, i !== o && (n[i] = s), i++), s.dependenciesState > r && (r = s.dependenciesState);
}
for (n.length = i, e.newObserving = null, a = t.length; a--;) {
var s = t[a];
s.diffValue === 0 && Yp(s, e), s.diffValue = 0;
}
for (; i--;) {
var s = n[i];
s.diffValue === 1 && (s.diffValue = 0, Jp(s, e));
}
r !== Y.UP_TO_DATE && (e.dependenciesState = r, e.onBecomeStale());
}
function Sp(e) {
var t = e.observing;
e.observing = [];
for (var n = t.length; n--;) Yp(t[n], e);
e.dependenciesState = Y.NOT_TRACKING;
}
function Cp(e) {
var t = wp();
try {
return e();
} finally {
Tp(t);
}
}
function wp() {
var e = X.trackingDerivation;
return X.trackingDerivation = null, e;
}
function Tp(e) {
X.trackingDerivation = e;
}
function Ep(e) {
var t = X.allowStateReads;
return X.allowStateReads = e, t;
}
function Dp(e) {
X.allowStateReads = e;
}
function Op(e) {
if (e.dependenciesState !== Y.UP_TO_DATE) {
e.dependenciesState = Y.UP_TO_DATE;
for (var t = e.observing, n = t.length; n--;) t[n].lowestObserverState = Y.UP_TO_DATE;
}
}
var kp = 0, Ap = 1, jp = Object.getOwnPropertyDescriptor(function() {}, "name");
jp && jp.configurable;
function Mp(e, t, n) {
var r = function() {
return Np(e, t, n || this, arguments);
};
return r.isMobxAction = !0, r;
}
function Np(e, t, n, r) {
var i = Pp(e, n, r);
try {
return t.apply(n, r);
} catch (e) {
throw i.error = e, e;
} finally {
Fp(i);
}
}
function Pp(e, t, n) {
var r = $() && !!e, i = 0, a = wp();
Z();
var o = {
prevDerivation: a,
prevAllowStateChanges: Ip(!0),
prevAllowStateReads: Ep(!0),
notifySpy: r,
startTime: i,
actionId: Ap++,
parentActionId: kp
};
return kp = o.actionId, o;
}
function Fp(e) {
kp !== e.actionId && K("invalid action stack. did you forget to finish an action?"), kp = e.parentActionId, e.error !== void 0 && (X.suppressReactionErrors = !0), Lp(e.prevAllowStateChanges), Dp(e.prevAllowStateReads), Q(), Tp(e.prevDerivation), e.notifySpy, X.suppressReactionErrors = !1;
}
function Ip(e) {
var t = X.allowStateChanges;
return X.allowStateChanges = e, t;
}
function Lp(e) {
X.allowStateChanges = e;
}
var Rp = function(e) {
Rf(t, e);
function t(t, n, r, i, a) {
r === void 0 && (r = "ObservableValue@" + G()), i === void 0 && (i = !0), a === void 0 && (a = If.default);
var o = e.call(this, r) || this;
return o.enhancer = n, o.name = r, o.equals = a, o.hasUnreportedChange = !1, o.value = n(t, void 0, r), o;
}
return t.prototype.dehanceValue = function(e) {
return this.dehancer === void 0 ? e : this.dehancer(e);
}, t.prototype.set = function(e) {
this.value, e = this.prepareNewValue(e), e !== X.UNCHANGED && this.setNewValue(e);
}, t.prototype.prepareNewValue = function(e) {
if (yp(this), Zm(this)) {
var t = $m(this, {
object: this,
type: "update",
newValue: e
});
if (!t) return X.UNCHANGED;
e = t.newValue;
}
return e = this.enhancer(e, this.value, this.name), this.equals(this.value, e) ? X.UNCHANGED : e;
}, t.prototype.setNewValue = function(e) {
var t = this.value;
this.value = e, this.reportChanged(), eh(this) && nh(this, {
type: "update",
object: this,
newValue: e,
oldValue: t
});
}, t.prototype.get = function() {
return this.reportObserved(), this.dehanceValue(this.value);
}, t.prototype.intercept = function(e) {
return Qm(this, e);
}, t.prototype.observe = function(e, t) {
return t && e({
object: this,
type: "update",
newValue: this.value,
oldValue: void 0
}), th(this, e);
}, t.prototype.toJSON = function() {
return this.get();
}, t.prototype.toString = function() {
return this.name + "[" + this.value + "]";
}, t.prototype.valueOf = function() {
return Df(this.get());
}, t.prototype[Symbol.toPrimitive] = function() {
return this.valueOf();
}, t;
}(kf), zp = Sf("ObservableValue", Rp), Bp = function() {
function e(e) {
this.dependenciesState = Y.NOT_TRACKING, this.observing = [], this.newObserving = null, this.isBeingObserved = !1, this.isPendingUnobservation = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.runId = 0, this.lastAccessedBy = 0, this.lowestObserverState = Y.UP_TO_DATE, this.unboundDepsCount = 0, this.__mapid = "#" + G(), this.value = new gp(null), this.isComputing = !1, this.isRunningSetter = !1, this.isTracing = hp.NONE, ff(e.get, "missing option for computed: get"), this.derivation = e.get, this.name = e.name || "ComputedValue@" + G(), e.set && (this.setter = Mp(this.name + "-setter", e.set)), this.equals = e.equals || (e.compareStructural || e.struct ? If.structural : If.default), this.scope = e.context, this.requiresReaction = !!e.requiresReaction, this.keepAlive = !!e.keepAlive;
}
return e.prototype.onBecomeStale = function() {
em(this);
}, e.prototype.onBecomeObserved = function() {
this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) {
return e();
});
}, e.prototype.onBecomeUnobserved = function() {
this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) {
return e();
});
}, e.prototype.get = function() {
this.isComputing && K("Cycle detected in computation " + this.name + ": " + this.derivation), X.inBatch === 0 && this.observers.size === 0 && !this.keepAlive ? vp(this) && (this.warnAboutUntrackedRead(), Z(), this.value = this.computeValue(!1), Q()) : (Zp(this), vp(this) && this.trackAndCompute() && $p(this));
var e = this.value;
if (_p(e)) throw e.cause;
return e;
}, e.prototype.peek = function() {
var e = this.computeValue(!1);
if (_p(e)) throw e.cause;
return e;
}, e.prototype.set = function(e) {
if (this.setter) {
ff(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"), this.isRunningSetter = !0;
try {
this.setter.call(this.scope, e);
} finally {
this.isRunningSetter = !1;
}
} else ff(!1, !1);
}, e.prototype.trackAndCompute = function() {
var e = this.value, t = this.dependenciesState === Y.NOT_TRACKING, n = this.computeValue(!0), r = t || _p(e) || _p(n) || !this.equals(e, n);
return r && (this.value = n), r;
}, e.prototype.computeValue = function(e) {
this.isComputing = !0, X.computationDepth++;
var t;
if (e) t = bp(this, this.derivation, this.scope);
else if (X.disableErrorBoundaries === !0) t = this.derivation.call(this.scope);
else try {
t = this.derivation.call(this.scope);
} catch (e) {
t = new gp(e);
}
return X.computationDepth--, this.isComputing = !1, t;
}, e.prototype.suspend = function() {
this.keepAlive || (Sp(this), this.value = void 0);
}, e.prototype.observe = function(e, t) {
var n = this, r = !0, i = void 0;
return vm(function() {
var a = n.get();
if (!r || t) {
var o = wp();
e({
type: "update",
object: n,
newValue: a,
oldValue: i
}), Tp(o);
}
r = !1, i = a;
});
}, e.prototype.warnAboutUntrackedRead = function() {}, e.prototype.toJSON = function() {
return this.get();
}, e.prototype.toString = function() {
return this.name + "[" + this.derivation.toString() + "]";
}, e.prototype.valueOf = function() {
return Df(this.get());
}, e.prototype[Symbol.toPrimitive] = function() {
return this.valueOf();
}, e;
}(), Vp = Sf("ComputedValue", Bp), Hp = function() {
function e() {
this.version = 5, this.UNCHANGED = {}, this.trackingDerivation = null, this.computationDepth = 0, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0, this.allowStateReads = !0, this.enforceActions = !1, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.computedConfigurable = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1;
}
return e;
}(), Up = {};
function Wp() {
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Up;
}
var Gp = !0, Kp = !1, X = (function() {
var e = Wp();
return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Gp = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Hp().version && (Gp = !1), Gp ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = new Hp()) : (setTimeout(function() {
Kp || K("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`");
}, 1), new Hp());
})();
function qp() {
(X.pendingReactions.length || X.inBatch || X.isRunningReactions) && K("isolateGlobalState should be called before MobX is running any reactions"), Kp = !0, Gp && (--Wp().__mobxInstanceCount === 0 && (Wp().__mobxGlobals = void 0), X = new Hp());
}
function Jp(e, t) {
e.observers.add(t), e.lowestObserverState > t.dependenciesState && (e.lowestObserverState = t.dependenciesState);
}
function Yp(e, t) {
e.observers.delete(t), e.observers.size === 0 && Xp(e);
}
function Xp(e) {
e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, X.pendingUnobservations.push(e));
}
function Z() {
X.inBatch++;
}
function Q() {
if (--X.inBatch === 0) {
om();
for (var e = X.pendingUnobservations, t = 0; t < e.length; t++) {
var n = e[t];
n.isPendingUnobservation = !1, n.observers.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBecomeUnobserved()), n instanceof Bp && n.suspend());
}
X.pendingUnobservations = [];
}
}
function Zp(e) {
var t = X.trackingDerivation;
return t === null ? (e.observers.size === 0 && X.inBatch > 0 && Xp(e), !1) : (t.runId !== e.lastAccessedBy && (e.lastAccessedBy = t.runId, t.newObserving[t.unboundDepsCount++] = e, e.isBeingObserved || (e.isBeingObserved = !0, e.onBecomeObserved())), !0);
}
function Qp(e) {
e.lowestObserverState !== Y.STALE && (e.lowestObserverState = Y.STALE, e.observers.forEach(function(t) {
t.dependenciesState === Y.UP_TO_DATE && (t.isTracing !== hp.NONE && tm(t, e), t.onBecomeStale()), t.dependenciesState = Y.STALE;
}));
}
function $p(e) {
e.lowestObserverState !== Y.STALE && (e.lowestObserverState = Y.STALE, e.observers.forEach(function(t) {
t.dependenciesState === Y.POSSIBLY_STALE ? t.dependenciesState = Y.STALE : t.dependenciesState === Y.UP_TO_DATE && (e.lowestObserverState = Y.UP_TO_DATE);
}));
}
function em(e) {
e.lowestObserverState === Y.UP_TO_DATE && (e.lowestObserverState = Y.POSSIBLY_STALE, e.observers.forEach(function(t) {
t.dependenciesState === Y.UP_TO_DATE && (t.dependenciesState = Y.POSSIBLY_STALE, t.isTracing !== hp.NONE && tm(t, e), t.onBecomeStale());
}));
}
function tm(e, t) {
if (console.log("[mobx.trace] '" + e.name + "' is invalidated due to a change in: '" + t.name + "'"), e.isTracing === hp.BREAK) {
var n = [];
nm(Am(e), n, 1), Function("debugger;\n/*\nTracing '" + e.name + "'\n\nYou are entering this break point because derivation '" + e.name + "' is being traced and '" + t.name + "' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n" + (e instanceof Bp ? e.derivation.toString().replace(/[*]\//g, "/") : "") + "\n\nThe dependencies for this derivation are:\n\n" + n.join("\n") + "\n*/\n ")();
}
}
function nm(e, t, n) {
if (t.length >= 1e3) {
t.push("(and many more)");
return;
}
t.push("" + Array(n).join(" ") + e.name), e.dependencies && e.dependencies.forEach(function(e) {
return nm(e, t, n + 1);
});
}
var rm = function() {
function e(e, t, n, r) {
e === void 0 && (e = "Reaction@" + G()), r === void 0 && (r = !1), this.name = e, this.onInvalidate = t, this.errorHandler = n, this.requiresObservable = r, this.observing = [], this.newObserving = [], this.dependenciesState = Y.NOT_TRACKING, this.diffValue = 0, this.runId = 0, this.unboundDepsCount = 0, this.__mapid = "#" + G(), this.isDisposed = !1, this._isScheduled = !1, this._isTrackPending = !1, this._isRunning = !1, this.isTracing = hp.NONE;
}
return e.prototype.onBecomeStale = function() {
this.schedule();
}, e.prototype.schedule = function() {
this._isScheduled || (this._isScheduled = !0, X.pendingReactions.push(this), om());
}, e.prototype.isScheduled = function() {
return this._isScheduled;
}, e.prototype.runReaction = function() {
if (!this.isDisposed) {
if (Z(), this._isScheduled = !1, vp(this)) {
this._isTrackPending = !0;
try {
this.onInvalidate(), this._isTrackPending;
} catch (e) {
this.reportExceptionInDerivation(e);
}
}
Q();
}
}, e.prototype.track = function(e) {
if (!this.isDisposed) {
Z(), this._isRunning = !0;
var t = bp(this, e, void 0);
this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && Sp(this), _p(t) && this.reportExceptionInDerivation(t.cause), Q();
}
}, e.prototype.reportExceptionInDerivation = function(e) {
var t = this;
if (this.errorHandler) {
this.errorHandler(e, this);
return;
}
if (X.disableErrorBoundaries) throw e;
var n = "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'";
X.suppressReactionErrors ? console.warn("[mobx] (error in reaction '" + this.name + "' suppressed, fix error of causing action below)") : console.error(n, e), $() && (this.name, "" + e), X.globalReactionErrorHandlers.forEach(function(n) {
return n(e, t);
});
}, e.prototype.dispose = function() {
this.isDisposed || (this.isDisposed = !0, this._isRunning || (Z(), Sp(this), Q()));
}, e.prototype.getDisposer = function() {
var e = this.dispose.bind(this);
return e[q] = this, e;
}, e.prototype.toString = function() {
return "Reaction[" + this.name + "]";
}, e.prototype.trace = function(e) {
e === void 0 && (e = !1), Vm(this, e);
}, e;
}(), im = 100, am = function(e) {
return e();
};
function om() {
X.inBatch > 0 || X.isRunningReactions || am(sm);
}
function sm() {
X.isRunningReactions = !0;
for (var e = X.pendingReactions, t = 0; e.length > 0;) {
++t === im && (console.error("Reaction doesn't converge to a stable state after " + im + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0])), e.splice(0));
for (var n = e.splice(0), r = 0, i = n.length; r < i; r++) n[r].runReaction();
}
X.isRunningReactions = !1;
}
var cm = Sf("Reaction", rm);
function lm(e) {
var t = am;
am = function(n) {
return e(function() {
return t(n);
});
};
}
function $() {
return !1;
}
function um(e) {
return console.warn("[mobx.spy] Is a no-op in production builds"), function() {};
}
function dm() {
K(!1);
}
function fm(e) {
return function(t, n, r) {
if (r) {
if (r.value) return {
value: Mp(e, r.value),
enumerable: !1,
configurable: !0,
writable: !0
};
var i = r.initializer;
return {
enumerable: !1,
configurable: !0,
writable: !0,
initializer: function() {
return Mp(e, i.call(this));
}
};
}
return pm(e).apply(this, arguments);
};
}
function pm(e) {
return function(t, n, r) {
Object.defineProperty(t, n, {
configurable: !0,
enumerable: !1,
get: function() {},
set: function(t) {
yf(this, n, hm(e, t));
}
});
};
}
function mm(e, t, n, r) {
return r === !0 ? (_m(e, t, n.value), null) : n ? {
configurable: !0,
enumerable: !1,
get: function() {
return _m(this, t, n.value || n.initializer.call(this)), this[t];
},
set: dm
} : {
enumerable: !1,
configurable: !0,
set: function(e) {
_m(this, t, e);
},
get: function() {}
};
}
var hm = function(e, t, n, r) {
if (arguments.length === 1 && typeof e == "function") return Mp(e.name || "<unnamed action>", e);
if (arguments.length === 2 && typeof t == "function") return Mp(e, t);
if (arguments.length === 1 && typeof e == "string") return fm(e);
if (r === !0) yf(e, t, Mp(e.name || t, n.value, this));
else return fm(t).apply(null, arguments);
};
hm.bound = mm;
function gm(e, t) {
return Np(typeof e == "string" ? e : e.name || "<unnamed action>", typeof e == "function" ? e : t, this, void 0);
}
function _m(e, t, n) {
yf(e, t, Mp(t, n.bind(e)));
}
function vm(e, t) {
t === void 0 && (t = df);
var n = t && t.name || e.name || "Autorun@" + G(), r = !t.scheduler && !t.delay, i;
if (r) i = new rm(n, function() {
this.track(s);
}, t.onError, t.requiresObservable);
else {
var a = bm(t), o = !1;
i = new rm(n, function() {
o || (o = !0, a(function() {
o = !1, i.isDisposed || i.track(s);
}));
}, t.onError, t.requiresObservable);
}
function s() {
e(i);
}
return i.schedule(), i.getDisposer();
}
var ym = function(e) {
return e();
};
function bm(e) {
return e.scheduler ? e.scheduler : e.delay ? function(t) {
return setTimeout(t, e.delay);
} : ym;
}
function xm(e, t, n) {
n === void 0 && (n = df);
var r = n.name || "Reaction@" + G(), i = hm(r, n.onError ? Sm(n.onError, t) : t), a = !n.scheduler && !n.delay, o = bm(n), s = !0, c = !1, l, u = n.compareStructural ? If.structural : n.equals || If.default, d = new rm(r, function() {
s || a ? f() : c || (c = !0, o(f));
}, n.onError, n.requiresObservable);
function f() {
if (c = !1, !d.isDisposed) {
var t = !1;
d.track(function() {
var n = e(d);
t = s || !u(l, n), l = n;
}), s && n.fireImmediately && i(l, d), !s && t === !0 && i(l, d), s && (s = !1);
}
}
return d.schedule(), d.getDisposer();
}
function Sm(e, t) {
return function() {
try {
return t.apply(this, arguments);
} catch (t) {
e.call(this, t);
}
};
}
function Cm(e, t, n) {
return Tm("onBecomeObserved", e, t, n);
}
function wm(e, t, n) {
return Tm("onBecomeUnobserved", e, t, n);
}
function Tm(e, t, n, r) {
var i = typeof r == "function" ? Dh(t, n) : Dh(t), a = typeof r == "function" ? r : n, o = e + "Listeners";
return i[o] ? i[o].add(a) : i[o] = /* @__PURE__ */ new Set([a]), typeof i[e] == "function" ? function() {
var e = i[o];
e && (e.delete(a), e.size === 0 && delete i[o]);
} : K(!1);
}
function Em(e) {
var t = e.enforceActions, n = e.computedRequiresReaction, r = e.computedConfigurable, i = e.disableErrorBoundaries, a = e.reactionScheduler, o = e.reactionRequiresObservable, s = e.observableRequiresReaction;
if (e.isolateGlobalState === !0 && qp(), t !== void 0) {
var c = void 0;
switch (t) {
case !0:
case "observed":
c = !0;
break;
case !1:
case "never":
c = !1;
break;
case "strict":
case "always":
c = "strict";
break;
default: K("Invalid value for 'enforceActions': '" + t + "', expected 'never', 'always' or 'observed'");
}
X.enforceActions = c, X.allowStateChanges = !(c === !0 || c === "strict");
}
n !== void 0 && (X.computedRequiresReaction = !!n), o !== void 0 && (X.reactionRequiresObservable = !!o), s !== void 0 && (X.observableRequiresReaction = !!s, X.allowStateReads = !X.observableRequiresReaction), r !== void 0 && (X.computedConfigurable = !!r), i !== void 0 && (i === !0 && console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."), X.disableErrorBoundaries = !!i), a && lm(a);
}
function Dm(e, t, n, r) {
r = rp(r);
var i = Om(r);
return Jf(e), yh(e, r.name, i.enhancer), t && km(e, t, n, i), e;
}
function Om(e) {
return e.defaultDecorator || (e.deep === !1 ? op : ip);
}
function km(e, t, n, r) {
var i, a;
if (0) var o, s, c, l;
Z();
try {
var o = Of(t);
try {
for (var u = Bf(o), d = u.next(); !d.done; d = u.next()) {
var l = d.value, f = Object.getOwnPropertyDescriptor(t, l), p = (n && l in n ? n[l] : f.get ? fp : r)(e, l, f, !0);
p && Object.defineProperty(e, l, p);
}
} catch (e) {
i = { error: e };
} finally {
try {
d && !d.done && (a = u.return) && a.call(u);
} finally {
if (i) throw i.error;
}
}
} finally {
Q();
}
}
function Am(e, t) {
return jm(Dh(e, t));
}
function jm(e) {
var t = { name: e.name };
return e.observing && e.observing.length > 0 && (t.dependencies = hf(e.observing).map(jm)), t;
}
function Mm() {
this.message = "FLOW_CANCELLED";
}
Mm.prototype = Object.create(Error.prototype);
function Nm(e, t) {
return e == null ? !1 : t === void 0 ? Eh(e) || !!e[q] || Af(e) || cm(e) || Vp(e) : Eh(e) ? e[q].values.has(t) : !1;
}
function Pm(e) {
return arguments.length !== 1 && K(!1), Nm(e);
}
function Fm(e) {
return Eh(e) ? e[q].getKeys() : ph(e) || _h(e) ? Array.from(e.keys()) : lh(e) ? e.map(function(e, t) {
return t;
}) : K(!1);
}
function Im(e, t, n) {
if (arguments.length === 2 && !_h(e)) {
Z();
var r = t;
try {
for (var i in r) Im(e, i, r[i]);
} finally {
Q();
}
return;
}
if (Eh(e)) {
var a = e[q];
a.values.get(t) ? a.write(t, n) : a.addObservableProp(t, n, a.defaultEnhancer);
} else if (ph(e)) e.set(t, n);
else if (_h(e)) e.add(t);
else if (lh(e)) typeof t != "number" && (t = parseInt(t, 10)), ff(t >= 0, "Not a valid index: '" + t + "'"), Z(), t >= e.length && (e.length = t + 1), e[t] = n, Q();
else return K(!1);
}
var Lm = {
detectCycles: !0,
exportMapsAsObjects: !0,
recurseEverything: !1
};
function Rm(e, t, n, r) {
return r.detectCycles && e.set(t, n), n;
}
function zm(e, t, n) {
if (!t.recurseEverything && !Pm(e) || typeof e != "object") return e;
if (e === null) return null;
if (e instanceof Date) return e;
if (zp(e)) return zm(e.get(), t, n);
if (Pm(e) && Fm(e), t.detectCycles === !0 && e !== null && n.has(e)) return n.get(e);
if (lh(e) || Array.isArray(e)) {
var r = Rm(n, e, [], t), i = e.map(function(e) {
return zm(e, t, n);
});
r.length = i.length;
for (var a = 0, o = i.length; a < o; a++) r[a] = i[a];
return r;
}
if (_h(e) || Object.getPrototypeOf(e) === Set.prototype) if (t.exportMapsAsObjects === !1) {
var s = Rm(n, e, /* @__PURE__ */ new Set(), t);
return e.forEach(function(e) {
s.add(zm(e, t, n));
}), s;
} else {
var c = Rm(n, e, [], t);
return e.forEach(function(e) {
c.push(zm(e, t, n));
}), c;
}
if (ph(e) || Object.getPrototypeOf(e) === Map.prototype) if (t.exportMapsAsObjects === !1) {
var l = Rm(n, e, /* @__PURE__ */ new Map(), t);
return e.forEach(function(e, r) {
l.set(r, zm(e, t, n));
}), l;
} else {
var u = Rm(n, e, {}, t);
return e.forEach(function(e, r) {
u[r] = zm(e, t, n);
}), u;
}
var d = Rm(n, e, {}, t);
return Tf(e).forEach(function(r) {
d[r] = zm(e[r], t, n);
}), d;
}
function Bm(e, t) {
typeof t == "boolean" && (t = { detectCycles: t }), t || (t = Lm), t.detectCycles = t.detectCycles === void 0 ? t.recurseEverything === !0 : t.detectCycles === !0;
var n;
return t.detectCycles && (n = /* @__PURE__ */ new Map()), zm(e, t, n);
}
function Vm() {
var e = [...arguments], t = !1;
typeof e[e.length - 1] == "boolean" && (t = e.pop());
var n = Hm(e);
if (!n) return K(!1);
n.isTracing === hp.NONE && console.log("[mobx.trace] '" + n.name + "' tracing enabled"), n.isTracing = t ? hp.BREAK : hp.LOG;
}
function Hm(e) {
switch (e.length) {
case 0: return X.trackingDerivation;
case 1: return Dh(e[0]);
case 2: return Dh(e[0], e[1]);
}
}
function Um(e, t) {
t === void 0 && (t = void 0), Z();
try {
return e.apply(t);
} finally {
Q();
}
}
function Wm(e, t, n) {
return arguments.length === 1 || t && typeof t == "object" ? Km(e, t) : Gm(e, t, n || {});
}
function Gm(e, t, n) {
var r;
typeof n.timeout == "number" && (r = setTimeout(function() {
if (!a[q].isDisposed) {
a();
var e = /* @__PURE__ */ Error("WHEN_TIMEOUT");
if (n.onError) n.onError(e);
else throw e;
}
}, n.timeout)), n.name = n.name || "When@" + G();
var i = Mp(n.name + "-effect", t), a = vm(function(t) {
e() && (t.dispose(), r && clearTimeout(r), i());
}, n);
return a;
}
function Km(e, t) {
var n, r = new Promise(function(r, i) {
var a = Gm(e, r, zf(zf({}, t), { onError: i }));
n = function() {
a(), i("WHEN_CANCELLED");
};
});
return r.cancel = n, r;
}
function qm(e) {
return e[q];
}
function Jm(e) {
return typeof e == "string" || typeof e == "number" || typeof e == "symbol";
}
var Ym = {
has: function(e, t) {
if (t === q || t === "constructor" || t === Uf) return !0;
var n = qm(e);
return Jm(t) ? n.has(t) : t in e;
},
get: function(e, t) {
if (t === q || t === "constructor" || t === Uf) return e[t];
var n = qm(e), r = n.values.get(t);
if (r instanceof kf) {
var i = r.get();
return i === void 0 && n.has(t), i;
}
return Jm(t) && n.has(t), e[t];
},
set: function(e, t, n) {
return Jm(t) ? (Im(e, t, n), !0) : !1;
},
deleteProperty: function(e, t) {
return Jm(t) ? (qm(e).remove(t), !0) : !1;
},
ownKeys: function(e) {
return qm(e).keysAtom.reportObserved(), Reflect.ownKeys(e);
},
preventExtensions: function(e) {
return K("Dynamic observable objects cannot be frozen"), !1;
}
};
function Xm(e) {
var t = new Proxy(e, Ym);
return e[q].proxy = t, t;
}
function Zm(e) {
return e.interceptors !== void 0 && e.interceptors.length > 0;
}
function Qm(e, t) {
var n = e.interceptors || (e.interceptors = []);
return n.push(t), pf(function() {
var e = n.indexOf(t);
e !== -1 && n.splice(e, 1);
});
}
function $m(e, t) {
var n = wp();
try {
for (var r = Hf(e.interceptors || []), i = 0, a = r.length; i < a && (t = r[i](t), ff(!t || t.type, "Intercept handlers should return nothing or a change object"), t); i++);
return t;
} finally {
Tp(n);
}
}
function eh(e) {
return e.changeListeners !== void 0 && e.changeListeners.length > 0;
}
function th(e, t) {
var n = e.changeListeners || (e.changeListeners = []);
return n.push(t), pf(function() {
var e = n.indexOf(t);
e !== -1 && n.splice(e, 1);
});
}
function nh(e, t) {
var n = wp(), r = e.changeListeners;
if (r) {
r = r.slice();
for (var i = 0, a = r.length; i < a; i++) r[i](t);
Tp(n);
}
}
var rh = 1e4, ih = {
get: function(e, t) {
return t === q ? e[q] : t === "length" ? e[q].getArrayLength() : typeof t == "number" ? sh.get.call(e, t) : typeof t == "string" && !isNaN(t) ? sh.get.call(e, parseInt(t)) : sh.hasOwnProperty(t) ? sh[t] : e[t];
},
set: function(e, t, n) {
return t === "length" && e[q].setArrayLength(n), typeof t == "number" && sh.set.call(e, t, n), typeof t == "symbol" || isNaN(t) ? e[t] = n : sh.set.call(e, parseInt(t), n), !0;
},
preventExtensions: function(e) {
return K("Observable arrays cannot be frozen"), !1;
}
};
function ah(e, t, n, r) {
n === void 0 && (n = "ObservableArray@" + G()), r === void 0 && (r = !1);
var i = new oh(n, t, r);
bf(i.values, q, i);
var a = new Proxy(i.values, ih);
if (i.proxy = a, e && e.length) {
var o = Ip(!0);
i.spliceWithArray(0, 0, e), Lp(o);
}
return a;
}
var oh = function() {
function e(e, t, n) {
this.owned = n, this.values = [], this.proxy = void 0, this.lastKnownLength = 0, this.atom = new kf(e || "ObservableArray@" + G()), this.enhancer = function(n, r) {
return t(n, r, e + "[..]");
};
}
return e.prototype.dehanceValue = function(e) {
return this.dehancer === void 0 ? e : this.dehancer(e);
}, e.prototype.dehanceValues = function(e) {
return this.dehancer !== void 0 && e.length > 0 ? e.map(this.dehancer) : e;
}, e.prototype.intercept = function(e) {
return Qm(this, e);
}, e.prototype.observe = function(e, t) {
return t === void 0 && (t = !1), t && e({
object: this.proxy,
type: "splice",
index: 0,
added: this.values.slice(),
addedCount: this.values.length,
removed: [],
removedCount: 0
}), th(this, e);
}, e.prototype.getArrayLength = function() {
return this.atom.reportObserved(), this.values.length;
}, e.prototype.setArrayLength = function(e) {
if (typeof e != "number" || e < 0) throw Error("[mobx.array] Out of range: " + e);
var t = this.values.length;
if (e !== t) if (e > t) {
for (var n = Array(e - t), r = 0; r < e - t; r++) n[r] = void 0;
this.spliceWithArray(t, 0, n);
} else this.spliceWithArray(e, t - e);
}, e.prototype.updateArrayLength = function(e, t) {
if (e !== this.lastKnownLength) throw Error("[mobx] Modification exception: the internal structure of an observable array was changed.");
this.lastKnownLength += t;
}, e.prototype.spliceWithArray = function(e, t, n) {
var r = this;
yp(this.atom);
var i = this.values.length;
if (e === void 0 ? e = 0 : e > i ? e = i : e < 0 && (e = Math.max(0, i + e)), t = arguments.length === 1 ? i - e : t == null ? 0 : Math.max(0, Math.min(t, i - e)), n === void 0 && (n = uf), Zm(this)) {
var a = $m(this, {
object: this.proxy,
type: "splice",
index: e,
removedCount: t,
added: n
});
if (!a) return uf;
t = a.removedCount, n = a.added;
}
n = n.length === 0 ? n : n.map(function(e) {
return r.enhancer(e, void 0);
});
var o = this.spliceItemsIntoValues(e, t, n);
return (t !== 0 || n.length !== 0) && this.notifyArraySplice(e, n, o), this.dehanceValues(o);
}, e.prototype.spliceItemsIntoValues = function(e, t, n) {
var r;
if (n.length < rh) return (r = this.values).splice.apply(r, Hf([e, t], n));
var i = this.values.slice(e, e + t);
return this.values = this.values.slice(0, e).concat(n, this.values.slice(e + t)), i;
}, e.prototype.notifyArrayChildUpdate = function(e, t, n) {
var r = !this.owned && $(), i = eh(this), a = i || r ? {
object: this.proxy,
type: "update",
index: e,
newValue: t,
oldValue: n
} : null;
this.atom.reportChanged(), i && nh(this, a);
}, e.prototype.notifyArraySplice = function(e, t, n) {
var r = !this.owned && $(), i = eh(this), a = i || r ? {
object: this.proxy,
type: "splice",
index: e,
removed: n,
added: t,
removedCount: n.length,
addedCount: t.length
} : null;
this.atom.reportChanged(), i && nh(this, a);
}, e;
}(), sh = {
intercept: function(e) {
return this[q].intercept(e);
},
observe: function(e, t) {
return t === void 0 && (t = !1), this[q].observe(e, t);
},
clear: function() {
return this.splice(0);
},
replace: function(e) {
var t = this[q];
return t.spliceWithArray(0, t.values.length, e);
},
toJS: function() {
return this.slice();
},
toJSON: function() {
return this.toJS();
},
splice: function(e, t) {
var n = [...arguments].slice(2), r = this[q];
switch (arguments.length) {
case 0: return [];
case 1: return r.spliceWithArray(e);
case 2: return r.spliceWithArray(e, t);
}
return r.spliceWithArray(e, t, n);
},
spliceWithArray: function(e, t, n) {
return this[q].spliceWithArray(e, t, n);
},
push: function() {
var e = [...arguments], t = this[q];
return t.spliceWithArray(t.values.length, 0, e), t.values.length;
},
pop: function() {
return this.splice(Math.max(this[q].values.length - 1, 0), 1)[0];
},
shift: function() {
return this.splice(0, 1)[0];
},
unshift: function() {
var e = [...arguments], t = this[q];
return t.spliceWithArray(0, 0, e), t.values.length;
},
reverse: function() {
var e = this.slice();
return e.reverse.apply(e, arguments);
},
sort: function(e) {
var t = this.slice();
return t.sort.apply(t, arguments);
},
remove: function(e) {
var t = this[q], n = t.dehanceValues(t.values).indexOf(e);
return n > -1 ? (this.splice(n, 1), !0) : !1;
},
get: function(e) {
var t = this[q];
if (t) {
if (e < t.values.length) return t.atom.reportObserved(), t.dehanceValue(t.values[e]);
console.warn("[mobx.array] Attempt to read an array index (" + e + ") that is out of bounds (" + t.values.length + "). Please check length first. Out of bound indices will not be tracked by MobX");
}
},
set: function(e, t) {
var n = this[q], r = n.values;
if (e < r.length) {
yp(n.atom);
var i = r[e];
if (Zm(n)) {
var a = $m(n, {
type: "update",
object: n.proxy,
index: e,
newValue: t
});
if (!a) return;
t = a.newValue;
}
t = n.enhancer(t, i), t !== i && (r[e] = t, n.notifyArrayChildUpdate(e, t, i));
} else if (e === r.length) n.spliceWithArray(e, 0, [t]);
else throw Error("[mobx.array] Index out of bounds, " + e + " is larger than " + r.length);
}
};
[
"concat",
"flat",
"includes",
"indexOf",
"join",
"lastIndexOf",
"slice",
"toString",
"toLocaleString"
].forEach(function(e) {
typeof Array.prototype[e] == "function" && (sh[e] = function() {
var t = this[q];
t.atom.reportObserved();
var n = t.dehanceValues(t.values);
return n[e].apply(n, arguments);
});
}), [
"every",
"filter",
"find",
"findIndex",
"flatMap",
"forEach",
"map",
"some"
].forEach(function(e) {
typeof Array.prototype[e] == "function" && (sh[e] = function(t, n) {
var r = this, i = this[q];
return i.atom.reportObserved(), i.dehanceValues(i.values)[e](function(e, i) {
return t.call(n, e, i, r);
}, n);
});
}), ["reduce", "reduceRight"].forEach(function(e) {
sh[e] = function() {
var t = this, n = this[q];
n.atom.reportObserved();
var r = arguments[0];
return arguments[0] = function(e, i, a) {
return i = n.dehanceValue(i), r(e, i, a, t);
}, n.values[e].apply(n.values, arguments);
};
});
var ch = Sf("ObservableArrayAdministration", oh);
function lh(e) {
return gf(e) && ch(e[q]);
}
var uh, dh = {}, fh = function() {
function e(e, t, n) {
if (t === void 0 && (t = Zf), n === void 0 && (n = "ObservableMap@" + G()), this.enhancer = t, this.name = n, this[uh] = dh, this._keysAtom = jf(this.name + ".keys()"), this[Symbol.toStringTag] = "Map", typeof Map != "function") throw Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");
this._data = /* @__PURE__ */ new Map(), this._hasMap = /* @__PURE__ */ new Map(), this.merge(e);
}
return e.prototype._has = function(e) {
return this._data.has(e);
}, e.prototype.has = function(e) {
var t = this;
if (!X.trackingDerivation) return this._has(e);
var n = this._hasMap.get(e);
if (!n) {
var r = n = new Rp(this._has(e), $f, this.name + "." + Ef(e) + "?", !1);
this._hasMap.set(e, r), wm(r, function() {
return t._hasMap.delete(e);
});
}
return n.get();
}, e.prototype.set = function(e, t) {
var n = this._has(e);
if (Zm(this)) {
var r = $m(this, {
type: n ? "update" : "add",
object: this,
newValue: t,
name: e
});
if (!r) return this;
t = r.newValue;
}
return n ? this._updateValue(e, t) : this._addValue(e, t), this;
}, e.prototype.delete = function(e) {
var t = this;
if (yp(this._keysAtom), Zm(this)) {
var n = $m(this, {
type: "delete",
object: this,
name: e
});
if (!n) return !1;
}
if (this._has(e)) {
var r = $(), i = eh(this), n = i || r ? {
type: "delete",
object: this,
oldValue: this._data.get(e).value,
name: e
} : null;
return Um(function() {
t._keysAtom.reportChanged(), t._updateHasMapEntry(e, !1), t._data.get(e).setNewValue(void 0), t._data.delete(e);
}), i && nh(this, n), !0;
}
return !1;
}, e.prototype._updateHasMapEntry = function(e, t) {
var n = this._hasMap.get(e);
n && n.setNewValue(t);
}, e.prototype._updateValue = function(e, t) {
var n = this._data.get(e);
if (t = n.prepareNewValue(t), t !== X.UNCHANGED) {
var r = $(), i = eh(this), a = i || r ? {
type: "update",
object: this,
oldValue: n.value,
name: e,
newValue: t
} : null;
n.setNewValue(t), i && nh(this, a);
}
}, e.prototype._addValue = function(e, t) {
var n = this;
yp(this._keysAtom), Um(function() {
var r = new Rp(t, n.enhancer, n.name + "." + Ef(e), !1);
n._data.set(e, r), t = r.value, n._updateHasMapEntry(e, !0), n._keysAtom.reportChanged();
});
var r = $(), i = eh(this), a = i || r ? {
type: "add",
object: this,
name: e,
newValue: t
} : null;
i && nh(this, a);
}, e.prototype.get = function(e) {
return this.has(e) ? this.dehanceValue(this._data.get(e).get()) : this.dehanceValue(void 0);
}, e.prototype.dehanceValue = function(e) {
return this.dehancer === void 0 ? e : this.dehancer(e);
}, e.prototype.keys = function() {
return this._keysAtom.reportObserved(), this._data.keys();
}, e.prototype.values = function() {
var e = this, t = this.keys();
return Fh({ next: function() {
var n = t.next(), r = n.done, i = n.value;
return {
done: r,
value: r ? void 0 : e.get(i)
};
} });
}, e.prototype.entries = function() {
var e = this, t = this.keys();
return Fh({ next: function() {
var n = t.next(), r = n.done, i = n.value;
return {
done: r,
value: r ? void 0 : [i, e.get(i)]
};
} });
}, e.prototype[uh = q, Symbol.iterator] = function() {
return this.entries();
}, e.prototype.forEach = function(e, t) {
var n, r;
try {
for (var i = Bf(this), a = i.next(); !a.done; a = i.next()) {
var o = Vf(a.value, 2), s = o[0], c = o[1];
e.call(t, c, s, this);
}
} catch (e) {
n = { error: e };
} finally {
try {
a && !a.done && (r = i.return) && r.call(i);
} finally {
if (n) throw n.error;
}
}
}, e.prototype.merge = function(e) {
var t = this;
return ph(e) && (e = e.toJS()), Um(function() {
var n = Ip(!0);
try {
_f(e) ? Tf(e).forEach(function(n) {
return t.set(n, e[n]);
}) : Array.isArray(e) ? e.forEach(function(e) {
var n = Vf(e, 2), r = n[0], i = n[1];
return t.set(r, i);
}) : Cf(e) ? (e.constructor !== Map && K("Cannot initialize from classes that inherit from Map: " + e.constructor.name), e.forEach(function(e, n) {
return t.set(n, e);
})) : e != null && K("Cannot initialize map from " + e);
} finally {
Lp(n);
}
}), this;
}, e.prototype.clear = function() {
var e = this;
Um(function() {
Cp(function() {
var t, n;
try {
for (var r = Bf(e.keys()), i = r.next(); !i.done; i = r.next()) {
var a = i.value;
e.delete(a);
}
} catch (e) {
t = { error: e };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (t) throw t.error;
}
}
});
});
}, e.prototype.replace = function(e) {
var t = this;
return Um(function() {
var n, r, i, a, o = vf(e), s = /* @__PURE__ */ new Map(), c = !1;
try {
for (var l = Bf(t._data.keys()), u = l.next(); !u.done; u = l.next()) {
var d = u.value;
if (!o.has(d)) if (t.delete(d)) c = !0;
else {
var f = t._data.get(d);
s.set(d, f);
}
}
} catch (e) {
n = { error: e };
} finally {
try {
u && !u.done && (r = l.return) && r.call(l);
} finally {
if (n) throw n.error;
}
}
try {
for (var p = Bf(o.entries()), m = p.next(); !m.done; m = p.next()) {
var h = Vf(m.value, 2), d = h[0], f = h[1], g = t._data.has(d);
if (t.set(d, f), t._data.has(d)) {
var _ = t._data.get(d);
s.set(d, _), g || (c = !0);
}
}
} catch (e) {
i = { error: e };
} finally {
try {
m && !m.done && (a = p.return) && a.call(p);
} finally {
if (i) throw i.error;
}
}
if (!c) if (t._data.size !== s.size) t._keysAtom.reportChanged();
else for (var v = t._data.keys(), y = s.keys(), b = v.next(), x = y.next(); !b.done;) {
if (b.value !== x.value) {
t._keysAtom.reportChanged();
break;
}
b = v.next(), x = y.next();
}
t._data = s;
}), this;
}, Object.defineProperty(e.prototype, "size", {
get: function() {
return this._keysAtom.reportObserved(), this._data.size;
},
enumerable: !0,
configurable: !0
}), e.prototype.toPOJO = function() {
var e, t, n = {};
try {
for (var r = Bf(this), i = r.next(); !i.done; i = r.next()) {
var a = Vf(i.value, 2), o = a[0], s = a[1];
n[typeof o == "symbol" ? o : Ef(o)] = s;
}
} catch (t) {
e = { error: t };
} finally {
try {
i && !i.done && (t = r.return) && t.call(r);
} finally {
if (e) throw e.error;
}
}
return n;
}, e.prototype.toJS = function() {
return new Map(this);
}, e.prototype.toJSON = function() {
return this.toPOJO();
}, e.prototype.toString = function() {
var e = this;
return this.name + "[{ " + Array.from(this.keys()).map(function(t) {
return Ef(t) + ": " + ("" + e.get(t));
}).join(", ") + " }]";
}, e.prototype.observe = function(e, t) {
return th(this, e);
}, e.prototype.intercept = function(e) {
return Qm(this, e);
}, e;
}(), ph = Sf("ObservableMap", fh), mh, hh = {}, gh = function() {
function e(e, t, n) {
if (t === void 0 && (t = Zf), n === void 0 && (n = "ObservableSet@" + G()), this.name = n, this[mh] = hh, this._data = /* @__PURE__ */ new Set(), this._atom = jf(this.name), this[Symbol.toStringTag] = "Set", typeof Set != "function") throw Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");
this.enhancer = function(e, r) {
return t(e, r, n);
}, e && this.replace(e);
}
return e.prototype.dehanceValue = function(e) {
return this.dehancer === void 0 ? e : this.dehancer(e);
}, e.prototype.clear = function() {
var e = this;
Um(function() {
Cp(function() {
var t, n;
try {
for (var r = Bf(e._data.values()), i = r.next(); !i.done; i = r.next()) {
var a = i.value;
e.delete(a);
}
} catch (e) {
t = { error: e };
} finally {
try {
i && !i.done && (n = r.return) && n.call(r);
} finally {
if (t) throw t.error;
}
}
});
});
}, e.prototype.forEach = function(e, t) {
var n, r;
try {
for (var i = Bf(this), a = i.next(); !a.done; a = i.next()) {
var o = a.value;
e.call(t, o, o, this);
}
} catch (e) {
n = { error: e };
} finally {
try {
a && !a.done && (r = i.return) && r.call(i);
} finally {
if (n) throw n.error;
}
}
}, Object.defineProperty(e.prototype, "size", {
get: function() {
return this._atom.reportObserved(), this._data.size;
},
enumerable: !0,
configurable: !0
}), e.prototype.add = function(e) {
var t = this;
if (yp(this._atom), Zm(this)) {
var n = $m(this, {
type: "add",
object: this,
newValue: e
});
if (!n) return this;
}
if (!this.has(e)) {
Um(function() {
t._data.add(t.enhancer(e, void 0)), t._atom.reportChanged();
});
var r = $(), i = eh(this), n = i || r ? {
type: "add",
object: this,
newValue: e
} : null;
i && nh(this, n);
}
return this;
}, e.prototype.delete = function(e) {
var t = this;
if (Zm(this)) {
var n = $m(this, {
type: "delete",
object: this,
oldValue: e
});
if (!n) return !1;
}
if (this.has(e)) {
var r = $(), i = eh(this), n = i || r ? {
type: "delete",
object: this,
oldValue: e
} : null;
return Um(function() {
t._atom.reportChanged(), t._data.delete(e);
}), i && nh(this, n), !0;
}
return !1;
}, e.prototype.has = function(e) {
return this._atom.reportObserved(), this._data.has(this.dehanceValue(e));
}, e.prototype.entries = function() {
var e = 0, t = Array.from(this.keys()), n = Array.from(this.values());
return Fh({ next: function() {
var r = e;
return e += 1, r < n.length ? {
value: [t[r], n[r]],
done: !1
} : { done: !0 };
} });
}, e.prototype.keys = function() {
return this.values();
}, e.prototype.values = function() {
this._atom.reportObserved();
var e = this, t = 0, n = Array.from(this._data.values());
return Fh({ next: function() {
return t < n.length ? {
value: e.dehanceValue(n[t++]),
done: !1
} : { done: !0 };
} });
}, e.prototype.replace = function(e) {
var t = this;
return _h(e) && (e = e.toJS()), Um(function() {
var n = Ip(!0);
try {
Array.isArray(e) || wf(e) ? (t.clear(), e.forEach(function(e) {
return t.add(e);
})) : e != null && K("Cannot initialize set from " + e);
} finally {
Lp(n);
}
}), this;
}, e.prototype.observe = function(e, t) {
return th(this, e);
}, e.prototype.intercept = function(e) {
return Qm(this, e);
}, e.prototype.toJS = function() {
return new Set(this);
}, e.prototype.toString = function() {
return this.name + "[ " + Array.from(this).join(", ") + " ]";
}, e.prototype[mh = q, Symbol.iterator] = function() {
return this.values();
}, e;
}(), _h = Sf("ObservableSet", gh), vh = function() {
function e(e, t, n, r) {
t === void 0 && (t = /* @__PURE__ */ new Map()), this.target = e, this.values = t, this.name = n, this.defaultEnhancer = r, this.keysAtom = new kf(n + ".keys");
}
return e.prototype.read = function(e) {
return this.values.get(e).get();
}, e.prototype.write = function(e, t) {
var n = this.target, r = this.values.get(e);
if (r instanceof Bp) {
r.set(t);
return;
}
if (Zm(this)) {
var i = $m(this, {
type: "update",
object: this.proxy || n,
name: e,
newValue: t
});
if (!i) return;
t = i.newValue;
}
if (t = r.prepareNewValue(t), t !== X.UNCHANGED) {
var a = eh(this), o = $(), i = a || o ? {
type: "update",
object: this.proxy || n,
oldValue: r.value,
name: e,
newValue: t
} : null;
r.setNewValue(t), a && nh(this, i);
}
}, e.prototype.has = function(e) {
var t = this.pendingKeys || (this.pendingKeys = /* @__PURE__ */ new Map()), n = t.get(e);
return n ? n.get() : (n = new Rp(!!this.values.get(e), $f, this.name + "." + Ef(e) + "?", !1), t.set(e, n), n.get());
}, e.prototype.addObservableProp = function(e, t, n) {
n === void 0 && (n = this.defaultEnhancer);
var r = this.target;
if (Zm(this)) {
var i = $m(this, {
object: this.proxy || r,
name: e,
type: "add",
newValue: t
});
if (!i) return;
t = i.newValue;
}
var a = new Rp(t, n, this.name + "." + Ef(e), !1);
this.values.set(e, a), t = a.value, Object.defineProperty(r, e, Sh(e)), this.notifyPropertyAddition(e, t);
}, e.prototype.addComputedProp = function(e, t, n) {
var r = this.target;
n.name = n.name || this.name + "." + Ef(t), this.values.set(t, new Bp(n)), (e === r || xf(e, t)) && Object.defineProperty(e, t, wh(t));
}, e.prototype.remove = function(e) {
if (this.values.has(e)) {
var t = this.target;
if (Zm(this)) {
var n = $m(this, {
object: this.proxy || t,
name: e,
type: "remove"
});
if (!n) return;
}
try {
Z();
var r = eh(this), i = $(), a = this.values.get(e), o = a && a.get();
if (a && a.set(void 0), this.keysAtom.reportChanged(), this.values.delete(e), this.pendingKeys) {
var s = this.pendingKeys.get(e);
s && s.set(!1);
}
delete this.target[e];
var n = r || i ? {
type: "remove",
object: this.proxy || t,
oldValue: o,
name: e
} : null;
r && nh(this, n);
} finally {
Q();
}
}
}, e.prototype.illegalAccess = function(e, t) {
console.warn("Property '" + t + "' of '" + e + "' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner");
}, e.prototype.observe = function(e, t) {
return th(this, e);
}, e.prototype.intercept = function(e) {
return Qm(this, e);
}, e.prototype.notifyPropertyAddition = function(e, t) {
var n = eh(this), r = $(), i = n || r ? {
type: "add",
object: this.proxy || this.target,
name: e,
newValue: t
} : null;
if (n && nh(this, i), this.pendingKeys) {
var a = this.pendingKeys.get(e);
a && a.set(!0);
}
this.keysAtom.reportChanged();
}, e.prototype.getKeys = function() {
var e, t;
this.keysAtom.reportObserved();
var n = [];
try {
for (var r = Bf(this.values), i = r.next(); !i.done; i = r.next()) {
var a = Vf(i.value, 2), o = a[0];
a[1] instanceof Rp && n.push(o);
}
} catch (t) {
e = { error: t };
} finally {
try {
i && !i.done && (t = r.return) && t.call(r);
} finally {
if (e) throw e.error;
}
}
return n;
}, e;
}();
function yh(e, t, n) {
if (t === void 0 && (t = ""), n === void 0 && (n = Zf), Object.prototype.hasOwnProperty.call(e, q)) return e[q];
_f(e) || (t = (e.constructor.name || "ObservableObject") + "@" + G()), t || (t = "ObservableObject@" + G());
var r = new vh(e, /* @__PURE__ */ new Map(), Ef(t), n);
return yf(e, q, r), r;
}
var bh = Object.create(null), xh = Object.create(null);
function Sh(e) {
return bh[e] || (bh[e] = {
configurable: !0,
enumerable: !0,
get: function() {
return this[q].read(e);
},
set: function(t) {
this[q].write(e, t);
}
});
}
function Ch(e) {
return e[q] || (Jf(e), e[q]);
}
function wh(e) {
return xh[e] || (xh[e] = {
configurable: X.computedConfigurable,
enumerable: !1,
get: function() {
return Ch(this).read(e);
},
set: function(t) {
Ch(this).write(e, t);
}
});
}
var Th = Sf("ObservableObjectAdministration", vh);
function Eh(e) {
return gf(e) ? (Jf(e), Th(e[q])) : !1;
}
function Dh(e, t) {
if (typeof e == "object" && e) {
if (lh(e)) return t !== void 0 && K(!1), e[q].atom;
if (_h(e)) return e[q];
if (ph(e)) {
var n = e;
if (t === void 0) return n._keysAtom;
var r = n._data.get(t) || n._hasMap.get(t);
return r || K(!1), r;
}
if (Jf(e), t && !e[q] && e[t], Eh(e)) {
if (!t) return K(!1);
var r = e[q].values.get(t);
return r || K(!1), r;
}
if (Af(e) || Vp(e) || cm(e)) return e;
} else if (typeof e == "function" && cm(e[q])) return e[q];
return K(!1);
}
function Oh(e, t) {
if (e || K("Expecting some object"), t !== void 0) return Oh(Dh(e, t));
if (Af(e) || Vp(e) || cm(e) || ph(e) || _h(e)) return e;
if (Jf(e), e[q]) return e[q];
K(!1);
}
function kh(e, t) {
return (t === void 0 ? Eh(e) || ph(e) || _h(e) ? Oh(e) : Dh(e) : Dh(e, t)).name;
}
var Ah = Object.prototype.toString;
function jh(e, t, n) {
return n === void 0 && (n = -1), Mh(e, t, n);
}
function Mh(e, t, n, r, i) {
if (e === t) return e !== 0 || 1 / e == 1 / t;
if (e == null || t == null) return !1;
if (e !== e) return t !== t;
var a = typeof e;
if (a !== "function" && a !== "object" && typeof t != "object") return !1;
var o = Ah.call(e);
if (o !== Ah.call(t)) return !1;
switch (o) {
case "[object RegExp]":
case "[object String]": return "" + e == "" + t;
case "[object Number]": return +e == +e ? +e == 0 ? 1 / e == 1 / t : +e == +t : +t != +t;
case "[object Date]":
case "[object Boolean]": return +e == +t;
case "[object Symbol]": return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t);
case "[object Map]":
case "[object Set]":
n >= 0 && n++;
break;
}
e = Nh(e), t = Nh(t);
var s = o === "[object Array]";
if (!s) {
if (typeof e != "object" || typeof t != "object") return !1;
var c = e.constructor, l = t.constructor;
if (c !== l && !(typeof c == "function" && c instanceof c && typeof l == "function" && l instanceof l) && "constructor" in e && "constructor" in t) return !1;
}
if (n === 0) return !1;
n < 0 && (n = -1), r = r || [], i = i || [];
for (var u = r.length; u--;) if (r[u] === e) return i[u] === t;
if (r.push(e), i.push(t), s) {
if (u = e.length, u !== t.length) return !1;
for (; u--;) if (!Mh(e[u], t[u], n - 1, r, i)) return !1;
} else {
var d = Object.keys(e), f = void 0;
if (u = d.length, Object.keys(t).length !== u) return !1;
for (; u--;) if (f = d[u], !(Ph(t, f) && Mh(e[f], t[f], n - 1, r, i))) return !1;
}
return r.pop(), i.pop(), !0;
}
function Nh(e) {
return lh(e) ? e.slice() : Cf(e) || ph(e) || wf(e) || _h(e) ? Array.from(e.entries()) : e;
}
function Ph(e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}
function Fh(e) {
return e[Symbol.iterator] = Ih, e;
}
function Ih() {
return this;
}
if (typeof Proxy > "u" || typeof Symbol > "u") throw Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");
(function() {
function e() {}
e.name;
})(), typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({
spy: um,
extras: { getDebugName: kh },
$mobx: q
});
//#endregion
//#region src/locales.ts
var Lh = {
de: "Deutsch",
en: "English",
es: "Español",
fr: "Français",
it: "Italiano",
ko: "한국어",
nl: "Nederlands",
pt: "Português",
ru: "Русский",
tr: "Türkçe",
zh: "中文",
sv: "Svenska",
ar: "العربية",
th: "ไทย",
vi: "Tiếng Việt",
uk: "Українська",
he: "עברית",
kk: "Қазақша",
pl: "Polski",
mn: "Монгол",
da: "Dansk"
};
//#endregion
//#region src/utils/localStorage.ts
function Rh() {
try {
return localStorage.setItem("test", "test"), localStorage.removeItem("test"), !0;
} catch {
return !1;
}
}
var zh = Rh(), Bh = "en", Vh = "efp-locale", Hh = "language", Uh = J.box(Bh), Wh = J.array([], { deep: !1 }), Gh = (e) => pd(`${cd}locales/${e}.json`), Kh = () => {
if (!zh) return null;
let e = localStorage.getItem(Vh), t = localStorage.getItem(Hh);
return t && localStorage.removeItem(Hh), e || (t && localStorage.setItem(Vh, t), t);
}, qh = () => {
var e;
let t = ((e = navigator.languages) == null ? void 0 : e[0]) || navigator.language, n = Object.keys(Lh).find((e) => t.startsWith(e));
return (Kh() || o().locale || n || Bh).toLowerCase();
}, Jh = () => Uh.get(), Yh = () => Wh, Xh = (e) => Wh.some((t) => t.id === e), Zh = (e, t) => (Uh.get(), cf.t(e, t)), Qh = (e, t) => (Uh.get(), cf.exists(e, t) ? cf.t(e, t) : e), $h = async () => {
Wh.replace(Object.entries(Lh).sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => ({
id: e,
name: t,
entity: { type: qu }
})));
let e = qh(), t = {};
if (e !== Bh) try {
t[e] = { translation: await Gh(e) };
} catch (t) {
console.error(`Unable to load "${e}" localization, falling back to "${Bh}".`, t), e = Bh;
}
return Uh.set(e), cf.init({
resources: t,
lng: e,
keySeparator: !1,
saveMissing: e !== Bh,
missingKeyHandler: (e, t, n, r) => console.debug(`i18n missing key: '${e[0]}:${t}:${n}', fallback: '${r}'`)
});
}, eg = async (e) => {
let t = e.toLowerCase();
try {
t !== Bh && !cf.hasResourceBundle(t, "translation") && cf.addResourceBundle(t, "translation", await Gh(t), !0, !0), await cf.changeLanguage(t), Uh.set(t), zh && localStorage.setItem(Vh, t);
} catch (e) {
console.error(`Failed to switch language to "${t}":`, e);
}
}, tg = async () => (zh && (localStorage.removeItem(Vh), localStorage.removeItem(Hh)), eg(qh()));
//#endregion
export { Fu as $, fd as A, Bt as At, nd as B, o as Bt, Cp as C, cr as Ct, md as D, mn as Dt, wd as E, bn as Et, Wu as F, Fe as Ft, $u as G, Vu as H, ed as I, T as It, Lu as J, Yu as K, td as L, b as Lt, Iu as M, ke as Mt, Ku as N, je as Nt, _d as O, En as Ot, Uu as P, Ne as Pt, Ru as Q, rd as R, E as Rt, Um as S, li as St, Dd as T, nr as Tt, qu as U, id as V, a as Vt, Zu as W, zu as X, Gu as Y, Bu as Z, J as _, sc as _t, tg as a, yu as at, um as b, Vr as bt, Qh as c, vl as ct, hm as d, fl as dt, Xu as et, vm as f, Xc as ft, Am as g, cc as gt, Em as h, uc as ht, $h as i, Pu as it, cd as j, O as jt, hd as k, Un as kt, zh as l, al as lt, mp as m, Sc as mt, Yh as n, Qu as nt, eg as o, yl as ot, If as p, Tc as pt, od as q, Xh as r, Ju as rt, Zh as s, bl as st, Jh as t, Hu as tt, rm as u, ml as ut, xm as v, ls as vt, Wm as w, Sn as wt, Bm as x, Fr as xt, gm as y, is as yt, ad as z, c as zt };