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

815 lines
22 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 20293dbce215808d.10cf9e27a9.js
* Module id: 996972
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
e.i(23741);
var t = e.i(888659),
n = e.i(358379),
r = e.i(425017),
o =
'input:not([inert]):not([inert] *),select:not([inert]):not([inert] *),textarea:not([inert]):not([inert] *),a[href]:not([inert]):not([inert] *),button:not([inert]):not([inert] *),[tabindex]:not(slot):not([inert]):not([inert] *),audio[controls]:not([inert]):not([inert] *),video[controls]:not([inert]):not([inert] *),[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *),details>summary:first-of-type:not([inert]):not([inert] *),details:not([inert]):not([inert] *)',
i = "u" < typeof Element,
l = i
? function () {}
: Element.prototype.matches ||
Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector,
a =
!i && Element.prototype.getRootNode
? function (e) {
var t;
return null == e || null == (t = e.getRootNode)
? void 0
: t.call(e);
}
: function (e) {
return null == e ? void 0 : e.ownerDocument;
},
u = function (e, t) {
void 0 === t && (t = !0);
var n,
r =
null == e || null == (n = e.getAttribute)
? void 0
: n.call(e, "inert");
return (
"" === r ||
"true" === r ||
(t &&
e &&
("function" == typeof e.closest
? e.closest("[inert]")
: u(e.parentNode)))
);
},
s = function (e) {
var t,
n =
null == e || null == (t = e.getAttribute)
? void 0
: t.call(e, "contenteditable");
return "" === n || "true" === n;
},
c = function (e, t, n) {
if (u(e)) return [];
var r = Array.prototype.slice.apply(e.querySelectorAll(o));
return t && l.call(e, o) && r.unshift(e), (r = r.filter(n));
},
d = function (e, t, n) {
for (var r = [], i = Array.from(e); i.length; ) {
var a = i.shift();
if (!u(a, !1))
if ("SLOT" === a.tagName) {
var s = a.assignedElements(),
c = d(s.length ? s : a.children, !0, n);
n.flatten
? r.push.apply(r, c)
: r.push({ scopeParent: a, candidates: c });
} else {
l.call(a, o) && n.filter(a) && (t || !e.includes(a)) && r.push(a);
var f =
a.shadowRoot ||
("function" == typeof n.getShadowRoot && n.getShadowRoot(a)),
m = !u(f, !1) && (!n.shadowRootFilter || n.shadowRootFilter(a));
if (f && m) {
var p = d(!0 === f ? a.children : f.children, !0, n);
n.flatten
? r.push.apply(r, p)
: r.push({ scopeParent: a, candidates: p });
} else i.unshift.apply(i, a.children);
}
}
return r;
},
f = function (e) {
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
},
m = function (e) {
if (!e) throw Error("No node provided");
return e.tabIndex < 0 &&
(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || s(e)) &&
!f(e)
? 0
: e.tabIndex;
},
p = function (e, t) {
var n = m(e);
return n < 0 && t && !f(e) ? 0 : n;
},
v = function (e, t) {
return e.tabIndex === t.tabIndex
? e.documentOrder - t.documentOrder
: e.tabIndex - t.tabIndex;
},
g = function (e) {
return "INPUT" === e.tagName;
},
h = function (e, t) {
for (var n = 0; n < e.length; n++)
if (e[n].checked && e[n].form === t) return e[n];
},
y = function (e) {
if (!e.name) return !0;
var t,
n = e.form || a(e),
r = function (e) {
return n.querySelectorAll('input[type="radio"][name="' + e + '"]');
};
if (
"u" > typeof window &&
void 0 !== window.CSS &&
"function" == typeof window.CSS.escape
)
t = r(window.CSS.escape(e.name));
else
try {
t = r(e.name);
} catch (e) {
return (
console.error(
"Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",
e.message,
),
!1
);
}
var o = h(t, e.form);
return !o || o === e;
},
w = function (e) {
return g(e) && "radio" === e.type && !y(e);
},
b = function (e) {
var t,
n,
r,
o,
i,
l,
u,
s = e && a(e),
c = null == (t = s) ? void 0 : t.host,
d = !1;
if (s && s !== e)
for (
d = !!(
(null != (n = c) &&
null != (r = n.ownerDocument) &&
r.contains(c)) ||
(null != e && null != (o = e.ownerDocument) && o.contains(e))
);
!d && c;
)
d = !!(
null != (l = c = null == (i = s = a(c)) ? void 0 : i.host) &&
null != (u = l.ownerDocument) &&
u.contains(c)
);
return d;
},
x = function (e) {
var t = e.getBoundingClientRect(),
n = t.width,
r = t.height;
return 0 === n && 0 === r;
},
E = function (e, t) {
var n = t.displayCheck,
r = t.getShadowRoot;
if ("full-native" === n && "checkVisibility" in e)
return !e.checkVisibility({
checkOpacity: !1,
opacityProperty: !1,
contentVisibilityAuto: !0,
visibilityProperty: !0,
checkVisibilityCSS: !0,
});
if ("hidden" === getComputedStyle(e).visibility) return !0;
var o = l.call(e, "details>summary:first-of-type")
? e.parentElement
: e;
if (l.call(o, "details:not([open]) *")) return !0;
if (n && "full" !== n && "full-native" !== n && "legacy-full" !== n) {
if ("non-zero-area" === n) return x(e);
} else {
if ("function" == typeof r) {
for (var i = e; e; ) {
var u = e.parentElement,
s = a(e);
if (u && !u.shadowRoot && !0 === r(u)) return x(e);
e = e.assignedSlot
? e.assignedSlot
: u || s === e.ownerDocument
? u
: s.host;
}
e = i;
}
if (b(e)) return !e.getClientRects().length;
if ("legacy-full" !== n) return !0;
}
return !1;
},
S = function (e) {
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
for (var t = e.parentElement; t; ) {
if ("FIELDSET" === t.tagName && t.disabled) {
for (var n = 0; n < t.children.length; n++) {
var r = t.children.item(n);
if ("LEGEND" === r.tagName)
return !!l.call(t, "fieldset[disabled] *") || !r.contains(e);
}
return !0;
}
t = t.parentElement;
}
return !1;
},
C = function (e, t) {
return !(
t.disabled ||
(g(t) && "hidden" === t.type) ||
E(t, e) ||
("DETAILS" === t.tagName &&
Array.prototype.slice.apply(t.children).some(function (e) {
return "SUMMARY" === e.tagName;
})) ||
S(t)
);
},
R = function (e, t) {
return !(w(t) || 0 > m(t)) && !!C(e, t);
},
T = function (e) {
var t = parseInt(e.getAttribute("tabindex"), 10);
return !!isNaN(t) || !!(t >= 0);
},
M = function (e) {
var t = [],
n = [];
return (
e.forEach(function (e, r) {
var o = !!e.scopeParent,
i = o ? e.scopeParent : e,
l = p(i, o),
a = o ? M(e.candidates) : i;
0 === l
? o
? t.push.apply(t, a)
: t.push(i)
: n.push({
documentOrder: r,
tabIndex: l,
item: e,
isScope: o,
content: a,
});
}),
n
.sort(v)
.reduce(function (e, t) {
return (
t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e
);
}, [])
.concat(t)
);
},
A = function (e, t) {
return M(
(t = t || {}).getShadowRoot
? d([e], t.includeContainer, {
filter: R.bind(null, t),
flatten: !1,
getShadowRoot: t.getShadowRoot,
shadowRootFilter: T,
})
: c(e, t.includeContainer, R.bind(null, t)),
);
},
L = function (e, t) {
return (t = t || {}).getShadowRoot
? d([e], t.includeContainer, {
filter: C.bind(null, t),
flatten: !0,
getShadowRoot: t.getShadowRoot,
})
: c(e, t.includeContainer, C.bind(null, t));
},
P = function (e, t) {
if (((t = t || {}), !e)) throw Error("No node provided");
return !1 !== l.call(e, o) && R(t, e);
};
function N() {
let e = navigator.userAgentData;
return null != e && e.platform ? e.platform : navigator.platform;
}
function k() {
let e = navigator.userAgentData;
return e && Array.isArray(e.brands)
? e.brands
.map((e) => {
let { brand: t, version: n } = e;
return t + "/" + n;
})
.join(" ")
: navigator.userAgent;
}
function O() {
return /apple/i.test(navigator.vendor);
}
function D() {
let e = /android/i;
return e.test(N()) || e.test(k());
}
function I() {
return N().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
}
function B() {
return k().includes("jsdom/");
}
e.s(
["focusable", () => L, "isTabbable", () => P, "tabbable", () => A],
996972,
);
let j = "data-floating-ui-focusable",
_ = "ArrowLeft",
F = "ArrowRight";
function H(e) {
let t = e.activeElement;
for (
;
(null == (n = t) || null == (n = n.shadowRoot)
? void 0
: n.activeElement) != null;
) {
var n;
t = t.shadowRoot.activeElement;
}
return t;
}
function W(e, n) {
if (!e || !n) return !1;
let r = null == n.getRootNode ? void 0 : n.getRootNode();
if (e.contains(n)) return !0;
if (r && (0, t.isShadowRoot)(r)) {
let t = n;
for (; t; ) {
if (e === t) return !0;
t = t.parentNode || t.host;
}
}
return !1;
}
function z(e) {
return "composedPath" in e ? e.composedPath()[0] : e.target;
}
function V(e, t) {
return (
null != t &&
("composedPath" in e
? e.composedPath().includes(t)
: null != e.target && t.contains(e.target))
);
}
function X(e) {
return e.matches("html,body");
}
function U(e) {
return (null == e ? void 0 : e.ownerDocument) || document;
}
function Y(e) {
return (
(0, t.isHTMLElement)(e) &&
e.matches(
"input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",
)
);
}
function $(e) {
return !!e && "combobox" === e.getAttribute("role") && Y(e);
}
function K(e) {
if (!e || B()) return !0;
try {
return e.matches(":focus-visible");
} catch (e) {
return !0;
}
}
function Z(e) {
return e
? e.hasAttribute(j)
? e
: e.querySelector("[" + j + "]") || e
: null;
}
function q(e, t, n) {
return (
void 0 === n && (n = !0),
e
.filter((e) => {
var r;
return (
e.parentId === t &&
(!n || (null == (r = e.context) ? void 0 : r.open))
);
})
.flatMap((t) => [t, ...q(e, t.id, n)])
);
}
function G(e, t) {
let n,
r = -1;
return (
!(function t(o, i) {
i > r && ((n = o), (r = i)),
q(e, o).forEach((e) => {
t(e.id, i + 1);
});
})(t, 0),
e.find((e) => e.id === n)
);
}
function J(e, t) {
var n;
let r = [],
o = null == (n = e.find((e) => e.id === t)) ? void 0 : n.parentId;
for (; o; ) {
let t = e.find((e) => e.id === o);
(o = null == t ? void 0 : t.parentId), t && (r = r.concat(t));
}
return r;
}
function Q(e) {
e.preventDefault(), e.stopPropagation();
}
function ee(e) {
return "nativeEvent" in e;
}
function et(e) {
return (
(0 === e.mozInputSource && !!e.isTrusted) ||
(D() && e.pointerType
? "click" === e.type && 1 === e.buttons
: 0 === e.detail && !e.pointerType)
);
}
function en(e) {
return (
!B() &&
((!D() && 0 === e.width && 0 === e.height) ||
(D() &&
1 === e.width &&
1 === e.height &&
0 === e.pressure &&
0 === e.detail &&
"mouse" === e.pointerType) ||
(e.width < 1 &&
e.height < 1 &&
0 === e.pressure &&
0 === e.detail &&
"touch" === e.pointerType))
);
}
function er(e, t) {
let n = ["mouse", "pen"];
return t || n.push("", void 0), n.includes(e);
}
var eo = "u" > typeof document ? n.useLayoutEffect : function () {};
function ei(e) {
let t = n.useRef(e);
return (
eo(() => {
t.current = e;
}),
t
);
}
let el = { ...n }.useInsertionEffect || ((e) => e());
function ea(e) {
let t = n.useRef(() => {});
return (
el(() => {
t.current = e;
}),
n.useCallback(function () {
for (var e = arguments.length, n = Array(e), r = 0; r < e; r++)
n[r] = arguments[r];
return null == t.current ? void 0 : t.current(...n);
}, [])
);
}
function eu(e, t, n) {
return Math.floor(e / t) !== n;
}
function es(e, t) {
return t < 0 || t >= e.current.length;
}
function ec(e, t) {
return ef(e, { disabledIndices: t });
}
function ed(e, t) {
return ef(e, {
decrement: !0,
startingIndex: e.current.length,
disabledIndices: t,
});
}
function ef(e, t) {
let {
startingIndex: n = -1,
decrement: r = !1,
disabledIndices: o,
amount: i = 1,
} = void 0 === t ? {} : t,
l = n;
do l += r ? -i : i;
while (l >= 0 && l <= e.current.length - 1 && eh(e, l, o));
return l;
}
function em(e, t) {
let {
event: n,
orientation: o,
loop: i,
rtl: l,
cols: a,
disabledIndices: u,
minIndex: s,
maxIndex: c,
prevIndex: d,
stopEvent: f = !1,
} = t,
m = d;
if ("ArrowUp" === n.key) {
if ((f && Q(n), -1 === d)) m = c;
else if (
((m = ef(e, {
startingIndex: m,
amount: a,
decrement: !0,
disabledIndices: u,
})),
i && (d - a < s || m < 0))
) {
let e = d % a,
t = c % a,
n = c - (t - e);
m = t === e ? c : t > e ? n : n - a;
}
es(e, m) && (m = d);
}
if (
("ArrowDown" === n.key &&
(f && Q(n),
-1 === d
? (m = s)
: ((m = ef(e, { startingIndex: d, amount: a, disabledIndices: u })),
i &&
d + a > c &&
(m = ef(e, {
startingIndex: (d % a) - a,
amount: a,
disabledIndices: u,
}))),
es(e, m) && (m = d)),
"both" === o)
) {
let t = (0, r.floor)(d / a);
n.key === (l ? _ : F) &&
(f && Q(n),
d % a != a - 1
? ((m = ef(e, { startingIndex: d, disabledIndices: u })),
i &&
eu(m, a, t) &&
(m = ef(e, {
startingIndex: d - (d % a) - 1,
disabledIndices: u,
})))
: i &&
(m = ef(e, {
startingIndex: d - (d % a) - 1,
disabledIndices: u,
})),
eu(m, a, t) && (m = d)),
n.key === (l ? F : _) &&
(f && Q(n),
d % a != 0
? ((m = ef(e, {
startingIndex: d,
decrement: !0,
disabledIndices: u,
})),
i &&
eu(m, a, t) &&
(m = ef(e, {
startingIndex: d + (a - (d % a)),
decrement: !0,
disabledIndices: u,
})))
: i &&
(m = ef(e, {
startingIndex: d + (a - (d % a)),
decrement: !0,
disabledIndices: u,
})),
eu(m, a, t) && (m = d));
let o = (0, r.floor)(c / a) === t;
es(e, m) &&
(m =
i && o
? n.key === (l ? F : _)
? c
: ef(e, { startingIndex: d - (d % a) - 1, disabledIndices: u })
: d);
}
return m;
}
function ep(e, t, n) {
let r = [],
o = 0;
return (
e.forEach((e, i) => {
let { width: l, height: a } = e,
u = !1;
for (n && (o = 0); !u; ) {
let e = [];
for (let n = 0; n < l; n++)
for (let r = 0; r < a; r++) e.push(o + n + r * t);
(o % t) + l <= t && e.every((e) => null == r[e])
? (e.forEach((e) => {
r[e] = i;
}),
(u = !0))
: o++;
}
}),
[...r]
);
}
function ev(e, t, n, r, o) {
if (-1 === e) return -1;
let i = n.indexOf(e),
l = t[e];
switch (o) {
case "tl":
return i;
case "tr":
if (!l) return i;
return i + l.width - 1;
case "bl":
if (!l) return i;
return i + (l.height - 1) * r;
case "br":
return n.lastIndexOf(e);
}
}
function eg(e, t) {
return t.flatMap((t, n) => (e.includes(t) ? [n] : []));
}
function eh(e, t, n) {
if ("function" == typeof n) return n(t);
if (n) return n.includes(t);
let r = e.current[t];
return (
null == r ||
r.hasAttribute("disabled") ||
"true" === r.getAttribute("aria-disabled")
);
}
let ey = () => ({
getShadowRoot: !0,
displayCheck:
"function" == typeof ResizeObserver &&
ResizeObserver.toString().includes("[native code]")
? "full"
: "none",
});
function ew(e, t) {
let n = A(e, ey()),
r = n.length;
if (0 === r) return;
let o = H(U(e)),
i = n.indexOf(o);
return n[-1 === i ? (1 === t ? 0 : r - 1) : i + t];
}
function eb(e) {
return ew(U(e).body, 1) || e;
}
function ex(e) {
return ew(U(e).body, -1) || e;
}
function eE(e, t) {
let n = t || e.currentTarget,
r = e.relatedTarget;
return !r || !W(n, r);
}
function eS(e) {
A(e, ey()).forEach((e) => {
(e.dataset.tabindex = e.getAttribute("tabindex") || ""),
e.setAttribute("tabindex", "-1");
});
}
function eC(e) {
e.querySelectorAll("[data-tabindex]").forEach((e) => {
let t = e.dataset.tabindex;
delete e.dataset.tabindex,
t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
});
}
e.s(
[
"activeElement",
() => H,
"contains",
() => W,
"createGridCellMap",
() => ep,
"disableFocusInside",
() => eS,
"enableFocusInside",
() => eC,
"findNonDisabledListIndex",
() => ef,
"getDeepestNode",
() => G,
"getDocument",
() => U,
"getFloatingFocusElement",
() => Z,
"getGridCellIndexOfCorner",
() => ev,
"getGridCellIndices",
() => eg,
"getGridNavigatedIndex",
() => em,
"getMaxListIndex",
() => ed,
"getMinListIndex",
() => ec,
"getNextTabbable",
() => eb,
"getNodeAncestors",
() => J,
"getNodeChildren",
() => q,
"getPlatform",
() => N,
"getPreviousTabbable",
() => ex,
"getTabbableOptions",
() => ey,
"getTarget",
() => z,
"getUserAgent",
() => k,
"isEventTargetWithin",
() => V,
"isIndexOutOfListBounds",
() => es,
"isListIndexDisabled",
() => eh,
"isMac",
() => I,
"isMouseLikePointerType",
() => er,
"isOutsideEvent",
() => eE,
"isReactEvent",
() => ee,
"isRootElement",
() => X,
"isSafari",
() => O,
"isTypeableCombobox",
() => $,
"isTypeableElement",
() => Y,
"isVirtualClick",
() => et,
"isVirtualPointerEvent",
() => en,
"matchesFocusVisible",
() => K,
"stopEvent",
() => Q,
"useEffectEvent",
() => ea,
"useLatestRef",
() => ei,
"useModernLayoutEffect",
() => eo,
],
594613,
);
};
export default moduleFactory;