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

104 lines
3.0 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 39c0420b837da380.f3eff5e6e8.js
* Module id: 801727
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e) => {
"use strict";
var r = e.i(282335),
t = e.i(633996);
function n(e) {
return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
}
function o(e, r = 0.179) {
return (
!e.startsWith("var(") &&
(function (e) {
if (e.startsWith("oklch(")) {
let r;
return (
(((r = e.match(/oklch\((.*?)%\s/)) ? parseFloat(r[1]) : null) ||
0) / 100
);
}
let { r, g: o, b: i } = (0, t.toRgba)(e);
return (
0.2126 * n(r / 255) + 0.7152 * n(o / 255) + 0.0722 * n(i / 255)
);
})(e) > r
);
}
function i({ color: e, theme: t, colorScheme: n }) {
if ("string" != typeof e)
throw Error(
`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`,
);
if ("bright" === e)
return {
color: e,
value: "dark" === n ? t.white : t.black,
shade: void 0,
isThemeColor: !1,
isLight: o("dark" === n ? t.white : t.black, t.luminanceThreshold),
variable: "--mantine-color-bright",
};
if ("dimmed" === e)
return {
color: e,
value: "dark" === n ? t.colors.dark[2] : t.colors.gray[7],
shade: void 0,
isThemeColor: !1,
isLight: o(
"dark" === n ? t.colors.dark[2] : t.colors.gray[6],
t.luminanceThreshold,
),
variable: "--mantine-color-dimmed",
};
if ("white" === e || "black" === e)
return {
color: e,
value: "white" === e ? t.white : t.black,
shade: void 0,
isThemeColor: !1,
isLight: o("white" === e ? t.white : t.black, t.luminanceThreshold),
variable: `--mantine-color-${e}`,
};
let [i, a] = e.split("."),
s = a ? Number(a) : void 0,
l = i in t.colors;
if (l) {
let e =
void 0 !== s
? t.colors[i][s]
: t.colors[i][(0, r.getPrimaryShade)(t, n || "light")];
return {
color: i,
value: e,
shade: s,
isThemeColor: l,
isLight: o(e, t.luminanceThreshold),
variable: a
? `--mantine-color-${i}-${s}`
: `--mantine-color-${i}-filled`,
};
}
return {
color: e,
value: e,
isThemeColor: l,
isLight: o(e, t.luminanceThreshold),
shade: s,
variable: void 0,
};
}
function a(e, r) {
let t = i({ color: e || r.primaryColor, theme: r });
return t.variable ? `var(${t.variable})` : e;
}
e.s(["parseThemeColor", () => i], 801727),
e.s(["getThemeColor", () => a], 620428);
};
export default moduleFactory;