Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

4745 lines
144 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([
"object" == typeof document ? document.currentScript : void 0,
930686,
(e) => {
"use strict";
((t = {}).Url = "1"),
(t.PurchasePopup = "2"),
(t.FeaturedPurchasePopup = "10");
var t,
r = e.i(325528);
r.config.name,
r.config.name,
r.config.name,
r.config.name,
e.s(
[
"DEFAULT_AVATAR",
0,
"https://liblibai-online.liblib.cloud/web/8244a30ac2e94d9289e7216922b50a09/c2ef199f-c9b7-4f24-9d0f-cfb6169deb3d.jpg",
"DEFAULT_COVER_URL",
0,
"https://liblibai-online.liblib.cloud/web/8244a30ac2e94d9289e7216922b50a09/a125a774-0ea9-4c4d-9e80-f079e2007053.png",
],
930686,
);
},
637591,
(e) => {
"use strict";
e.i(373518);
var t = e.i(383924),
r = e.i(185990);
e.s([
"getInviteCodeDetail",
0,
(e) =>
t.apiClient.get(r.default.inviteFissionCodeDetail, {
params: { inviteCode: e },
}),
"getInviteCodeDetails",
0,
(e) =>
t.apiClient.get(r.default.inviteFissionCodeDetails, {
params: { batchNo: e },
}),
"getInviteCodeInfo",
0,
(e) =>
t.apiClient.get(r.default.inviteFissionCodeInfo, {
params: { inviteCode: e },
}),
]);
},
204347,
840984,
579959,
317286,
212546,
(e) => {
"use strict";
var t = e.i(325528),
r = e.i(396805),
o = e.i(505e3);
e.i(135623);
var n = e.i(168823);
let i = (0, r.createWithEqualityFn)(() => ({ exportWidthAIWaterMark: -1 }));
function a() {
let e = (0, n.getCookie)(o.USER_TOKEN_COOKIE_KEY);
return "string" == typeof e ? e : "";
}
async function s(e) {
try {
let r = e || a();
if (!r) return;
let o = await fetch(
`${t.config.apiHost}/api/www/user/remove-watermark/get`,
{
method: "POST",
headers: {
Accept: "application/json, text/plain, */*",
"Content-Type": "application/json",
token: r,
},
},
);
if (!o.ok) return;
let n = await o.json(),
s = n?.data?.removeWatermark;
(-1 === s || 0 === s || 1 === s) &&
i.setState({ exportWidthAIWaterMark: s });
} catch (e) {
console.error("[initWatermarkPreference] 初始化失败:", e);
}
}
async function l(e) {
i.setState({ exportWidthAIWaterMark: e });
try {
let r = a();
if (!r) return;
await fetch(`${t.config.apiHost}/api/www/user/remove-watermark/set`, {
method: "POST",
headers: {
Accept: "application/json, text/plain, */*",
"Content-Type": "application/json",
token: r,
},
body: JSON.stringify({ removeWatermark: e }),
});
} catch (e) {
console.error("[setWatermarkPreference] 同步后端失败:", e);
}
}
function c() {
return i.getState().exportWidthAIWaterMark;
}
e.s(
[
"getWatermarkPreference",
() => c,
"initWatermarkPreference",
() => s,
"setWatermarkPreference",
() => l,
],
840984,
);
var u = e.i(462214),
d = e.i(358379),
f = e.i(524961),
p = e.i(734911),
g = e.i(384916);
let m = null;
function h(e) {
m = e;
}
async function b() {
return (await s(), m)
? m.open()
: (console.error(
"[openWatermarkSettingModal] WatermarkSettingModal 未挂载",
),
null);
}
let y = (0, d.forwardRef)((e, t) => {
let [r, o] = (0, d.useState)(!1),
[n, i] = (0, d.useState)(!1),
[a, s] = (0, d.useState)(null),
m = (0, d.useCallback)(
() => (
i(1 === c()),
o(!0),
new Promise((e) => {
s(() => e);
})
),
[],
),
h = (0, d.useCallback)(
(e) => {
o(!1), a?.(e), s(null);
},
[a],
),
b = (0, d.useCallback)(async () => {
let e = +!!n;
h(e), await l(e);
}, [n, h]),
y = (0, d.useCallback)(() => {
h(null);
}, [h]);
return (
(0, d.useImperativeHandle)(t, () => ({ open: m })),
(0, u.jsx)(p.Modal, {
opened: r,
onClose: y,
title: "AI 生成内容水印管理规则",
centered: !0,
withCloseButton: !1,
closeOnClickOutside: !1,
closeOnEscape: !1,
size: 740,
styles: {
overlay: { zIndex: 800 },
inner: { zIndex: 801 },
content: { borderRadius: 24, backgroundColor: "var(--bg-surface)" },
header: {
padding: 24,
paddingBottom: 8,
backgroundColor: "transparent",
},
title: {
fontSize: 18,
fontWeight: 500,
color: "var(--fg-default)",
},
body: { padding: 24, paddingTop: 0 },
},
children: (0, u.jsxs)("div", {
className: "text-fg-secondary",
children: [
(0, u.jsxs)("div", {
className: "max-h-[500px] overflow-y-auto text-xs leading-5",
children: [
(0, u.jsx)("p", {
children: "欢迎您使用LiblibAI的产品和服务!",
}),
(0, u.jsx)("p", {
className: "indent-8",
children:
'您申请我们向您提供没有添加显式标识(以下或称"水印")的AI生成合成内容之前,亦即您使用"去水印"功能之前,请您务必认真阅读并充分理解本规则。您知悉、同意并遵守以下内容的,方可使用本功能。',
}),
(0, u.jsxs)("p", {
className: "indent-8",
children: [
"经您提出申请,LiblibAI平台可向您提供未添加前述显式标识的AI生成合成内容。请注意:您在使用网络信息内容传播服务发布该等AI生成合成内容时,需主动作出声明,并通过传播LiblibAI平台提供的标识功能完成标识操作。您确认已知晓并承诺:若您未依据法律法规要求在AI生成合成内容中添加显式标识,进而引发公众混淆或误认,由此产生的全部后果及法律责任均由您自行承担。更详细的说明见",
(0, u.jsx)("a", {
href: "https://liblibai.feishu.cn/docx/WpIqdL8fToZJJcxJ5cpcHzIgnEL",
target: "_blank",
rel: "noopener noreferrer",
className: "cursor-pointer text-[#1F6DFF] underline",
children: "LiblibAI水印规范",
}),
"。",
],
}),
(0, u.jsx)("p", {
className: "indent-8",
children:
'当您开启"去除水印"功能开关后,您通过本账号创作、生成的AI生成合成内容,将不再添加"AI生成"明水印。',
}),
],
}),
(0, u.jsxs)("div", {
className: "mt-6 flex items-center gap-3",
children: [
(0, u.jsx)(g.Switch, {
checked: n,
onChange: (e) => {
i(e.currentTarget.checked);
},
}),
(0, u.jsx)("div", {
className: "text-fg-default text-sm font-medium",
children: "去 AI 水印",
}),
],
}),
(0, u.jsx)("div", {
className: "mt-2 text-xs opacity-60",
children:
'开启本功能开关并点击 "保存设置" 按钮,即视为您已充分知悉并同意本规则全部内容。后续您可通过 "头像 - AI水印设置" 路径调整本功能配置。',
}),
(0, u.jsx)("div", {
className: "mt-8 flex justify-end",
children: (0, u.jsx)(f.Button, {
radius: 8,
style: {
height: 44,
paddingLeft: 32,
paddingRight: 32,
backgroundColor: "#1F6DFF",
fontSize: 16,
fontWeight: 500,
},
onClick: () => void b(),
children: "保存设置",
}),
}),
],
}),
})
);
});
async function x() {
let e = c();
return 0 === e || 1 === e ? e : b();
}
function v() {
let e = (0, d.useRef)(null);
return (
(0, d.useEffect)(() => {
e.current && (m = e.current);
}, []),
(0, u.jsx)(y, { ref: e })
);
}
(y.displayName = "WatermarkSettingModal"),
e.s(
[
"default",
0,
y,
"openWatermarkSettingModal",
() => b,
"setWatermarkModalRef",
() => h,
],
579959,
),
e.s(["ensureWatermarkPreference", () => x], 317286),
e.s(["default", () => v], 212546),
e.s([], 204347);
},
542703,
(e) => {
"use strict";
var t = e.i(358379),
r = e.i(841183);
e.i(370357);
var o = e.i(185264),
n = e.i(409488);
let i = "libtv_refresh_activity_config";
function a(e) {
let { checkIfInTimelimit: a } = (0, r.useTimelimitHooks)(),
s = (0, t.useCallback)(async () => {
await o.vipInfoStore.getState().syncVipInfo(), await a();
try {
let e = await (0, n.checkActivityConfig)("CHINESE_1111");
if (0 === e.code && e.data) {
let { activitySwitch: t, remark: r, powerRemark: n } = e.data;
o.vipInfoStore
.getState()
.updatePromptActivity({
visible: t,
activityTips: r,
powerRemark: n,
});
}
} catch {}
window.dispatchEvent(new CustomEvent(i));
}, [a]);
(0, t.useEffect)(() => {
e && s();
}, [e, s]),
(0, t.useEffect)(() => {
if (!e) return;
let t = () => {
s();
},
r = (e) => {
try {
if (!e.data) return;
let r =
"object" == typeof e.data
? e.data
: JSON.parse(String(e.data));
"refresh_vip_info" === r.type && t();
} catch {}
},
o = (e) => {
"refresh_vip_info" === e.key && t();
};
return (
window.addEventListener("message", r),
window.addEventListener("storage", o),
() => {
window.removeEventListener("message", r),
window.removeEventListener("storage", o);
}
);
}, [e, s]);
}
e.s([
"LIBTV_REFRESH_ACTIVITY_CONFIG_EVENT",
0,
i,
"useLibtvRefreshVipAfterPayment",
() => a,
]);
},
211478,
(e) => {
"use strict";
var t = e.i(462214),
r = e.i(358379),
o = e.i(677588),
n = e.i(325528);
e.i(606823);
var i = e.i(104596);
e.i(693602);
var a = e.i(40456),
s = e.i(50602),
l = e.i(640958),
c = e.i(135623);
let u = ({ onClose: e, visible: o }) => {
let {
isLoading: u,
setLoadingState: d,
setSuccessState: f,
setFailState: p,
} = (0, i.useLoadingHooks)(),
g = (0, r.useRef)(null),
m = (0, r.useMemo)(() => {
let e = new URLSearchParams(window.location.search),
t = e.get("bd_vid") || "",
r = e.get("track_id") || "",
o = e.get("qhclickid") || "",
i = e.get("msclkid") || "",
a = e.get("cb") || "",
s = "";
return (t && (s = `&bd_vid=${t}`),
r && (s = `&track_id=${r}`),
o && (s = `&qhclickid=${o}`),
i && (s = `&msclkid=${i}`),
a && (s = `&cb=${a}`),
"test" === n.config.name)
? `https://www-test.liblib.art/login?platform=libtv${s}`
: "pre" === n.config.name
? `https://www-pre.liblib.art/login?platform=libtv${s}`
: "online" === n.config.name
? `https://www.liblib.art/login?platform=libtv${s}`
: void 0;
}, []);
return ((0, r.useEffect)(() => {
if (!o) return () => void 0;
{
d(),
g.current && clearTimeout(g.current),
(g.current = setTimeout(() => {
e?.(), p("");
}, 15e3));
let t = (t) => {
try {
if (!t.data) return;
let {
type: r,
token: o,
data: i,
} = "object" == typeof t.data
? t.data
: JSON.parse(String(t.data));
if ("onLoginClose" === r) e?.();
else if ("onLoginPageLoadFinish" === r)
f(), g.current && clearTimeout(g.current);
else if ("loginSuccess" === r) {
let e = String(o ?? i ?? ""),
t = (0, c.getCookieWebid)();
(0, l.setCookieLongTerm)("usertoken", e, {
secure: "https" === window.location.protocol,
sameSite:
"https" === window.location.protocol ? "none" : "",
});
try {
(0, a.getSSOClient)({
siteId: n.config.tv.domain,
bridgeUrl: n.config.tv.bridgeUrl,
}).notifyLogin({ token: e, webid: t, type: "login" });
} catch (e) {
console.error("notifyLogin error:", e);
}
window.location.reload();
} else
"onPageColse" === r
? e?.()
: "redirectUrl" === r &&
i &&
(window.location.href = String(i));
} catch (e) {
console.error("LibLogin messageListener error", e);
}
};
return (
window.addEventListener("message", t),
() => {
window.removeEventListener("message", t),
g.current && (clearTimeout(g.current), (g.current = null));
}
);
}
}, [o, e, d, f, p]),
o && m)
? (0, t.jsxs)(t.Fragment, {
children: [
(0, t.jsx)(s.LoadingOverlay, {
visible: u,
zIndex: 1e3,
overlayProps: { color: "transparent" },
}),
(0, t.jsx)("iframe", {
src: m,
style: {
width: "100%",
height: "100%",
background: "transparent",
colorScheme: "normal",
},
}),
],
})
: null;
},
d = (0, r.createContext)(null);
e.s(
[
"LoginProvider",
0,
({ children: e }) => {
let [n, i] = (0, r.useState)(null),
a = !!n,
s = (0, r.useCallback)(() => {
i(null);
}, []),
l = (0, r.useCallback)((e) => {
(0, o.reportLog)({
page: 13,
t: 1,
e: "user.login.page.show",
var: { platform: "xingliu" },
}),
i({ ...e });
}, []),
c = (0, r.useMemo)(
() => ({ closeLogin: s, openLogin: l, isOpen: a }),
[s, l, a],
);
return (0, t.jsxs)(d.Provider, {
value: c,
children: [
e,
(0, t.jsx)("div", {
className: "login-modal-container",
style: {
position: "fixed",
top: 0,
left: 0,
right: 0,
bottom: 0,
zIndex: a ? "var(--z-critical)" : -1,
background: "transparent",
pointerEvents: a ? "auto" : "none",
},
children: (0, t.jsx)(u, { visible: a, onClose: s }),
}),
],
});
},
"useLogin",
0,
() => {
let e = (0, r.useContext)(d);
if (!e) throw Error("useLogin must be used within a LoginProvider");
return e;
},
],
211478,
);
},
480038,
(e, t, r) => {
"use strict";
var o,
n = Symbol.for("react.element"),
i = Symbol.for("react.portal"),
a = Symbol.for("react.fragment"),
s = Symbol.for("react.strict_mode"),
l = Symbol.for("react.profiler"),
c = Symbol.for("react.provider"),
u = Symbol.for("react.context"),
d = Symbol.for("react.server_context"),
f = Symbol.for("react.forward_ref"),
p = Symbol.for("react.suspense"),
g = Symbol.for("react.suspense_list"),
m = Symbol.for("react.memo"),
h = Symbol.for("react.lazy"),
b = Symbol.for("react.offscreen");
function y(e) {
if ("object" == typeof e && null !== e) {
var t = e.$$typeof;
switch (t) {
case n:
switch ((e = e.type)) {
case a:
case l:
case s:
case p:
case g:
return e;
default:
switch ((e = e && e.$$typeof)) {
case d:
case u:
case f:
case h:
case m:
case c:
return e;
default:
return t;
}
}
case i:
return t;
}
}
}
(o = Symbol.for("react.module.reference")),
(r.ContextConsumer = u),
(r.ContextProvider = c),
(r.Element = n),
(r.ForwardRef = f),
(r.Fragment = a),
(r.Lazy = h),
(r.Memo = m),
(r.Portal = i),
(r.Profiler = l),
(r.StrictMode = s),
(r.Suspense = p),
(r.SuspenseList = g),
(r.isAsyncMode = function () {
return !1;
}),
(r.isConcurrentMode = function () {
return !1;
}),
(r.isContextConsumer = function (e) {
return y(e) === u;
}),
(r.isContextProvider = function (e) {
return y(e) === c;
}),
(r.isElement = function (e) {
return "object" == typeof e && null !== e && e.$$typeof === n;
}),
(r.isForwardRef = function (e) {
return y(e) === f;
}),
(r.isFragment = function (e) {
return y(e) === a;
}),
(r.isLazy = function (e) {
return y(e) === h;
}),
(r.isMemo = function (e) {
return y(e) === m;
}),
(r.isPortal = function (e) {
return y(e) === i;
}),
(r.isProfiler = function (e) {
return y(e) === l;
}),
(r.isStrictMode = function (e) {
return y(e) === s;
}),
(r.isSuspense = function (e) {
return y(e) === p;
}),
(r.isSuspenseList = function (e) {
return y(e) === g;
}),
(r.isValidElementType = function (e) {
return (
"string" == typeof e ||
"function" == typeof e ||
e === a ||
e === l ||
e === s ||
e === p ||
e === g ||
e === b ||
("object" == typeof e &&
null !== e &&
(e.$$typeof === h ||
e.$$typeof === m ||
e.$$typeof === c ||
e.$$typeof === u ||
e.$$typeof === f ||
e.$$typeof === o ||
void 0 !== e.getModuleId)) ||
!1
);
}),
(r.typeOf = y);
},
87683,
(e, t, r) => {
"use strict";
t.exports = e.r(480038);
},
50602,
(e) => {
"use strict";
var t = e.i(462214);
e.i(358379);
var r = e.i(909243),
o = e.i(938202);
e.i(7284);
var n = e.i(830744),
i = e.i(479324),
a = e.i(450943),
s = e.i(124859),
l = e.i(593307),
c = e.i(403094),
u = e.i(433923),
d = e.i(764218),
f = { root: "m_6e45937b", loader: "m_e8eb006c", overlay: "m_df587f17" };
let p = {
transitionProps: { transition: "fade", duration: 0 },
overlayProps: { backgroundOpacity: 0.75 },
zIndex: (0, r.getDefaultZIndex)("overlay"),
},
g = (0, o.createVarsResolver)((e, { zIndex: t }) => ({
root: { "--lo-z-index": t?.toString() },
})),
m = (0, l.factory)((e, r) => {
let o = (0, i.useProps)("LoadingOverlay", p, e),
{
classNames: l,
className: m,
style: h,
styles: b,
unstyled: y,
vars: x,
transitionProps: v,
loaderProps: S,
overlayProps: k,
visible: w,
zIndex: C,
attributes: j,
...E
} = o,
M = (0, n.useMantineTheme)(),
$ = (0, a.useStyles)({
name: "LoadingOverlay",
classes: f,
props: o,
className: m,
style: h,
classNames: l,
styles: b,
unstyled: y,
attributes: j,
vars: x,
varsResolver: g,
}),
T = { ...p.overlayProps, ...k };
return (0, t.jsx)(d.Transition, {
transition: "fade",
...v,
mounted: !!w,
children: (e) =>
(0, t.jsxs)(s.Box, {
...$("root", { style: e }),
ref: r,
...E,
children: [
(0, t.jsx)(c.Loader, { ...$("loader"), unstyled: y, ...S }),
(0, t.jsx)(u.Overlay, {
...T,
...$("overlay"),
darkHidden: !0,
unstyled: y,
color: k?.color || M.white,
}),
(0, t.jsx)(u.Overlay, {
...T,
...$("overlay"),
lightHidden: !0,
unstyled: y,
color: k?.color || M.colors.dark[5],
}),
],
}),
});
});
(m.classes = f),
(m.displayName = "@mantine/core/LoadingOverlay"),
e.s(["LoadingOverlay", () => m], 50602);
},
357957,
830476,
731042,
921976,
368185,
(e) => {
"use strict";
var t = "comm",
r = "rule",
o = "decl",
n = "@import",
i = "@namespace",
a = "@keyframes",
s = "@layer";
e.s(
[
"COMMENT",
() => t,
"DECLARATION",
() => o,
"IMPORT",
() => n,
"KEYFRAMES",
() => a,
"LAYER",
() => s,
"MOZ",
() => "-moz-",
"MS",
() => "-ms-",
"NAMESPACE",
() => i,
"RULESET",
() => r,
"WEBKIT",
() => "-webkit-",
],
830476,
);
var l = Math.abs,
c = String.fromCharCode,
u = Object.assign;
function d(e, t) {
return 45 ^ h(e, 0)
? (((((((t << 2) ^ h(e, 0)) << 2) ^ h(e, 1)) << 2) ^ h(e, 2)) << 2) ^
h(e, 3)
: 0;
}
function f(e) {
return e.trim();
}
function p(e, t) {
return (e = t.exec(e)) ? e[0] : e;
}
function g(e, t, r) {
return e.replace(t, r);
}
function m(e, t, r) {
return e.indexOf(t, r);
}
function h(e, t) {
return 0 | e.charCodeAt(t);
}
function b(e, t, r) {
return e.slice(t, r);
}
function y(e) {
return e.length;
}
function x(e) {
return e.length;
}
function v(e, t) {
return t.push(e), e;
}
function S(e, t) {
return e.map(t).join("");
}
function k(e, t) {
return e.filter(function (e) {
return !p(e, t);
});
}
e.s(
[
"abs",
() => l,
"append",
() => v,
"assign",
() => u,
"charat",
() => h,
"combine",
() => S,
"filter",
() => k,
"from",
() => c,
"hash",
() => d,
"indexof",
() => m,
"match",
() => p,
"replace",
() => g,
"sizeof",
() => x,
"strlen",
() => y,
"substr",
() => b,
"trim",
() => f,
],
731042,
);
var w = 1,
C = 1,
j = 0,
E = 0,
M = 0,
$ = "";
function T(e, t, r, o, n, i, a, s) {
return {
value: e,
root: t,
parent: r,
type: o,
props: n,
children: i,
line: w,
column: C,
length: a,
return: "",
siblings: s,
};
}
function _(e, t) {
return u(
T("", null, null, "", null, null, 0, e.siblings),
e,
{ length: -e.length },
t,
);
}
function R(e) {
for (; e.root; ) e = _(e.root, { children: [e] });
v(e, e.siblings);
}
function L() {
return M;
}
function A() {
return (M = E > 0 ? h($, --E) : 0), C--, 10 === M && ((C = 1), w--), M;
}
function I() {
return (M = E < j ? h($, E++) : 0), C++, 10 === M && ((C = 1), w++), M;
}
function P() {
return h($, E);
}
function z() {
return E;
}
function N(e) {
switch (e) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function O(e) {
return (w = C = 1), (j = y(($ = e))), (E = 0), [];
}
function D(e) {
return ($ = ""), e;
}
function W(e) {
var t, r;
return f(
((t = E - 1),
(r = (function e(t) {
for (; I(); )
switch (M) {
case t:
return E;
case 34:
case 39:
34 !== t && 39 !== t && e(M);
break;
case 40:
41 === t && e(t);
break;
case 92:
I();
}
return E;
})(91 === e ? e + 2 : 40 === e ? e + 1 : e)),
b($, t, r)),
);
}
function B(e) {
for (; (M = P()); )
if (M < 33) I();
else break;
return N(e) > 2 || N(M) > 3 ? "" : " ";
}
function F(e, t) {
for (
var r;
--t &&
I() &&
!(M < 48) &&
!(M > 102) &&
(!(M > 57) || !(M < 65)) &&
(!(M > 70) || !(M < 97));
);
return (r = E + (t < 6 && 32 == P() && 32 == I())), b($, e, r);
}
function U(e, t) {
for (; I(); )
if (e + M === 57) break;
else if (e + M === 84 && 47 === P()) break;
return "/*" + b($, t, E - 1) + "*" + c(47 === e ? e : I());
}
function H(e) {
for (; !N(P()); ) I();
return b($, e, E);
}
function V(e) {
return D(
(function e(r, o, n, i, a, s, u, d, f) {
for (
var p,
x,
S,
k,
w = 0,
C = 0,
j = u,
$ = 0,
_ = 0,
R = 0,
L = 1,
z = 1,
O = 1,
D = 0,
V = "",
Y = a,
J = s,
X = i,
Z = V;
z;
)
switch (((R = D), (D = I()))) {
case 40:
if (108 != R && 58 == h(Z, j - 1)) {
-1 !=
m((Z += g(W(D), "&", "&\f")), "&\f", l(w ? d[w - 1] : 0)) &&
(O = -1);
break;
}
case 34:
case 39:
case 91:
Z += W(D);
break;
case 9:
case 10:
case 13:
case 32:
Z += B(R);
break;
case 92:
Z += F(E - 1, 7);
continue;
case 47:
switch (P()) {
case 42:
case 47:
v(
((p = U(I(), E)),
(x = o),
(S = n),
(k = f),
T(p, x, S, t, c(M), b(p, 2, -2), 0, k)),
f,
),
(5 == N(R || 1) || 5 == N(P() || 1)) &&
y(Z) &&
" " !== b(Z, -1, void 0) &&
(Z += " ");
break;
default:
Z += "/";
}
break;
case 123 * L:
d[w++] = y(Z) * O;
case 125 * L:
case 59:
case 0:
switch (D) {
case 0:
case 125:
z = 0;
case 59 + C:
-1 == O && (Z = g(Z, /\f/g, "")),
_ > 0 &&
(y(Z) - j || (0 === L && 47 === R)) &&
v(
_ > 32
? K(Z + ";", i, n, j - 1, f)
: K(g(Z, " ", "") + ";", i, n, j - 2, f),
f,
);
break;
case 59:
Z += ";";
default:
if (
(v(
(X = G(
Z,
o,
n,
w,
C,
a,
d,
V,
(Y = []),
(J = []),
j,
s,
)),
s,
),
123 === D)
)
if (0 === C) e(Z, o, X, X, Y, s, j, d, J);
else {
switch ($) {
case 99:
if (110 === h(Z, 3)) break;
case 108:
if (97 === h(Z, 2)) break;
default:
C = 0;
case 100:
case 109:
case 115:
}
C
? e(
r,
X,
X,
i &&
v(
G(r, X, X, 0, 0, a, d, V, a, (Y = []), j, J),
J,
),
a,
J,
j,
d,
i ? Y : J,
)
: e(Z, X, X, X, [""], J, 0, d, J);
}
}
(w = C = _ = 0), (L = O = 1), (V = Z = ""), (j = u);
break;
case 58:
(j = 1 + y(Z)), (_ = R);
default:
if (L < 1) {
if (123 == D) --L;
else if (125 == D && 0 == L++ && 125 == A()) continue;
}
switch (((Z += c(D)), D * L)) {
case 38:
O = C > 0 ? 1 : ((Z += "\f"), -1);
break;
case 44:
(d[w++] = (y(Z) - 1) * O), (O = 1);
break;
case 64:
45 === P() && (Z += W(I())),
($ = P()),
(C = j = y((V = Z += H(E)))),
D++;
break;
case 45:
45 === R && 2 == y(Z) && (L = 0);
}
}
return s;
})("", null, null, null, [""], (e = O(e)), 0, [0], e),
);
}
function G(e, t, o, n, i, a, s, c, u, d, p, m) {
for (
var h = i - 1, y = 0 === i ? a : [""], v = x(y), S = 0, k = 0, w = 0;
S < n;
++S
)
for (var C = 0, j = b(e, h + 1, (h = l((k = s[S])))), E = e; C < v; ++C)
(E = f(k > 0 ? y[C] + " " + j : g(j, /&\f/g, y[C]))) && (u[w++] = E);
return T(e, t, o, 0 === i ? r : c, u, d, p, m);
}
function K(e, t, r, n, i) {
return T(e, t, r, o, b(e, 0, n), b(e, n + 1, -1), n, i);
}
function Y(e, t) {
for (var r = "", o = 0; o < e.length; o++) r += t(e[o], o, e, t) || "";
return r;
}
function J(e, l, c, u) {
switch (e.type) {
case s:
if (e.children.length) break;
case n:
case i:
case o:
return (e.return = e.return || e.value);
case t:
return "";
case a:
return (e.return = e.value + "{" + Y(e.children, u) + "}");
case r:
if (!y((e.value = e.props.join(",")))) return "";
}
return y((c = Y(e.children, u)))
? (e.return = e.value + "{" + c + "}")
: "";
}
e.s(
[
"alloc",
() => O,
"caret",
() => z,
"char",
() => L,
"commenter",
() => U,
"copy",
() => _,
"dealloc",
() => D,
"delimit",
() => W,
"escaping",
() => F,
"identifier",
() => H,
"lift",
() => R,
"next",
() => I,
"node",
() => T,
"peek",
() => P,
"prev",
() => A,
"token",
() => N,
"whitespace",
() => B,
],
921976,
),
e.s(["compile", () => V], 357957),
e.s(["serialize", () => Y, "stringify", () => J], 368185);
},
403094,
(e) => {
"use strict";
var t = e.i(462214),
r = e.i(358379),
o = e.i(855698),
n = e.i(938202),
i = e.i(7284),
a = e.i(620428),
s = e.i(479324),
l = e.i(450943),
c = e.i(124859),
u = e.i(593307),
d = {
root: "m_5ae2e3c",
barsLoader: "m_7a2bd4cd",
bar: "m_870bb79",
"bars-loader-animation": "m_5d2b3b9d",
dotsLoader: "m_4e3f22d7",
dot: "m_870c4af",
"loader-dots-animation": "m_aac34a1",
ovalLoader: "m_b34414df",
"oval-loader-animation": "m_f8e89c4b",
};
let f = (0, r.forwardRef)(({ className: e, ...r }, o) =>
(0, t.jsxs)(c.Box, {
component: "span",
className: (0, i.default)(d.barsLoader, e),
...r,
ref: o,
children: [
(0, t.jsx)("span", { className: d.bar }),
(0, t.jsx)("span", { className: d.bar }),
(0, t.jsx)("span", { className: d.bar }),
],
}),
);
f.displayName = "@mantine/core/Bars";
let p = (0, r.forwardRef)(({ className: e, ...r }, o) =>
(0, t.jsxs)(c.Box, {
component: "span",
className: (0, i.default)(d.dotsLoader, e),
...r,
ref: o,
children: [
(0, t.jsx)("span", { className: d.dot }),
(0, t.jsx)("span", { className: d.dot }),
(0, t.jsx)("span", { className: d.dot }),
],
}),
);
p.displayName = "@mantine/core/Dots";
let g = (0, r.forwardRef)(({ className: e, ...r }, o) =>
(0, t.jsx)(c.Box, {
component: "span",
className: (0, i.default)(d.ovalLoader, e),
...r,
ref: o,
}),
);
g.displayName = "@mantine/core/Oval";
let m = { bars: f, oval: g, dots: p },
h = { loaders: m, type: "oval" },
b = (0, n.createVarsResolver)((e, { size: t, color: r }) => ({
root: {
"--loader-size": (0, o.getSize)(t, "loader-size"),
"--loader-color": r ? (0, a.getThemeColor)(r, e) : void 0,
},
})),
y = (0, u.factory)((e, r) => {
let o = (0, s.useProps)("Loader", h, e),
{
size: n,
color: i,
type: a,
vars: u,
className: f,
style: p,
classNames: g,
styles: m,
unstyled: y,
loaders: x,
variant: v,
children: S,
attributes: k,
...w
} = o,
C = (0, l.useStyles)({
name: "Loader",
props: o,
classes: d,
className: f,
style: p,
classNames: g,
styles: m,
unstyled: y,
attributes: k,
vars: u,
varsResolver: b,
});
return S
? (0, t.jsx)(c.Box, { ...C("root"), ref: r, ...w, children: S })
: (0, t.jsx)(c.Box, {
...C("root"),
ref: r,
component: x[a],
variant: v,
size: n,
...w,
});
});
(y.defaultLoaders = m),
(y.classes = d),
(y.displayName = "@mantine/core/Loader"),
e.s(["Loader", () => y], 403094);
},
524961,
(e) => {
"use strict";
var t = e.i(462214),
r = e.i(389435);
e.i(358379);
var o = e.i(855698),
n = e.i(938202);
e.i(7284);
var i = e.i(479324),
a = e.i(450943),
s = e.i(124859),
l = e.i(910655),
c = e.i(403094),
u = e.i(764218),
d = e.i(606227),
f = {
root: "m_77c9d27d",
inner: "m_80f1301b",
label: "m_811560b9",
section: "m_a74036a",
loader: "m_a25b86ee",
group: "m_80d6d844",
groupSection: "m_70be2a01",
},
p = e.i(593307);
let g = { orientation: "horizontal" },
m = (0, n.createVarsResolver)((e, { borderWidth: t }) => ({
group: { "--button-border-width": (0, r.rem)(t) },
})),
h = (0, p.factory)((e, r) => {
let o = (0, i.useProps)("ButtonGroup", g, e),
{
className: n,
style: l,
classNames: c,
styles: u,
unstyled: d,
orientation: p,
vars: h,
borderWidth: b,
variant: y,
mod: x,
attributes: v,
...S
} = (0, i.useProps)("ButtonGroup", g, e),
k = (0, a.useStyles)({
name: "ButtonGroup",
props: o,
classes: f,
className: n,
style: l,
classNames: c,
styles: u,
unstyled: d,
attributes: v,
vars: h,
varsResolver: m,
rootSelector: "group",
});
return (0, t.jsx)(s.Box, {
...k("group"),
ref: r,
variant: y,
mod: [{ "data-orientation": p }, x],
role: "group",
...S,
});
});
(h.classes = f), (h.displayName = "@mantine/core/ButtonGroup");
let b = (0, n.createVarsResolver)(
(
e,
{
radius: t,
color: r,
gradient: n,
variant: i,
autoContrast: a,
size: s,
},
) => {
let l = e.variantColorResolver({
color: r || e.primaryColor,
theme: e,
gradient: n,
variant: i || "filled",
autoContrast: a,
});
return {
groupSection: {
"--section-height": (0, o.getSize)(s, "section-height"),
"--section-padding-x": (0, o.getSize)(s, "section-padding-x"),
"--section-fz": s?.includes("compact")
? (0, o.getFontSize)(s.replace("compact-", ""))
: (0, o.getFontSize)(s),
"--section-radius": void 0 === t ? void 0 : (0, o.getRadius)(t),
"--section-bg": r || i ? l.background : void 0,
"--section-color": l.color,
"--section-bd": r || i ? l.border : void 0,
},
};
},
),
y = (0, p.factory)((e, r) => {
let o = (0, i.useProps)("ButtonGroupSection", null, e),
{
className: n,
style: l,
classNames: c,
styles: u,
unstyled: d,
vars: p,
variant: g,
gradient: m,
radius: h,
autoContrast: y,
attributes: x,
...v
} = o,
S = (0, a.useStyles)({
name: "ButtonGroupSection",
props: o,
classes: f,
className: n,
style: l,
classNames: c,
styles: u,
unstyled: d,
attributes: x,
vars: p,
varsResolver: b,
rootSelector: "groupSection",
});
return (0, t.jsx)(s.Box, {
...S("groupSection"),
ref: r,
variant: g,
...v,
});
});
(y.classes = f), (y.displayName = "@mantine/core/ButtonGroupSection");
let x = {
in: {
opacity: 1,
transform: `translate(-50%, calc(-50% + ${(0, r.rem)(1)}))`,
},
out: { opacity: 0, transform: "translate(-50%, -200%)" },
common: { transformOrigin: "center" },
transitionProperty: "transform, opacity",
},
v = (0, n.createVarsResolver)(
(
e,
{
radius: t,
color: r,
gradient: n,
variant: i,
size: a,
justify: s,
autoContrast: l,
},
) => {
let c = e.variantColorResolver({
color: r || e.primaryColor,
theme: e,
gradient: n,
variant: i || "filled",
autoContrast: l,
});
return {
root: {
"--button-justify": s,
"--button-height": (0, o.getSize)(a, "button-height"),
"--button-padding-x": (0, o.getSize)(a, "button-padding-x"),
"--button-fz": a?.includes("compact")
? (0, o.getFontSize)(a.replace("compact-", ""))
: (0, o.getFontSize)(a),
"--button-radius": void 0 === t ? void 0 : (0, o.getRadius)(t),
"--button-bg": r || i ? c.background : void 0,
"--button-hover": r || i ? c.hover : void 0,
"--button-color": c.color,
"--button-bd": r || i ? c.border : void 0,
"--button-hover-color": r || i ? c.hoverColor : void 0,
},
};
},
),
S = (0, l.polymorphicFactory)((e, r) => {
let o = (0, i.useProps)("Button", null, e),
{
style: n,
vars: l,
className: p,
color: g,
disabled: m,
children: h,
leftSection: b,
rightSection: y,
fullWidth: S,
variant: k,
radius: w,
loading: C,
loaderProps: j,
gradient: E,
classNames: M,
styles: $,
unstyled: T,
"data-disabled": _,
autoContrast: R,
mod: L,
attributes: A,
...I
} = o,
P = (0, a.useStyles)({
name: "Button",
props: o,
classes: f,
className: p,
style: n,
classNames: M,
styles: $,
unstyled: T,
attributes: A,
vars: l,
varsResolver: v,
}),
z = !!b,
N = !!y;
return (0, t.jsxs)(d.UnstyledButton, {
ref: r,
...P("root", { active: !m && !C && !_ }),
unstyled: T,
variant: k,
disabled: m || C,
mod: [
{
disabled: m || _,
loading: C,
block: S,
"with-left-section": z,
"with-right-section": N,
},
L,
],
...I,
children: [
"boolean" == typeof C &&
(0, t.jsx)(u.Transition, {
mounted: C,
transition: x,
duration: 150,
children: (e) =>
(0, t.jsx)(s.Box, {
component: "span",
...P("loader", { style: e }),
"aria-hidden": !0,
children: (0, t.jsx)(c.Loader, {
color: "var(--button-color)",
size: "calc(var(--button-height) / 1.8)",
...j,
}),
}),
}),
(0, t.jsxs)("span", {
...P("inner"),
children: [
b &&
(0, t.jsx)(s.Box, {
component: "span",
...P("section"),
mod: { position: "left" },
children: b,
}),
(0, t.jsx)(s.Box, {
component: "span",
mod: { loading: C },
...P("label"),
children: h,
}),
y &&
(0, t.jsx)(s.Box, {
component: "span",
...P("section"),
mod: { position: "right" },
children: y,
}),
],
}),
],
});
});
(S.classes = f),
(S.displayName = "@mantine/core/Button"),
(S.Group = h),
(S.GroupSection = y),
e.s(["Button", () => S], 524961);
},
422676,
(e) => {
"use strict";
var t = e.i(462214),
r = e.i(358379),
o = e.i(855698),
n = e.i(938202);
e.i(7284);
var i = e.i(479324),
a = e.i(450943),
s = e.i(124859),
l = e.i(593307),
c = { root: "m_4081bf90" };
let u = {
preventGrowOverflow: !0,
gap: "md",
align: "center",
justify: "flex-start",
wrap: "wrap",
},
d = (0, n.createVarsResolver)(
(
e,
{
grow: t,
preventGrowOverflow: r,
gap: n,
align: i,
justify: a,
wrap: s,
},
{ childWidth: l },
) => ({
root: {
"--group-child-width": t && r ? l : void 0,
"--group-gap": (0, o.getSpacing)(n),
"--group-align": i,
"--group-justify": a,
"--group-wrap": s,
},
}),
),
f = (0, l.factory)((e, n) => {
let l = (0, i.useProps)("Group", u, e),
{
classNames: f,
className: p,
style: g,
styles: m,
unstyled: h,
children: b,
gap: y,
align: x,
justify: v,
wrap: S,
grow: k,
preventGrowOverflow: w,
vars: C,
variant: j,
__size: E,
mod: M,
attributes: $,
...T
} = l,
_ = r.Children.toArray(b).filter(Boolean),
R = _.length,
L = (0, o.getSpacing)(y ?? "md"),
A = `calc(${100 / R}% - (${L} - ${L} / ${R}))`,
I = (0, a.useStyles)({
name: "Group",
props: l,
stylesCtx: { childWidth: A },
className: p,
style: g,
classes: c,
classNames: f,
styles: m,
unstyled: h,
attributes: $,
vars: C,
varsResolver: d,
});
return (0, t.jsx)(s.Box, {
...I("root"),
ref: n,
variant: j,
mod: [{ grow: k }, M],
size: E,
...T,
children: _,
});
});
(f.classes = c),
(f.displayName = "@mantine/core/Group"),
e.s(["Group", () => f], 422676);
},
254119,
(e) => {
"use strict";
var t = e.i(358379);
let r = (e) => {
let t,
r =
((t = navigator.userAgent.toLowerCase()),
{
isAndroid: /android/.test(t),
isIOS: /iphone|ipad|ipod/.test(t),
isWindows: /windows phone/.test(t),
isMobileUA:
/mobile|android|iphone|ipod|blackberry|iemobile|opera mini/.test(
t,
),
isTabletUA:
/ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone))/.test(
t,
),
}),
o =
"ontouchstart" in window ||
navigator.maxTouchPoints > 0 ||
navigator.msMaxTouchPoints > 0;
return r.isMobileUA
? {
isMobile: !0,
isTablet: !1,
isDesktop: !1,
screenWidth: e,
isTouchDevice: o,
userAgent: navigator.userAgent,
breakpoint: "mobile",
}
: r.isTabletUA
? {
isMobile: !1,
isTablet: !0,
isDesktop: !1,
screenWidth: e,
isTouchDevice: o,
userAgent: navigator.userAgent,
breakpoint: "tablet",
}
: e < 768
? {
isMobile: !0,
isTablet: !1,
isDesktop: !1,
screenWidth: e,
isTouchDevice: o,
userAgent: navigator.userAgent,
breakpoint: "mobile",
}
: e < 1024
? {
isMobile: !1,
isTablet: !0,
isDesktop: !1,
screenWidth: e,
isTouchDevice: o,
userAgent: navigator.userAgent,
breakpoint: "tablet",
}
: {
isMobile: !1,
isTablet: !1,
isDesktop: !0,
screenWidth: e,
isTouchDevice: o,
userAgent: navigator.userAgent,
breakpoint: "desktop",
};
},
o = () => {
let [e, o] = (0, t.useState)(() => r(window.innerWidth));
return (
(0, t.useEffect)(() => {
let e,
t = () => {
o(r(window.innerWidth));
},
n = () => {
clearTimeout(e), (e = setTimeout(t, 100));
};
return (
window.addEventListener("resize", n),
window.addEventListener("orientationchange", t),
() => {
window.removeEventListener("resize", n),
window.removeEventListener("orientationchange", t),
clearTimeout(e);
}
);
}, []),
e
);
};
e.s(["useIsMobile", 0, o, "useIsMobileSimple", 0, () => o().isMobile]);
},
362727,
(e) => {
"use strict";
function t(e) {
let t =
"string" == typeof e && e.includes("var(--mantine-scale)")
? e
.match(/^calc\((.*?)\)$/)?.[1]
.split("*")[0]
.trim()
: e;
return "number" == typeof t
? t
: "string" == typeof t
? t.includes("calc") || t.includes("var")
? t
: t.includes("px")
? Number(t.replace("px", ""))
: t.includes("rem")
? 16 * Number(t.replace("rem", ""))
: t.includes("em")
? 16 * Number(t.replace("em", ""))
: Number(t)
: NaN;
}
e.s(["px", () => t]);
},
963527,
(e) => {
"use strict";
e.s([
"communityPostMessage",
0,
({ type: e, data: t }) => {
e && window.postMessage(JSON.stringify({ type: e, data: t }));
},
"openVipModel",
0,
(e) => {
window.postMessage(
JSON.stringify({ type: "show_purchase_dialog", data: e }),
);
},
]);
},
182004,
(e) => {
"use strict";
var t,
r,
o,
n =
(((t = {}).TEXT = "text"),
(t.IMAGE = "image"),
(t.VIDEO = "video"),
(t.AUDIO = "audio"),
(t.CUSTOM = "custom"),
(t.GROUP = "group"),
(t.SCRIPT = "script"),
(t.VIDEO_STORY = "video-story"),
(t.VIDEO_GROUP = "video_group"),
(t.VIDEO_CLIP = "video-clip"),
(t.SPACE_SCENE_720 = "space-scene-720"),
t);
let i = {
text: "文本",
image: "图片",
video: "视频",
audio: "音频",
custom: "自定义",
group: "分组",
script: "脚本",
"video-story": "视频故事",
video_group: "视频组",
"video-clip": "视频合成",
storyboard: "脚本",
temp: "临时",
};
function a(e) {
if ("string" != typeof e) return;
let t = e.trim();
if (t) return i[t];
}
var s = (((r = {}).DEFAULT = "default"), (r.ENHANCE = "enhance"), r),
l =
(((o = {}).TEXT_GENERATE = "text_generate"),
(o.TEXT_RESOURCE = "text_resource"),
(o.IMAGE_GENERATE = "image_generate"),
(o.IMAGE_EDIT = "image_edit"),
(o.IMAGE_RESOURCE = "image_resource"),
(o.VIDEO_GENERATE = "video_generate"),
(o.VIDEO_EDIT = "video_edit"),
(o.VIDEO_RESOURCE = "video_resource"),
(o.VIDEO_CLIP_RESOURCE = "video_clip_resource"),
(o.AUDIO_GENERATE = "audio_generate"),
(o.AUDIO_RESOURCE = "audio_resource"),
(o.SCRIPT_GENERATE = "script_generate"),
(o.SCRIPT_RESOURCE = "script_resource"),
(o.VIDEO_STORY_RESOURCE = "video_story_resource"),
o);
let c = [
{
key: "shotNumber",
apiKey: "shot_number",
label: "镜号",
numeric: !0,
fieldType: "number",
},
{
key: "durationSeconds",
apiKey: "duration_seconds",
label: "时长",
numeric: !0,
fieldType: "number",
},
{
key: "plotDescription",
apiKey: "plot_description",
label: "画面描述",
numeric: !1,
fieldType: "text",
},
{
key: "videoReference",
apiKey: "video_reference",
label: "视频参考图",
numeric: !1,
fieldType: "image",
},
{
key: "shotSize",
apiKey: "shot_size",
label: "景别",
numeric: !1,
fieldType: "text",
},
{
key: "characterAction",
apiKey: "character_action",
label: "角色动作",
numeric: !1,
fieldType: "text",
},
{
key: "emotion",
apiKey: "emotion",
label: "表情",
numeric: !1,
fieldType: "text",
},
{
key: "sceneTags",
apiKey: "scene_tags",
label: "场景",
numeric: !1,
fieldType: "text",
},
{
key: "lightingAndAtmosphere",
apiKey: "lighting_and_atmosphere",
label: "光影氛围",
numeric: !1,
fieldType: "text",
},
{
key: "audioEffects",
apiKey: "audio_effects",
label: "音效",
numeric: !1,
fieldType: "text",
},
{
key: "dialogue",
apiKey: "dialogue",
label: "对白",
numeric: !1,
fieldType: "text",
},
{
key: "imageGenerationPrompt",
apiKey: "image_generation_prompt",
label: "分镜提示词",
numeric: !1,
fieldType: "text",
},
{
key: "videoMotionPrompt",
apiKey: "video_motion_prompt",
label: "视频提示词",
numeric: !1,
fieldType: "text",
},
];
function u(e, t) {
let r = c.find((t) => t.key === e);
if (t?.length && r) {
let e = t.find((e) => e.field === r.apiKey);
if (e) return e.label;
}
return r?.label ?? e;
}
let d = new Set([
"image_resource",
"video_resource",
"video_clip_resource",
"audio_resource",
"text_resource",
"script_resource",
"video_story_resource",
]);
function f(e) {
return null != e && d.has(e);
}
e.s([
"DEFAULT_SCRIPT_VIEWS",
0,
[
{ id: "default", type: "table", name: "脚本视图" },
{ id: "creative", type: "creative", name: "创意视图" },
],
"GeneratorType",
() => s,
"NodeAction",
() => l,
"NodeType",
() => n,
"SCRIPT_FIELD_META",
0,
c,
"getFieldLabel",
() => u,
"getMediaType",
0,
(e) =>
e.includes("image")
? { action: "image_resource", nodeType: "image" }
: e.includes("video")
? { action: "video_resource", nodeType: "video" }
: e.includes("audio")
? { action: "audio_resource", nodeType: "audio" }
: { action: "text_resource", nodeType: "text" },
"isResourceAction",
() => f,
"resolveCanvasNodeTypeLabelZh",
() => a,
]);
},
546372,
(e) => {
"use strict";
e.s([
"i18n",
0,
{ defaultLocale: "zh", locales: ["zh"] },
"langArray",
0,
[{ label: "简体中文", alias: "简中", value: "zh" }],
]);
},
677588,
(e) => {
"use strict";
var t = e.i(358379);
e.i(606823);
var r = e.i(626673),
o = e.i(470760);
function n(e) {
if (e && location.href.includes("sourceId")) {
let t = new URLSearchParams(location.search).get("sourceId");
t && (e.var ? (e.var.source_id = t) : (e.var = { source_id: t }));
}
window.__is_canary &&
(e.var
? (e.var.is_canary = window.__is_canary)
: (e.var = { is_canary: window.__is_canary }));
try {
(0, o.report)(e);
} catch {}
}
e.s([
"reportLog",
() => n,
"useReportLogReceiver",
0,
() => {
(0, t.useEffect)(() => {
let e = (e) => {
e.data?.type === r.REPORT_LOG_MESSAGE_TYPE && n(e.data.payload);
};
return (
window.addEventListener("message", e),
() => window.removeEventListener("message", e)
);
}, []);
},
]);
},
507263,
(e) => {
"use strict";
var t = e.i(282335),
r = e.i(801727);
function o({ color: e, theme: t, autoContrast: o }) {
return ("boolean" == typeof o ? o : t.autoContrast) &&
(0, r.parseThemeColor)({ color: e || t.primaryColor, theme: t }).isLight
? "var(--mantine-color-black)"
: "var(--mantine-color-white)";
}
function n(e, r) {
return o({
color: e.colors[e.primaryColor][(0, t.getPrimaryShade)(e, r)],
theme: e,
autoContrast: null,
});
}
e.s(["getContrastColor", () => o, "getPrimaryContrastColor", () => n]);
},
151449,
(e) => {
"use strict";
var t = e.i(462214);
function r(e) {
return "auto" === e || "dark" === e || "light" === e;
}
var o = e.i(978459),
n = e.i(889403),
i = e.i(362727),
a = e.i(389435),
s = e.i(358379),
l = e.i(830744);
function c() {
let e = (0, l.useMantineTheme)(),
r = (0, o.useMantineStyleNonce)(),
s = (0, n.keys)(e.breakpoints).reduce((t, r) => {
let o = e.breakpoints[r].includes("px"),
n = (0, i.px)(e.breakpoints[r]),
s = o ? `${n - 0.1}px` : (0, a.em)(n - 0.1),
l = o ? `${n}px` : (0, a.em)(n);
return `${t}@media (max-width: ${s}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${r} {display: none !important;}}`;
}, "");
return (0, t.jsx)("style", {
"data-mantine-styles": "classes",
nonce: r?.(),
dangerouslySetInnerHTML: { __html: s },
});
}
function u(e) {
return Object.entries(e)
.map(([e, t]) => `${e}: ${t};`)
.join("");
}
function d(e, t) {
let r = t ? [t] : [":root", ":host"],
o = u(e.variables),
n = o ? `${r.join(", ")}{${o}}` : "",
i = u(e.dark),
a = u(e.light),
s = (e) =>
r
.map((t) =>
":host" === t
? `${t}([data-mantine-color-scheme="${e}"])`
: `${t}[data-mantine-color-scheme="${e}"]`,
)
.join(", "),
l = i ? `${s("dark")}{${i}}` : "",
c = a ? `${s("light")}{${a}}` : "";
return `${n}
${l}
${c}`;
}
var f = e.i(198138),
p = e.i(282335),
g = e.i(507263),
m = e.i(540685);
function h({
theme: e,
color: t,
colorScheme: r,
name: o = t,
withColorValues: n = !0,
}) {
if (!e.colors[t]) return {};
if ("light" === r) {
let r = (0, p.getPrimaryShade)(e, "light"),
i = {
[`--mantine-color-${o}-text`]: `var(--mantine-color-${o}-filled)`,
[`--mantine-color-${o}-filled`]: `var(--mantine-color-${o}-${r})`,
[`--mantine-color-${o}-filled-hover`]: `var(--mantine-color-${o}-${9 === r ? 8 : r + 1})`,
[`--mantine-color-${o}-light`]: (0, m.alpha)(e.colors[t][r], 0.1),
[`--mantine-color-${o}-light-hover`]: (0, m.alpha)(
e.colors[t][r],
0.12,
),
[`--mantine-color-${o}-light-color`]: `var(--mantine-color-${o}-${r})`,
[`--mantine-color-${o}-outline`]: `var(--mantine-color-${o}-${r})`,
[`--mantine-color-${o}-outline-hover`]: (0, m.alpha)(
e.colors[t][r],
0.05,
),
};
return n
? {
[`--mantine-color-${o}-0`]: e.colors[t][0],
[`--mantine-color-${o}-1`]: e.colors[t][1],
[`--mantine-color-${o}-2`]: e.colors[t][2],
[`--mantine-color-${o}-3`]: e.colors[t][3],
[`--mantine-color-${o}-4`]: e.colors[t][4],
[`--mantine-color-${o}-5`]: e.colors[t][5],
[`--mantine-color-${o}-6`]: e.colors[t][6],
[`--mantine-color-${o}-7`]: e.colors[t][7],
[`--mantine-color-${o}-8`]: e.colors[t][8],
[`--mantine-color-${o}-9`]: e.colors[t][9],
...i,
}
: i;
}
let i = (0, p.getPrimaryShade)(e, "dark"),
a = {
[`--mantine-color-${o}-text`]: `var(--mantine-color-${o}-4)`,
[`--mantine-color-${o}-filled`]: `var(--mantine-color-${o}-${i})`,
[`--mantine-color-${o}-filled-hover`]: `var(--mantine-color-${o}-${9 === i ? 8 : i + 1})`,
[`--mantine-color-${o}-light`]: (0, m.alpha)(
e.colors[t][Math.max(0, i - 2)],
0.15,
),
[`--mantine-color-${o}-light-hover`]: (0, m.alpha)(
e.colors[t][Math.max(0, i - 2)],
0.2,
),
[`--mantine-color-${o}-light-color`]: `var(--mantine-color-${o}-${Math.max(i - 5, 0)})`,
[`--mantine-color-${o}-outline`]: `var(--mantine-color-${o}-${Math.max(i - 4, 0)})`,
[`--mantine-color-${o}-outline-hover`]: (0, m.alpha)(
e.colors[t][Math.max(i - 4, 0)],
0.05,
),
};
return n
? {
[`--mantine-color-${o}-0`]: e.colors[t][0],
[`--mantine-color-${o}-1`]: e.colors[t][1],
[`--mantine-color-${o}-2`]: e.colors[t][2],
[`--mantine-color-${o}-3`]: e.colors[t][3],
[`--mantine-color-${o}-4`]: e.colors[t][4],
[`--mantine-color-${o}-5`]: e.colors[t][5],
[`--mantine-color-${o}-6`]: e.colors[t][6],
[`--mantine-color-${o}-7`]: e.colors[t][7],
[`--mantine-color-${o}-8`]: e.colors[t][8],
[`--mantine-color-${o}-9`]: e.colors[t][9],
...a,
}
: a;
}
function b(e, t, r) {
(0, n.keys)(t).forEach((o) =>
Object.assign(e, { [`--mantine-${r}-${o}`]: t[o] }),
);
}
let y = (e) => {
let t = (0, p.getPrimaryShade)(e, "light"),
r =
e.defaultRadius in e.radius
? e.radius[e.defaultRadius]
: (0, a.rem)(e.defaultRadius),
o = {
variables: {
"--mantine-z-index-app": "100",
"--mantine-z-index-modal": "200",
"--mantine-z-index-popover": "300",
"--mantine-z-index-overlay": "400",
"--mantine-z-index-max": "9999",
"--mantine-scale": e.scale.toString(),
"--mantine-cursor-type": e.cursorType,
"--mantine-webkit-font-smoothing": e.fontSmoothing
? "antialiased"
: "unset",
"--mantine-moz-font-smoothing": e.fontSmoothing
? "grayscale"
: "unset",
"--mantine-color-white": e.white,
"--mantine-color-black": e.black,
"--mantine-line-height": e.lineHeights.md,
"--mantine-font-family": e.fontFamily,
"--mantine-font-family-monospace": e.fontFamilyMonospace,
"--mantine-font-family-headings": e.headings.fontFamily,
"--mantine-heading-font-weight": e.headings.fontWeight,
"--mantine-heading-text-wrap": e.headings.textWrap,
"--mantine-radius-default": r,
"--mantine-primary-color-filled": `var(--mantine-color-${e.primaryColor}-filled)`,
"--mantine-primary-color-filled-hover": `var(--mantine-color-${e.primaryColor}-filled-hover)`,
"--mantine-primary-color-light": `var(--mantine-color-${e.primaryColor}-light)`,
"--mantine-primary-color-light-hover": `var(--mantine-color-${e.primaryColor}-light-hover)`,
"--mantine-primary-color-light-color": `var(--mantine-color-${e.primaryColor}-light-color)`,
},
light: {
"--mantine-color-scheme": "light",
"--mantine-primary-color-contrast": (0,
g.getPrimaryContrastColor)(e, "light"),
"--mantine-color-bright": "var(--mantine-color-black)",
"--mantine-color-text": e.black,
"--mantine-color-body": e.white,
"--mantine-color-error": "var(--mantine-color-red-6)",
"--mantine-color-placeholder": "var(--mantine-color-gray-5)",
"--mantine-color-anchor": `var(--mantine-color-${e.primaryColor}-${t})`,
"--mantine-color-default": "var(--mantine-color-white)",
"--mantine-color-default-hover": "var(--mantine-color-gray-0)",
"--mantine-color-default-color": "var(--mantine-color-black)",
"--mantine-color-default-border": "var(--mantine-color-gray-4)",
"--mantine-color-dimmed": "var(--mantine-color-gray-6)",
"--mantine-color-disabled": "var(--mantine-color-gray-2)",
"--mantine-color-disabled-color": "var(--mantine-color-gray-5)",
"--mantine-color-disabled-border": "var(--mantine-color-gray-3)",
},
dark: {
"--mantine-color-scheme": "dark",
"--mantine-primary-color-contrast": (0,
g.getPrimaryContrastColor)(e, "dark"),
"--mantine-color-bright": "var(--mantine-color-white)",
"--mantine-color-text": "var(--mantine-color-dark-0)",
"--mantine-color-body": "var(--mantine-color-dark-7)",
"--mantine-color-error": "var(--mantine-color-red-8)",
"--mantine-color-placeholder": "var(--mantine-color-dark-3)",
"--mantine-color-anchor": `var(--mantine-color-${e.primaryColor}-4)`,
"--mantine-color-default": "var(--mantine-color-dark-6)",
"--mantine-color-default-hover": "var(--mantine-color-dark-5)",
"--mantine-color-default-color": "var(--mantine-color-white)",
"--mantine-color-default-border": "var(--mantine-color-dark-4)",
"--mantine-color-dimmed": "var(--mantine-color-dark-2)",
"--mantine-color-disabled": "var(--mantine-color-dark-6)",
"--mantine-color-disabled-color": "var(--mantine-color-dark-3)",
"--mantine-color-disabled-border": "var(--mantine-color-dark-4)",
},
};
b(o.variables, e.breakpoints, "breakpoint"),
b(o.variables, e.spacing, "spacing"),
b(o.variables, e.fontSizes, "font-size"),
b(o.variables, e.lineHeights, "line-height"),
b(o.variables, e.shadows, "shadow"),
b(o.variables, e.radius, "radius"),
e.colors[e.primaryColor].forEach((t, r) => {
o.variables[`--mantine-primary-color-${r}`] =
`var(--mantine-color-${e.primaryColor}-${r})`;
}),
(0, n.keys)(e.colors).forEach((t) => {
let r = e.colors[t];
if (r && "object" == typeof r && "mantine-virtual-color" in r) {
Object.assign(
o.light,
h({
theme: e,
name: r.name,
color: r.light,
colorScheme: "light",
withColorValues: !0,
}),
),
Object.assign(
o.dark,
h({
theme: e,
name: r.name,
color: r.dark,
colorScheme: "dark",
withColorValues: !0,
}),
);
return;
}
r.forEach((e, r) => {
o.variables[`--mantine-color-${t}-${r}`] = e;
}),
Object.assign(
o.light,
h({
theme: e,
color: t,
colorScheme: "light",
withColorValues: !1,
}),
),
Object.assign(
o.dark,
h({
theme: e,
color: t,
colorScheme: "dark",
withColorValues: !1,
}),
);
});
let i = e.headings.sizes;
return (
(0, n.keys)(i).forEach((t) => {
(o.variables[`--mantine-${t}-font-size`] = i[t].fontSize),
(o.variables[`--mantine-${t}-line-height`] = i[t].lineHeight),
(o.variables[`--mantine-${t}-font-weight`] =
i[t].fontWeight || e.headings.fontWeight);
}),
o
);
},
x = y(e.i(648598).DEFAULT_THEME);
function v({ cssVariablesSelector: e, deduplicateCssVariables: r }) {
let i,
a = (0, l.useMantineTheme)(),
s = (0, o.useMantineStyleNonce)(),
c = (function ({ theme: e, generator: t }) {
let r = y(e),
o = t?.(e);
return o ? (0, f.deepMerge)(r, o) : r;
})({ theme: a, generator: (0, o.useMantineCssVariablesResolver)() }),
u = (void 0 === e || ":root" === e || ":host" === e) && r,
p = d(
u
? ((i = { variables: {}, light: {}, dark: {} }),
(0, n.keys)(c.variables).forEach((e) => {
x.variables[e] !== c.variables[e] &&
(i.variables[e] = c.variables[e]);
}),
(0, n.keys)(c.light).forEach((e) => {
x.light[e] !== c.light[e] && (i.light[e] = c.light[e]);
}),
(0, n.keys)(c.dark).forEach((e) => {
x.dark[e] !== c.dark[e] && (i.dark[e] = c.dark[e]);
}),
i)
: c,
e,
);
return p
? (0, t.jsx)("style", {
"data-mantine-styles": !0,
nonce: s?.(),
dangerouslySetInnerHTML: {
__html: `${p}${u ? "" : d({ variables: {}, dark: { "--mantine-color-scheme": "dark" }, light: { "--mantine-color-scheme": "light" } }, e)}`,
},
})
: null;
}
v.displayName = "@mantine/CssVariables";
var S = e.i(883787);
function k(e, t) {
let r =
"u" > typeof window &&
"matchMedia" in window &&
window.matchMedia("(prefers-color-scheme: dark)")?.matches;
t()?.setAttribute(
"data-mantine-color-scheme",
"auto" !== e ? e : r ? "dark" : "light",
);
}
function w({
theme: e,
children: n,
getStyleNonce: i,
withStaticClasses: a = !0,
withGlobalClasses: u = !0,
deduplicateCssVariables: d = !0,
withCssVariables: f = !0,
cssVariablesSelector: p,
classNamesPrefix: g = "mantine",
colorSchemeManager: m = (function ({
key: e = "mantine-color-scheme-value",
} = {}) {
let t;
return {
get: (t) => {
if ("u" < typeof window) return t;
try {
let o = window.localStorage.getItem(e);
return r(o) ? o : t;
} catch {
return t;
}
},
set: (t) => {
try {
window.localStorage.setItem(e, t);
} catch (e) {
console.warn(
"[@mantine/core] Local storage color scheme manager was unable to save color scheme.",
e,
);
}
},
subscribe: (o) => {
(t = (t) => {
t.storageArea === window.localStorage &&
t.key === e &&
r(t.newValue) &&
o(t.newValue);
}),
window.addEventListener("storage", t);
},
unsubscribe: () => {
window.removeEventListener("storage", t);
},
clear: () => {
window.localStorage.removeItem(e);
},
};
})(),
defaultColorScheme: h = "light",
getRootElement: b = () => document.documentElement,
cssVariablesResolver: y,
forceColorScheme: x,
stylesTransform: w,
env: C,
}) {
let {
colorScheme: j,
setColorScheme: E,
clearColorScheme: M,
} = (function ({
manager: e,
defaultColorScheme: t,
getRootElement: r,
forceColorScheme: o,
}) {
let n = (0, s.useRef)(null),
[i, a] = (0, s.useState)(() => e.get(t)),
l = o || i,
c = (0, s.useCallback)(
(t) => {
o || (k(t, r), a(t), e.set(t));
},
[e.set, l, o],
),
u = (0, s.useCallback)(() => {
a(t), k(t, r), e.clear();
}, [e.clear, t]);
return (
(0, s.useEffect)(
() => (e.subscribe(c), e.unsubscribe),
[e.subscribe, e.unsubscribe],
),
(0, S.useIsomorphicEffect)(() => {
k(e.get(t), r);
}, []),
(0, s.useEffect)(() => {
if (o) return k(o, r), () => {};
void 0 === o && k(i, r),
"u" > typeof window &&
"matchMedia" in window &&
(n.current = window.matchMedia("(prefers-color-scheme: dark)"));
let e = (e) => {
"auto" === i && k(e.matches ? "dark" : "light", r);
};
return (
n.current?.addEventListener("change", e),
() => n.current?.removeEventListener("change", e)
);
}, [i, o]),
{ colorScheme: l, setColorScheme: c, clearColorScheme: u }
);
})({
defaultColorScheme: h,
forceColorScheme: x,
manager: m,
getRootElement: b,
});
return (
!(function ({ respectReducedMotion: e, getRootElement: t }) {
(0, S.useIsomorphicEffect)(() => {
e && t()?.setAttribute("data-respect-reduced-motion", "true");
}, [e]);
})({
respectReducedMotion: e?.respectReducedMotion || !1,
getRootElement: b,
}),
(0, t.jsx)(o.MantineContext.Provider, {
value: {
colorScheme: j,
setColorScheme: E,
clearColorScheme: M,
getRootElement: b,
classNamesPrefix: g,
getStyleNonce: i,
cssVariablesResolver: y,
cssVariablesSelector: p ?? ":root",
withStaticClasses: a,
stylesTransform: w,
env: C,
},
children: (0, t.jsxs)(l.MantineThemeProvider, {
theme: e,
children: [
f &&
(0, t.jsx)(v, {
cssVariablesSelector: p,
deduplicateCssVariables: d,
}),
u && (0, t.jsx)(c, {}),
n,
],
}),
})
);
}
function C({ children: e, theme: r, env: n }) {
return (0, t.jsx)(o.MantineContext.Provider, {
value: {
colorScheme: "auto",
setColorScheme: () => {},
clearColorScheme: () => {},
getRootElement: () => document.documentElement,
classNamesPrefix: "mantine",
cssVariablesSelector: ":root",
withStaticClasses: !1,
headless: !0,
env: n,
},
children: (0, t.jsx)(l.MantineThemeProvider, { theme: r, children: e }),
});
}
(w.displayName = "@mantine/core/MantineProvider"),
(C.displayName = "@mantine/core/HeadlessMantineProvider"),
e.s(
["HeadlessMantineProvider", () => C, "MantineProvider", () => w],
151449,
);
},
260245,
(e) => {
"use strict";
function t(e) {
let t = document.documentElement;
t.classList.toggle("dark", "dark" === e),
t.classList.toggle("light", "light" === e),
t.classList.toggle("canvas-light", "light" === e);
}
e.s(["applyThemeClasses", () => t]);
},
397264,
216371,
805332,
506929,
210680,
171656,
(e) => {
"use strict";
e.s([], 216371);
class t {
constructor(e = {}) {
(this.stores = new Map()),
(this.listeners = new Map()),
(this.paused = !1),
(this.listenerIdCounter = 0),
(this.config = {
enabled: !0,
maxHistorySize: 100,
debugMode: !1,
autoRegister: !1,
logChanges: !1,
filters: { storeNames: [], excludeKeys: [] },
...e,
}),
this.config.debugMode &&
console.log("[StateMonitor] Initialized with config:", this.config);
}
register(e, t) {
if (!this.config.enabled) return;
if (this.stores.has(e))
return void console.warn(
`[StateMonitor] Store "${e}" is already registered`,
);
if (this.shouldFilterStore(e)) {
this.config.debugMode &&
console.log(`[StateMonitor] Store "${e}" filtered out`);
return;
}
let r = t.getState(),
o = t.subscribe((t, r) => {
if (this.paused) return;
let o = {
storeName: e,
oldState: r,
newState: t,
timestamp: Date.now(),
diff: this.computeDiff(r, t),
};
this.recordStateChange(e, o),
this.notifyListeners(o),
this.config.logChanges &&
console.log(`[StateMonitor] State changed in "${e}":`, o);
});
this.stores.set(e, {
name: e,
store: t,
unsubscribe: o,
currentState: r,
history: [],
}),
this.config.debugMode &&
console.log(`[StateMonitor] Registered store "${e}"`);
}
unregister(e) {
let t = this.stores.get(e);
t
? (t.unsubscribe(),
this.stores.delete(e),
this.config.debugMode &&
console.log(`[StateMonitor] Unregistered store "${e}"`))
: console.warn(`[StateMonitor] Store "${e}" is not registered`);
}
addListener(e) {
let t = `listener_${++this.listenerIdCounter}`;
return (
this.listeners.set(t, { ...e, id: t }),
this.config.debugMode &&
console.log(`[StateMonitor] Added listener "${t}"`),
t
);
}
removeListener(e) {
let t = this.listeners.delete(e);
this.config.debugMode &&
console.log(
`[StateMonitor] ${t ? "Removed" : "Failed to remove"} listener "${e}"`,
);
}
getState(e) {
let t = this.stores.get(e);
return null == t ? void 0 : t.store.getState();
}
getAllStates() {
let e = {};
for (let [t, r] of this.stores) e[t] = r.store.getState();
return e;
}
getHistory(e) {
if (e) {
let t = this.stores.get(e);
return (null == t ? void 0 : t.history) || [];
}
let t = [];
for (let e of this.stores.values()) t.push(...e.history);
return t.sort((e, t) => e.timestamp - t.timestamp);
}
clearHistory(e) {
if (e) {
let t = this.stores.get(e);
t && (t.history = []);
} else for (let e of this.stores.values()) e.history = [];
this.config.debugMode &&
console.log(
`[StateMonitor] Cleared history for ${e || "all stores"}`,
);
}
isRegistered(e) {
return this.stores.has(e);
}
getRegisteredStores() {
return Array.from(this.stores.keys());
}
pause() {
(this.paused = !0),
this.config.debugMode && console.log("[StateMonitor] Paused");
}
resume() {
(this.paused = !1),
this.config.debugMode && console.log("[StateMonitor] Resumed");
}
isPaused() {
return this.paused;
}
shouldFilterStore(e) {
let { filters: t } = this.config;
return (
!!t.storeNames && t.storeNames.length > 0 && !t.storeNames.includes(e)
);
}
recordStateChange(e, t) {
let r = this.stores.get(e);
r &&
(r.history.push(t),
(r.currentState = t.newState),
r.history.length > this.config.maxHistorySize && r.history.shift());
}
notifyListeners(e) {
for (let t of this.listeners.values())
if (!t.storeNames || t.storeNames.includes(e.storeName))
try {
t.callback(e);
} catch (e) {
console.error("[StateMonitor] Error in listener callback:", e);
}
}
computeDiff(e, t) {
if ("object" != typeof e || "object" != typeof t) return t;
let r = {};
for (let o of new Set([...Object.keys(e), ...Object.keys(t)])) {
let n = e[o],
i = t[o];
n !== i && (r[o] = i);
}
return r;
}
destroy() {
for (let e of this.stores.values()) e.unsubscribe();
this.stores.clear(),
this.listeners.clear(),
this.config.debugMode && console.log("[StateMonitor] Destroyed");
}
}
e.s(["StateMonitor", () => t], 805332);
var r = e.i(358379);
let o = null;
function n(e) {
return new t(e);
}
function i(e) {
return o || (o = new t(e)), o;
}
function a(e) {
let t = (0, r.useRef)();
return (
t.current || (t.current = i(e)),
(0, r.useEffect)(() => () => {}, []),
t.current
);
}
function s(e) {
let t = a(),
[o, n] = (0, r.useState)(0),
i = (0, r.useMemo)(() => t.getHistory(e), [t, e, o]);
return (
(0, r.useEffect)(() => {
let r = t.addListener({
id: `history-listener-${e || "all"}-${Date.now()}`,
callback: () => {
n((e) => e + 1);
},
storeNames: e ? [e] : void 0,
});
return () => {
t.removeListener(r);
};
}, [t, e]),
{
history: i,
clearHistory: (0, r.useCallback)(() => {
t.clearHistory(e), n((e) => e + 1);
}, [t, e]),
}
);
}
function l(e, t) {
let o = a(),
n = (0, r.useRef)(e);
(0, r.useEffect)(() => {
n.current = e;
}, [e]),
(0, r.useEffect)(() => {
let e = o.addListener({
id: "hook-listener",
callback: (e) => n.current(e),
storeNames: t,
});
return () => {
o.removeListener(e);
};
}, [o, t]);
}
function c(e, t, o = !0) {
let n = a(),
[i, s] = (0, r.useState)(!1);
return (
(0, r.useEffect)(
() => (
o && t && !n.isRegistered(e) && (n.register(e, t), s(!0)),
() => {
o && n.isRegistered(e) && (n.unregister(e), s(!1));
}
),
[n, e, t, o],
),
{
isRegistered: i,
register: (0, r.useCallback)(() => {
t && !n.isRegistered(e) && (n.register(e, t), s(!0));
}, [n, e, t]),
unregister: (0, r.useCallback)(() => {
n.isRegistered(e) && (n.unregister(e), s(!1));
}, [n, e]),
}
);
}
e.s(
[
"createStateMonitor",
() => n,
"getGlobalStateMonitor",
() => i,
"useStateHistory",
() => s,
"useStateListener",
() => l,
"useStateMonitor",
() => a,
"useStoreRegistration",
() => c,
],
506929,
);
let u = new Set(),
d = 0;
function f(e = {}) {
let t = i(e),
r = e.storeNameExtractor || ((e) => `zustand-store-${++d}`),
o = new Set(e.exclude || []);
return function (n) {
return function (i, ...a) {
let s = n(i, ...a);
if (u.has(s)) return s;
let l = r(s);
if (o.has(l)) return s;
try {
t.register(l, s),
u.add(s),
e.debugMode &&
console.log(`[StateMonitor] Auto-registered store: ${l}`);
} catch (e) {
console.error(
`[StateMonitor] Failed to auto-register store: ${l}`,
e,
);
}
return s;
};
};
}
function p(e = {}) {
if ("u" < typeof window) return;
let t = () => {
try {
let t = window.__ZUSTAND_MODULE__;
if (t && t.create) {
let r = f(e),
o = t.create;
return (
(t.create = r(o)),
e.debugMode &&
console.log(
"[StateMonitor] Global auto-register setup completed",
),
!0
);
}
} catch (t) {
e.debugMode &&
console.warn(
"[StateMonitor] Failed to setup global auto-register:",
t,
);
}
return !1;
};
t() || setTimeout(t, 100);
}
function g(e, t, r) {
let o = t(),
n = i(r);
try {
n.register(e, o),
(null == r ? void 0 : r.debugMode) &&
console.log(
`[StateMonitor] Auto-registered store with withAutoRegister: ${e}`,
);
} catch (t) {
console.error(`[StateMonitor] Failed to register store: ${e}`, t);
}
return o;
}
function m(e, t, r) {
return function (o) {
return g(e, () => o(() => t), r);
};
}
function h(e, t, r) {
let o = i(r);
try {
o.register(e, t),
u.add(t),
(null == r ? void 0 : r.debugMode) &&
console.log(
`[StateMonitor] Manually registered existing store: ${e}`,
);
} catch (t) {
console.error(
`[StateMonitor] Failed to register existing store: ${e}`,
t,
);
}
}
function b(e, t) {
i(t).unregister(e),
(null == t ? void 0 : t.debugMode) &&
console.log(`[StateMonitor] Unregistered store: ${e}`);
}
e.s(
[
"createAutoRegisterWrapper",
() => f,
"createMonitoredStore",
() => m,
"registerExistingStore",
() => h,
"setupGlobalAutoRegister",
() => p,
"unregisterStore",
() => b,
"withAutoRegister",
() => g,
],
210680,
);
var y = e.i(462214);
let x = {
padding: "12px 16px",
backgroundColor: "#4f46e5",
color: "white",
border: "none",
borderRadius: "12px",
cursor: "pointer",
zIndex: 9999,
fontSize: "14px",
fontWeight: "600",
boxShadow: "0 8px 25px rgba(79, 70, 229, 0.3)",
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
backdropFilter: "blur(10px)",
},
v = {
backgroundColor: "#ffffff",
border: "1px solid rgba(148, 163, 184, 0.2)",
borderRadius: "16px",
boxShadow:
"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
zIndex: 9999,
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
fontSize: "13px",
backdropFilter: "blur(20px)",
background: "linear-gradient(135deg, #ffffff 0%, #f8fafc 100%)",
position: "relative",
display: "flex",
flexDirection: "column",
overflow: "hidden",
},
S = {
padding: "16px 20px",
background: "linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)",
borderBottom: "none",
borderRadius: "16px 16px 0 0",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)",
},
k = { margin: 0, fontSize: "16px", fontWeight: "700", color: "white" },
w = {
background: "rgba(255, 255, 255, 0.1)",
border: "none",
fontSize: "16px",
cursor: "pointer",
color: "white",
borderRadius: "8px",
padding: "6px 8px",
transition: "all 0.2s ease",
},
C = { padding: "20px", flex: 1, overflow: "auto", minHeight: 0 },
j = { marginBottom: "16px" },
E = {
display: "flex",
gap: "8px",
borderBottom: "2px solid #e5e7eb",
marginBottom: "16px",
},
M = {
padding: "10px 16px",
fontSize: "13px",
fontWeight: "600",
color: "#9ca3af",
border: "none",
background: "transparent",
cursor: "pointer",
transition: "all 0.2s ease",
marginBottom: "-2px",
},
$ = { color: "#4f46e5" },
T = { minHeight: "200px" },
_ = { marginBottom: "16px" },
R = {
display: "block",
marginBottom: "8px",
fontWeight: "600",
color: "#374151",
fontSize: "14px",
},
L = {
width: "100%",
padding: "10px 12px",
border: "2px solid #e5e7eb",
borderRadius: "10px",
backgroundColor: "#ffffff",
fontSize: "13px",
transition: "all 0.2s ease",
outline: "none",
},
A = { marginBottom: "16px" },
I = {
display: "flex",
justifyContent: "space-between",
alignItems: "center",
marginBottom: "8px",
},
P = { fontWeight: "600", color: "#374151", fontSize: "14px" },
z = {
padding: "6px 12px",
fontSize: "12px",
backgroundColor: "#ef4444",
color: "white",
border: "none",
borderRadius: "8px",
cursor: "pointer",
fontWeight: "500",
transition: "all 0.2s ease",
},
N = {
maxHeight: "300px",
overflowY: "auto",
border: "2px solid #f1f5f9",
borderRadius: "12px",
backgroundColor: "#fafbfc",
scrollbarWidth: "thin",
scrollbarColor: "#cbd5e1 #f1f5f9",
},
O = {
padding: "32px",
textAlign: "center",
color: "#9ca3af",
fontSize: "14px",
},
D = { fontSize: "24px", marginBottom: "8px" },
W = {
marginTop: "16px",
fontSize: "12px",
color: "#6b7280",
backgroundColor: "#f8fafc",
padding: "12px",
borderRadius: "10px",
},
B = {
display: "flex",
justifyContent: "space-between",
marginBottom: "8px",
},
F = { color: "#10b981" },
U = { color: "#ef4444" },
H = { marginTop: "8px", display: "flex", gap: "8px" },
V = {
padding: "6px 12px",
fontSize: "12px",
color: "white",
border: "none",
borderRadius: "8px",
cursor: "pointer",
fontWeight: "500",
transition: "all 0.2s ease",
flex: 1,
},
G = { backgroundColor: "#4f46e5" },
K = {
position: "absolute",
bottom: 0,
right: 0,
width: "20px",
height: "20px",
cursor: "nwse-resize",
zIndex: 10,
display: "flex",
alignItems: "center",
justifyContent: "center",
},
Y = {
width: "12px",
height: "12px",
borderRight: "2px solid #cbd5e1",
borderBottom: "2px solid #cbd5e1",
borderRadius: "0 0 3px 0",
transition: "border-color 0.2s",
},
J = {
position: "absolute",
top: 0,
left: 0,
width: "4px",
height: "100%",
cursor: "ew-resize",
zIndex: 10,
},
X = {
position: "absolute",
top: 0,
left: 0,
width: "100%",
height: "4px",
cursor: "ns-resize",
zIndex: 10,
},
Z = {
position: "absolute",
top: 0,
left: 0,
width: "12px",
height: "12px",
cursor: "nw-resize",
zIndex: 11,
},
Q = {
display: "flex",
alignItems: "center",
gap: "6px",
padding: "8px 20px",
borderBottom: "1px solid #f1f5f9",
backgroundColor: "#fafbfc",
},
q = {
flex: 1,
padding: "6px 10px",
border: "1.5px solid #e5e7eb",
borderRadius: "8px",
fontSize: "12px",
outline: "none",
backgroundColor: "#fff",
transition: "border-color 0.2s, box-shadow 0.2s",
minWidth: 0,
},
ee = { display: "flex", alignItems: "center", gap: "2px", flexShrink: 0 },
et = {
padding: "3px 6px",
border: "none",
backgroundColor: "transparent",
cursor: "pointer",
fontSize: "14px",
color: "#6b7280",
borderRadius: "4px",
transition: "all 0.15s",
lineHeight: 1,
},
er = {
fontSize: "11px",
color: "#9ca3af",
whiteSpace: "nowrap",
minWidth: "40px",
textAlign: "center",
},
eo = {
backgroundColor: "#fef08a",
borderRadius: "2px",
padding: "0 1px",
},
en = {
backgroundColor: "#fb923c",
color: "#fff",
borderRadius: "2px",
padding: "0 1px",
},
ei = {
padding: "12px 16px",
borderBottom: "1px solid #e2e8f0",
cursor: "pointer",
transition: "all 0.2s ease",
},
ea = "#f8fafc",
es = {
display: "flex",
justifyContent: "space-between",
alignItems: "center",
},
el = { display: "flex", alignItems: "center", gap: "8px" },
ec = { fontSize: "12px", transition: "all 0.2s ease" },
eu = "#4f46e5",
ed = "#6b7280",
ef = { fontWeight: "600", color: "#4f46e5", fontSize: "14px" },
ep = { fontSize: "11px", color: "#9ca3af", fontWeight: "500" },
eg = {
marginTop: "12px",
fontSize: "11px",
animation: "fadeIn 0.2s ease-in",
textAlign: "left",
},
em = { marginBottom: "8px", textAlign: "left" },
eh = { color: "#374151", fontSize: "12px", textAlign: "left" },
eb = {
margin: "6px 0",
padding: "12px",
backgroundColor: "#f8f9fa",
borderRadius: "8px",
whiteSpace: "pre-wrap",
wordBreak: "break-word",
border: "1px solid #e9ecef",
fontFamily:
'Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
fontSize: "11px",
lineHeight: "1.4",
cursor: "text",
userSelect: "text",
textAlign: "left",
},
ey = { marginTop: "8px", textAlign: "left" },
ex = {
cursor: "pointer",
fontSize: "12px",
fontWeight: "600",
color: "#6b7280",
padding: "4px 0",
borderRadius: "4px",
transition: "color 0.2s ease",
textAlign: "left",
},
ev = {
margin: "6px 0",
padding: "12px",
backgroundColor: "#f8f9fa",
borderRadius: "8px",
whiteSpace: "pre-wrap",
wordBreak: "break-word",
overflowY: "auto",
border: "1px solid #e9ecef",
fontFamily:
'Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
fontSize: "11px",
lineHeight: "1.4",
cursor: "text",
userSelect: "text",
textAlign: "left",
},
eS = {
onMouseEnter: (e) => {
(e.currentTarget.style.transform = "translateY(-2px) scale(1.02)"),
(e.currentTarget.style.boxShadow =
"0 12px 35px rgba(79, 70, 229, 0.4)"),
(e.currentTarget.style.backgroundColor = "#3b38f0");
},
onMouseLeave: (e) => {
(e.currentTarget.style.transform = "translateY(0) scale(1)"),
(e.currentTarget.style.boxShadow =
"0 8px 25px rgba(79, 70, 229, 0.3)"),
(e.currentTarget.style.backgroundColor = "#4f46e5");
},
},
ek = {
onMouseEnter: (e) => {
(e.currentTarget.style.background = "rgba(255, 255, 255, 0.2)"),
(e.currentTarget.style.transform = "scale(1.05)");
},
onMouseLeave: (e) => {
(e.currentTarget.style.background = "rgba(255, 255, 255, 0.1)"),
(e.currentTarget.style.transform = "scale(1)");
},
},
ew = {
onMouseEnter: (e) => {
(e.currentTarget.style.backgroundColor = "#dc2626"),
(e.currentTarget.style.transform = "scale(1.02)");
},
onMouseLeave: (e) => {
(e.currentTarget.style.backgroundColor = "#ef4444"),
(e.currentTarget.style.transform = "scale(1)");
},
},
eC = {
onMouseEnter: (e) => {
(e.currentTarget.style.transform = "scale(1.02)"),
(e.currentTarget.style.opacity = "0.9");
},
onMouseLeave: (e) => {
(e.currentTarget.style.transform = "scale(1)"),
(e.currentTarget.style.opacity = "1");
},
},
ej = {
onMouseEnter: (e) => {
(e.currentTarget.style.transform = "scale(1.02)"),
(e.currentTarget.style.backgroundColor = "#3b38f0");
},
onMouseLeave: (e) => {
(e.currentTarget.style.transform = "scale(1)"),
(e.currentTarget.style.backgroundColor = "#4f46e5");
},
},
eE = {
onFocus: (e) => {
(e.currentTarget.style.borderColor = "#4f46e5"),
(e.currentTarget.style.boxShadow =
"0 0 0 3px rgba(79, 70, 229, 0.1)");
},
onBlur: (e) => {
(e.currentTarget.style.borderColor = "#e5e7eb"),
(e.currentTarget.style.boxShadow = "none");
},
},
eM = (e, t) => {
t || (e.currentTarget.style.backgroundColor = "#f1f5f9");
},
e$ = (e, t) => {
t || (e.currentTarget.style.backgroundColor = "transparent");
},
eT = ({ change: e }) => {
let [t, o] = r.default.useState(!1);
return (0, y.jsxs)("div", {
style: { ...ei, backgroundColor: t ? ea : "transparent" },
onClick: () => o(!t),
onMouseEnter: (e) => eM(e, t),
onMouseLeave: (e) => e$(e, t),
children: [
(0, y.jsxs)("div", {
style: es,
children: [
(0, y.jsxs)("div", {
style: el,
children: [
(0, y.jsx)("span", {
style: { ...ec, color: t ? eu : ed },
children: t ? "▼" : "▶",
}),
(0, y.jsx)("span", { style: ef, children: e.storeName }),
],
}),
(0, y.jsx)("span", {
style: ep,
children: new Date(e.timestamp).toLocaleTimeString(),
}),
],
}),
t &&
(0, y.jsxs)("div", {
style: eg,
onClick: (e) => e.stopPropagation(),
children: [
(0, y.jsxs)("div", {
style: em,
children: [
(0, y.jsx)("strong", { style: eh, children: "Changes:" }),
(0, y.jsx)("pre", {
style: eb,
children: JSON.stringify(e.diff, null, 2),
}),
],
}),
(0, y.jsxs)("details", {
style: ey,
children: [
(0, y.jsx)("summary", {
style: ex,
children: "Full New State",
}),
(0, y.jsx)("pre", {
style: ev,
children: JSON.stringify(e.newState, null, 2),
}),
],
}),
],
}),
],
});
},
e_ = ({ history: e, clearHistory: t }) =>
(0, y.jsxs)(y.Fragment, {
children: [
(0, y.jsx)("div", {
style: A,
children: (0, y.jsxs)("div", {
style: I,
children: [
(0, y.jsxs)("span", {
style: P,
children: ["变更历史 (", e.length, ")"],
}),
(0, y.jsx)("button", {
onClick: t,
style: z,
...ew,
children: "Clear",
}),
],
}),
}),
(0, y.jsx)("div", {
style: N,
children:
0 === e.length
? (0, y.jsxs)("div", {
style: O,
children: [
(0, y.jsx)("div", { style: D, children: "📊" }),
"No state changes recorded",
],
})
: e
.slice()
.reverse()
.map((e, t) =>
(0, y.jsx)(eT, { change: e }, `${e.timestamp}-${t}`),
),
}),
],
});
function eR(e, t, r) {
if (!t) return [];
let o = t.toLowerCase(),
n = [];
return (
Array.isArray(e)
? e.forEach((e, i) => {
let a = `${r}[${i}]`;
`[${i}]`.toLowerCase().includes(o) &&
n.push({ path: a, type: "key" }),
"object" == typeof e && null !== e
? n.push(...eR(e, t, a))
: (null === e
? "null"
: void 0 === e
? "undefined"
: String(e)
)
.toLowerCase()
.includes(o) && n.push({ path: a, type: "value" });
})
: "object" == typeof e &&
null !== e &&
Object.keys(e).forEach((i) => {
let a = r ? `${r}.${i}` : i;
i.toLowerCase().includes(o) && n.push({ path: a, type: "key" });
let s = e[i];
"object" == typeof s && null !== s
? n.push(...eR(s, t, a))
: (null === s ? "null" : void 0 === s ? "undefined" : String(s))
.toLowerCase()
.includes(o) && n.push({ path: a, type: "value" });
}),
n
);
}
function eL(e, t) {
return t && e
? Array.isArray(e)
? eR(e, t, "root")
: "object" == typeof e && null !== e
? eR(e, t, "")
: []
: [];
}
function eA(e, t, r) {
if (!t) return e;
let o = e.toLowerCase(),
n = t.toLowerCase(),
i = o.indexOf(n);
if (-1 === i) return e;
let a = [],
s = 0,
l = i;
for (; -1 !== l; )
l > s && a.push(e.substring(s, l)),
a.push(
(0, y.jsx)(
"span",
{ style: r ? en : eo, children: e.substring(l, l + t.length) },
l,
),
),
(s = l + t.length),
(l = o.indexOf(n, s));
return (
s < e.length && a.push(e.substring(s)),
(0, y.jsx)(y.Fragment, { children: a })
);
}
let eI = ({
label: e,
value: t,
path: o,
level: n,
expandedPaths: i,
onToggle: a,
searchQuery: s,
activeMatch: l,
matchPaths: c,
}) => {
let u,
d = (0, r.useRef)(null),
[f, p] = (0, r.useState)(null),
g = (0, r.useRef)(null),
m = i.has(o),
h = "object" == typeof t && null !== t,
b = "object" == typeof t && null !== t && !Array.isArray(t),
x = Array.isArray(t),
v = (0, r.useCallback)((e, t) => {
!(function (e) {
if (navigator.clipboard) return navigator.clipboard.writeText(e);
let t = document.createElement("textarea");
(t.value = e),
(t.style.position = "fixed"),
(t.style.opacity = "0"),
document.body.appendChild(t),
t.select(),
document.execCommand("copy"),
document.body.removeChild(t),
Promise.resolve();
})(e),
p(t),
g.current && clearTimeout(g.current),
(g.current = setTimeout(() => p(null), 1200));
}, []),
S = (null == l ? void 0 : l.path) === o;
return (
(0, r.useEffect)(() => {
S &&
d.current &&
d.current.scrollIntoView({ behavior: "smooth", block: "center" });
}, [S]),
(0, y.jsxs)("div", {
style: { marginLeft: `${16 * n}px` },
children: [
(0, y.jsxs)("div", {
ref: d,
style: {
display: "flex",
alignItems: "center",
padding: "2px 4px",
cursor: h ? "pointer" : "default",
borderRadius: "4px",
transition: "background-color 0.15s",
fontSize: "13px",
lineHeight: "1.5",
backgroundColor: S ? "rgba(79, 70, 229, 0.08)" : void 0,
outline: S ? "1.5px solid rgba(79, 70, 229, 0.3)" : void 0,
},
onMouseEnter: (e) => {
S || (e.currentTarget.style.backgroundColor = "#f9fafb");
},
onMouseLeave: (e) => {
S ||
(e.currentTarget.style.backgroundColor = S
? "rgba(79, 70, 229, 0.08)"
: "transparent");
},
onClick: () => {
h && a(o);
},
children: [
(0, y.jsx)("span", {
style: {
width: "16px",
display: "inline-flex",
alignItems: "center",
justifyContent: "center",
fontSize: "10px",
color: "#6b7280",
marginRight: "6px",
transition: "transform 0.2s",
transform: m ? "rotate(90deg)" : "rotate(0deg)",
opacity: +!!h,
flexShrink: 0,
},
children: "▶",
}),
(0, y.jsxs)("span", {
style: {
fontWeight: h ? "600" : "400",
color: "#374151",
marginRight: "6px",
flexShrink: 0,
cursor: "pointer",
position: "relative",
borderRadius: "3px",
transition: "background-color 0.15s",
},
title: "点击复制属性名",
onClick: (t) => {
t.stopPropagation(), v(e, "key");
},
onMouseEnter: (e) => {
e.currentTarget.style.backgroundColor =
"rgba(79, 70, 229, 0.08)";
},
onMouseLeave: (e) => {
e.currentTarget.style.backgroundColor = "transparent";
},
children: [
eA(
e,
c.has(o) && s ? s : "",
S && (null == l ? void 0 : l.type) === "key",
),
":",
"key" === f &&
(0, y.jsx)("span", {
style: {
position: "absolute",
top: "-20px",
left: "50%",
transform: "translateX(-50%)",
fontSize: "10px",
color: "#fff",
backgroundColor: "#10b981",
padding: "1px 6px",
borderRadius: "4px",
whiteSpace: "nowrap",
pointerEvents: "none",
zIndex: 100,
},
children: "已复制",
}),
],
}),
h &&
(0, y.jsx)("span", {
style: {
color: "#9ca3af",
fontSize: "12px",
marginRight: "6px",
},
children: x
? `[${t.length}]`
: b
? `{${Object.keys(t).length}}`
: "",
}),
!h &&
(0, y.jsxs)("span", {
style: {
color: "#6b7280",
fontSize: "12px",
wordBreak: "break-all",
cursor: "pointer",
position: "relative",
borderRadius: "3px",
transition: "background-color 0.15s",
},
title: "点击复制值",
onClick: (e) => {
e.stopPropagation(),
v(
null === t
? "null"
: void 0 === t
? "undefined"
: "string" == typeof t
? t
: String(t),
"value",
);
},
onMouseEnter: (e) => {
e.currentTarget.style.backgroundColor =
"rgba(79, 70, 229, 0.08)";
},
onMouseLeave: (e) => {
e.currentTarget.style.backgroundColor = "transparent";
},
children: [
((u =
null === t
? "null"
: void 0 === t
? "undefined"
: "string" == typeof t
? `"${t}"`
: "number" == typeof t || "boolean" == typeof t
? String(t)
: ""),
s
? eA(
u,
c.has(o) ? s : "",
S && (null == l ? void 0 : l.type) === "value",
)
: u),
"value" === f &&
(0, y.jsx)("span", {
style: {
position: "absolute",
top: "-20px",
left: "50%",
transform: "translateX(-50%)",
fontSize: "10px",
color: "#fff",
backgroundColor: "#10b981",
padding: "1px 6px",
borderRadius: "4px",
whiteSpace: "nowrap",
pointerEvents: "none",
zIndex: 100,
},
children: "已复制",
}),
],
}),
],
}),
h && m
? x
? t.map((e, t) => {
let r = `${o}[${t}]`;
return (0, y.jsx)(
eI,
{
label: `[${t}]`,
value: e,
path: r,
level: n + 1,
expandedPaths: i,
onToggle: a,
searchQuery: s,
activeMatch: l,
matchPaths: c,
},
r,
);
})
: b
? Object.keys(t).map((e) => {
let r = `${o}.${e}`;
return (0, y.jsx)(
eI,
{
label: e,
value: t[e],
path: r,
level: n + 1,
expandedPaths: i,
onToggle: a,
searchQuery: s,
activeMatch: l,
matchPaths: c,
},
r,
);
})
: null
: null,
],
})
);
},
eP = ({
data: e,
defaultExpanded: t = !0,
searchQuery: o = "",
externalMatches: n,
externalActiveMatch: i,
activeMatchIndex: a = 0,
onMatchCountChange: s,
}) => {
var l;
let [c, u] = (0, r.useState)(new Set()),
[d, f] = (0, r.useState)([]),
p = (0, r.useRef)(new Set()),
g = void 0 !== n,
m = g ? n : d,
h = g ? (null != i ? i : null) : null != (l = d[a]) ? l : null;
(0, r.useEffect)(() => {
if (t && e) {
let t = new Set();
"object" == typeof e &&
null !== e &&
(Array.isArray(e)
? e.forEach((e, r) => {
"object" == typeof e && null !== e && t.add(`root[${r}]`);
})
: Object.keys(e).forEach((r) => {
"object" == typeof e[r] && null !== e[r] && t.add(r);
})),
u(t);
}
}, [e, t]),
(0, r.useEffect)(() => {
if (g) {
p.current = new Set(m.map((e) => e.path));
return;
}
if (!o || !e) {
f([]), (p.current = new Set()), null == s || s(0);
return;
}
let t = eL(e, o);
f(t),
(p.current = new Set(t.map((e) => e.path))),
null == s || s(t.length);
}, [o, e, g, m, s]),
(0, r.useEffect)(() => {
h &&
u((e) => {
let t = (function (e) {
let t = [],
r = e;
for (;;) {
let e = Math.max(r.lastIndexOf("."), r.lastIndexOf("["));
if (e <= 0) break;
(r = r.substring(0, e)), t.push(r);
}
return t;
})(h.path);
if (t.every((t) => e.has(t))) return e;
let r = new Set(e);
return t.forEach((e) => r.add(e)), r;
});
}, [h]);
let b = (0, r.useCallback)((e) => {
u((t) => {
let r = new Set(t);
return r.has(e) ? r.delete(e) : r.add(e), r;
});
}, []);
if (null == e)
return (0, y.jsx)("div", {
style: { padding: "8px", color: "#9ca3af", fontSize: "13px" },
children: String(e),
});
let x = "object" == typeof e && null !== e && !Array.isArray(e),
v = Array.isArray(e);
return x || v
? (0, y.jsx)("div", {
style: { fontFamily: "system-ui, -apple-system, sans-serif" },
children: v
? e.map((e, t) =>
(0, y.jsx)(
eI,
{
label: `[${t}]`,
value: e,
path: `root[${t}]`,
level: 0,
expandedPaths: c,
onToggle: b,
searchQuery: o,
activeMatch: h,
matchPaths: p.current,
},
`root[${t}]`,
),
)
: Object.keys(e).map((t) =>
(0, y.jsx)(
eI,
{
label: t,
value: e[t],
path: t,
level: 0,
expandedPaths: c,
onToggle: b,
searchQuery: o,
activeMatch: h,
matchPaths: p.current,
},
t,
),
),
})
: (0, y.jsx)("div", {
style: {
fontFamily: "system-ui, -apple-system, sans-serif",
padding: "8px",
color: "#6b7280",
fontSize: "13px",
},
children: "string" == typeof e ? `"${e}"` : String(e),
});
},
ez = ({
monitor: e,
selectedStore: t,
searchQuery: o = "",
activeMatchIndex: n = 0,
onMatchCountChange: i,
}) => {
var a;
let [s, l] = r.default.useState({}),
[c, u] = r.default.useState(new Set()),
d = r.default.useRef([]);
r.default.useEffect(() => {
let r = () => {
if (t) {
let r = e.getState(t);
l(r ? { [t]: r } : {});
} else l(e.getAllStates());
};
r();
let o = setInterval(r, 100);
return () => clearInterval(o);
}, [e, t]),
r.default.useEffect(() => {
if (!o) {
(d.current = []), null == i || i(0);
return;
}
let e = [],
t = Object.keys(s),
r = new Set();
if (
(t.forEach((t) => {
let n = eL(s[t], o);
n.length > 0 &&
(r.add(t),
n.forEach((r) => e.push({ storeName: t, match: r })));
}),
(d.current = e),
null == i || i(e.length),
e.length > 0)
) {
let t = e[0];
u((e) => {
if (e.has(t.storeName)) return e;
let r = new Set(e);
return r.add(t.storeName), r;
});
}
}, [o, s, i]),
r.default.useEffect(() => {
if (0 === d.current.length) return;
let e = d.current[n];
e &&
u((t) => {
if (t.has(e.storeName)) return t;
let r = new Set(t);
return r.add(e.storeName), r;
});
}, [n]);
let f = Object.keys(s),
p = null != (a = d.current[n]) ? a : null;
return (0, y.jsx)("div", {
style: N,
children:
0 === f.length
? (0, y.jsxs)("div", {
style: O,
children: [
(0, y.jsx)("div", { style: D, children: "📦" }),
t
? `No state found for store: ${t}`
: "No stores registered",
],
})
: f.map((e) => {
let t,
r,
n = c.has(e),
i = s[e],
{ storeMatches: a, storeActiveMatch: l } =
((t = d.current
.filter((t) => t.storeName === e)
.map((e) => e.match)),
(r = null),
p && p.storeName === e && (r = p.match),
{ storeMatches: t, storeActiveMatch: r });
return (0, y.jsxs)(
"div",
{
style: { ...ei, backgroundColor: n ? ea : "transparent" },
onClick: () => {
u((t) => {
let r = new Set(t);
return r.has(e) ? r.delete(e) : r.add(e), r;
});
},
children: [
(0, y.jsxs)("div", {
style: es,
children: [
(0, y.jsxs)("div", {
style: el,
children: [
(0, y.jsx)("span", {
style: { ...ec, color: n ? eu : ed },
children: n ? "▼" : "▶",
}),
(0, y.jsx)("span", { style: ef, children: e }),
],
}),
(0, y.jsx)("span", {
style: ep,
children: "Current State",
}),
],
}),
n &&
(0, y.jsx)("div", {
style: eg,
onClick: (e) => e.stopPropagation(),
children: (0, y.jsx)("pre", {
style: ev,
children: (0, y.jsx)(eP, {
data: i,
defaultExpanded: !1,
searchQuery: o,
externalMatches: a,
externalActiveMatch: l,
}),
}),
}),
],
},
e,
);
}),
});
},
eN = "zustand-state-monitor-size";
function eO() {
var e, t;
try {
let r = localStorage.getItem(eN);
if (r) {
let o = JSON.parse(r);
return {
width: Math.max(320, null != (e = o.width) ? e : 420),
height: Math.max(300, null != (t = o.height) ? t : 520),
};
}
} catch (e) {}
return { width: 420, height: 520 };
}
e.s(
[
"StateMonitorDevTools",
0,
({ className: e, style: t, defaultVisible: o = !1 }) => {
let n = a(),
[i, l] = (0, r.useState)(o),
[c, u] = (0, r.useState)(""),
[d, f] = (0, r.useState)([]),
[p, g] = (0, r.useState)("current"),
{ history: m, clearHistory: h } = s(c),
[b, A] = (0, r.useState)(eO),
I = (0, r.useRef)(null),
[P, z] = (0, r.useState)(""),
[N, O] = (0, r.useState)(""),
[D, eo] = (0, r.useState)(0),
[en, ei] = (0, r.useState)(0);
(0, r.useEffect)(() => {
let e = () => {
f(n.getRegisteredStores());
};
e();
let t = setInterval(e, 1e3);
return () => clearInterval(t);
}, [n]);
let ea = (0, r.useCallback)(
(e, t) => {
e.preventDefault(),
e.stopPropagation(),
(I.current = {
startX: e.clientX,
startY: e.clientY,
startW: b.width,
startH: b.height,
edge: t,
});
let r = (e) => {
if (!I.current) return;
let {
startX: t,
startY: r,
startW: o,
startH: n,
edge: i,
} = I.current,
a = e.clientX - t,
s = e.clientY - r,
l = o,
c = n;
i.includes("right") && (l = Math.max(320, o + a)),
i.includes("left") && (l = Math.max(320, o - a)),
i.includes("bottom") && (c = Math.max(300, n + s)),
i.includes("top") && (c = Math.max(300, n - s)),
A({ width: l, height: c });
},
o = () => {
I.current &&
A((e) => {
var t = e.width,
r = e.height;
try {
localStorage.setItem(
eN,
JSON.stringify({ width: t, height: r }),
);
} catch (e) {}
return e;
}),
(I.current = null),
document.removeEventListener("mousemove", r),
document.removeEventListener("mouseup", o);
};
document.addEventListener("mousemove", r),
document.addEventListener("mouseup", o);
},
[b],
),
es = (0, r.useCallback)(
(e) => {
if ("Enter" === e.key) {
e.preventDefault();
let t = e.currentTarget.value;
t !== N
? O(t)
: D > 0 &&
(e.shiftKey
? ei((e) => (e - 1 + D) % D)
: ei((e) => (e + 1) % D));
}
},
[D, N],
),
el = (0, r.useCallback)(() => {
0 !== D && ei((e) => (e - 1 + D) % D);
}, [D]),
ec = (0, r.useCallback)(() => {
0 !== D && ei((e) => (e + 1) % D);
}, [D]);
(0, r.useEffect)(() => {
ei(0);
}, [N]),
(0, r.useEffect)(() => {
P || O("");
}, [P]);
let eu = (0, r.useCallback)((e) => {
eo(e), ei((t) => (0 === e ? 0 : Math.min(t, e - 1)));
}, []);
return i
? (0, y.jsxs)("div", {
style: {
...v,
width: `${b.width}px`,
height: `${b.height}px`,
...t,
},
className: e,
children: [
(0, y.jsx)("div", {
style: J,
onMouseDown: (e) => ea(e, "left"),
}),
(0, y.jsx)("div", {
style: X,
onMouseDown: (e) => ea(e, "top"),
}),
(0, y.jsx)("div", {
style: Z,
onMouseDown: (e) => ea(e, "top-left"),
}),
(0, y.jsxs)("div", {
style: S,
children: [
(0, y.jsx)("h3", {
style: k,
children: "Zustand State Monitor",
}),
(0, y.jsx)("button", {
onClick: () => l(!1),
style: w,
...ek,
children: "✕",
}),
],
}),
(0, y.jsxs)("div", {
style: Q,
children: [
(0, y.jsx)("input", {
type: "text",
placeholder: "搜索属性或值 (Enter 搜索)",
value: P,
onChange: (e) => z(e.target.value),
onKeyDown: es,
onFocus: (e) => {
(e.currentTarget.style.borderColor = "#4f46e5"),
(e.currentTarget.style.boxShadow =
"0 0 0 2px rgba(79, 70, 229, 0.1)");
},
onBlur: (e) => {
(e.currentTarget.style.borderColor = "#e5e7eb"),
(e.currentTarget.style.boxShadow = "none");
},
style: q,
}),
P &&
(0, y.jsxs)("div", {
style: ee,
children: [
(0, y.jsx)("span", {
style: er,
children: D > 0 ? `${en + 1}/${D}` : "0",
}),
(0, y.jsx)("button", {
onClick: el,
style: et,
title: "上一个 (Shift+Enter)",
onMouseEnter: (e) => {
e.currentTarget.style.backgroundColor =
"#f1f5f9";
},
onMouseLeave: (e) => {
e.currentTarget.style.backgroundColor =
"transparent";
},
children: "▲",
}),
(0, y.jsx)("button", {
onClick: ec,
style: et,
title: "下一个 (Enter)",
onMouseEnter: (e) => {
e.currentTarget.style.backgroundColor =
"#f1f5f9";
},
onMouseLeave: (e) => {
e.currentTarget.style.backgroundColor =
"transparent";
},
children: "▼",
}),
],
}),
],
}),
(0, y.jsxs)("div", {
style: C,
children: [
(0, y.jsxs)("div", {
style: _,
children: [
(0, y.jsx)("label", { style: R, children: "Store:" }),
(0, y.jsxs)("select", {
value: c,
onChange: (e) => u(e.target.value),
style: L,
...eE,
children: [
(0, y.jsx)("option", {
value: "",
children: "All Stores",
}),
d.map((e) =>
(0, y.jsx)(
"option",
{ value: e, children: e },
e,
),
),
],
}),
],
}),
(0, y.jsxs)("div", {
style: j,
children: [
(0, y.jsxs)("div", {
style: E,
children: [
(0, y.jsx)("button", {
onClick: () => g("current"),
style: { ...M, ...("current" === p ? $ : {}) },
children: "当前状态",
}),
(0, y.jsx)("button", {
onClick: () => g("history"),
style: { ...M, ...("history" === p ? $ : {}) },
children: "变更历史",
}),
],
}),
(0, y.jsx)("div", {
style: T,
children:
"history" === p
? (0, y.jsx)(e_, {
history: m,
clearHistory: h,
})
: (0, y.jsx)(ez, {
monitor: n,
selectedStore: c,
searchQuery: N,
activeMatchIndex: en,
onMatchCountChange: eu,
}),
}),
],
}),
(0, y.jsxs)("div", {
style: W,
children: [
(0, y.jsxs)("div", {
style: B,
children: [
(0, y.jsxs)("span", {
children: [
"Registered stores: ",
(0, y.jsx)("strong", { children: d.length }),
],
}),
(0, y.jsxs)("span", {
children: [
"Status:",
" ",
(0, y.jsx)("strong", {
style: n.isPaused() ? U : F,
children: n.isPaused()
? "Paused"
: "Active",
}),
],
}),
],
}),
(0, y.jsxs)("div", {
style: H,
children: [
(0, y.jsx)("button", {
onClick: () =>
n.isPaused() ? n.resume() : n.pause(),
style: {
...V,
backgroundColor: n.isPaused()
? "#10b981"
: "#f59e0b",
},
...eC,
children: n.isPaused()
? "▶️ Resume"
: "⏸️ Pause",
}),
(0, y.jsx)("button", {
onClick: () => {
console.log("All States:", n.getAllStates()),
console.log("All History:", n.getHistory());
},
style: { ...V, ...G },
...ej,
children: "🖥️ Log to Console",
}),
],
}),
],
}),
],
}),
(0, y.jsx)("div", {
style: K,
onMouseDown: (e) => ea(e, "bottom-right"),
onMouseEnter: (e) => {
let t = e.currentTarget.firstElementChild;
t && (t.style.borderColor = "#4f46e5");
},
onMouseLeave: (e) => {
let t = e.currentTarget.firstElementChild;
t && (t.style.borderColor = "#cbd5e1");
},
children: (0, y.jsx)("div", { style: Y }),
}),
],
})
: (0, y.jsx)("button", {
onClick: () => l(!0),
style: { ...x, ...t },
className: e,
...eS,
children: "🔍 Zustand State Monitor",
});
},
],
171656,
),
e.s([], 397264);
},
921123,
(e) => {
"use strict";
var t = e.i(462214),
r = e.i(358379);
e.i(370357);
var o = e.i(436178),
n = e.i(492394),
i = e.i(185264),
a = e.i(586011),
s = e.i(284309);
e.i(397264);
var l = e.i(210680),
c = e.i(216257);
let u = (0, a.default)(
() => e.A(393134).then((e) => ({ default: e.StateMonitorDevTools })),
{ loadableGenerated: { modules: [253169] }, ssr: !1 },
);
function d() {
let e = "true" === (0, s.useSearchParams)().get("debug"),
a = (0, c.useRootStore)();
return ((0, r.useEffect)(() => {
if (e)
return (
(0, l.registerExistingStore)("useUserInfo", n.useUserInfo),
(0, l.registerExistingStore)("commercialStore", o.commercialStore),
(0, l.registerExistingStore)("vipInfoStore", i.vipInfoStore),
(0, l.registerExistingStore)("langStore", a.langStore),
(0, l.registerExistingStore)("areaStore", a.areaStore),
(0, l.registerExistingStore)("globalStore", a.globalStore),
(0, l.registerExistingStore)("canvasStore", a.canvasStore),
(0, l.registerExistingStore)("projectStore", a.projectStore),
() => {
(0, l.unregisterStore)("usePersonalInfo"),
(0, l.unregisterStore)("useUserInfo"),
(0, l.unregisterStore)("langStore"),
(0, l.unregisterStore)("areaStore"),
(0, l.unregisterStore)("globalStore"),
(0, l.unregisterStore)("canvasStore"),
(0, l.unregisterStore)("projectStore");
}
);
}, [e, a]),
e)
? (0, t.jsx)("div", {
className: "z-(--z-chrome) fixed bottom-5 right-20 text-black",
children: (0, t.jsx)(u, {}),
})
: null;
}
function f() {
return (0, t.jsx)(r.Suspense, {
fallback: null,
children: (0, t.jsx)(d, {}),
});
}
e.s(["default", () => f]);
},
585980,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/83c8966b1ad49a7e.js"].map((t) => e.l(t)),
).then(() => t(278011)),
);
},
6597,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/5f14c10bc6aff02e.js"].map((t) => e.l(t)),
).then(() => t(822373)),
);
},
53094,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/f7927c0979c31262.js"].map((t) => e.l(t)),
).then(() => t(39121)),
);
},
349515,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/76a5be2d0f341091.js"].map((t) => e.l(t)),
).then(() => t(209688)),
);
},
679018,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/16863ee98390693f.js"].map((t) => e.l(t)),
).then(() => t(827694)),
);
},
706500,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/558f89303351cb9f.js"].map((t) => e.l(t)),
).then(() => t(911185)),
);
},
781417,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/88481978c9e9419d.js"].map((t) => e.l(t)),
).then(() => t(459127)),
);
},
688090,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/cee1f25589ddc595.js"].map((t) => e.l(t)),
).then(() => t(668193)),
);
},
753146,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/8b30f29bbf01e847.js"].map((t) => e.l(t)),
).then(() => t(854825)),
);
},
220121,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/027a598534b84441.js"].map((t) => e.l(t)),
).then(() => t(806643)),
);
},
952247,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/c07046f6cd184174.js"].map((t) => e.l(t)),
).then(() => t(170326)),
);
},
393134,
(e) => {
e.v((t) =>
Promise.all(
["static/chunks/0d41e15997e567ff.js"].map((t) => e.l(t)),
).then(() => t(253169)),
);
},
899249,
(e) => {
e.v((t) =>
Promise.all(
[
"static/chunks/fb331b08bcf9fa6e.js",
"static/chunks/334606b5978d0903.js",
"static/chunks/a3e5634aaf3cd51c.js",
"static/chunks/5d5b47876e53e564.js",
"static/chunks/9791d1c834ee18fb.js",
"static/chunks/15518d5e8f32d9ef.js",
"static/chunks/7dfccc4966dc75f0.css",
"static/chunks/2b59777e58bb2cb3.css",
"static/chunks/8c1225bb3494bfac.css",
"static/chunks/adfe6c35be0aa22f.css",
].map((t) => e.l(t)),
).then(() => t(17482)),
);
},
]);