From 09ebac1c0959864213d6411ae3a9b0fb4382cdf3 Mon Sep 17 00:00:00 2001 From: maziggy Date: Fri, 27 Mar 2026 14:04:11 +0100 Subject: [PATCH] Reduce SpoolBuddy kiosk idle CPU load from ~3.3 to ~0.9 Frontend: replace expensive idle dashboard animations (3x animate-ping with scale transforms, blur-2xl glow, continuous animate-pulse on status dots) with static NFC rings and slow 5s color-cycling spool. Chromium: add --disable-extensions, --disable-background-timer-throttling, --memory-pressure-off, --disable-renderer-backgrounding, --disable-breakpad, and --js-flags=--max-old-space-size=128. Install script: mask stripped services (not just disable) to prevent socket/dbus reactivation; use /etc/systemd/user/ global overrides for user services instead of unreliable su-based systemctl --user. Remove chromium/upower from strip_packages since kiosk reinstalls them immediately. --- CHANGELOG.md | 2 +- .../spoolbuddy/SpoolBuddyStatusBar.tsx | 2 +- .../pages/spoolbuddy/SpoolBuddyDashboard.tsx | 44 +++++++--------- spoolbuddy/install/install.sh | 51 +++++++++---------- static/assets/index-C0h3VoP7.css | 1 + .../{index-BJ5z52r8.js => index-CnzPkDwq.js} | 4 +- static/assets/index-DWwO6mIe.css | 1 - static/index.html | 4 +- 8 files changed, 51 insertions(+), 58 deletions(-) create mode 100644 static/assets/index-C0h3VoP7.css rename static/assets/{index-BJ5z52r8.js => index-CnzPkDwq.js} (98%) delete mode 100644 static/assets/index-DWwO6mIe.css diff --git a/CHANGELOG.md b/CHANGELOG.md index d574da4e5..4fbff28c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ All notable changes to Bambuddy will be documented in this file. - **External Folder Mounting for File Manager** ([#124](https://github.com/maziggy/bambuddy/issues/124)) — Host directories (NAS shares, USB drives, network storage) can now be mounted into the File Manager without copying files. Click "Link External" to point at a Docker bind-mounted path. Files are indexed into the database on scan but accessed directly from their original location — nothing is copied. Supports read-only mode (default, blocks uploads/moves/deletes), hidden file filtering, and automatic thumbnail extraction for 3MF, STL, gcode, and image files. External folders show a distinct icon and info bar with a rescan button. Deleting an external folder only removes the database index, never the actual files. Requested by @S1N4X. ### Improved -- **SpoolBuddy Kiosk Performance Optimizations** — Reduced CPU load on Raspberry Pi. Chromium: overrides Debian's default flags via `/etc/chromium.d/spoolbuddy-kiosk` to disable GPU rasterization (falls back to CPU on Pi's VideoCore VI), enable low-end device mode (caps memory on ≤2GB Pis), and disable smooth scrolling and background networking. The system default `--enable-gpu-rasterization` was conflicting with per-launch flags — the new config replaces all system defaults. WebSocket: SpoolBuddy Dashboard and Layout pages now use React Query `select` to extract only `connected` status from printer queries, so temperature/fan/progress updates no longer trigger re-renders on every MQTT tick. Services: expanded install script stripping to disable pipewire audio stack, CUPS printing, rpcbind, upower, polkit, accounts-daemon, xdg-desktop-portal, and mpris-proxy. User-level services are masked via `systemctl --user`. +- **SpoolBuddy Kiosk Performance Optimizations** — Reduced idle CPU load on Raspberry Pi from ~3.3 to ~0.9. Frontend: replaced expensive CSS animations on the idle dashboard (`animate-ping` with scale transforms, `blur-2xl` glow, continuous `animate-pulse` on status dots) with static elements and a slow color-cycling spool (5s interval). Chromium: added `--disable-extensions`, `--disable-background-timer-throttling`, `--memory-pressure-off`, `--disable-renderer-backgrounding`, `--disable-breakpad`, and `--js-flags=--max-old-space-size=128` to `/etc/chromium.d/spoolbuddy-kiosk`. WebSocket: SpoolBuddy Dashboard and Layout pages now use React Query `select` to extract only `connected` status from printer queries, so temperature/fan/progress updates no longer trigger re-renders on every MQTT tick. Services: stripped services are now masked (not just disabled) to prevent socket/dbus reactivation; user-level services (xdg-desktop-portal, mpris-proxy, pipewire, etc.) are masked globally via `/etc/systemd/user/` overrides instead of unreliable `su -l systemctl --user`. Removed chromium and upower from `strip_packages` since the kiosk needs them — they were being uninstalled then immediately reinstalled on every run. - **SpoolBuddy AMS Slot Action Picker** — Clicking an AMS slot on the SpoolBuddy AMS page now shows a picker with contextual actions: Configure AMS Slot (set filament preset, K-profile, color), and either Assign Spool / Link to Spoolman (when no spool is mapped) or Unassign / Unlink (when one is). Works with both internal inventory and Spoolman. Previously the slot click went straight to the configure modal with no way to manage spool assignments. - **Unassign Button in Edit Spool Modal** — The edit spool modal now has an "Unassign" button next to "Delete Tag" that removes the spool's AMS slot assignment, clearing the location column in the inventory table. - **SpoolBuddy Settings Device Tab No Longer Scrolls** — Removed the branding card, folded Device ID into the Device Info card, placed Backend/Auth config and diagnostic buttons side by side in a 2-column layout, removed the redundant online/offline status row from Device Info, and tightened spacing throughout. The Device tab now fits on the small SpoolBuddy touchscreen without scrolling. diff --git a/frontend/src/components/spoolbuddy/SpoolBuddyStatusBar.tsx b/frontend/src/components/spoolbuddy/SpoolBuddyStatusBar.tsx index 9cc361dd4..60f9ce194 100644 --- a/frontend/src/components/spoolbuddy/SpoolBuddyStatusBar.tsx +++ b/frontend/src/components/spoolbuddy/SpoolBuddyStatusBar.tsx @@ -31,7 +31,7 @@ export function SpoolBuddyStatusBar({ alert }: SpoolBuddyStatusBarProps) { return (
{/* Status LED */} -
+
{/* Status message */}
diff --git a/frontend/src/pages/spoolbuddy/SpoolBuddyDashboard.tsx b/frontend/src/pages/spoolbuddy/SpoolBuddyDashboard.tsx index 13ebc15ef..23e6d3e99 100644 --- a/frontend/src/pages/spoolbuddy/SpoolBuddyDashboard.tsx +++ b/frontend/src/pages/spoolbuddy/SpoolBuddyDashboard.tsx @@ -9,12 +9,6 @@ import { SpoolInfoCard, UnknownTagCard } from '../../components/spoolbuddy/Spool import { AssignToAmsModal } from '../../components/spoolbuddy/AssignToAmsModal'; import { LinkSpoolModal } from '../../components/spoolbuddy/LinkSpoolModal'; -// Color palette for the cycling spool animation -const SPOOL_COLORS = [ - '#00AE42', '#FF6B35', '#3B82F6', '#EF4444', '#A855F7', - '#FBBF24', '#14B8A6', '#EC4899', '#F97316', '#22C55E', -]; - function normalizeHexTag(value: string | null | undefined): string { if (!value) return ''; return value.replace(/[^0-9a-f]/gi, '').toUpperCase(); @@ -29,15 +23,21 @@ function tagsEquivalent(a: string | null | undefined, b: string | null | undefin return aNorm.endsWith(bNorm) || bNorm.endsWith(aNorm); } -// --- Idle state with color-cycling spool and NFC waves --- -function ColorCyclingSpool() { +// Color palette for the cycling spool animation +const SPOOL_COLORS = [ + '#00AE42', '#FF6B35', '#3B82F6', '#EF4444', '#A855F7', + '#FBBF24', '#14B8A6', '#EC4899', '#F97316', '#22C55E', +]; + +// --- Idle state with slow color-cycling spool --- +function IdleSpool() { const { t } = useTranslation(); const [colorIndex, setColorIndex] = useState(0); useEffect(() => { const interval = setInterval(() => { setColorIndex((prev) => (prev + 1) % SPOOL_COLORS.length); - }, 2000); + }, 5000); return () => clearInterval(interval); }, []); @@ -45,22 +45,16 @@ function ColorCyclingSpool() { return (
- {/* Animated spool with NFC waves */} + {/* Spool with single subtle NFC ring */}
- {/* NFC wave rings */} -
-
-
+ {/* Static NFC wave rings */} +
+
+
- {/* Spool icon with color transition and glow */} -
-
-
- -
+ {/* Spool icon with slow color transition */} +
+
@@ -314,7 +308,7 @@ export function SpoolBuddyDashboard() {
{/* Connection status */}
-
+
{sbState.deviceOnline ? t('spoolbuddy.status.online', 'Online') : t('spoolbuddy.status.offline', 'Disconnected')} @@ -410,7 +404,7 @@ export function SpoolBuddyDashboard() { onClose={handleCloseSpoolCard} /> ) : ( - + )}
diff --git a/spoolbuddy/install/install.sh b/spoolbuddy/install/install.sh index 89a27dfb0..246eb8690 100755 --- a/spoolbuddy/install/install.sh +++ b/spoolbuddy/install/install.sh @@ -846,33 +846,31 @@ strip_services() { success "No unnecessary services to disable" fi - # Disable user-level services (audio stack, portals, mpris-proxy) - # These run under the kiosk user and aren't caught by system-level disable - local kiosk_user="${SUDO_USER:-$(logname 2>/dev/null || echo pi)}" - if id "$kiosk_user" &>/dev/null; then - local user_services=( - pipewire.service - pipewire.socket - pipewire-pulse.service - pipewire-pulse.socket - wireplumber.service - xdg-desktop-portal.service - xdg-desktop-portal-gtk.service - xdg-document-portal.service - xdg-permission-store.service - mpris-proxy.service - ) - local user_disabled=0 - for svc in "${user_services[@]}"; do - if su -l "$kiosk_user" -c "systemctl --user is-enabled $svc" &>/dev/null; then - su -l "$kiosk_user" -c "systemctl --user disable $svc" 2>/dev/null || true - su -l "$kiosk_user" -c "systemctl --user mask $svc" 2>/dev/null || true - (( ++user_disabled )) - fi - done - if (( user_disabled > 0 )); then - success "Disabled $user_disabled unnecessary user services for $kiosk_user" + # Mask user-level services globally via /etc/systemd/user/ overrides. + # The su-based approach doesn't reliably reach the user's systemd instance + # when run from sudo, so we create global masks that apply before login. + local user_services=( + pipewire.service + pipewire.socket + pipewire-pulse.service + pipewire-pulse.socket + wireplumber.service + xdg-desktop-portal.service + xdg-desktop-portal-gtk.service + xdg-document-portal.service + xdg-permission-store.service + mpris-proxy.service + ) + mkdir -p /etc/systemd/user + local user_masked=0 + for svc in "${user_services[@]}"; do + if [[ ! -L "/etc/systemd/user/$svc" ]] || [[ "$(readlink /etc/systemd/user/$svc)" != "/dev/null" ]]; then + ln -sf /dev/null "/etc/systemd/user/$svc" + (( ++user_masked )) fi + done + if (( user_masked > 0 )); then + success "Masked $user_masked unnecessary user services globally" fi } @@ -1167,6 +1165,7 @@ exec chromium --kiosk --no-first-run --disable-infobars \ --noerrdialogs --disable-component-update \ --overscroll-history-navigation=0 \ --ozone-platform=wayland \ + --disable-crash-reporter --disable-breakpad \ "\$kiosk_url" EOF diff --git a/static/assets/index-C0h3VoP7.css b/static/assets/index-C0h3VoP7.css new file mode 100644 index 000000000..a9d5e728d --- /dev/null +++ b/static/assets/index-C0h3VoP7.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-lime-500:oklch(76.8% .233 130.85);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-2xl:40px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bambu-green:var(--accent);--color-bambu-green-light:var(--accent-light);--color-bambu-green-dark:var(--accent-dark);--color-status-ok:var(--status-ok);--color-status-error:var(--status-error);--color-status-warning:var(--status-warning);--color-bambu-dark:var(--bg-primary);--color-bambu-dark-secondary:var(--bg-secondary);--color-bambu-dark-tertiary:var(--bg-tertiary);--color-bambu-gray:var(--text-muted);--color-bambu-gray-light:var(--text-secondary);--color-bambu-gray-dark:var(--text-tertiary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-top-0\.5{top:calc(var(--spacing)*-.5)}.-top-1{top:calc(var(--spacing)*-1)}.-top-1\.5{top:calc(var(--spacing)*-1.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\.5{top:calc(var(--spacing)*.5)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-2\.5{top:calc(var(--spacing)*2.5)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-\[2px\]{top:2px}.top-\[3px\]{top:3px}.top-\[52px\]{top:52px}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing)*-.5)}.-right-1{right:calc(var(--spacing)*-1)}.-right-1\.5{right:calc(var(--spacing)*-1.5)}.-right-2{right:calc(var(--spacing)*-2)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-1\.5{right:calc(var(--spacing)*1.5)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-12{right:calc(var(--spacing)*12)}.right-20{right:calc(var(--spacing)*20)}.right-\[5\.5rem\]{right:5.5rem}.right-full{right:100%}.-bottom-0\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-2{bottom:calc(var(--spacing)*-2)}.-bottom-7{bottom:calc(var(--spacing)*-7)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-0\.5{left:calc(var(--spacing)*.5)}.left-1{left:calc(var(--spacing)*1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.left-10{left:calc(var(--spacing)*10)}.left-12{left:calc(var(--spacing)*12)}.left-\[2px\]{left:2px}.left-\[3px\]{left:3px}.left-full{left:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-60,.z-\[60\]{z-index:60}.z-\[100\]{z-index:100}.z-\[101\]{z-index:101}.z-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-m-4{margin:calc(var(--spacing)*-4)}.-mx-4{margin-inline:calc(var(--spacing)*-4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.-mt-0\.5{margin-top:calc(var(--spacing)*-.5)}.-mt-2{margin-top:calc(var(--spacing)*-2)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-14{margin-top:calc(var(--spacing)*14)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-7{margin-left:calc(var(--spacing)*7)}.ml-9{margin-left:calc(var(--spacing)*9)}.ml-14{margin-left:calc(var(--spacing)*14)}.ml-16{margin-left:calc(var(--spacing)*16)}.ml-64{margin-left:calc(var(--spacing)*64)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing)*0)}.h-0\.5{height:calc(var(--spacing)*.5)}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-40{height:calc(var(--spacing)*40)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-80{height:calc(var(--spacing)*80)}.h-\[18px\]{height:18px}.h-\[38px\]{height:38px}.h-\[40px\]{height:40px}.h-\[48px\]{height:48px}.h-\[80vh\]{height:80vh}.h-\[160px\]{height:160px}.h-\[300px\]{height:300px}.h-\[calc\(100\%-40px\)\]{height:calc(100% - 40px)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.max-h-\[600px\]{max-height:600px}.max-h-\[calc\(90vh-80px\)\]{max-height:calc(90vh - 80px)}.max-h-\[calc\(100vh-320px\)\]{max-height:calc(100vh - 320px)}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[36px\]{min-height:36px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[48px\]{min-height:48px}.min-h-\[80px\]{min-height:80px}.min-h-\[120px\]{min-height:120px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-\[calc\(100vh-64px\)\]{min-height:calc(100vh - 64px)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-0\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-5\/12{width:41.6667%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-7\/12{width:58.3333%}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-40{width:calc(var(--spacing)*40)}.w-44{width:calc(var(--spacing)*44)}.w-48{width:calc(var(--spacing)*48)}.w-52{width:calc(var(--spacing)*52)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-96{width:calc(var(--spacing)*96)}.w-\[240px\]{width:240px}.w-\[340px\]{width:340px}.w-\[420px\]{width:420px}.w-\[560px\]{width:560px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-32{max-width:calc(var(--spacing)*32)}.max-w-\[40\%\]{max-width:40%}.max-w-\[50\%\]{max-width:50%}.max-w-\[80px\]{max-width:80px}.max-w-\[90vw\]{max-width:90vw}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[600px\]{max-width:600px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-48{min-width:calc(var(--spacing)*48)}.min-w-\[16px\]{min-width:16px}.min-w-\[18px\]{min-width:18px}.min-w-\[32px\]{min-width:32px}.min-w-\[40px\]{min-width:40px}.min-w-\[48px\]{min-width:48px}.min-w-\[50px\]{min-width:50px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[130px\]{min-width:130px}.min-w-\[140px\]{min-width:140px}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[2_1_190px\]{flex:2 190px}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3\.5{--tw-translate-x:calc(var(--spacing)*3.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-\[1\.02\]{scale:1.02}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.cursor-se-resize{cursor:se-resize}.touch-manipulation{touch-action:manipulation}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.\[appearance\:textfield\]{appearance:textfield}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[auto_1fr_100px_100px_100px_80px\]{grid-template-columns:auto 1fr 100px 100px 100px 80px}.grid-cols-\[auto_1fr_120px_100px_100px_100px_80px\]{grid-template-columns:auto 1fr 120px 100px 100px 100px 80px}.grid-cols-\[repeat\(auto-fill\,minmax\(130px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\[3px\]{gap:3px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-3{row-gap:calc(var(--spacing)*3)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-bambu-dark-tertiary>:not(:last-child)),:where(.divide-bambu-dark-tertiary\/30>:not(:last-child)){border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){:where(.divide-bambu-dark-tertiary\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}:where(.divide-bambu-gray\/20>:not(:last-child)){border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){:where(.divide-bambu-gray\/20>:not(:last-child)){border-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.\!rounded-l-none{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-tl{border-top-left-radius:.25rem}.\!rounded-r-none{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-\[5px\]{border-top-style:var(--tw-border-style);border-top-width:5px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.\!border-r-0{border-right-style:var(--tw-border-style)!important;border-right-width:0!important}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-\[5px\]{border-right-style:var(--tw-border-style);border-right-width:5px}.border-r-\[6px\]{border-right-style:var(--tw-border-style);border-right-width:6px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-\[6px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:6px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[5px\]{border-left-style:var(--tw-border-style);border-left-width:5px}.border-l-\[6px\]{border-left-style:var(--tw-border-style);border-left-width:6px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.\!border-green-500{border-color:var(--color-green-500)!important}.\!border-yellow-500{border-color:var(--color-yellow-500)!important}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-bambu-dark-secondary{border-color:var(--color-bambu-dark-secondary)}.border-bambu-dark-tertiary,.border-bambu-dark-tertiary\/20{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/20{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)20%,transparent)}}.border-bambu-dark-tertiary\/30{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/30{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.border-bambu-dark-tertiary\/40{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/40{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)40%,transparent)}}.border-bambu-dark-tertiary\/50{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/50{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.border-bambu-gray,.border-bambu-gray\/20{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/20{border-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.border-bambu-gray\/30{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/30{border-color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.border-bambu-gray\/50{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/50{border-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.border-bambu-green,.border-bambu-green\/20{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/20{border-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.border-bambu-green\/30{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/30{border-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.border-bambu-green\/40{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/40{border-color:color-mix(in oklab,var(--color-bambu-green)40%,transparent)}}.border-bambu-green\/50{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/50{border-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.border-black\/20{border-color:#0003}@supports (color:color-mix(in lab,red,red)){.border-black\/20{border-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.border-blue-400\/20{border-color:#54a2ff33}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/20{border-color:color-mix(in oklab,var(--color-blue-400)20%,transparent)}}.border-blue-400\/50{border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/50{border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.border-blue-500\/40{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/40{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.border-blue-500\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400\/20{border-color:#99a1af33}@supports (color:color-mix(in lab,red,red)){.border-gray-400\/20{border-color:color-mix(in oklab,var(--color-gray-400)20%,transparent)}}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-500\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.border-gray-500\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.border-gray-700{border-color:var(--color-gray-700)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-500\/10{border-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.border-green-500\/10{border-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.border-green-500\/20{border-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.border-green-500\/20{border-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500)30%,transparent)}}.border-green-500\/40{border-color:#00c75866}@supports (color:color-mix(in lab,red,red)){.border-green-500\/40{border-color:color-mix(in oklab,var(--color-green-500)40%,transparent)}}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500)50%,transparent)}}.border-green-800{border-color:var(--color-green-800)}.border-orange-400\/20{border-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.border-orange-400\/20{border-color:color-mix(in oklab,var(--color-orange-400)20%,transparent)}}.border-orange-400\/50{border-color:#ff8b1a80}@supports (color:color-mix(in lab,red,red)){.border-orange-400\/50{border-color:color-mix(in oklab,var(--color-orange-400)50%,transparent)}}.border-orange-500\/20{border-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/20{border-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.border-purple-400\/20{border-color:#c07eff33}@supports (color:color-mix(in lab,red,red)){.border-purple-400\/20{border-color:color-mix(in oklab,var(--color-purple-400)20%,transparent)}}.border-purple-500{border-color:var(--color-purple-500)}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-800{border-color:var(--color-red-800)}.border-red-800\/70{border-color:#9f0712b3}@supports (color:color-mix(in lab,red,red)){.border-red-800\/70{border-color:color-mix(in oklab,var(--color-red-800)70%,transparent)}}.border-red-900\/40{border-color:#82181a66}@supports (color:color-mix(in lab,red,red)){.border-red-900\/40{border-color:color-mix(in oklab,var(--color-red-900)40%,transparent)}}.border-slate-500{border-color:var(--color-slate-500)}.border-status-error\/20{border-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.border-status-error\/20{border-color:color-mix(in oklab,var(--color-status-error)20%,transparent)}}.border-status-ok,.border-status-ok\/20{border-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.border-status-ok\/20{border-color:color-mix(in oklab,var(--color-status-ok)20%,transparent)}}.border-status-warning\/20{border-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.border-status-warning\/20{border-color:color-mix(in oklab,var(--color-status-warning)20%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.border-yellow-400\/20{border-color:#fac80033}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/20{border-color:color-mix(in oklab,var(--color-yellow-400)20%,transparent)}}.border-yellow-400\/30{border-color:#fac8004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/30{border-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.border-yellow-400\/50{border-color:#fac80080}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/50{border-color:color-mix(in oklab,var(--color-yellow-400)50%,transparent)}}.border-yellow-500{border-color:var(--color-yellow-500)}.border-yellow-500\/20{border-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/20{border-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.border-yellow-500\/50{border-color:#edb20080}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/50{border-color:color-mix(in oklab,var(--color-yellow-500)50%,transparent)}}.border-zinc-500{border-color:var(--color-zinc-500)}.border-zinc-600{border-color:var(--color-zinc-600)}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\/50{border-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\/50{border-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-t-bambu-dark-tertiary{border-top-color:var(--color-bambu-dark-tertiary)}.border-t-transparent{border-top-color:#0000}.border-r-transparent{border-right-color:#0000}.border-b-bambu-dark-tertiary{border-bottom-color:var(--color-bambu-dark-tertiary)}.border-l-transparent{border-left-color:#0000}.border-l-yellow-500{border-left-color:var(--color-yellow-500)}.\!bg-bambu-green{background-color:var(--color-bambu-green)!important}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-amber-600\/20{background-color:#dd740033}@supports (color:color-mix(in lab,red,red)){.bg-amber-600\/20{background-color:color-mix(in oklab,var(--color-amber-600)20%,transparent)}}.bg-bambu-dark{background-color:var(--color-bambu-dark)}.bg-bambu-dark-secondary,.bg-bambu-dark-secondary\/30{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/30{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)30%,transparent)}}.bg-bambu-dark-secondary\/50{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/50{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)50%,transparent)}}.bg-bambu-dark-secondary\/60{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/60{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)60%,transparent)}}.bg-bambu-dark-secondary\/90{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/90{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)90%,transparent)}}.bg-bambu-dark-secondary\/95{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/95{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)95%,transparent)}}.bg-bambu-dark-tertiary,.bg-bambu-dark-tertiary\/20{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/20{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)20%,transparent)}}.bg-bambu-dark-tertiary\/30{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/30{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.bg-bambu-dark-tertiary\/40{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/40{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)40%,transparent)}}.bg-bambu-dark-tertiary\/50{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/50{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.bg-bambu-dark-tertiary\/70{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/70{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)70%,transparent)}}.bg-bambu-dark-tertiary\/80{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/80{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.bg-bambu-dark\/20{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/20{background-color:color-mix(in oklab,var(--color-bambu-dark)20%,transparent)}}.bg-bambu-dark\/30{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/30{background-color:color-mix(in oklab,var(--color-bambu-dark)30%,transparent)}}.bg-bambu-dark\/50{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/50{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.bg-bambu-dark\/80{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/80{background-color:color-mix(in oklab,var(--color-bambu-dark)80%,transparent)}}.bg-bambu-dark\/90{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/90{background-color:color-mix(in oklab,var(--color-bambu-dark)90%,transparent)}}.bg-bambu-gray,.bg-bambu-gray\/10{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/10{background-color:color-mix(in oklab,var(--color-bambu-gray)10%,transparent)}}.bg-bambu-gray\/20{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/20{background-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.bg-bambu-gray\/30{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/30{background-color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.bg-bambu-gray\/50{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/50{background-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.bg-bambu-gray\/60{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/60{background-color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.bg-bambu-gray\/90{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/90{background-color:color-mix(in oklab,var(--color-bambu-gray)90%,transparent)}}.bg-bambu-green,.bg-bambu-green\/5{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/5{background-color:color-mix(in oklab,var(--color-bambu-green)5%,transparent)}}.bg-bambu-green\/10{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/10{background-color:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.bg-bambu-green\/15{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/15{background-color:color-mix(in oklab,var(--color-bambu-green)15%,transparent)}}.bg-bambu-green\/20{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/20{background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.bg-bambu-green\/30{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/30{background-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.bg-bambu-green\/50{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/50{background-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.bg-bambu-green\/75{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/75{background-color:color-mix(in oklab,var(--color-bambu-green)75%,transparent)}}.bg-bambu-green\/90{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/90{background-color:color-mix(in oklab,var(--color-bambu-green)90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab,red,red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/10{background-color:color-mix(in oklab,var(--color-blue-400)10%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\/30{background-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/30{background-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.bg-blue-500\/90{background-color:#3080ffe6}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/90{background-color:color-mix(in oklab,var(--color-blue-500)90%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\/20{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\/20{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.bg-blue-700{background-color:var(--color-blue-700)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.bg-cyan-600\/20{background-color:#0092b533}@supports (color:color-mix(in lab,red,red)){.bg-cyan-600\/20{background-color:color-mix(in oklab,var(--color-cyan-600)20%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.bg-emerald-600\/20{background-color:#00976733}@supports (color:color-mix(in lab,red,red)){.bg-emerald-600\/20{background-color:color-mix(in oklab,var(--color-emerald-600)20%,transparent)}}.bg-emerald-700{background-color:var(--color-emerald-700)}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-400\/10{background-color:#99a1af1a}@supports (color:color-mix(in lab,red,red)){.bg-gray-400\/10{background-color:color-mix(in oklab,var(--color-gray-400)10%,transparent)}}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\/15{background-color:#00c75826}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/15{background-color:color-mix(in oklab,var(--color-green-500)15%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-600\/20{background-color:#00a54433}@supports (color:color-mix(in lab,red,red)){.bg-green-600\/20{background-color:color-mix(in oklab,var(--color-green-600)20%,transparent)}}.bg-green-600\/40{background-color:#00a54466}@supports (color:color-mix(in lab,red,red)){.bg-green-600\/40{background-color:color-mix(in oklab,var(--color-green-600)40%,transparent)}}.bg-green-700{background-color:var(--color-green-700)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab,red,red)){.bg-green-900\/30{background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab,red,red)){.bg-green-900\/50{background-color:color-mix(in oklab,var(--color-green-900)50%,transparent)}}.bg-indigo-500\/20{background-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/20{background-color:color-mix(in oklab,var(--color-indigo-500)20%,transparent)}}.bg-lime-500{background-color:var(--color-lime-500)}.bg-orange-400\/10{background-color:#ff8b1a1a}@supports (color:color-mix(in lab,red,red)){.bg-orange-400\/10{background-color:color-mix(in oklab,var(--color-orange-400)10%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-orange-600{background-color:var(--color-orange-600)}.bg-orange-600\/20{background-color:#f0510033}@supports (color:color-mix(in lab,red,red)){.bg-orange-600\/20{background-color:color-mix(in oklab,var(--color-orange-600)20%,transparent)}}.bg-purple-400\/10{background-color:#c07eff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-400\/10{background-color:color-mix(in oklab,var(--color-purple-400)10%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-purple-500\/80{background-color:#ac4bffcc}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/80{background-color:color-mix(in oklab,var(--color-purple-500)80%,transparent)}}.bg-purple-500\/90{background-color:#ac4bffe6}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/90{background-color:color-mix(in oklab,var(--color-purple-500)90%,transparent)}}.bg-purple-700{background-color:var(--color-purple-700)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500)5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-500\/30{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/30{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.bg-red-500\/40{background-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/40{background-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500)80%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.bg-red-950\/70{background-color:#460809b3}@supports (color:color-mix(in lab,red,red)){.bg-red-950\/70{background-color:color-mix(in oklab,var(--color-red-950)70%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500)20%,transparent)}}.bg-rose-600\/20{background-color:#e7004433}@supports (color:color-mix(in lab,red,red)){.bg-rose-600\/20{background-color:color-mix(in oklab,var(--color-rose-600)20%,transparent)}}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-500\/20{background-color:#00a5ef33}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/20{background-color:color-mix(in oklab,var(--color-sky-500)20%,transparent)}}.bg-status-error,.bg-status-error\/10{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/10{background-color:color-mix(in oklab,var(--color-status-error)10%,transparent)}}.bg-status-error\/20{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/20{background-color:color-mix(in oklab,var(--color-status-error)20%,transparent)}}.bg-status-error\/80{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/80{background-color:color-mix(in oklab,var(--color-status-error)80%,transparent)}}.bg-status-ok,.bg-status-ok\/10{background-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.bg-status-ok\/10{background-color:color-mix(in oklab,var(--color-status-ok)10%,transparent)}}.bg-status-ok\/20{background-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.bg-status-ok\/20{background-color:color-mix(in oklab,var(--color-status-ok)20%,transparent)}}.bg-status-warning,.bg-status-warning\/10{background-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-status-warning\/10{background-color:color-mix(in oklab,var(--color-status-warning)10%,transparent)}}.bg-status-warning\/20{background-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-status-warning\/20{background-color:color-mix(in oklab,var(--color-status-warning)20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-500\/20{background-color:#00baa733}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/20{background-color:color-mix(in oklab,var(--color-teal-500)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500{background-color:var(--color-violet-500)}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\/70{background-color:color-mix(in oklab,var(--color-white)70%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-400\/10{background-color:#fac8001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\/10{background-color:color-mix(in oklab,var(--color-yellow-400)10%,transparent)}}.bg-yellow-400\/20{background-color:#fac80033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\/20{background-color:color-mix(in oklab,var(--color-yellow-400)20%,transparent)}}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500)5%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.bg-yellow-700{background-color:var(--color-yellow-700)}.bg-zinc-600{background-color:var(--color-zinc-600)}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-bambu-dark-secondary{--tw-gradient-from:var(--color-bambu-dark-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-bambu-green\/10{--tw-gradient-from:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.from-bambu-green\/10{--tw-gradient-from:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.from-bambu-green\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.from-blue-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.from-blue-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500\/10{--tw-gradient-from:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.from-blue-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.from-blue-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gray-500\/10{--tw-gradient-from:#6a72821a}@supports (color:color-mix(in lab,red,red)){.from-gray-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)10%,transparent)}}.from-gray-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.from-purple-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white\/10{--tw-gradient-from:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.from-white\/10{--tw-gradient-from:color-mix(in oklab,var(--color-white)10%,transparent)}}.from-white\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-yellow-500\/10{--tw-gradient-from:#edb2001a}@supports (color:color-mix(in lab,red,red)){.from-yellow-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.from-yellow-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-black\/60{--tw-gradient-via:#0009}@supports (color:color-mix(in lab,red,red)){.via-black\/60{--tw-gradient-via:color-mix(in oklab,var(--color-black)60%,transparent)}}.via-black\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-bambu-dark-secondary{--tw-gradient-to:var(--color-bambu-dark-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-bambu-dark-tertiary{--tw-gradient-to:var(--color-bambu-dark-tertiary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.fill-yellow-400{fill:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-left{object-position:left}.p-0{padding:calc(var(--spacing)*0)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.\!px-1\.5{padding-inline:calc(var(--spacing)*1.5)!important}.\!px-3{padding-inline:calc(var(--spacing)*3)!important}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.py-20{padding-block:calc(var(--spacing)*20)}.py-24{padding-block:calc(var(--spacing)*24)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-6{padding-right:calc(var(--spacing)*6)}.pr-7{padding-right:calc(var(--spacing)*7)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[6px\]{font-size:6px}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-green-400{color:var(--color-green-400)!important}.\!text-white{color:var(--color-white)!important}.\!text-yellow-400{color:var(--color-yellow-400)!important}.text-amber-200{color:var(--color-amber-200)}.text-amber-200\/80{color:#fee685cc}@supports (color:color-mix(in lab,red,red)){.text-amber-200\/80{color:color-mix(in oklab,var(--color-amber-200)80%,transparent)}}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/60{color:#ffd23699}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/60{color:color-mix(in oklab,var(--color-amber-300)60%,transparent)}}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/70{color:color-mix(in oklab,var(--color-amber-300)70%,transparent)}}.text-amber-300\/80{color:#ffd236cc}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/80{color:color-mix(in oklab,var(--color-amber-300)80%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/70{color:#fcbb00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/70{color:color-mix(in oklab,var(--color-amber-400)70%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\/80{color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-500\/80{color:color-mix(in oklab,var(--color-amber-500)80%,transparent)}}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-bambu-dark-tertiary{color:var(--color-bambu-dark-tertiary)}.text-bambu-gray{color:var(--color-bambu-gray)}.text-bambu-gray-dark{color:var(--color-bambu-gray-dark)}.text-bambu-gray-light{color:var(--color-bambu-gray-light)}.text-bambu-gray\/30{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/30{color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.text-bambu-gray\/40{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/40{color:color-mix(in oklab,var(--color-bambu-gray)40%,transparent)}}.text-bambu-gray\/50{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/50{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.text-bambu-gray\/60{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/60{color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.text-bambu-gray\/70{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/70{color:color-mix(in oklab,var(--color-bambu-gray)70%,transparent)}}.text-bambu-gray\/80{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/80{color:color-mix(in oklab,var(--color-bambu-gray)80%,transparent)}}.text-bambu-green,.text-bambu-green\/70{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.text-bambu-green\/70{color:color-mix(in oklab,var(--color-bambu-green)70%,transparent)}}.text-black{color:var(--color-black)}.text-black\/80{color:#000c}@supports (color:color-mix(in lab,red,red)){.text-black\/80{color:color-mix(in oklab,var(--color-black)80%,transparent)}}.text-blue-100{color:var(--color-blue-100)}.text-blue-300{color:var(--color-blue-300)}.text-blue-300\/70{color:#90c5ffb3}@supports (color:color-mix(in lab,red,red)){.text-blue-300\/70{color:color-mix(in oklab,var(--color-blue-300)70%,transparent)}}.text-blue-300\/80{color:#90c5ffcc}@supports (color:color-mix(in lab,red,red)){.text-blue-300\/80{color:color-mix(in oklab,var(--color-blue-300)80%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-500\/70{color:#3080ffb3}@supports (color:color-mix(in lab,red,red)){.text-blue-500\/70{color:color-mix(in oklab,var(--color-blue-500)70%,transparent)}}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-200{color:var(--color-green-200)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-400\/60{color:#05df7299}@supports (color:color-mix(in lab,red,red)){.text-green-400\/60{color:color-mix(in oklab,var(--color-green-400)60%,transparent)}}.text-green-500{color:var(--color-green-500)}.text-green-500\/60{color:#00c75899}@supports (color:color-mix(in lab,red,red)){.text-green-500\/60{color:color-mix(in oklab,var(--color-green-500)60%,transparent)}}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-200{color:var(--color-orange-200)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-300{color:var(--color-purple-300)}.text-purple-300\/70{color:#d9b3ffb3}@supports (color:color-mix(in lab,red,red)){.text-purple-300\/70{color:color-mix(in oklab,var(--color-purple-300)70%,transparent)}}.text-purple-400{color:var(--color-purple-400)}.text-purple-400\/80{color:#c07effcc}@supports (color:color-mix(in lab,red,red)){.text-purple-400\/80{color:color-mix(in oklab,var(--color-purple-400)80%,transparent)}}.text-purple-500{color:var(--color-purple-500)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300)80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/50{color:#ff656880}@supports (color:color-mix(in lab,red,red)){.text-red-400\/50{color:color-mix(in oklab,var(--color-red-400)50%,transparent)}}.text-red-400\/60{color:#ff656899}@supports (color:color-mix(in lab,red,red)){.text-red-400\/60{color:color-mix(in oklab,var(--color-red-400)60%,transparent)}}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\/70{color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-status-error{color:var(--color-status-error)}.text-status-ok{color:var(--color-status-ok)}.text-status-warning{color:var(--color-status-warning)}.text-teal-400{color:var(--color-teal-400)}.text-white{color:var(--color-white)}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.text-white\/30{color:color-mix(in oklab,var(--color-white)30%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white)40%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white)50%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-200{color:var(--color-yellow-200)}.text-yellow-200\/70{color:#fff085b3}@supports (color:color-mix(in lab,red,red)){.text-yellow-200\/70{color:color-mix(in oklab,var(--color-yellow-200)70%,transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-500\/70{color:#edb200b3}@supports (color:color-mix(in lab,red,red)){.text-yellow-500\/70{color:color-mix(in oklab,var(--color-yellow-500)70%,transparent)}}.text-yellow-500\/80{color:#edb200cc}@supports (color:color-mix(in lab,red,red)){.text-yellow-500\/80{color:color-mix(in oklab,var(--color-yellow-500)80%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.placeholder-bambu-gray::placeholder{color:var(--color-bambu-gray)}.placeholder-bambu-gray-dark::placeholder{color:var(--color-bambu-gray-dark)}.placeholder-bambu-gray\/40::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/40::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)40%,transparent)}}.placeholder-bambu-gray\/50::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/50::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.placeholder-bambu-gray\/60::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/60::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.placeholder-white\/30::placeholder{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.placeholder-white\/30::placeholder{color:color-mix(in oklab,var(--color-white)30%,transparent)}}.placeholder-zinc-500::placeholder{color:var(--color-zinc-500)}.accent-amber-500{accent-color:var(--color-amber-500)}.accent-bambu-green{accent-color:var(--color-bambu-green)}.accent-green-500{accent-color:var(--color-green-500)}.\[color-scheme\:dark\]{color-scheme:dark}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_6px_rgba\(34\,197\,94\,0\.5\)\]{--tw-shadow:0 0 6px var(--tw-shadow-color,#22c55e80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow\/depth{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-bambu-green\/20{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.shadow-bambu-green\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-bambu-green\/25{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.shadow-bambu-green\/25{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)25%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-bambu-green,.ring-bambu-green\/30{--tw-ring-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.ring-bambu-green\/30{--tw-ring-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.ring-blue-400\/50{--tw-ring-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.ring-blue-400\/50{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.ring-green-500{--tw-ring-color:var(--color-green-500)}.ring-white{--tw-ring-color:var(--color-white)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bambu-dark{--tw-ring-offset-color:var(--color-bambu-dark)}.ring-offset-bambu-dark-secondary{--tw-ring-offset-color:var(--color-bambu-dark-secondary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-lg));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-\[2000ms\]{--tw-duration:2s;transition-duration:2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:bg-bambu-green\/20:is(:where(.group):hover *){background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-bambu-green\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.group-hover\:text-bambu-gray:is(:where(.group):hover *){color:var(--color-bambu-gray)}.group-hover\:text-bambu-green:is(:where(.group):hover *){color:var(--color-bambu-green)}.group-hover\:opacity-50:is(:where(.group):hover *){opacity:.5}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/resize\:opacity-100:is(:where(.group\/resize):hover *){opacity:1}.group-hover\/thumb\:block:is(:where(.group\/thumb):hover *){display:block}}.peer-checked\:bg-amber-500:is(:where(.peer):checked~*){background-color:var(--color-amber-500)}.peer-checked\:bg-bambu-green:is(:where(.peer):checked~*){background-color:var(--color-bambu-green)}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.placeholder\:text-bambu-gray::placeholder,.placeholder\:text-bambu-gray\/50::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-bambu-gray\/50::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-0:before{content:var(--tw-content);top:calc(var(--spacing)*0)}.before\:right-0:before{content:var(--tw-content);right:calc(var(--spacing)*0)}.before\:left-0:before{content:var(--tw-content);left:calc(var(--spacing)*0)}.before\:h-0\.5:before{content:var(--tw-content);height:calc(var(--spacing)*.5)}.before\:bg-bambu-green:before{content:var(--tw-content);background-color:var(--color-bambu-green)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing)*4)}.after\:h-5:after{content:var(--tw-content);height:calc(var(--spacing)*5)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing)*4)}.after\:w-5:after{content:var(--tw-content);width:calc(var(--spacing)*5)}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);border-color:var(--color-gray-300)}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-bambu-green:focus-within{border-color:var(--color-bambu-green)}@media(hover:hover){.hover\:z-20:hover{z-index:20}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-amber-500:hover{border-color:var(--color-amber-500)}.hover\:border-bambu-dark-tertiary\/80:hover{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-dark-tertiary\/80:hover{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.hover\:border-bambu-gray:hover{border-color:var(--color-bambu-gray)}.hover\:border-bambu-gray-dark:hover{border-color:var(--color-bambu-gray-dark)}.hover\:border-bambu-gray\/50:hover{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-gray\/50:hover{border-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.hover\:border-bambu-green:hover,.hover\:border-bambu-green\/50:hover{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-green\/50:hover{border-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-green-500\/50:hover{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.hover\:border-green-500\/50:hover{border-color:color-mix(in oklab,var(--color-green-500)50%,transparent)}}.hover\:border-white:hover{border-color:var(--color-white)}.hover\:border-white\/40:hover{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/40:hover{border-color:color-mix(in oklab,var(--color-white)40%,transparent)}}.hover\:\!bg-bambu-green\/80:hover{background-color:var(--color-bambu-green)!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-bambu-green\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)!important}}.hover\:\!bg-green-500\/20:hover{background-color:#00c75833!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-green-500\/20:hover{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)!important}}.hover\:\!bg-yellow-500\/20:hover{background-color:#edb20033!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-yellow-500\/20:hover{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)!important}}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.hover\:bg-amber-500\/30:hover{background-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/30:hover{background-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.hover\:bg-bambu-dark:hover{background-color:var(--color-bambu-dark)}.hover\:bg-bambu-dark-secondary:hover,.hover\:bg-bambu-dark-secondary\/50:hover{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-secondary\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)50%,transparent)}}.hover\:bg-bambu-dark-secondary\/80:hover{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)80%,transparent)}}.hover\:bg-bambu-dark-tertiary:hover,.hover\:bg-bambu-dark-tertiary\/30:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/30:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.hover\:bg-bambu-dark-tertiary\/50:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.hover\:bg-bambu-dark-tertiary\/70:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/70:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)70%,transparent)}}.hover\:bg-bambu-dark-tertiary\/80:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.hover\:bg-bambu-dark\/50:hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.hover\:bg-bambu-dark\/80:hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark)80%,transparent)}}.hover\:bg-bambu-gray-dark:hover{background-color:var(--color-bambu-gray-dark)}.hover\:bg-bambu-green:hover{background-color:var(--color-bambu-green)}.hover\:bg-bambu-green-dark:hover{background-color:var(--color-bambu-green-dark)}.hover\:bg-bambu-green-light:hover{background-color:var(--color-bambu-green-light)}.hover\:bg-bambu-green\/10:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/10:hover{background-color:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.hover\:bg-bambu-green\/20:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/20:hover{background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.hover\:bg-bambu-green\/30:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/30:hover{background-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.hover\:bg-bambu-green\/50:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.hover\:bg-bambu-green\/80:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)}}.hover\:bg-black\/40:hover{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/40:hover{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.hover\:bg-black\/70:hover{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/70:hover{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.hover\:bg-black\/80:hover{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/80:hover{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.hover\:bg-blue-500\/30:hover{background-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/30:hover{background-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-700:hover{background-color:var(--color-gray-700)}.hover\:bg-green-500\/20:hover{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.hover\:bg-green-500\/20:hover{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-orange-400\/20:hover{background-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-400\/20:hover{background-color:color-mix(in oklab,var(--color-orange-400)20%,transparent)}}.hover\:bg-purple-600\/90:hover{background-color:#9810fae6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-600\/90:hover{background-color:color-mix(in oklab,var(--color-purple-600)90%,transparent)}}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-400\/10:hover{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-400\/10:hover{background-color:color-mix(in oklab,var(--color-red-400)10%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-red-500\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:bg-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\:bg-yellow-500\/30:hover{background-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-yellow-500\/30:hover{background-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.hover\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\:bg-zinc-700:hover{background-color:var(--color-zinc-700)}.hover\:bg-zinc-700\/50:hover{background-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.hover\:bg-zinc-700\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-bambu-gray:hover{color:var(--color-bambu-gray)}.hover\:text-bambu-green:hover{color:var(--color-bambu-green)}.hover\:text-bambu-green-light:hover{color:var(--color-bambu-green-light)}.hover\:text-bambu-green\/70:hover{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:text-bambu-green\/70:hover{color:color-mix(in oklab,var(--color-bambu-green)70%,transparent)}}.hover\:text-bambu-green\/80:hover{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:text-bambu-green\/80:hover{color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)}}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-orange-300:hover{color:var(--color-orange-300)}.hover\:text-red-200:hover{color:var(--color-red-200)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/60:hover{color:#fff9}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/60:hover{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.hover\:text-white\/70:hover{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/70:hover{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/80:hover{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\:text-yellow-400:hover{color:var(--color-yellow-400)}.hover\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-70:hover{opacity:.7}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-bambu-green\/5:hover{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-bambu-green\/5:hover{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)5%,transparent)var(--tw-shadow-alpha),transparent)}}.hover\:shadow-bambu-green\/30:hover{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-bambu-green\/30:hover{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)30%,transparent)var(--tw-shadow-alpha),transparent)}}}.focus\:border-amber-500\/50:focus{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.focus\:border-amber-500\/50:focus{border-color:color-mix(in oklab,var(--color-amber-500)50%,transparent)}}.focus\:border-bambu-green:focus{border-color:var(--color-bambu-green)}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:border-transparent:focus{border-color:#0000}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-bambu-gray:focus{--tw-ring-color:var(--color-bambu-gray)}.focus\:ring-bambu-green:focus,.focus\:ring-bambu-green\/50:focus{--tw-ring-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.focus\:ring-bambu-green\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-bambu-dark:focus{--tw-ring-offset-color:var(--color-bambu-dark)}.focus\:ring-offset-bambu-dark-secondary:focus{--tw-ring-offset-color:var(--color-bambu-dark-secondary)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.disabled\:bg-zinc-700:disabled{background-color:var(--color-zinc-700)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:bg-bambu-green:disabled:hover{background-color:var(--color-bambu-green)}}@media not all and (min-width:640px){.max-\[640px\]\:hidden{display:none}.max-\[640px\]\:w-full{width:100%}.max-\[640px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[640px\]\:flex-col{flex-direction:column}.max-\[640px\]\:flex-wrap{flex-wrap:wrap}.max-\[640px\]\:items-center{align-items:center}.max-\[640px\]\:items-start{align-items:flex-start}}@media not all and (min-width:550px){.max-\[550px\]\:order-1{order:1}.max-\[550px\]\:order-2{order:2}.max-\[550px\]\:order-3{order:3}.max-\[550px\]\:order-4{order:4}.max-\[550px\]\:mt-1{margin-top:calc(var(--spacing)*1)}.max-\[550px\]\:w-full{width:100%}.max-\[550px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.max-\[550px\]\:flex-col{flex-direction:column}.max-\[550px\]\:flex-wrap{flex-wrap:wrap}.max-\[550px\]\:items-center{align-items:center}.max-\[550px\]\:items-start{align-items:flex-start}.max-\[550px\]\:justify-end{justify-content:flex-end}.max-\[550px\]\:gap-1\.5{gap:calc(var(--spacing)*1.5)}.max-\[550px\]\:gap-3{gap:calc(var(--spacing)*3)}.max-\[550px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:mt-2{margin-top:calc(var(--spacing)*2)}.sm\:mt-3{margin-top:calc(var(--spacing)*3)}.sm\:mr-1{margin-right:calc(var(--spacing)*1)}.sm\:mb-4{margin-bottom:calc(var(--spacing)*4)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-2{height:calc(var(--spacing)*2)}.sm\:h-3{height:calc(var(--spacing)*3)}.sm\:h-3\.5{height:calc(var(--spacing)*3.5)}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-5{height:calc(var(--spacing)*5)}.sm\:h-6{height:calc(var(--spacing)*6)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:w-3{width:calc(var(--spacing)*3)}.sm\:w-3\.5{width:calc(var(--spacing)*3.5)}.sm\:w-4{width:calc(var(--spacing)*4)}.sm\:w-5{width:calc(var(--spacing)*5)}.sm\:w-6{width:calc(var(--spacing)*6)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-14{width:calc(var(--spacing)*14)}.sm\:w-16{width:calc(var(--spacing)*16)}.sm\:w-40{width:calc(var(--spacing)*40)}.sm\:w-auto{width:auto}.sm\:max-w-none{max-width:none}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:flex-1{flex:1}.sm\:flex-none{flex:none}.sm\:cursor-default{cursor:default}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:calc(var(--spacing)*1)}.sm\:gap-1\.5{gap:calc(var(--spacing)*1.5)}.sm\:gap-2{gap:calc(var(--spacing)*2)}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-6{gap:calc(var(--spacing)*6)}:where(.sm\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.sm\:border-bambu-dark-tertiary{border-color:var(--color-bambu-dark-tertiary)}.sm\:p-1\.5{padding:calc(var(--spacing)*1.5)}.sm\:p-2{padding:calc(var(--spacing)*2)}.sm\:p-3{padding:calc(var(--spacing)*3)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:px-2{padding-inline:calc(var(--spacing)*2)}.sm\:px-3{padding-inline:calc(var(--spacing)*3)}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:48rem){.md\:top-\[2px\]{top:2px}.md\:left-\[2px\]{left:2px}.md\:mx-0{margin-inline:calc(var(--spacing)*0)}.md\:block{display:block}.md\:inline{display:inline}.md\:h-4{height:calc(var(--spacing)*4)}.md\:h-5{height:calc(var(--spacing)*5)}.md\:min-h-0{min-height:calc(var(--spacing)*0)}.md\:w-4{width:calc(var(--spacing)*4)}.md\:w-9{width:calc(var(--spacing)*9)}.md\:min-w-\[200px\]{min-width:200px}.md\:flex-1{flex:1}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-wrap{flex-wrap:wrap}.md\:items-center{align-items:center}.md\:gap-4{gap:calc(var(--spacing)*4)}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:p-8{padding:calc(var(--spacing)*8)}.md\:px-0{padding-inline:calc(var(--spacing)*0)}.md\:py-2{padding-block:calc(var(--spacing)*2)}.md\:pb-0{padding-bottom:calc(var(--spacing)*0)}}@media(min-width:64rem){.lg\:static{position:static}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[calc\(100vh-64px\)\]{height:calc(100vh - 64px)}.lg\:w-1\/3{width:33.3333%}.lg\:w-2\/3{width:66.6667%}.lg\:w-80{width:calc(var(--spacing)*80)}.lg\:w-\[480px\]{width:480px}.lg\:max-w-md{max-width:var(--container-md)}.lg\:max-w-sm{max-width:var(--container-sm)}.lg\:max-w-xl{max-width:var(--container-xl)}.lg\:flex-shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:gap-4{gap:calc(var(--spacing)*4)}.lg\:gap-6{gap:calc(var(--spacing)*6)}.lg\:gap-8{gap:calc(var(--spacing)*8)}.lg\:overflow-y-auto{overflow-y:auto}.lg\:p-8{padding:calc(var(--spacing)*8)}}@media(min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:96rem){.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}.dark\:border-amber-700:where(.dark,.dark *){border-color:var(--color-amber-700)}.dark\:border-amber-800:where(.dark,.dark *){border-color:var(--color-amber-800)}.dark\:border-bambu-dark-tertiary:where(.dark,.dark *),.dark\:border-bambu-dark-tertiary\/50:where(.dark,.dark *){border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.dark\:border-bambu-dark-tertiary\/50:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.dark\:border-bambu-green\/40:where(.dark,.dark *){border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:border-bambu-green\/40:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-bambu-green)40%,transparent)}}.dark\:border-gray-600:where(.dark,.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\:border-red-500\/30:where(.dark,.dark *){border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-500\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.dark\:border-red-500\/40:where(.dark,.dark *){border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-500\/40:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.dark\:bg-amber-500\/10:where(.dark,.dark *){background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.dark\:bg-amber-900\/20:where(.dark,.dark *){background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-900)20%,transparent)}}.dark\:bg-bambu-dark:where(.dark,.dark *){background-color:var(--color-bambu-dark)}.dark\:bg-bambu-dark-secondary:where(.dark,.dark *){background-color:var(--color-bambu-dark-secondary)}.dark\:bg-bambu-green\/20:where(.dark,.dark *){background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-bambu-green\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.dark\:bg-black\/80:where(.dark,.dark *){background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/80:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.dark\:bg-blue-500\/10:where(.dark,.dark *){background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.dark\:bg-blue-500\/20:where(.dark,.dark *){background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.dark\:bg-blue-900\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\:bg-red-500\/10:where(.dark,.dark *){background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.dark\:bg-red-500\/20:where(.dark,.dark *){background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.dark\:text-amber-200:where(.dark,.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:where(.dark,.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\:text-bambu-gray:where(.dark,.dark *),.dark\:text-bambu-gray\/30:where(.dark,.dark *){color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-gray\/30:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.dark\:text-bambu-gray\/50:where(.dark,.dark *){color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-gray\/50:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.dark\:text-bambu-green:where(.dark,.dark *),.dark\:text-bambu-green\/60:where(.dark,.dark *){color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-green\/60:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-green)60%,transparent)}}.dark\:text-blue-200:where(.dark,.dark *){color:var(--color-blue-200)}.dark\:text-blue-200\/80:where(.dark,.dark *){color:#bedbffcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-blue-200\/80:where(.dark,.dark *){color:color-mix(in oklab,var(--color-blue-200)80%,transparent)}}.dark\:text-blue-300:where(.dark,.dark *){color:var(--color-blue-300)}.dark\:text-blue-300\/60:where(.dark,.dark *){color:#90c5ff99}@supports (color:color-mix(in lab,red,red)){.dark\:text-blue-300\/60:where(.dark,.dark *){color:color-mix(in oklab,var(--color-blue-300)60%,transparent)}}.dark\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:where(.dark,.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:where(.dark,.dark *){color:var(--color-gray-600)}.dark\:text-green-400:where(.dark,.dark *){color:var(--color-green-400)}.dark\:text-orange-200:where(.dark,.dark *){color:var(--color-orange-200)}.dark\:text-orange-400:where(.dark,.dark *){color:var(--color-orange-400)}.dark\:text-red-400:where(.dark,.dark *){color:var(--color-red-400)}.dark\:text-red-400\/70:where(.dark,.dark *){color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-red-400\/70:where(.dark,.dark *){color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.dark\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\:text-yellow-200:where(.dark,.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-200\/70:where(.dark,.dark *){color:#fff085b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-yellow-200\/70:where(.dark,.dark *){color:color-mix(in oklab,var(--color-yellow-200)70%,transparent)}}@media(hover:hover){.dark\:hover\:border-gray-500:where(.dark,.dark *):hover{border-color:var(--color-gray-500)}.dark\:hover\:bg-bambu-dark-tertiary:where(.dark,.dark *):hover{background-color:var(--color-bambu-dark-tertiary)}.dark\:hover\:bg-bambu-dark\/50:where(.dark,.dark *):hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-bambu-dark\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.dark\:hover\:bg-gray-600:where(.dark,.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-red-500\/30:where(.dark,.dark *):hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-500\/30:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.dark\:hover\:text-amber-200:where(.dark,.dark *):hover{color:var(--color-amber-200)}.dark\:hover\:text-gray-300:where(.dark,.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-white:where(.dark,.dark *):hover{color:var(--color-white)}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:h-3::-webkit-slider-thumb{height:calc(var(--spacing)*3)}.\[\&\:\:-webkit-slider-thumb\]\:w-3::-webkit-slider-thumb{width:calc(var(--spacing)*3)}.\[\&\:\:-webkit-slider-thumb\]\:cursor-pointer::-webkit-slider-thumb{cursor:pointer}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-thumb\]\:bg-bambu-green::-webkit-slider-thumb{background-color:var(--color-bambu-green)}}:root{--accent:#00ae42;--accent-light:#00c64d;--accent-dark:#009438;--status-ok:#22c55e;--status-error:#ef4444;--status-warning:#f59e0b;--bg-primary:#f5f5f5;--bg-secondary:#fff;--bg-tertiary:#e5e5e5;--text-primary:#1a1a1a;--text-secondary:#4a4a4a;--text-muted:#6b6b6b;--text-tertiary:gray;--border-color:#d4d4d4;--card-shadow:0 2px 8px #00000014;--glow-color:transparent;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,system-ui,sans-serif;font-weight:400;line-height:1.5}.dark{--bg-primary:#1a1a1a;--bg-secondary:#2d2d2d;--bg-tertiary:#3d3d3d;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:gray;--text-tertiary:#4a4a4a;--border-color:#3d3d3d;--card-shadow:0 4px 16px #0006}.bg-warm{--bg-primary:#faf8f5;--bg-secondary:#fffefa;--bg-tertiary:#e8e4dd;--text-primary:#2d2a26;--text-secondary:#5c5750;--text-muted:#7a756c;--text-tertiary:#9a9590;--border-color:#d8d4cc}.bg-cool{--bg-primary:#f0f4f8;--bg-secondary:#fff;--bg-tertiary:#dce4ec;--text-primary:#1a2530;--text-secondary:#4a5568;--text-muted:#6b7a8a;--text-tertiary:#8a9aaa;--border-color:#c8d4e0}.dark.bg-neutral{--bg-primary:#1a1a1a;--bg-secondary:#2d2d2d;--bg-tertiary:#3d3d3d;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:gray;--text-tertiary:#4a4a4a;--border-color:#3d3d3d}.dark.bg-warm{--bg-primary:#1c1a18;--bg-secondary:#2e2a26;--bg-tertiary:#3e3a36;--text-primary:#f5f0ea;--text-secondary:#b0a898;--text-muted:#8a8278;--text-tertiary:#5a5248;--border-color:#3e3a36}.dark.bg-cool{--bg-primary:#181c20;--bg-secondary:#262c32;--bg-tertiary:#363e46;--text-primary:#f0f4f8;--text-secondary:#98a8b8;--text-muted:#788898;--text-tertiary:#4a5a6a;--border-color:#363e46}.dark.bg-oled{--bg-primary:#000;--bg-secondary:#141414;--bg-tertiary:#1f1f1f;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:#707070;--text-tertiary:#404040;--border-color:#2a2a2a}.dark.bg-slate{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--text-tertiary:#475569;--border-color:#334155}.dark.bg-forest{--bg-primary:#121a16;--bg-secondary:#1c2a22;--bg-tertiary:#2a3d30;--text-primary:#e8f5ec;--text-secondary:#8aa894;--text-muted:#6a8874;--text-tertiary:#4a6854;--border-color:#2a3d30}.printer-control-buttons-container{container-type:inline-size}@container (max-width:220px){.printer-control-buttons{flex-direction:column;align-items:stretch}.printer-control-buttons>button{width:100%}}.style-glow{--card-shadow:0 2px 8px #00000014,0 0 25px var(--accent)}@supports (color:color-mix(in lab,red,red)){.style-glow{--card-shadow:0 2px 8px #00000014,0 0 25px color-mix(in srgb,var(--accent)12%,transparent)}}.dark.style-glow{--card-shadow:0 4px 20px #00000080,0 0 40px var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark.style-glow{--card-shadow:0 4px 20px #00000080,0 0 40px color-mix(in srgb,var(--accent)15%,transparent)}}.style-vibrant{--card-shadow:0 8px 30px #00000026,0 2px 8px #0000001a}.dark.style-vibrant{--card-shadow:0 10px 40px #0009,0 4px 12px #0006}.accent-green{--accent:#00ae42;--accent-light:#00c64d;--accent-dark:#009438}.accent-teal{--accent:#14b8a6;--accent-light:#2dd4bf;--accent-dark:#0d9488}.accent-blue{--accent:#3b82f6;--accent-light:#60a5fa;--accent-dark:#2563eb}.accent-orange{--accent:#f97316;--accent-light:#fb923c;--accent-dark:#ea580c}.accent-purple{--accent:#8b5cf6;--accent-light:#a78bfa;--accent-dark:#7c3aed}.accent-red{--accent:#ef4444;--accent-light:#f87171;--accent-dark:#dc2626}body{background-color:var(--bg-primary);color:var(--text-primary);min-height:100vh;margin:0;transition:background-color .2s,color .2s}#root{min-height:100vh}.text-white{color:var(--text-primary)}.bg-bambu-dark,.bg-bambu-dark-secondary,.bg-bambu-dark-tertiary,.border-bambu-dark-tertiary{transition:background-color .2s,border-color .2s}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}.icon-theme{opacity:.5}.dark .icon-theme{filter:invert();opacity:.4}.icon-green{filter:invert(48%)sepia(89%)saturate(459%)hue-rotate(93deg)brightness(95%)contrast(92%);opacity:1}.icon-heating{filter:invert(50%)sepia()saturate(1000%)hue-rotate(360deg)brightness()contrast();opacity:1}.dark .jogpad-theme{filter:brightness(.35)contrast(1.2)}.ams-empty-slot{background:repeating-linear-gradient(45deg,#444,#444 2px,#222 2px 4px)}.dark .ams-empty-slot{background:repeating-linear-gradient(45deg,#555,#555 2px,#333 2px 4px)}.touch-manipulation{touch-action:manipulation}.safe-area-bottom{padding-bottom:env(safe-area-inset-bottom,0)}.safe-area-top{padding-top:env(safe-area-inset-top,0)}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}@keyframes slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.animate-slide-in-left{animation:.3s ease-out slide-in-left}.card-shadow{box-shadow:var(--card-shadow)}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl{flex-direction:column;height:90vh;max-height:90vh;display:flex}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:first-child,[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:last-child{flex-shrink:0}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:nth-child(2){flex:auto;min-height:0;overflow-y:auto}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl .max-h-96{max-height:none}.calendar-scroll{scrollbar-width:thin;scrollbar-color:var(--text-muted)transparent}@supports (color:color-mix(in lab,red,red)){.calendar-scroll{scrollbar-color:color-mix(in srgb,var(--text-muted)60%,transparent)transparent}}.calendar-scroll::-webkit-scrollbar{width:8px}.calendar-scroll::-webkit-scrollbar-track{background:0 0}.calendar-scroll::-webkit-scrollbar-thumb{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--text-muted)60%,transparent)}}.calendar-scroll::-webkit-scrollbar-thumb{border:2px solid var(--bg-secondary);border-radius:999px}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb{border:2px solid color-mix(in srgb,var(--bg-secondary)70%,transparent)}}.calendar-scroll::-webkit-scrollbar-thumb:hover{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,var(--text-muted)80%,transparent)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}.hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}.simple-keyboard.vkb-theme{background:#1a1a1a;border-top:1px solid #333;padding:8px 4px;font-family:inherit}.simple-keyboard.vkb-theme .hg-row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px;margin-bottom:4px}.simple-keyboard.vkb-theme .hg-row:last-child{margin-bottom:0}.simple-keyboard.vkb-theme .hg-button{display:inline-flex!important;align-items:center;justify-content:center;flex-grow:1;flex-shrink:1;flex-basis:auto;background:#2d2d2d;color:#e0e0e0;border:none;border-radius:6px;height:44px;font-size:16px;font-weight:500;box-shadow:0 1px 2px #0000004d;transition:background .1s;cursor:pointer;padding:0 2px;min-width:0}.simple-keyboard.vkb-theme .hg-button:active{background:#00ae42;color:#fff}.simple-keyboard.vkb-theme .hg-button-bksp,.simple-keyboard.vkb-theme .hg-button-shift,.simple-keyboard.vkb-theme .hg-button-lock{background:#3a3a3a;color:#aaa;flex-grow:1.5}.simple-keyboard.vkb-theme .hg-button-close{background:#3a3a3a;color:#aaa;flex-grow:2;font-weight:600}.simple-keyboard.vkb-theme .hg-button-close:active{background:#555}.simple-keyboard.vkb-theme .hg-button-space{flex-grow:7}.simple-keyboard.vkb-theme .hg-activeButton{background:#00ae42;color:#fff} diff --git a/static/assets/index-BJ5z52r8.js b/static/assets/index-CnzPkDwq.js similarity index 98% rename from static/assets/index-BJ5z52r8.js rename to static/assets/index-CnzPkDwq.js index 154cf47da..48bdb3071 100644 --- a/static/assets/index-BJ5z52r8.js +++ b/static/assets/index-CnzPkDwq.js @@ -8718,7 +8718,7 @@ Difference: ${l}g (within tolerance)`:`Scale: ${Math.round(n)}g Calculated: ${Math.round(a)}g Difference: ${l}g (mismatch!)`;return i.jsxs("div",{className:`flex items-center gap-1 text-sm font-medium ${o?"text-green-400":"text-yellow-400"}`,title:c,children:[i.jsxs("span",{children:[Math.round(n),"g"]}),o?i.jsx(Zr,{className:"w-3 h-3"}):i.jsxs(i.Fragment,{children:[i.jsx(jn,{className:"w-3 h-3"}),e&&i.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),d.preventDefault(),e(t)},className:"p-1 hover:bg-bambu-green/20 rounded transition-colors text-bambu-green",title:"Sync: trust scale weight and reset tracking",children:i.jsx(vr,{className:"w-3.5 h-3.5"})})]})]})}},o3={id:t=>t.id,added_time:t=>t.created_at||"",encode_time:t=>t.encode_time||"",last_used_time:t=>t.last_used||"",material:t=>(t.material||"").toLowerCase(),subtype:t=>(t.subtype||"").toLowerCase(),color_name:t=>(t.color_name||"").toLowerCase(),brand:t=>(t.brand||"").toLowerCase(),slicer_filament:t=>(t.slicer_filament_name||t.slicer_filament||"").toLowerCase(),location:(t,e)=>{const n=e[t.id];if(!n)return"";const r=n.ams_id===254||n.ams_id===255,a=!r&&n.ams_id>=128,s=n.ams_label?` (${n.ams_label})`:"";return`${n.printer_name||""} ${Jw(n.ams_id,n.tray_id,a,r)}${s}`},label_weight:t=>t.label_weight,net:t=>Math.max(0,t.label_weight-t.weight_used),gross:t=>Math.max(0,t.label_weight-t.weight_used)+t.core_weight,used:t=>t.weight_used,remaining:t=>t.label_weight>0?Math.max(0,t.label_weight-t.weight_used)/t.label_weight:0,note:t=>(t.note||"").toLowerCase(),data_origin:t=>(t.data_origin||"").toLowerCase(),tag_type:t=>(t.tag_type||"").toLowerCase(),stock:t=>t.slicer_filament?1:0,spool_name:t=>t.core_weight_catalog_id??0,cost_per_kg:t=>t.cost_per_kg??0,weight_check:t=>{if(t.last_scale_weight==null)return-1;const e=Math.max(0,t.label_weight-t.weight_used)+t.core_weight;return Math.abs(t.last_scale_weight-e)}},IL="bambuddy-inventory-sort";function Snt(){try{const t=localStorage.getItem(IL);if(t)return JSON.parse(t)}catch{}return null}function _nt(t){try{t?localStorage.setItem(IL,JSON.stringify(t)):localStorage.removeItem(IL)}catch{}}function Nnt(){const{data:t}=Je({queryKey:["spoolman-settings"],queryFn:fe.getSpoolmanSettings,staleTime:3e5});return t?.spoolman_enabled==="true"&&t?.spoolman_url?i.jsx("iframe",{src:`${t.spoolman_url.replace(/\/+$/,"")}/spool`,className:"h-full w-full border-0",title:"Spoolman",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"}):i.jsx(knt,{})}function knt(){const{t}=jt(),e=cn(),{showToast:n}=pn(),[r,a]=w.useState(null),[s,o]=w.useState(null),[l,c]=w.useState("active"),[d,u]=w.useState("all"),[m,p]=w.useState(""),[f,y]=w.useState(""),[v,b]=w.useState(""),[g,_]=w.useState("all"),[N,C]=w.useState(""),[k,P]=w.useState("table"),[T,j]=w.useState(Snt),[A,F]=w.useState(xnt),[G,z]=w.useState(!1),[J,I]=w.useState(()=>{try{return localStorage.getItem("bambuddy-inventory-group")==="true"}catch{return!1}}),[te,se]=w.useState(new Set),[Z,de]=w.useState(0),[me,ue]=w.useState(()=>{try{const Ce=localStorage.getItem("bambuddy-inventory-pageSize");if(Ce){const Te=Number(Ce);if([15,30,50,100,-1].includes(Te))return Te}}catch{}return 15}),{data:W}=Je({queryKey:["settings"],queryFn:fe.getSettings}),ae=W?.date_format||"system",{data:le,isLoading:ge}=Je({queryKey:["inventory-spools"],queryFn:()=>fe.getSpools(!0),refetchInterval:3e4}),{data:Ne}=Je({queryKey:["spool-assignments"],queryFn:()=>fe.getAssignments(),refetchInterval:3e4}),{data:H}=Je({queryKey:["spool-catalog"],queryFn:()=>fe.getSpoolCatalog()}),X=ht({mutationFn:Ce=>fe.deleteSpool(Ce),onSuccess:()=>{e.invalidateQueries({queryKey:["inventory-spools"]}),n(t("inventory.spoolDeleted"),"success")}}),D=ht({mutationFn:Ce=>fe.archiveSpool(Ce),onSuccess:()=>{e.invalidateQueries({queryKey:["inventory-spools"]}),n(t("inventory.spoolArchived"),"success")}}),M=ht({mutationFn:Ce=>fe.restoreSpool(Ce),onSuccess:()=>{e.invalidateQueries({queryKey:["inventory-spools"]}),n(t("inventory.spoolRestored"),"success")}}),U=async Ce=>{if(Ce.last_scale_weight!=null)try{await zi.updateSpoolWeight(Ce.id,Ce.last_scale_weight),e.invalidateQueries({queryKey:["inventory-spools"]});const Te=[Ce.brand,Ce.material,Ce.color_name].filter(Boolean).join(" ");n(`Synced "${Te}" to scale weight`,"success")}catch{n("Failed to sync weight","error")}},K=W?.low_stock_threshold??20,[B,ie]=w.useState(!1),[O,q]=w.useState(K.toString());w.useEffect(()=>{B||q(K.toString())},[K,B]);const Y=ht({mutationFn:Ce=>fe.updateSettings({low_stock_threshold:Ce}),onSuccess:()=>{e.invalidateQueries({queryKey:["settings"]}),n(t("common.saved"),"success"),ie(!1)},onError:()=>{n(t("inventory.lowStockThresholdError"),"error")}}),V=w.useMemo(()=>{if(!le)return null;let Ce=0,Te=0,$e=0,nt=0;const bt={};for(const vt of le){if(vt.archived_at)continue;nt++;const mt=Math.max(0,vt.label_weight-vt.weight_used);Ce+=mt,Te+=vt.weight_used,(vt.label_weight>0?mt/vt.label_weight*100:0){const Ce={};for(const Te of Ne||[])Ce[Te.spool_id]=Te;return Ce},[Ne]),pe=w.useMemo(()=>{const Ce={};for(const Te of H||[])Ce[Te.id]=Te;return Ce},[H]),re=w.useMemo(()=>V?Object.entries(V.byMaterial).sort((Ce,Te)=>Te[1].weight-Ce[1].weight).slice(0,4):[],[V]),L=w.useMemo(()=>{let Ce=le||[];if(l==="active"?Ce=Ce.filter(Te=>!Te.archived_at):Ce=Ce.filter(Te=>!!Te.archived_at),d==="used"?Ce=Ce.filter(Te=>Te.weight_used>0):d==="new"?Ce=Ce.filter(Te=>Te.weight_used===0):d==="lowstock"&&(Ce=Ce.filter(Te=>{const $e=Math.max(0,Te.label_weight-Te.weight_used);return(Te.label_weight>0?$e/Te.label_weight*100:0)Te.material===m)),f&&(Ce=Ce.filter(Te=>Te.brand===f)),v){const Te=Number(v);Ce=Ce.filter($e=>$e.core_weight_catalog_id===Te)}if(g==="stock"?Ce=Ce.filter(Te=>!Te.slicer_filament):g==="configured"&&(Ce=Ce.filter(Te=>!!Te.slicer_filament)),N){const Te=N.toLowerCase();Ce=Ce.filter($e=>$e.brand?.toLowerCase().includes(Te)||$e.material.toLowerCase().includes(Te)||$e.color_name?.toLowerCase().includes(Te)||$e.subtype?.toLowerCase().includes(Te)||$e.note?.toLowerCase().includes(Te)||$e.slicer_filament_name?.toLowerCase().includes(Te))}return Ce},[le,l,d,m,f,v,g,N,K]),R=()=>de(0),ne=[...new Set(le?.map(Ce=>Ce.material)||[])].sort(),ye=[...new Set(le?.map(Ce=>Ce.brand).filter(Boolean)||[])].sort(),ve=[...new Set(le?.map(Ce=>Ce.core_weight_catalog_id).filter(Ce=>Ce!=null)||[])].sort((Ce,Te)=>{const $e=(pe[Ce]?.name||"").toLowerCase(),nt=(pe[Te]?.name||"").toLowerCase();return $e.localeCompare(nt)}),be=l!=="active"||d!=="all"||!!m||!!f||!!v||g!=="all"||!!N,Be=Ce=>{F(Ce),ynt(Ce)},we=w.useMemo(()=>A.filter(Ce=>Ce.visible).map(Ce=>Ce.id),[A]),Ae=Ce=>{o3[Ce]&&(j(Te=>{let $e;return Te?.column===Ce?$e=Te.direction==="asc"?{column:Ce,direction:"desc"}:null:$e={column:Ce,direction:"asc"},_nt($e),$e}),R())},Le=w.useMemo(()=>{if(!T)return L;const Ce=o3[T.column];return Ce?[...L].sort(($e,nt)=>{const bt=Ce($e,he),vt=Ce(nt,he);return btvt?T.direction==="asc"?1:-1:0}):L},[L,T,he]),Ee=w.useMemo(()=>{if(!J)return Le.map(nt=>({type:"single",spool:nt}));const Ce=new Map;for(const nt of Le)if(!(nt.weight_used>0||he[nt.id])){const bt=KY(nt),vt=Ce.get(bt);vt?vt.push(nt):Ce.set(bt,[nt])}const Te=[],$e=new Set;for(const nt of Le){if(nt.weight_used>0||he[nt.id]){Te.push({type:"single",spool:nt});continue}const bt=KY(nt);if($e.has(bt))continue;$e.add(bt);const vt=Ce.get(bt);vt.length===1?Te.push({type:"single",spool:vt[0]}):Te.push({type:"group",key:bt,spools:vt,representative:vt[0]})}return Te},[Le,J,he]),_e=me===-1,Me=Ee.length,He=_e?Me||1:me,Fe=Math.max(1,Math.ceil(Me/He)),Xe=_e?0:Math.min(Z,Fe-1),xe=_e?Ee:Ee.slice(Xe*He,(Xe+1)*He),We=()=>{const Ce=!J;I(Ce),se(new Set),R();try{localStorage.setItem("bambuddy-inventory-group",String(Ce))}catch{}},Pe=Ce=>{se(Te=>{const $e=new Set(Te);return $e.has(Ce)?$e.delete(Ce):$e.add(Ce),$e})},Ke=Ce=>{ue(Ce),de(0);try{localStorage.setItem("bambuddy-inventory-pageSize",String(Ce))}catch{}},Ve=()=>{c("active"),u("all"),p(""),y(""),b(""),_("all"),C(""),R()};return i.jsxs("div",{className:"p-4 md:p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(vi,{className:"w-6 h-6 text-bambu-green"}),i.jsx("h1",{className:"text-2xl font-bold text-white",children:t("inventory.title")})]}),i.jsx("p",{className:"text-sm text-bambu-gray mt-1 ml-9",children:(t("inventory.noSpools").split(".")[0],"")})]}),i.jsxs(Ie,{onClick:()=>a({spool:null}),children:[i.jsx(ir,{className:"w-4 h-4"}),t("inventory.addSpool")]})]}),V&&!ge&&i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",children:[i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(vi,{className:"w-4 h-4 text-bambu-green"}),i.jsx("span",{className:"text-xs text-bambu-gray font-medium uppercase tracking-wide",children:t("inventory.totalInventory")})]}),i.jsx("div",{className:"text-xl font-bold text-white",children:pd(V.totalWeight,!0)}),i.jsxs("div",{className:"text-xs text-bambu-gray mt-1",children:[V.totalSpools," ",V.totalSpools!==1?t("inventory.spools"):t("inventory.spool")]})]}),i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(oO,{className:"w-4 h-4 text-blue-400"}),i.jsx("span",{className:"text-xs text-bambu-gray font-medium uppercase tracking-wide",children:t("inventory.totalConsumed")})]}),i.jsx("div",{className:"text-xl font-bold text-white",children:pd(V.totalConsumed,!0)}),i.jsx("div",{className:"text-xs text-bambu-gray mt-1",children:t("inventory.sinceTracking")})]}),i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(Yi,{className:"w-4 h-4 text-green-400"}),i.jsx("span",{className:"text-xs text-bambu-gray font-medium uppercase tracking-wide",children:t("inventory.byMaterial")})]}),i.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:re.map(([Ce,Te])=>i.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium ${vnt[Ce]||"bg-bambu-dark-tertiary text-bambu-gray"}`,children:[Ce," ",i.jsx("span",{className:"opacity-70",children:pd(Te.weight,!0)})]},Ce))})]}),i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(Nr,{className:"w-4 h-4 text-purple-400"}),i.jsx("span",{className:"text-xs text-bambu-gray font-medium uppercase tracking-wide",children:t("inventory.inPrinter")})]}),i.jsx("div",{className:"text-xl font-bold text-white",children:ee}),i.jsx("div",{className:"text-xs text-bambu-gray mt-1",children:t("inventory.loadedInAms")})]}),i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[i.jsx(jn,{className:"w-4 h-4 text-yellow-400"}),i.jsx("span",{className:"text-xs text-bambu-gray font-medium uppercase tracking-wide",children:t("inventory.lowStock")})]}),i.jsx("div",{className:`text-xl font-bold ${V.lowStock>0?"text-yellow-400":"text-white"}`,children:V.lowStock}),i.jsx("div",{className:"text-xs text-bambu-gray mt-1 flex items-center gap-2",children:B?i.jsxs("form",{onSubmit:Ce=>{Ce.preventDefault();const Te=parseFloat(O);!isNaN(Te)&&Te>=.1&&Te<=99.9?Y.mutate(Te):n(t("inventory.lowStockThresholdError"),"error")},className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs text-bambu-gray",children:"<"}),i.jsx("input",{type:"text",inputMode:"decimal",pattern:"^\\d{0,2}(\\.\\d?)?$",maxLength:4,value:O,onChange:Ce=>{const Te=Ce.target.value.replace(/[^\d.]/g,"");/^\d{0,2}(\.\d?)?$/.test(Te)&&q(Te)},className:"px-1.5 py-1 rounded border border-bambu-dark-tertiary text-xs text-white bg-bambu-dark-secondary focus:outline-none focus:border-bambu-green w-14 text-center",onWheel:Ce=>Ce.currentTarget.blur(),disabled:Y.isPending}),i.jsx("span",{className:"text-xs text-bambu-gray",children:"%"}),i.jsx(Ie,{type:"submit",size:"sm",disabled:Y.isPending,children:t("common.save")}),i.jsx(Ie,{type:"button",size:"sm",variant:"ghost",onClick:()=>ie(!1),disabled:Y.isPending,children:t("common.cancel")})]}):i.jsxs(i.Fragment,{children:[i.jsxs("span",{className:"text-bambu-gray",children:["< ",K,"%"]}),i.jsx("button",{className:"p-1.5 text-bambu-gray hover:text-white rounded transition-colors",title:t("common.edit"),onClick:()=>{q(K.toString()),ie(!0)},children:i.jsx(bh,{className:"w-4 h-4"})})]})})]})]}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center justify-between",children:[i.jsxs("div",{className:"relative flex-1 max-w-md",children:[i.jsx(Ar,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-bambu-gray/50"}),i.jsx("input",{type:"text",value:N,onChange:Ce=>{C(Ce.target.value),R()},placeholder:t("inventory.search"),className:"w-full pl-10 pr-8 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white text-sm placeholder:text-bambu-gray/50 focus:outline-none focus:border-bambu-green"}),N&&i.jsx("button",{onClick:()=>{C(""),R()},className:"absolute right-3 top-1/2 -translate-y-1/2 text-bambu-gray hover:text-white",children:i.jsx(qt,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[k==="table"&&i.jsxs("button",{onClick:()=>z(!0),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-bambu-gray border border-bambu-dark-tertiary rounded-lg hover:bg-bambu-dark-tertiary transition-colors",title:t("inventory.configureColumns"),children:[i.jsx(Zpe,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:t("inventory.columns")})]}),i.jsxs("button",{onClick:We,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium border rounded-lg transition-colors ${J?"bg-bambu-green/20 text-bambu-green border-bambu-green/30":"text-bambu-gray border-bambu-dark-tertiary hover:bg-bambu-dark-tertiary"}`,title:t("inventory.groupSimilar"),children:[i.jsx(Wfe,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:t("inventory.groupSimilar")})]}),i.jsxs("div",{className:"flex bg-bambu-dark-primary border border-bambu-dark-tertiary rounded-lg overflow-hidden",children:[i.jsxs("button",{onClick:()=>P("table"),className:`flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium transition-colors ${k==="table"?"bg-bambu-green text-white":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(Ube,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:t("inventory.table")})]}),i.jsxs("button",{onClick:()=>P("cards"),className:`flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium transition-colors ${k==="cards"?"bg-bambu-green text-white":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(_w,{className:"w-4 h-4"}),i.jsx("span",{className:"hidden sm:inline",children:t("inventory.cards")})]})]})]})]}),i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs("div",{className:"flex items-center rounded-lg border border-bambu-dark-tertiary overflow-hidden",children:[i.jsxs("button",{onClick:()=>{c("active"),R()},className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium transition-colors ${l==="active"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(vi,{className:"w-3.5 h-3.5"}),t("inventory.active")]}),i.jsxs("button",{onClick:()=>{c("archived"),R()},className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium transition-colors ${l==="archived"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(Gs,{className:"w-3.5 h-3.5"}),t("inventory.archived")]})]}),i.jsx("div",{className:"w-px h-5 bg-bambu-dark-tertiary"}),i.jsxs("div",{className:"flex items-center rounded-lg border border-bambu-dark-tertiary overflow-hidden",children:[i.jsx("button",{onClick:()=>{u("all"),R()},className:`px-3 py-1.5 text-xs font-medium transition-colors ${d==="all"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:t("inventory.all")}),i.jsxs("button",{onClick:()=>{u("used"),R()},className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium transition-colors ${d==="used"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(Zn,{className:"w-3.5 h-3.5"}),t("inventory.used")]}),i.jsx("button",{onClick:()=>{u("new"),R()},className:`px-3 py-1.5 text-xs font-medium transition-colors ${d==="new"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:t("inventory.new")}),i.jsxs("button",{onClick:()=>{u("lowstock"),R()},className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium transition-colors ${d==="lowstock"?"bg-yellow-500/20 text-yellow-400":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:[i.jsx(jn,{className:"w-3.5 h-3.5"}),t("inventory.lowStock")]})]}),i.jsxs("div",{className:"flex items-center rounded-lg border border-bambu-dark-tertiary overflow-hidden",children:[i.jsx("button",{onClick:()=>{_("all"),R()},className:`px-3 py-1.5 text-xs font-medium transition-colors ${g==="all"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:t("inventory.all")}),i.jsx("button",{onClick:()=>{_("stock"),R()},className:`px-3 py-1.5 text-xs font-medium transition-colors ${g==="stock"?"bg-amber-500/20 text-amber-400":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:t("inventory.stock")}),i.jsx("button",{onClick:()=>{_("configured"),R()},className:`px-3 py-1.5 text-xs font-medium transition-colors ${g==="configured"?"bg-bambu-green/20 text-bambu-green":"text-bambu-gray hover:bg-bambu-dark-tertiary"}`,children:t("inventory.configured")})]}),i.jsx("div",{className:"w-px h-5 bg-bambu-dark-tertiary"}),i.jsxs("select",{value:m,onChange:Ce=>{p(Ce.target.value),R()},className:`px-3 py-1.5 rounded-lg border text-xs font-medium transition-colors cursor-pointer focus:outline-none ${m?"bg-bambu-green/20 text-bambu-green border-bambu-green/30":"bg-transparent text-bambu-gray border-bambu-dark-tertiary hover:bg-bambu-dark-tertiary"}`,children:[i.jsx("option",{value:"",children:t("inventory.material")}),ne.map(Ce=>i.jsx("option",{value:Ce,children:Ce},Ce))]}),i.jsxs("select",{value:f,onChange:Ce=>{y(Ce.target.value),R()},className:`px-3 py-1.5 rounded-lg border text-xs font-medium transition-colors cursor-pointer focus:outline-none ${f?"bg-bambu-green/20 text-bambu-green border-bambu-green/30":"bg-transparent text-bambu-gray border-bambu-dark-tertiary hover:bg-bambu-dark-tertiary"}`,children:[i.jsx("option",{value:"",children:t("inventory.brand")}),ye.map(Ce=>i.jsx("option",{value:Ce,children:Ce},Ce))]}),ve.length>0&&i.jsxs("select",{value:v,onChange:Ce=>{b(Ce.target.value),R()},className:`px-3 py-1.5 rounded-lg border text-xs font-medium transition-colors cursor-pointer focus:outline-none ${v?"bg-bambu-green/20 text-bambu-green border-bambu-green/30":"bg-transparent text-bambu-gray border-bambu-dark-tertiary hover:bg-bambu-dark-tertiary"}`,children:[i.jsx("option",{value:"",children:t("inventory.spoolName")}),ve.map(Ce=>i.jsx("option",{value:Ce,children:pe[Ce]?.name||`#${Ce}`},Ce))]}),be&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-px h-5 bg-bambu-dark-tertiary"}),i.jsxs("button",{onClick:Ve,className:"flex items-center gap-1 text-xs text-bambu-gray hover:text-bambu-green transition-colors",children:[i.jsx(qt,{className:"w-3.5 h-3.5"}),t("inventory.clearFilters")]})]}),i.jsxs("span",{className:"ml-auto text-xs text-bambu-gray",children:[Le.length," ",Le.length!==1?t("inventory.spools"):t("inventory.spool"),J&&Me0?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:xe.map(Ce=>{if(Ce.type==="group"){const{key:vt,spools:mt,representative:Ht}=Ce,Yt=Ht.rgba?`#${Ht.rgba.substring(0,6)}`:"#808080",Pt=te.has(vt);return i.jsxs("div",{className:"col-span-full",children:[i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg overflow-hidden border border-bambu-green/30 hover:border-bambu-green transition-colors cursor-pointer",onClick:()=>Pe(vt),children:[i.jsx("div",{className:"h-10 flex items-center px-4 gap-3",style:{backgroundColor:Yt},children:i.jsx("span",{className:"bg-white/90 text-gray-800 px-3 py-0.5 rounded-full text-sm font-medium",children:Zw(Ht.color_name,Ht.rgba)||"-"})}),i.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(zn,{className:`w-4 h-4 text-bambu-gray transition-transform ${Pt?"":"-rotate-90"}`}),i.jsxs("div",{children:[i.jsxs("h3",{className:"font-semibold text-white",children:[Ht.material,Ht.subtype?` ${Ht.subtype}`:""]}),i.jsx("p",{className:"text-sm text-bambu-gray",children:Ht.brand||"-"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-bambu-gray",children:pd(Ht.label_weight)}),i.jsx("span",{className:"text-xs font-medium bg-bambu-green/20 text-bambu-green px-2 py-0.5 rounded-full",children:t("inventory.groupedSpools",{count:mt.length})})]})]})]}),Pt&&i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 mt-2 ml-4",children:mt.map(ut=>{const Lt=Math.max(0,ut.label_weight-ut.weight_used),qe=ut.label_weight>0?Lt/ut.label_weight*100:0,St=ut.rgba?`#${ut.rgba.substring(0,6)}`:"#808080";return i.jsx(YY,{spool:ut,remaining:Lt,pct:qe,colorStyle:St,onClick:()=>a({spool:ut}),t},ut.id)})})]},`group-${vt}`)}const Te=Ce.spool,$e=Math.max(0,Te.label_weight-Te.weight_used),nt=Te.label_weight>0?$e/Te.label_weight*100:0,bt=Te.rgba?`#${Te.rgba.substring(0,6)}`:"#808080";return i.jsx(YY,{spool:Te,remaining:$e,pct:nt,colorStyle:bt,onClick:()=>a({spool:Te}),t},Te.id)})}),i.jsx(Cnt,{pageIndex:Xe,pageSize:me,totalRows:Me,totalPages:Fe,onPageChange:de,onPageSizeChange:Ke,t})]}):i.jsx(XY,{hasFilters:be,onAddSpool:()=>a({spool:null}),t}):xe.length>0?i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg overflow-hidden border border-bambu-dark-tertiary",children:[i.jsx("div",{className:"overflow-x-auto",children:i.jsxs("table",{className:"w-full",children:[i.jsx("thead",{children:i.jsxs("tr",{className:"border-b border-bambu-dark-tertiary bg-bambu-dark-tertiary/30",children:[we.map(Ce=>{const Te=!!o3[Ce],$e=T?.column===Ce;return i.jsx("th",{className:`text-left py-3 px-4 text-xs font-medium uppercase tracking-wide select-none ${Ce==="remaining"?"min-w-[150px]":""} ${Te?"cursor-pointer hover:text-bambu-green transition-colors":""} ${$e?"text-bambu-green":"text-bambu-gray"}`,onClick:Te?()=>Ae(Ce):void 0,children:i.jsxs("span",{className:"inline-flex items-center gap-1",children:[wnt[Ce]?.(t)??Ce,Te&&($e?T.direction==="asc"?i.jsx(Ff,{className:"w-3 h-3"}):i.jsx(hx,{className:"w-3 h-3"}):i.jsx(tO,{className:"w-3 h-3 opacity-30"}))]})},Ce)}),i.jsx("th",{className:"text-right py-3 px-4 text-xs font-medium text-bambu-gray uppercase tracking-wide",children:t("common.actions")})]})}),i.jsx("tbody",{children:xe.map(Ce=>{if(Ce.type==="group"){const{key:bt,spools:vt,representative:mt}=Ce,Ht=te.has(bt),Yt=Math.max(0,mt.label_weight-mt.weight_used),Pt=mt.label_weight>0?Yt/mt.label_weight*100:0;return i.jsx(Tnt,{spools:vt,representative:mt,remaining:Yt,pct:Pt,isExpanded:Ht,onToggle:()=>Pe(bt),onEdit:ut=>a({spool:ut}),onArchive:ut=>o({type:"archive",spoolId:ut}),onDelete:ut=>o({type:"delete",spoolId:ut}),visibleColumns:we,assignmentMap:he,catalogMap:pe,currencySymbol:oe,dateFormat:ae,t,onSyncWeight:U},`group-${bt}`)}const Te=Ce.spool,$e=Math.max(0,Te.label_weight-Te.weight_used),nt=Te.label_weight>0?$e/Te.label_weight*100:0;return i.jsx(_le,{spool:Te,remaining:$e,pct:nt,onEdit:()=>a({spool:Te}),onRestore:()=>M.mutate(Te.id),onArchive:()=>o({type:"archive",spoolId:Te.id}),onDelete:()=>o({type:"delete",spoolId:Te.id}),visibleColumns:we,assignmentMap:he,catalogMap:pe,currencySymbol:oe,dateFormat:ae,t,onSyncWeight:U},Te.id)})})]})}),i.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-bambu-dark-tertiary/50 border-t border-bambu-dark-tertiary text-sm",children:[i.jsx("span",{className:"text-bambu-gray",children:_e?`${Me} ${t(Me!==1?"inventory.spools":"inventory.spool")}`:i.jsxs(i.Fragment,{children:[t("inventory.showing")," ",Xe*He+1," ",t("inventory.to")," ",Math.min((Xe+1)*He,Me)," ",t("inventory.of")," ",Me," ",t("inventory.spools")]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-bambu-gray",children:t("inventory.show")}),i.jsxs("select",{value:me,onChange:Ce=>Ke(Number(Ce.target.value)),className:"px-2 py-1 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded text-white text-sm focus:outline-none focus:border-bambu-green",children:[[15,30,50,100].map(Ce=>i.jsx("option",{value:Ce,children:Ce},Ce)),i.jsx("option",{value:-1,children:t("inventory.all")})]}),!_e&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>de(0),disabled:Xe===0,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",title:"First page",children:i.jsx(nQ,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>de(Ce=>Math.max(0,Ce-1)),disabled:Xe===0,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(Pc,{className:"w-4 h-4"})}),i.jsxs("span",{className:"text-bambu-gray px-2 whitespace-nowrap",children:[t("inventory.page")," ",Xe+1," ",t("inventory.of")," ",Fe]}),i.jsx("button",{onClick:()=>de(Ce=>Math.min(Fe-1,Ce+1)),disabled:Xe>=Fe-1,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(ga,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>de(Fe-1),disabled:Xe>=Fe-1,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",title:"Last page",children:i.jsx(rQ,{className:"w-4 h-4"})})]})]})]})]}):i.jsx(XY,{hasFilters:be,onAddSpool:()=>a({spool:null}),t}),r!==null&&i.jsx(gnt,{isOpen:!0,onClose:()=>a(null),spool:r.spool,currencySymbol:oe}),s&&i.jsx(_n,{title:s.type==="delete"?t("common.delete"):t("inventory.archive"),message:s.type==="delete"?t("inventory.deleteConfirm"):t("inventory.archiveConfirm"),confirmText:s.type==="delete"?t("common.delete"):t("inventory.archive"),variant:s.type==="delete"?"danger":"warning",onConfirm:()=>{s.type==="delete"?X.mutate(s.spoolId):D.mutate(s.spoolId),o(null)},onCancel:()=>o(null)}),i.jsx(bnt,{isOpen:G,onClose:()=>z(!1),columns:A,defaultColumns:jN,onSave:Be})]})}function Cnt({pageIndex:t,pageSize:e,totalRows:n,totalPages:r,onPageChange:a,onPageSizeChange:s,t:o}){const l=e===-1;if(r<=1&&!l)return null;const c=l?n||1:e;return i.jsxs("div",{className:"flex items-center justify-between pt-2 text-sm",children:[i.jsx("span",{className:"text-bambu-gray",children:l?`${n} ${o(n!==1?"inventory.spools":"inventory.spool")}`:i.jsxs(i.Fragment,{children:[o("inventory.showing")," ",t*c+1," ",o("inventory.to")," ",Math.min((t+1)*c,n)," ",o("inventory.of")," ",n," ",o("inventory.spools")]})}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-bambu-gray",children:o("inventory.show")}),i.jsxs("select",{value:e,onChange:d=>s(Number(d.target.value)),className:"px-2 py-1 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded text-white text-sm focus:outline-none focus:border-bambu-green",children:[[15,30,50,100].map(d=>i.jsx("option",{value:d,children:d},d)),i.jsx("option",{value:-1,children:o("inventory.all")})]}),!l&&i.jsxs(i.Fragment,{children:[i.jsx("button",{onClick:()=>a(0),disabled:t===0,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(nQ,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>a(Math.max(0,t-1)),disabled:t===0,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(Pc,{className:"w-4 h-4"})}),i.jsxs("span",{className:"text-bambu-gray px-2 whitespace-nowrap",children:[o("inventory.page")," ",t+1," ",o("inventory.of")," ",r]}),i.jsx("button",{onClick:()=>a(Math.min(r-1,t+1)),disabled:t>=r-1,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(ga,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>a(r-1),disabled:t>=r-1,className:"p-1.5 rounded text-bambu-gray hover:text-white disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:i.jsx(rQ,{className:"w-4 h-4"})})]})]})]})}function YY({spool:t,remaining:e,pct:n,colorStyle:r,onClick:a,t:s}){return i.jsxs("div",{className:`bg-bambu-dark-secondary rounded-lg overflow-hidden border border-bambu-dark-tertiary hover:border-bambu-green transition-colors cursor-pointer ${t.archived_at?"opacity-50":""}`,onClick:a,children:[i.jsx("div",{className:"h-14 flex items-center justify-center",style:{backgroundColor:r},children:i.jsx("span",{className:"bg-white/90 text-gray-800 px-3 py-0.5 rounded-full text-sm font-medium",children:Zw(t.color_name,t.rgba)||"-"})}),i.jsxs("div",{className:"p-4 space-y-3",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{children:[i.jsxs("h3",{className:"font-semibold text-white",children:[t.material,t.subtype?` ${t.subtype}`:""]}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t.brand||"-"})]}),i.jsxs("span",{className:"text-xs font-mono text-bambu-gray bg-bambu-dark-tertiary px-2 py-1 rounded",children:["#",t.id]})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-xs text-bambu-gray mb-1",children:[i.jsx("span",{children:s("inventory.remaining")}),i.jsxs("span",{children:[Math.round(n),"%"]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"flex-1 h-2 bg-bambu-dark-tertiary rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full ${n>50?"bg-bambu-green":n>20?"bg-yellow-500":"bg-red-500"}`,style:{width:`${Math.min(n,100)}%`}})}),i.jsxs("span",{className:"text-xs text-bambu-gray min-w-[40px] text-right",children:[Math.round(e),"g"]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[i.jsxs("div",{children:[i.jsxs("span",{className:"text-bambu-gray/60",children:[s("inventory.labelWeight"),": "]}),i.jsx("span",{className:"text-bambu-gray",children:pd(t.label_weight)})]}),i.jsxs("div",{children:[i.jsxs("span",{className:"text-bambu-gray/60",children:[s("inventory.weightUsed"),": "]}),i.jsx("span",{className:"text-bambu-gray",children:t.weight_used>0?pd(t.weight_used):"-"})]})]}),t.note&&i.jsx("div",{className:"text-xs text-bambu-gray/60 pt-2 border-t border-bambu-dark-tertiary truncate",title:t.note,children:t.note})]})]})}function _le({spool:t,remaining:e,pct:n,onEdit:r,onRestore:a,onArchive:s,onDelete:o,visibleColumns:l,assignmentMap:c,catalogMap:d,currencySymbol:u,dateFormat:m,t:p,onSyncWeight:f}){return i.jsxs("tr",{className:`border-b border-bambu-dark-tertiary/50 hover:bg-bambu-dark-tertiary/30 transition-colors cursor-pointer ${t.archived_at?"opacity-50":""}`,onClick:r,children:[l.map(y=>i.jsx("td",{className:"py-3 px-4",children:OL[y]?.({spool:t,remaining:e,pct:n,assignmentMap:c,catalogMap:d,currencySymbol:u,dateFormat:m,t:p,onSyncWeight:f})},y)),i.jsx("td",{className:"py-3 px-4",children:i.jsxs("div",{className:"flex items-center justify-end gap-1",onClick:y=>y.stopPropagation(),children:[i.jsx("button",{onClick:r,className:"p-1.5 text-bambu-gray hover:text-white rounded transition-colors",title:p("common.edit"),children:i.jsx(bh,{className:"w-4 h-4"})}),t.archived_at?i.jsx("button",{onClick:a,className:"p-1.5 text-bambu-gray hover:text-bambu-green rounded transition-colors",title:p("inventory.restore"),children:i.jsx(Po,{className:"w-4 h-4"})}):i.jsx("button",{onClick:s,className:"p-1.5 text-bambu-gray hover:text-yellow-400 rounded transition-colors",title:p("inventory.archive"),children:i.jsx(Gs,{className:"w-4 h-4"})}),i.jsx("button",{onClick:o,className:"p-1.5 text-bambu-gray hover:text-red-400 rounded transition-colors",title:p("common.delete"),children:i.jsx(an,{className:"w-4 h-4"})})]})})]})}function Tnt({spools:t,representative:e,remaining:n,pct:r,isExpanded:a,onToggle:s,onEdit:o,onArchive:l,onDelete:c,visibleColumns:d,assignmentMap:u,catalogMap:m,currencySymbol:p,dateFormat:f,t:y,onSyncWeight:v}){return i.jsxs(i.Fragment,{children:[i.jsxs("tr",{className:"border-b border-bambu-dark-tertiary/50 hover:bg-bambu-dark-tertiary/30 transition-colors cursor-pointer bg-bambu-green/5",onClick:s,children:[d.map((b,g)=>i.jsx("td",{className:"py-3 px-4",children:g===0?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(zn,{className:`w-4 h-4 text-bambu-gray transition-transform ${a?"":"-rotate-90"}`}),OL[b]?.({spool:e,remaining:n,pct:r,assignmentMap:u,catalogMap:m,currencySymbol:p,dateFormat:f,t:y,onSyncWeight:v})]}):b==="id"?i.jsx("span",{className:"text-xs font-medium bg-bambu-green/20 text-bambu-green px-2 py-0.5 rounded-full",children:y("inventory.groupedSpools",{count:t.length})}):OL[b]?.({spool:e,remaining:n,pct:r,assignmentMap:u,catalogMap:m,currencySymbol:p,dateFormat:f,t:y,onSyncWeight:v})},b)),i.jsx("td",{className:"py-3 px-4",children:i.jsx("span",{className:"text-xs text-bambu-gray",children:t.map(b=>`#${b.id}`).join(", ")})})]}),a&&t.map(b=>{const g=Math.max(0,b.label_weight-b.weight_used),_=b.label_weight>0?g/b.label_weight*100:0;return i.jsx(_le,{spool:b,remaining:g,pct:_,onEdit:()=>o(b),onRestore:()=>{},onArchive:()=>l(b.id),onDelete:()=>c(b.id),visibleColumns:d,assignmentMap:u,catalogMap:m,currencySymbol:p,dateFormat:f,t:y,onSyncWeight:v},b.id)})]})}function XY({hasFilters:t,onAddSpool:e,t:n}){return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4",children:[i.jsxs("div",{className:"relative mb-6",children:[i.jsx("div",{className:"absolute inset-0 -m-4 bg-bambu-green/5 rounded-full blur-2xl"}),i.jsxs("div",{className:"relative flex items-center justify-center w-24 h-24 rounded-2xl bg-gradient-to-br from-bambu-dark-secondary to-bambu-dark-tertiary border border-bambu-dark-tertiary shadow-lg",children:[i.jsx("div",{className:"absolute -top-1 -right-1 w-3 h-3 rounded-full bg-bambu-green/30"}),i.jsx("div",{className:"absolute -bottom-2 -left-2 w-2 h-2 rounded-full bg-bambu-green/20"}),t?i.jsx(Ar,{className:"w-10 h-10 text-bambu-gray/40",strokeWidth:1.5}):i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"w-14 h-14 rounded-full border-4 border-bambu-gray/20 flex items-center justify-center",children:i.jsx("div",{className:"w-6 h-6 rounded-full bg-bambu-gray/10 border-2 border-bambu-gray/20"})}),i.jsx("div",{className:"absolute -bottom-1 -right-1 w-6 h-6 rounded-full bg-bambu-green flex items-center justify-center shadow-md",children:i.jsx("span",{className:"text-white text-lg font-bold leading-none",children:"+"})})]})]})]}),i.jsx("h3",{className:"text-lg font-semibold text-white mb-2 text-center",children:t?n("inventory.noSpoolsMatch"):n("inventory.noSpools").split(".")[0]}),i.jsx("p",{className:"text-sm text-bambu-gray text-center max-w-sm mb-6",children:n(t?"inventory.noSpoolsMatchDesc":"inventory.noSpools")}),!t&&i.jsxs(Ie,{onClick:e,children:[i.jsx(vi,{className:"w-4 h-4"}),n("inventory.addSpool")]})]})}const QY=["DEBUG","INFO","WARNING","ERROR"],l3={DEBUG:"text-gray-400",INFO:"text-blue-400",WARNING:"text-yellow-400",ERROR:"text-red-400"},Ant={DEBUG:px,INFO:$s,WARNING:jn,ERROR:Ii};function Pnt(){const t=cn(),[e,n]=w.useState(!0),[r,a]=w.useState(new Set),[s,o]=w.useState(""),[l,c]=w.useState("ALL"),[d,u]=w.useState(!1),[m,p]=w.useState(!1),f=w.useRef(null),{data:y,isLoading:v,refetch:b}=Je({queryKey:["application-logs",l,s],queryFn:()=>Zb.getLogs({limit:200,level:l==="ALL"?void 0:l,search:s||void 0}),refetchInterval:m?2e3:!1,enabled:d});w.useEffect(()=>{d||p(!1)},[d]);const g=ht({mutationFn:()=>Zb.clearLogs(),onSuccess:()=>{t.invalidateQueries({queryKey:["application-logs"]})}});w.useEffect(()=>{e&&f.current&&y?.entries&&(f.current.scrollTop=f.current.scrollHeight)},[y?.entries,e]);const _=T=>{a(j=>{const A=new Set(j);return A.has(T)?A.delete(T):A.add(T),A})},N=T=>{const j=T.split(" ");return j.length>=2?j[1]:T},C=w.useMemo(()=>y?.entries??[],[y?.entries]),k=w.useMemo(()=>[...C].reverse(),[C]),P=({level:T})=>{const j=Ant[T]||$s;return i.jsx(j,{className:`w-3.5 h-3.5 ${l3[T]||"text-gray-400"}`})};return i.jsxs("div",{className:"bg-bambu-dark rounded-lg overflow-hidden",children:[i.jsxs("button",{onClick:()=>u(!d),className:"w-full flex items-center justify-between p-4 hover:bg-bambu-dark-tertiary/50 transition-colors",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`p-2 rounded-lg ${m?"bg-bambu-green/20 text-bambu-green":"bg-bambu-dark-tertiary text-bambu-gray"}`,children:i.jsx(px,{className:"w-5 h-5"})}),i.jsxs("div",{className:"text-left",children:[i.jsx("p",{className:"font-medium text-white",children:"Application Logs"}),i.jsx("p",{className:"text-sm text-bambu-gray",children:m?`Live streaming - ${y?.filtered_count??0} entries`:"View and filter application logs"})]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[m&&i.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 bg-bambu-green/20 rounded text-bambu-green text-xs",children:[i.jsx("span",{className:"w-1.5 h-1.5 bg-bambu-green rounded-full animate-pulse"}),"Live"]}),d?i.jsx(Wl,{className:"w-5 h-5 text-bambu-gray"}):i.jsx(zn,{className:"w-5 h-5 text-bambu-gray"})]})]}),d&&i.jsxs("div",{className:"border-t border-bambu-dark-tertiary",children:[i.jsxs("div",{className:"flex flex-col gap-2 p-4 border-b border-bambu-dark-tertiary",children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m?i.jsxs("button",{onClick:T=>{T.stopPropagation(),p(!1)},className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-red-500/20 text-red-400 hover:bg-red-500/30 rounded transition-colors",children:[i.jsx(al,{className:"w-4 h-4"}),"Stop"]}):i.jsxs("button",{onClick:T=>{T.stopPropagation(),p(!0),b()},className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30 rounded transition-colors",children:[i.jsx(Ys,{className:"w-4 h-4"}),"Start"]}),i.jsxs("button",{onClick:()=>g.mutate(),disabled:g.isPending||C.length===0,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bambu-dark-tertiary text-bambu-gray hover:text-white hover:bg-bambu-dark-secondary rounded transition-colors disabled:opacity-50",children:[i.jsx(an,{className:"w-4 h-4"}),"Clear"]}),i.jsx("button",{onClick:()=>b(),disabled:v,className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bambu-dark-tertiary text-bambu-gray hover:text-white hover:bg-bambu-dark-secondary rounded transition-colors disabled:opacity-50",children:i.jsx(vr,{className:`w-4 h-4 ${v?"animate-spin":""}`})}),i.jsx("div",{className:"flex-1"}),i.jsxs("label",{className:"flex items-center gap-2 text-sm text-bambu-gray cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:e,onChange:T=>n(T.target.checked),className:"rounded border-bambu-dark-tertiary bg-bambu-dark-tertiary"}),"Auto-scroll"]}),i.jsxs("span",{className:"text-sm text-bambu-gray",children:[y?.filtered_count??0,"/",y?.total_in_file??0]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Ar,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-bambu-gray"}),i.jsx("input",{type:"text",placeholder:"Search message or logger name...",value:s,onChange:T=>o(T.target.value),className:"w-full pl-8 pr-8 py-1.5 text-sm bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none"}),s&&i.jsx("button",{onClick:()=>o(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-bambu-gray hover:text-white",children:i.jsx(qt,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"flex items-center gap-1 bg-bambu-dark-secondary rounded border border-bambu-dark-tertiary",children:[i.jsx("button",{onClick:()=>c("ALL"),className:`px-2 py-1.5 text-xs rounded-l transition-colors ${l==="ALL"?"bg-bambu-green text-white":"text-bambu-gray hover:text-white"}`,children:"All"}),QY.map((T,j)=>i.jsx("button",{onClick:()=>c(T),className:`px-2 py-1.5 text-xs transition-colors flex items-center gap-1 ${j===QY.length-1?"rounded-r":""} ${l===T?`${l3[T]} bg-bambu-dark-tertiary`:"text-bambu-gray hover:text-white"}`,children:T},T))]})]})]}),i.jsx("div",{ref:f,className:"overflow-auto font-mono text-xs bg-black min-h-[300px] max-h-[500px]",children:C.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center h-[300px] text-bambu-gray",children:[i.jsx("p",{className:"mb-2",children:"No log entries found"}),i.jsx("p",{className:"text-sm",children:"Log file may be empty or cleared"})]}):i.jsx("div",{className:"divide-y divide-bambu-dark-tertiary/30",children:k.map((T,j)=>{const A=r.has(j),F=T.message.includes(` `);return i.jsx("div",{className:`p-2 cursor-pointer hover:bg-bambu-dark-secondary/50 transition-colors ${A?"bg-bambu-dark-secondary/30":""}`,onClick:()=>F&&_(j),children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx("span",{className:"text-bambu-gray/70 shrink-0 w-20",children:N(T.timestamp)}),i.jsx("span",{className:"shrink-0",children:i.jsx(P,{level:T.level})}),i.jsxs("span",{className:"text-purple-400/80 shrink-0 max-w-[200px] truncate",title:T.logger_name,children:["[",T.logger_name,"]"]}),i.jsx("span",{className:`flex-1 ${l3[T.level]||"text-white/80"} ${!A&&F?"truncate":""}`,children:A?i.jsx("pre",{className:"whitespace-pre-wrap break-all",children:T.message}):T.message.split(` -`)[0]}),F&&i.jsx("span",{className:"text-bambu-gray/50 shrink-0",children:A?i.jsx(Wl,{className:"w-3.5 h-3.5"}):i.jsx(zn,{className:"w-3.5 h-3.5"})})]})},j)})})}),i.jsx("div",{className:"flex items-center justify-between p-3 border-t border-bambu-dark-tertiary text-sm text-bambu-gray",children:m?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Auto-refreshing every 2 seconds"]}):i.jsx("span",{children:"Click Start to enable live log streaming"})})]})]})}function Mnt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function Mi({icon:t,label:e,value:n,subValue:r,color:a="text-bambu-green"}){return i.jsxs("div",{className:"flex items-start gap-3 p-4 bg-bambu-dark rounded-lg",children:[i.jsx("div",{className:`p-2 rounded-lg bg-bambu-dark-tertiary ${a}`,children:i.jsx(t,{className:"w-5 h-5"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm text-bambu-gray",children:e}),i.jsx("p",{className:"text-lg font-semibold text-white truncate",children:n}),r&&i.jsx("p",{className:"text-xs text-bambu-gray mt-0.5",children:r})]})]})}function ZY({percent:t,color:e="bg-bambu-green"}){return i.jsx("div",{className:"w-full h-2 bg-bambu-dark rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full ${e} transition-all duration-300`,style:{width:`${Math.min(100,t)}%`}})})}function Zm({title:t,icon:e,children:n}){return i.jsxs(At,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(e,{className:"w-5 h-5 text-bambu-green"}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:t})]}),n]})}function Ent(){const{t}=jt(),e=cn(),[n,r]=w.useState(null),[a,s]=w.useState(!1),[o,l]=w.useState(!1),{data:c,isLoading:d,refetch:u,isFetching:m}=Je({queryKey:["systemInfo"],queryFn:fe.getSystemInfo,refetchInterval:3e4}),{data:p}=Je({queryKey:["debugLogging"],queryFn:Zb.getDebugLoggingState,staleTime:10*1e3,refetchInterval:10*1e3}),{data:f}=Je({queryKey:["settings"],queryFn:fe.getSettings}),{data:y}=Je({queryKey:["library-stats"],queryFn:fe.getLibraryStats}),v=f?.time_format||"system",b=async()=>{l(!0);try{const C=await Zb.setDebugLogging(!p?.enabled);e.setQueryData(["debugLogging"],C)}catch(C){console.error("Failed to toggle debug logging:",C)}finally{l(!1)}},g=async()=>{r(null),s(!0);try{await Zb.downloadSupportBundle()}catch(C){r(C instanceof Error?C.message:"Failed to download support bundle")}finally{s(!1)}};if(d)return i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx(ft,{className:"w-8 h-8 text-bambu-green animate-spin"})});if(!c)return i.jsx("div",{className:"p-6 text-center text-bambu-gray",children:t("system.failedToLoad","Failed to load system information")});const _=c.storage.disk_percent_used>90?"bg-red-500":c.storage.disk_percent_used>75?"bg-yellow-500":"bg-bambu-green",N=c.memory.percent_used>90?"bg-red-500":c.memory.percent_used>75?"bg-yellow-500":"bg-bambu-green";return i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-white",children:t("system.title","System Information")}),i.jsx("p",{className:"text-bambu-gray mt-1",children:t("system.subtitle","Monitor system resources and database statistics")})]}),i.jsxs("button",{onClick:()=>u(),disabled:m,className:"flex items-center gap-2 px-4 py-2 bg-bambu-dark-secondary hover:bg-bambu-dark-tertiary rounded-lg transition-colors disabled:opacity-50",children:[i.jsx(vr,{className:`w-4 h-4 ${m?"animate-spin":""}`}),t("common.refresh","Refresh")]})]}),i.jsx(Zm,{title:t("system.application","Application"),icon:qp,children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx(Mi,{icon:qp,label:t("system.version","Version"),value:`v${c.app.version}`}),i.jsx(Mi,{icon:Zn,label:t("system.uptime","System Uptime"),value:c.system.uptime_formatted}),i.jsx(Mi,{icon:qp,label:t("system.hostname","Hostname"),value:c.system.hostname})]})}),i.jsx(Zm,{title:t("support.title","Support & Troubleshooting"),icon:Jfe,children:i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-sm text-bambu-gray",children:t("support.description","Enable debug logging to capture detailed information, then download a support bundle to share when reporting issues.")}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`p-2 rounded-lg ${p?.enabled?"bg-amber-500/20 text-amber-500":"bg-bambu-dark-tertiary text-bambu-gray"}`,children:i.jsx(px,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-white",children:t("support.debugLogging","Debug Logging")}),i.jsxs("p",{className:"text-sm text-bambu-gray",children:[p?.enabled?t("support.debugLoggingEnabled","Capturing detailed logs"):t("support.debugLoggingDisabled","Normal logging level"),p?.enabled&&p.duration_seconds!==null&&i.jsxs("span",{className:"text-amber-400 ml-2",children:["(",Math.floor(p.duration_seconds/60),"m ",p.duration_seconds%60,"s)"]})]})]})]}),i.jsxs("button",{onClick:b,disabled:o,className:`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${p?.enabled?"bg-amber-500/20 text-amber-400 hover:bg-amber-500/30":"bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30"} disabled:opacity-50`,children:[o&&i.jsx(ft,{className:"w-4 h-4 animate-spin"}),p?.enabled?t("support.disableDebug","Disable"):t("support.enableDebug","Enable")]})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"p-2 rounded-lg bg-bambu-dark-tertiary text-bambu-green",children:i.jsx(fi,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-white",children:t("support.supportBundle","Support Bundle")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("support.supportBundleDescription","Download system info and logs as a ZIP file")})]})]}),i.jsxs("button",{onClick:g,disabled:a||!p?.enabled,className:"px-4 py-2 rounded-lg font-medium bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30 transition-colors flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",title:p?.enabled?void 0:t("support.enableDebugFirst","Enable debug logging first"),children:[a&&i.jsx(ft,{className:"w-4 h-4 animate-spin"}),t("common.download","Download")]})]}),n&&i.jsx("div",{className:"p-3 bg-red-500/20 border border-red-500/30 rounded-lg text-red-400 text-sm",children:n}),!p?.enabled&&i.jsx("div",{className:"p-4 bg-bambu-dark-tertiary/50 rounded-lg",children:i.jsxs("p",{className:"text-sm text-bambu-gray",children:[i.jsx("span",{className:"text-amber-400 font-medium",children:t("support.instructions","To report an issue:")}),i.jsx("br",{}),"1. ",t("support.step1","Enable debug logging"),i.jsx("br",{}),"2. ",t("support.step2","Reproduce the issue"),i.jsx("br",{}),"3. ",t("support.step3","Download the support bundle"),i.jsx("br",{}),"4. ",t("support.step4","Attach the ZIP file to your issue report")]})}),i.jsxs("div",{className:"p-4 bg-bambu-dark rounded-lg space-y-3",children:[i.jsx("p",{className:"text-sm font-medium text-white",children:t("support.privacyTitle","What's in the support bundle?")}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-bambu-green font-medium mb-1",children:t("support.collected","Collected:")}),i.jsxs("ul",{className:"text-bambu-gray space-y-0.5",children:[i.jsxs("li",{children:["• ",t("support.collectItem1","App version and debug mode")]}),i.jsxs("li",{children:["• ",t("support.collectItem2","OS, architecture, Python version")]}),i.jsxs("li",{children:["• ",t("support.collectItem3","Database statistics (counts only)")]}),i.jsxs("li",{children:["• ",t("support.collectItem4","Printer models and nozzle counts")]}),i.jsxs("li",{children:["• ",t("support.collectItem5","Non-sensitive settings (themes, formats)")]}),i.jsxs("li",{children:["• ",t("support.collectItem6","Debug logs (sanitized)")]}),i.jsxs("li",{children:["• ",t("support.collectItem7","Printer connectivity and firmware versions")]}),i.jsxs("li",{children:["• ",t("support.collectItem8","Integration status (Spoolman, MQTT, HA)")]}),i.jsxs("li",{children:["• ",t("support.collectItem9","Network interfaces (subnets only)")]}),i.jsxs("li",{children:["• ",t("support.collectItem10","Python package versions")]}),i.jsxs("li",{children:["• ",t("support.collectItem11","Database health checks")]}),i.jsxs("li",{children:["• ",t("support.collectItem12","Docker environment details")]})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-red-400 font-medium mb-1",children:t("support.notCollected","NOT collected:")}),i.jsxs("ul",{className:"text-bambu-gray space-y-0.5",children:[i.jsxs("li",{children:["• ",t("support.notItem1","Printer names and serial numbers")]}),i.jsxs("li",{children:["• ",t("support.notItem2","Access codes and passwords")]}),i.jsxs("li",{children:["• ",t("support.notItem3","Email addresses")]}),i.jsxs("li",{children:["• ",t("support.notItem4","API keys and tokens")]}),i.jsxs("li",{children:["• ",t("support.notItem5","Webhook URLs")]}),i.jsxs("li",{children:["• ",t("support.notItem6","Your hostname or username")]}),i.jsxs("li",{children:["• ",t("support.notItem7","IP addresses")]})]})]})]}),i.jsx("p",{className:"text-xs text-bambu-gray/70",children:t("support.privacyNote","Email addresses in logs are replaced with [EMAIL], printer names with [PRINTER], serial numbers with [SERIAL], and IP addresses with [IP].")})]}),i.jsx(Pnt,{})]})}),i.jsxs(Zm,{title:t("system.database","Database"),icon:fd,children:[i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[i.jsx(Mi,{icon:Gs,label:t("system.totalArchives","Total Archives"),value:c.database.archives}),i.jsx(Mi,{icon:_c,label:t("system.completed","Completed"),value:c.database.archives_completed,color:"text-green-500"}),i.jsx(Mi,{icon:Ki,label:t("system.failed","Failed"),value:c.database.archives_failed,color:"text-red-500"}),i.jsx(Mi,{icon:ft,label:t("system.printing","Printing"),value:c.database.archives_printing,color:"text-yellow-500"})]}),i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[i.jsx(Mi,{icon:Nr,label:t("system.printers","Printers"),value:c.database.printers}),i.jsx(Mi,{icon:Nw,label:t("system.filaments","Filaments"),value:c.database.filaments}),i.jsx(Mi,{icon:Ns,label:t("system.projects","Projects"),value:c.database.projects}),i.jsx(Mi,{icon:Hl,label:t("system.smartPlugs","Smart Plugs"),value:c.database.smart_plugs})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[i.jsx(Mi,{icon:Zn,label:t("system.totalPrintTime","Total Print Time"),value:c.database.total_print_time_formatted}),i.jsx(Mi,{icon:Gs,label:t("system.totalFilament","Total Filament Used"),value:`${c.database.total_filament_kg} kg`,subValue:`${c.database.total_filament_grams.toLocaleString()} g`})]})]}),i.jsxs(Zm,{title:t("system.connectedPrinters","Connected Printers"),icon:Nr,children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"text-3xl font-bold text-bambu-green",children:c.printers.connected}),i.jsx("div",{className:"text-bambu-gray",children:t("system.ofTotal","of {{total}} printers connected",{total:c.printers.total})})]}),c.printers.connected_list.length>0?i.jsx("div",{className:"space-y-2",children:c.printers.connected_list.map(C=>i.jsxs("div",{className:"flex items-center justify-between p-3 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full bg-bambu-green"}),i.jsx("span",{className:"font-medium text-white",children:C.name})]}),i.jsxs("div",{className:"flex items-center gap-4 text-sm text-bambu-gray",children:[i.jsx("span",{children:C.model}),i.jsx("span",{className:`px-2 py-0.5 rounded ${C.state==="RUNNING"?"bg-bambu-green/20 text-bambu-green":C.state==="IDLE"?"bg-blue-500/20 text-blue-400":"bg-bambu-dark-tertiary"}`,children:C.state})]})]},C.id))}):i.jsx("p",{className:"text-bambu-gray",children:t("system.noPrintersConnected","No printers connected")})]}),i.jsx(Zm,{title:t("system.storage","Storage"),icon:Kx,children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-bambu-gray",children:t("system.diskUsage","Disk Usage")}),i.jsxs("span",{className:"text-white",children:[c.storage.disk_used_formatted," / ",c.storage.disk_total_formatted]})]}),i.jsx(ZY,{percent:c.storage.disk_percent_used,color:_}),i.jsxs("p",{className:"text-xs text-bambu-gray mt-1",children:[c.storage.disk_free_formatted," ",t("system.free","free")," (",(100-c.storage.disk_percent_used).toFixed(1),"%)"]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx(Mi,{icon:Gs,label:t("system.archiveStorage","Archive Storage"),value:c.storage.archive_size_formatted}),i.jsx(Mi,{icon:fd,label:t("system.databaseSize","Database Size"),value:c.storage.database_size_formatted}),y&&i.jsx(Mi,{icon:Ec,label:t("system.fileManagerStorage","File Manager"),value:Mnt(y.total_size_bytes),subValue:`${y.total_files} files, ${y.total_folders} folders`})]})]})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Zm,{title:t("system.memory","Memory"),icon:Ege,children:i.jsx("div",{className:"space-y-4",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-bambu-gray",children:t("system.memoryUsage","Memory Usage")}),i.jsxs("span",{className:"text-white",children:[c.memory.used_formatted," / ",c.memory.total_formatted]})]}),i.jsx(ZY,{percent:c.memory.percent_used,color:N}),i.jsxs("p",{className:"text-xs text-bambu-gray mt-1",children:[c.memory.available_formatted," ",t("system.available","available")]})]})})}),i.jsx(Zm,{title:t("system.cpu","CPU"),icon:g_,children:i.jsx("div",{className:"space-y-4",children:i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsx(Mi,{icon:g_,label:t("system.cores","Cores"),value:c.cpu.count,subValue:`${c.cpu.count_logical} logical`}),i.jsx(Mi,{icon:g_,label:t("system.usage","Usage"),value:`${c.cpu.percent}%`})]})})})]}),i.jsx(Zm,{title:t("system.systemDetails","System Details"),icon:qp,children:i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[i.jsx(Mi,{icon:qp,label:t("system.os","Operating System"),value:c.system.platform,subValue:c.system.platform_release}),i.jsx(Mi,{icon:g_,label:t("system.architecture","Architecture"),value:c.system.architecture}),i.jsx(Mi,{icon:qp,label:t("system.python","Python"),value:c.system.python_version}),i.jsx(Mi,{icon:Zn,label:t("system.bootTime","Boot Time"),value:zf(c.system.boot_time,v)})]})})]})}function jnt(){const t=Mo(),{t:e}=jt(),{login:n}=kr(),{showToast:r}=pn(),{mode:a}=og(),[s,o]=w.useState(""),[l,c]=w.useState(""),[d,u]=w.useState(!1),[m,p]=w.useState(""),{data:f}=Je({queryKey:["advancedAuthStatus"],queryFn:()=>fe.getAdvancedAuthStatus()}),y=ht({mutationFn:()=>n(s,l),onSuccess:()=>{r(e("login.loginSuccess")),t("/")},onError:_=>{r(_.message||e("login.loginFailed"),"error")}}),v=ht({mutationFn:_=>fe.forgotPassword({email:_}),onSuccess:_=>{r(_.message,"success"),u(!1),p("")},onError:_=>{r(_.message,"error")}}),b=_=>{if(_.preventDefault(),!s||!l){r(e("login.enterCredentials"),"error");return}y.mutate()},g=_=>{if(_.preventDefault(),!m){r("Please enter your email address","error");return}v.mutate(m)};return i.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-bambu-dark p-4",children:[i.jsxs("div",{className:"max-w-md w-full space-y-8 p-8 bg-gradient-to-br from-bambu-card to-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary shadow-lg",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"flex items-center justify-center mb-6",children:i.jsx("img",{src:a==="dark"?"/img/bambuddy_logo_dark_transparent.png":"/img/bambuddy_logo_light.png",alt:"Bambuddy",className:"h-16"})}),i.jsx("h2",{className:"text-3xl font-bold text-white",children:e("login.title")}),i.jsx("p",{className:"mt-2 text-sm text-bambu-gray",children:e("login.subtitle")})]}),i.jsxs("form",{className:"mt-8 space-y-6",onSubmit:b,children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-white mb-2",children:f?.advanced_auth_enabled?e("login.usernameOrEmail")||"Username or Email":e("login.username")}),i.jsx("input",{id:"username",type:"text",required:!0,value:s,onChange:_=>o(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:f?.advanced_auth_enabled?e("login.usernameOrEmailPlaceholder")||"Enter your username or email":e("login.usernamePlaceholder"),autoComplete:"username"})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-white mb-2",children:e("login.password")}),i.jsx("input",{id:"password",type:"password",required:!0,value:l,onChange:_=>c(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("login.passwordPlaceholder"),autoComplete:"current-password"})]})]}),i.jsx("div",{children:i.jsx("button",{type:"submit",disabled:y.isPending,className:"w-full flex justify-center py-3 px-4 bg-bambu-green hover:bg-bambu-green-light text-white font-medium rounded-lg shadow-lg shadow-bambu-green/20 hover:shadow-bambu-green/30 focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:ring-offset-2 focus:ring-offset-bambu-dark-secondary transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-bambu-green",children:y.isPending?e("login.signingIn"):e("login.signIn")})}),f?.advanced_auth_enabled&&i.jsx("div",{className:"text-center",children:i.jsx("button",{type:"button",onClick:()=>u(!0),className:"text-sm text-bambu-gray hover:text-bambu-green transition-colors",children:e("login.forgotPassword")})})]})]}),d&&i.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",onClick:()=>u(!1),children:i.jsxs(At,{className:"w-full max-w-md",onClick:_=>_.stopPropagation(),children:[i.jsx(Hn,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(gx,{className:"w-5 h-5 text-bambu-green"}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:e("login.forgotPasswordTitle")})]}),i.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>{u(!1),p("")},children:i.jsx(qt,{className:"w-5 h-5"})})]})}),i.jsx(Et,{children:f?.advanced_auth_enabled?i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[i.jsx("p",{className:"text-bambu-gray text-sm",children:e("login.forgotPasswordEmailMessage")||"Enter your email address and we'll send you a new password."}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"forgot-email",className:"block text-sm font-medium text-white mb-2",children:e("login.emailAddress")||"Email Address"}),i.jsx("input",{id:"forgot-email",type:"email",required:!0,value:m,onChange:_=>p(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("login.emailPlaceholder")||"your.email@example.com"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ie,{type:"button",variant:"secondary",className:"flex-1",onClick:()=>{u(!1),p("")},children:e("login.cancel")||"Cancel"}),i.jsx(Ie,{type:"submit",className:"flex-1",disabled:v.isPending,children:v.isPending?e("login.sending")||"Sending...":e("login.sendResetEmail")||"Send Reset Email"})]})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-bambu-gray",children:e("login.forgotPasswordMessage")}),i.jsxs("div",{className:"bg-bambu-dark rounded-lg p-4 space-y-2",children:[i.jsx("p",{className:"text-sm text-white font-medium",children:e("login.howToReset")}),i.jsxs("ol",{className:"text-sm text-bambu-gray space-y-1 list-decimal list-inside",children:[i.jsx("li",{children:e("login.resetStep1")}),i.jsx("li",{children:e("login.resetStep2")}),i.jsx("li",{children:e("login.resetStep3")}),i.jsx("li",{children:e("login.resetStep4")})]})]}),i.jsx(Ie,{variant:"secondary",className:"w-full",onClick:()=>u(!1),children:e("login.gotIt")})]})})]})})]})}function Dnt(){const t=Mo(),{t:e}=jt(),{showToast:n}=pn(),{mode:r}=og(),{refreshAuth:a}=kr(),[s,o]=w.useState(!1),[l,c]=w.useState(""),[d,u]=w.useState(""),[m,p]=w.useState(""),f=ht({mutationFn:()=>fe.setupAuth({auth_enabled:s,admin_username:s?l:void 0,admin_password:s?d:void 0}),onSuccess:async v=>{await a(),v.auth_enabled?v.admin_created?(n(e("setup.toast.authEnabledAdminCreated")),t("/login")):(n(e("setup.toast.authEnabledExistingAdmins")),t("/login")):(n(e("setup.toast.setupCompleted")),t("/"))},onError:v=>{n(v.message,"error")}}),y=v=>{if(v.preventDefault(),s&&(l||d)){if(!l||!d){n(e("setup.toast.enterBothCredentials"),"error");return}if(d!==m){n(e("setup.toast.passwordsDoNotMatch"),"error");return}if(d.length<6){n(e("setup.toast.passwordTooShort"),"error");return}}f.mutate()};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-bambu-dark p-4",children:i.jsxs("div",{className:"max-w-md w-full space-y-8 p-8 bg-gradient-to-br from-bambu-card to-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary shadow-lg",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"flex items-center justify-center mb-6",children:i.jsx("img",{src:r==="dark"?"/img/bambuddy_logo_dark_transparent.png":"/img/bambuddy_logo_light.png",alt:"Bambuddy",className:"h-16"})}),i.jsx("h2",{className:"text-3xl font-bold text-white",children:e("setup.title")}),i.jsx("p",{className:"mt-2 text-sm text-bambu-gray",children:e("setup.subtitle")})]}),i.jsxs("form",{className:"mt-8 space-y-6",onSubmit:y,children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center p-4 bg-bambu-dark-secondary/50 rounded-lg border border-bambu-dark-tertiary",children:[i.jsx("input",{id:"auth-enabled",type:"checkbox",checked:s,onChange:v=>o(v.target.checked),className:"h-4 w-4 text-bambu-green focus:ring-bambu-green border-bambu-dark-tertiary rounded bg-bambu-dark-secondary"}),i.jsx("label",{htmlFor:"auth-enabled",className:"ml-3 block text-sm font-medium text-white",children:e("setup.enableAuth")})]}),s&&i.jsxs("div",{className:"space-y-4 mt-4",children:[i.jsx("div",{className:"p-3 bg-bambu-dark-secondary/50 border border-bambu-dark-tertiary rounded-lg",children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx($s,{className:"w-4 h-4 text-bambu-green mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"text-sm text-bambu-gray",children:[i.jsx("p",{className:"text-white font-medium mb-1",children:e("setup.adminAccount")}),i.jsx("p",{children:e("setup.adminAccountDesc")})]})]})}),i.jsxs("div",{children:[i.jsxs("label",{htmlFor:"admin-username",className:"block text-sm font-medium text-white mb-2",children:[e("setup.adminUsername")," ",i.jsx("span",{className:"text-bambu-gray text-xs",children:e("setup.optionalIfAdminExists")})]}),i.jsx("input",{id:"admin-username",type:"text",value:l,onChange:v=>c(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.adminUsernamePlaceholder"),autoComplete:"username"})]}),i.jsxs("div",{children:[i.jsxs("label",{htmlFor:"admin-password",className:"block text-sm font-medium text-white mb-2",children:[e("setup.adminPassword")," ",i.jsx("span",{className:"text-bambu-gray text-xs",children:e("setup.optionalIfAdminExists")})]}),i.jsx("input",{id:"admin-password",type:"password",value:d,onChange:v=>u(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.adminPasswordPlaceholder"),minLength:6,autoComplete:"new-password"})]}),d&&i.jsxs("div",{children:[i.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium text-white mb-2",children:e("setup.confirmPassword")}),i.jsx("input",{id:"confirm-password",type:"password",value:m,onChange:v=>p(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.confirmPasswordPlaceholder"),minLength:6,autoComplete:"new-password"})]})]})]}),i.jsx("div",{children:i.jsx("button",{type:"submit",disabled:f.isPending,className:"w-full flex justify-center py-3 px-4 bg-bambu-green hover:bg-bambu-green-light text-white font-medium rounded-lg shadow-lg shadow-bambu-green/20 hover:shadow-bambu-green/30 focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:ring-offset-2 focus:ring-offset-bambu-dark-secondary transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-bambu-green",children:f.isPending?e("setup.settingUp"):e("setup.completeSetup")})})]})]})})}function Fnt(){const{t}=jt(),{user:e}=kr(),{showToast:n}=pn(),r=cn(),a=Mo(),[s,o]=w.useState(!0),[l,c]=w.useState(!0),[d,u]=w.useState(!0),[m,p]=w.useState(!0),[f,y]=w.useState(!1),{data:v,isLoading:b}=Je({queryKey:["advancedAuthStatus"],queryFn:fe.getAdvancedAuthStatus,staleTime:300*1e3}),{data:g,isLoading:_}=Je({queryKey:["settings"],queryFn:fe.getSettings,staleTime:300*1e3}),{data:N,isLoading:C}=Je({queryKey:["user-email-preferences"],queryFn:()=>fe.getUserEmailPreferences()});w.useEffect(()=>{(v&&!v.advanced_auth_enabled||g&&!g.user_notifications_enabled)&&a("/settings",{replace:!0})},[v,g,a]),w.useEffect(()=>{N&&(o(N.notify_print_start),c(N.notify_print_complete),u(N.notify_print_failed),p(N.notify_print_stopped),y(!1))},[N]);const k=ht({mutationFn:()=>fe.updateUserEmailPreferences({notify_print_start:s,notify_print_complete:l,notify_print_failed:d,notify_print_stopped:m}),onSuccess:()=>{r.invalidateQueries({queryKey:["user-email-preferences"]}),y(!1),n(t("notifications.userEmail.saveSuccess"),"success")},onError:T=>{n(T.message||t("notifications.userEmail.saveError"),"error")}}),P=(T,j)=>{T(!j),y(!0)};return C||b||_?i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx(ft,{className:"w-8 h-8 animate-spin text-bambu-green"})}):i.jsxs("div",{className:"p-4 md:p-6 max-w-2xl mx-auto",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx(Ah,{className:"w-7 h-7 text-bambu-green"}),i.jsx("h1",{className:"text-2xl font-bold text-white",children:t("notifications.userEmail.title")})]}),i.jsx(At,{className:"mb-6 border-blue-500/30 bg-blue-500/5",children:i.jsx(Et,{className:"py-4",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center bg-blue-500/20 flex-shrink-0",children:i.jsx(gx,{className:"w-5 h-5 text-blue-400"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-white font-medium",children:t("notifications.userEmail.emailNotifications")}),i.jsx("p",{className:"text-sm text-bambu-gray mt-1",children:t("notifications.userEmail.emailNotificationsDesc")}),e?.email?i.jsxs("p",{className:"text-sm text-blue-400 mt-2",children:[t("notifications.userEmail.sendingTo"),": ",i.jsx("strong",{children:e.email})]}):i.jsx("p",{className:"text-sm text-yellow-400 mt-2",children:t("notifications.userEmail.noEmailWarning")})]})]})})}),i.jsxs(At,{className:"mb-6",children:[i.jsxs(Hn,{children:[i.jsx("h2",{className:"text-lg font-semibold text-white",children:t("notifications.userEmail.printJobNotifications")}),i.jsx("p",{className:"text-sm text-bambu-gray mt-1",children:t("notifications.userEmail.printJobNotificationsDesc")})]}),i.jsxs(Et,{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${s?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${s?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobStarts")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobStartsDesc")})]})]}),i.jsx("button",{onClick:()=>P(o,s),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${s?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":s,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${s?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${l?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${l?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobFinishes")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobFinishesDesc")})]})]}),i.jsx("button",{onClick:()=>P(c,l),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${l?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":l,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${l?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${d?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${d?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printErrors")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printErrorsDesc")})]})]}),i.jsx("button",{onClick:()=>P(u,d),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${d?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":d,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${d?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${m?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${m?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobStops")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobStopsDesc")})]})]}),i.jsx("button",{onClick:()=>P(p,m),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${m?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":m,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${m?"translate-x-6":"translate-x-1"}`})})]})]})]}),i.jsx("div",{className:"flex justify-end",children:i.jsx(Ie,{onClick:()=>k.mutate(),disabled:!f||k.isPending||!e?.email,children:k.isPending?i.jsxs(i.Fragment,{children:[i.jsx(ft,{className:"w-4 h-4 animate-spin"}),t("common.saving")]}):i.jsxs(i.Fragment,{children:[i.jsx(ss,{className:"w-4 h-4"}),t("common.save")]})})})]})}function Rnt(){const t=w.useRef(null),e=w.useRef(null),n=cn(),[r,a]=w.useState(!1),s=w.useRef(new Map),{showToast:o}=pn(),{t:l}=jt(),c=w.useRef(new Set),d=w.useRef(null),u=w.useRef(new Map),m=w.useRef(null),p=w.useRef([]),f=w.useRef(!1),y=w.useRef(()=>{}),v=w.useCallback(()=>{if(f.current||p.current.length===0)return;f.current=!0;const k=()=>{const P=p.current.shift();P?requestAnimationFrame(()=>{y.current(P),p.current.length>0?setTimeout(k,16):f.current=!1}):f.current=!1};k()},[]),b=w.useCallback(()=>{if(t.current?.readyState===WebSocket.OPEN)return;const P=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`,T=new WebSocket(P);let j=null;T.onopen=()=>{console.log("[WebSocket] Connected"),a(!0),j=window.setInterval(()=>{T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:"ping"}))},3e4)},T.onmessage=A=>{try{const F=JSON.parse(A.data);F.type==="printer_status"&&F.printer_id!==void 0&&F.data?y.current(F):(p.current.push(F),v())}catch{}},T.onclose=A=>{console.log("[WebSocket] Closed",A.code,A.reason),j&&(clearInterval(j),j=null),a(!1),t.current=null,e.current=window.setTimeout(()=>{b()},3e3)},T.onerror=A=>{console.error("[WebSocket] Error",A),T.close()},t.current=T},[v]),g=w.useCallback((k,P)=>{const T=u.current.get(k)||{};u.current.set(k,{...T,...P}),m.current||(m.current=window.setTimeout(()=>{const j=new Map(u.current);u.current.clear(),m.current=null,requestAnimationFrame(()=>{j.forEach((A,F)=>{n.setQueryData(["printerStatus",F],G=>{const z={...G,...A};return z.wifi_signal==null&&G?.wifi_signal!=null&&(z.wifi_signal=G.wifi_signal),z})})})},100))},[n]),_=w.useCallback(k=>{c.current.add(k),d.current&&clearTimeout(d.current),d.current=window.setTimeout(()=>{const P=Array.from(c.current);c.current.clear(),d.current=null;let T=0;P.forEach(j=>{setTimeout(()=>{requestAnimationFrame(()=>{n.invalidateQueries({queryKey:[j]})})},T),T+=500})},3e3)},[n]),N=w.useCallback(k=>{switch(k.type){case"printer_status":k.printer_id!==void 0&&k.data&&g(k.printer_id,k.data);break;case"print_start":k.printer_id!==void 0&&n.invalidateQueries({queryKey:["printerStatus",k.printer_id]});break;case"missing_spool_assignment":{if(k.printer_id===void 0||!Array.isArray(k.missing_slots))break;const P=k.missing_slots.map(F=>F&&typeof F.slot=="string"?F.slot:"Unknown").filter(F=>F.length>0);if(P.length===0){s.current.delete(k.printer_id);break}const T=P.join("|");if(s.current.get(k.printer_id)===T)break;s.current.set(k.printer_id,T);const j=k.printer_name||`Printer ${k.printer_id}`,A=l("printers.toast.missingSpoolAssignment",{printer:j,slots:P.join(", ")});o(A,"warning");break}case"print_complete":_("archives"),_("archiveStats");break;case"archive_created":_("archives"),_("archiveStats");break;case"archive_updated":_("archives");break;case"pong":break;case"plate_not_empty":window.dispatchEvent(new CustomEvent("plate-not-empty",{detail:{printer_id:k.printer_id,printer_name:k.printer_name,message:k.message}}));break;case"spool_assignment_changed":_("spool-assignments"),_("slotPresets");break;case"spool_auto_assigned":_("inventory-spools"),_("spool-assignments");break;case"spool_usage_logged":_("inventory-spools");break;case"unknown_tag":window.dispatchEvent(new CustomEvent("unknown-tag",{detail:{printer_id:k.printer_id,ams_id:k.ams_id,tray_id:k.tray_id,tag_uid:k.tag_uid,tray_uuid:k.tray_uuid}}));break;case"background_dispatch":window.dispatchEvent(new CustomEvent("background-dispatch",{detail:k.data||{}}));break;case"spoolbuddy_weight":window.dispatchEvent(new CustomEvent("spoolbuddy-weight",{detail:k}));break;case"spoolbuddy_tag_matched":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-matched",{detail:k})),_("inventory-spools");break;case"spoolbuddy_unknown_tag":window.dispatchEvent(new CustomEvent("spoolbuddy-unknown-tag",{detail:k}));break;case"spoolbuddy_tag_removed":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-removed",{detail:k}));break;case"spoolbuddy_tag_written":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-written",{detail:k})),_("inventory-spools");break;case"spoolbuddy_tag_write_failed":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-write-failed",{detail:k}));break;case"spoolbuddy_online":window.dispatchEvent(new CustomEvent("spoolbuddy-online",{detail:k})),_("spoolbuddy-devices"),_("spoolbuddy-update-check");break;case"spoolbuddy_offline":window.dispatchEvent(new CustomEvent("spoolbuddy-offline",{detail:k})),_("spoolbuddy-devices");break;case"spoolbuddy_update":_("spoolbuddy-devices"),_("spoolbuddy-update-check");break}},[n,_,g,o,l]);w.useEffect(()=>{y.current=N},[N]),w.useEffect(()=>(b(),()=>{e.current&&clearTimeout(e.current),d.current&&clearTimeout(d.current),m.current&&clearTimeout(m.current),t.current&&t.current.close()}),[b]);const C=w.useCallback(k=>{t.current?.readyState===WebSocket.OPEN&&t.current.send(JSON.stringify(k))},[]);return{isConnected:r,sendMessage:C}}function Lnt(){const{authEnabled:t}=kr(),{data:e}=Je({queryKey:["camera-stream-token"],queryFn:()=>fe.getCameraStreamToken(),enabled:t,staleTime:3e3*1e3,refetchInterval:3e3*1e3});w.useEffect(()=>(o6(e?.token??null),()=>o6(null)),[e?.token])}function Ont({selectedPrinterId:t,onPrinterChange:e,deviceOnline:n}){const{t:r}=jt(),[a,s]=w.useState(new Date),{data:o=[]}=Je({queryKey:["printers"],queryFn:()=>fe.getPrinters()}),l=tp({queries:o.map(u=>({queryKey:["printerStatus",u.id],queryFn:()=>fe.getPrinterStatus(u.id),refetchInterval:1e4}))}),c=w.useMemo(()=>o.filter((u,m)=>l[m]?.data?.connected),[o,l]);w.useEffect(()=>{const u=c.some(m=>m.id===t);(!t||!u)&&c.length>0&&e(c[0].id)},[c,t,e]);const{data:d}=Je({queryKey:["settings"],queryFn:fe.getSettings});return w.useEffect(()=>{const u=setInterval(()=>s(new Date),1e3);return()=>clearInterval(u)},[]),i.jsxs("div",{className:"h-12 bg-bambu-dark-secondary border-b border-bambu-dark-tertiary flex items-center px-3 gap-4 shrink-0",children:[i.jsx("div",{className:"flex items-center shrink-0",children:i.jsx("img",{src:"/img/spoolbuddy_logo_dark_small.png",alt:"SpoolBuddy",width:113,height:28,className:"h-7 w-auto"})}),i.jsx("div",{className:"flex-1 flex justify-center",children:i.jsx("select",{value:t??"",onChange:u=>e(Number(u.target.value)),className:"bg-bambu-dark text-white text-base px-4 py-2 rounded border border-bambu-dark-tertiary focus:outline-none focus:border-bambu-green min-w-[180px]",children:c.length===0?i.jsx("option",{value:"",children:r("spoolbuddy.status.noPrinters","No printers online")}):c.map(u=>i.jsx("option",{value:u.id,children:u.name},u.id))})}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[i.jsx("div",{className:"flex items-center",title:n?r("spoolbuddy.status.backend","Backend"):r("spoolbuddy.status.offline","Offline"),children:n?i.jsx("div",{className:"flex items-end gap-0.5 h-4",children:[1,2,3,4].map(u=>i.jsx("div",{className:`w-1 rounded-sm ${u<=4?"bg-white":"bg-bambu-dark-tertiary"}`,style:{height:`${u*4}px`}},u))}):i.jsx(qh,{className:"w-5 h-5 text-red-400"})}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${n?"bg-bambu-green shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-bambu-gray"}`}),i.jsx("span",{className:"text-sm text-white/50",children:n?r("spoolbuddy.status.backend","Backend"):r("spoolbuddy.status.offline","Offline")})]}),i.jsx("span",{className:"text-white/50 text-base font-mono min-w-[50px] text-right",children:kQ(a,d?.time_format||"system")})]})]})}const Int=[{to:"/spoolbuddy",labelKey:"spoolbuddy.nav.dashboard",fallback:"Dashboard",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})},{to:"/spoolbuddy/ams",labelKey:"spoolbuddy.nav.ams",fallback:"AMS",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})},{to:"/spoolbuddy/write-tag",labelKey:"spoolbuddy.nav.writeTag",fallback:"Write",icon:i.jsxs("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.288 15.038a5.25 5.25 0 017.424 0M5.106 11.856c3.807-3.808 9.98-3.808 13.788 0M1.924 8.674c5.565-5.565 14.587-5.565 20.152 0"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12.53 18.22l-.53.53-.53-.53a.75.75 0 011.06 0z"})]})},{to:"/spoolbuddy/inventory",labelKey:"spoolbuddy.nav.inventory",fallback:"Inventory",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})})},{to:"/spoolbuddy/settings",labelKey:"spoolbuddy.nav.settings",fallback:"Settings",icon:i.jsxs("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}];function znt(){const{t}=jt();return i.jsx("nav",{className:"h-14 bg-bambu-dark-secondary border-t border-bambu-dark-tertiary flex items-stretch shrink-0",children:Int.map(e=>i.jsxs(Hb,{to:e.to,end:e.to==="/spoolbuddy",className:({isActive:n})=>`flex-1 flex flex-col items-center justify-center gap-1 transition-colors ${n?"text-bambu-green bg-bambu-dark":"text-white/50 hover:text-white/70 hover:bg-bambu-dark-tertiary"}`,children:[e.icon,i.jsx("span",{className:"text-xs font-medium",children:t(e.labelKey,e.fallback)})]},e.to))})}function Unt({alert:t}){const{t:e}=jt(),n=t?t.type==="error"?"bg-red-500":t.type==="warning"?"bg-amber-500":"bg-bambu-green":"bg-bambu-green",r=t?t.type==="error"?"border-red-500":t.type==="warning"?"border-amber-500":"border-bambu-dark-tertiary":"border-bambu-dark-tertiary";return i.jsxs("div",{className:`h-9 bg-bambu-dark-secondary border-t-2 ${r} flex items-center px-3 gap-3 shrink-0`,children:[i.jsx("div",{className:`w-3.5 h-3.5 rounded-full ${n} animate-pulse`}),i.jsx("div",{className:"flex-1 text-sm text-white/50 truncate",children:t?i.jsx("span",{children:t.message}):i.jsx("span",{className:"text-bambu-green",children:e("spoolbuddy.status.systemReady","System Ready")})})]})}const Bnt={weight:null,weightStable:!1,rawAdc:null,matchedSpool:null,unknownTagUid:null,deviceOnline:!1,deviceId:null};function Hnt(t,e){switch(e.type){case"WEIGHT_UPDATE":return{...t,weight:e.weight,weightStable:e.stable,rawAdc:e.rawAdc,deviceId:e.deviceId,deviceOnline:!0};case"TAG_MATCHED":return{...t,matchedSpool:e.spool,unknownTagUid:null,deviceId:e.deviceId};case"UNKNOWN_TAG":return{...t,matchedSpool:null,unknownTagUid:e.tagUid,deviceId:e.deviceId};case"TAG_REMOVED":return{...t,matchedSpool:null,unknownTagUid:null};case"DEVICE_ONLINE":return{...t,deviceOnline:!0,deviceId:e.deviceId};case"DEVICE_OFFLINE":return{...t,deviceOnline:!1,weight:null,weightStable:!1,rawAdc:null};default:return t}}function $nt(){const[t,e]=w.useReducer(Hnt,Bnt),n=w.useCallback(u=>{const m=u.detail;e({type:"WEIGHT_UPDATE",weight:m.weight_grams??m.data?.weight_grams,stable:m.stable??m.data?.stable??!1,rawAdc:m.raw_adc??m.data?.raw_adc??null,deviceId:m.device_id??m.data?.device_id??""})},[]),r=w.useCallback(u=>{const m=u.detail,p=m.spool??m.data?.spool;p&&e({type:"TAG_MATCHED",spool:{id:p.id,tag_uid:m.tag_uid??m.data?.tag_uid??"",material:p.material??"",subtype:p.subtype??null,color_name:p.color_name??null,rgba:p.rgba??null,brand:p.brand??null,label_weight:p.label_weight??0,core_weight:p.core_weight??0,weight_used:p.weight_used??0},deviceId:m.device_id??m.data?.device_id??""})},[]),a=w.useCallback(u=>{const m=u.detail;e({type:"UNKNOWN_TAG",tagUid:m.tag_uid??m.data?.tag_uid??"",deviceId:m.device_id??m.data?.device_id??""})},[]),s=w.useCallback(u=>{const m=u.detail;e({type:"TAG_REMOVED",deviceId:m.device_id??m.data?.device_id??""})},[]),o=w.useCallback(u=>{const m=u.detail;e({type:"DEVICE_ONLINE",deviceId:m.device_id??m.data?.device_id??""})},[]),l=w.useCallback(u=>{const m=u.detail;e({type:"DEVICE_OFFLINE",deviceId:m.device_id??m.data?.device_id??""})},[]);w.useEffect(()=>(window.addEventListener("spoolbuddy-weight",n),window.addEventListener("spoolbuddy-tag-matched",r),window.addEventListener("spoolbuddy-unknown-tag",a),window.addEventListener("spoolbuddy-tag-removed",s),window.addEventListener("spoolbuddy-online",o),window.addEventListener("spoolbuddy-offline",l),()=>{window.removeEventListener("spoolbuddy-weight",n),window.removeEventListener("spoolbuddy-tag-matched",r),window.removeEventListener("spoolbuddy-unknown-tag",a),window.removeEventListener("spoolbuddy-tag-removed",s),window.removeEventListener("spoolbuddy-online",o),window.removeEventListener("spoolbuddy-offline",l)}),[n,r,a,s,o,l]);const c=t.matchedSpool?Math.max(0,t.matchedSpool.label_weight-t.matchedSpool.weight_used):null,d=t.weight!==null&&t.matchedSpool?Math.max(0,t.weight-t.matchedSpool.core_weight):null;return{...t,remainingWeight:c,netWeight:d}}var DN={exports:{}};var qnt=DN.exports,JY;function Vnt(){return JY||(JY=1,(function(t,e){(function(n,r){t.exports=r(ag())})(qnt,(function(n){return(function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&(function(l){if("Element"in l){var c="classList",d="prototype",u=l.Element[d],m=Object,p=String[d].trim||function(){return this.replace(/^\s+|\s+$/g,"")},f=Array[d].indexOf||function(C){for(var k=0,P=this.length;k1?arguments[1]:void 0)}},7916:function(H,X,D){var M=D(6080),U=D(9565),K=D(8981),B=D(6319),ie=D(4209),O=D(3517),q=D(6198),Y=D(4659),V=D(4527),ee=D(81),oe=D(851),he=Array;H.exports=function(pe){var re=K(pe),L=O(this),R=arguments.length,ne=R>1?arguments[1]:void 0,ye=ne!==void 0;ye&&(ne=M(ne,R>2?arguments[2]:void 0));var ve,be,Be,we,Ae,Le,Ee=oe(re),_e=0;if(!Ee||this===he&&ie(Ee))for(ve=q(re),be=L?new this(ve):he(ve);ve>_e;_e++)Le=ye?ne(re[_e],_e):re[_e],Y(be,_e,Le);else for(be=L?new this:[],Ae=(we=ee(re,Ee)).next;!(Be=U(Ae,we)).done;_e++)Le=ye?B(we,ne,[Be.value,_e],!0):Be.value,Y(be,_e,Le);return V(be,_e),be}},9617:function(H,X,D){var M=D(5397),U=D(5610),K=D(6198),B=function(ie){return function(O,q,Y){var V=M(O),ee=K(V);if(ee===0)return!ie&&-1;var oe,he=U(Y,ee);if(ie&&q!=q){for(;ee>he;)if((oe=V[he++])!=oe)return!0}else for(;ee>he;he++)if((ie||he in V)&&V[he]===q)return ie||he||0;return!ie&&-1}};H.exports={includes:B(!0),indexOf:B(!1)}},9213:function(H,X,D){var M=D(6080),U=D(7055),K=D(8981),B=D(6198),ie=D(1469),O=D(4659),q=function(Y){var V=Y===1,ee=Y===2,oe=Y===3,he=Y===4,pe=Y===6,re=Y===7,L=Y===5||pe;return function(R,ne,ye){for(var ve,be,Be=K(R),we=U(Be),Ae=B(we),Le=M(ne,ye),Ee=0,_e=0,Me=V?ie(R,Ae):ee||re?ie(R,0):void 0;Ae>Ee;Ee++)if((L||Ee in we)&&(be=Le(ve=we[Ee],Ee,Be),Y))if(V)O(Me,Ee,be);else if(be)switch(Y){case 3:return!0;case 5:return ve;case 6:return Ee;case 2:O(Me,_e++,ve)}else switch(Y){case 4:return!1;case 7:O(Me,_e++,ve)}return pe?-1:oe||he?he:Me}};H.exports={forEach:q(0),map:q(1),filter:q(2),some:q(3),every:q(4),find:q(5),findIndex:q(6),filterReject:q(7)}},597:function(H,X,D){var M=D(9039),U=D(8227),K=D(9519),B=U("species");H.exports=function(ie){return K>=51||!M((function(){var O=[];return(O.constructor={})[B]=function(){return{foo:1}},O[ie](Boolean).foo!==1}))}},4598:function(H,X,D){var M=D(9039);H.exports=function(U,K){var B=[][U];return!!B&&M((function(){B.call(null,K||function(){return 1},1)}))}},926:function(H,X,D){var M=D(9306),U=D(8981),K=D(7055),B=D(6198),ie=TypeError,O="Reduce of empty array with no initial value",q=function(Y){return function(V,ee,oe,he){var pe=U(V),re=K(pe),L=B(pe);if(M(ee),L===0&&oe<2)throw new ie(O);var R=Y?L-1:0,ne=Y?-1:1;if(oe<2)for(;;){if(R in re){he=re[R],R+=ne;break}if(R+=ne,Y?R<0:L<=R)throw new ie(O)}for(;Y?R>=0:L>R;R+=ne)R in re&&(he=ee(he,re[R],R,pe));return he}};H.exports={left:q(!1),right:q(!0)}},4527:function(H,X,D){var M=D(3724),U=D(4376),K=TypeError,B=Object.getOwnPropertyDescriptor,ie=M&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(O){return O instanceof TypeError}})();H.exports=ie?function(O,q){if(U(O)&&!B(O,"length").writable)throw new K("Cannot set read only .length");return O.length=q}:function(O,q){return O.length=q}},7680:function(H,X,D){var M=D(9504);H.exports=M([].slice)},4488:function(H,X,D){var M=D(7680),U=Math.floor,K=function(B,ie){var O=B.length;if(O<8)for(var q,Y,V=1;V0;)B[Y]=B[--Y];Y!==V++&&(B[Y]=q)}else for(var ee=U(O/2),oe=K(M(B,0,ee),ie),he=K(M(B,ee),ie),pe=oe.length,re=he.length,L=0,R=0;L9007199254740991)throw X("Maximum allowed index exceeded");return D}},7400:function(H){H.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(H,X,D){var M=D(4055)("span").classList,U=M&&M.constructor&&M.constructor.prototype;H.exports=U===Object.prototype?void 0:U},8727:function(H){H.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3709:function(H,X,D){var M=D(2839).match(/firefox\/(\d+)/i);H.exports=!!M&&+M[1]},3763:function(H,X,D){var M=D(2839);H.exports=/MSIE|Trident/.test(M)},6193:function(H,X,D){var M=D(4215);H.exports=M==="NODE"},2839:function(H,X,D){var M=D(4576).navigator,U=M&&M.userAgent;H.exports=U?String(U):""},9519:function(H,X,D){var M,U,K=D(4576),B=D(2839),ie=K.process,O=K.Deno,q=ie&&ie.versions||O&&O.version,Y=q&&q.v8;Y&&(U=(M=Y.split("."))[0]>0&&M[0]<4?1:+(M[0]+M[1])),!U&&B&&(!(M=B.match(/Edge\/(\d+)/))||M[1]>=74)&&(M=B.match(/Chrome\/(\d+)/))&&(U=+M[1]),H.exports=U},3607:function(H,X,D){var M=D(2839).match(/AppleWebKit\/(\d+)\./);H.exports=!!M&&+M[1]},4215:function(H,X,D){var M=D(4576),U=D(2839),K=D(2195),B=function(ie){return U.slice(0,ie.length)===ie};H.exports=B("Bun/")?"BUN":B("Cloudflare-Workers")?"CLOUDFLARE":B("Deno/")?"DENO":B("Node.js/")?"NODE":M.Bun&&typeof Bun.version=="string"?"BUN":M.Deno&&typeof Deno.version=="object"?"DENO":K(M.process)==="process"?"NODE":M.window&&M.document?"BROWSER":"REST"},6518:function(H,X,D){var M=D(4576),U=D(7347).f,K=D(6699),B=D(6840),ie=D(9433),O=D(7740),q=D(2796);H.exports=function(Y,V){var ee,oe,he,pe,re,L=Y.target,R=Y.global,ne=Y.stat;if(ee=R?M:ne?M[L]||ie(L,{}):M[L]&&M[L].prototype)for(oe in V){if(pe=V[oe],he=Y.dontCallGetSet?(re=U(ee,oe))&&re.value:ee[oe],!q(R?oe:L+(ne?".":"#")+oe,Y.forced)&&he!==void 0){if(typeof pe==typeof he)continue;O(pe,he)}(Y.sham||he&&he.sham)&&K(pe,"sham",!0),B(ee,oe,pe,Y)}}},9039:function(H){H.exports=function(X){try{return!!X()}catch{return!0}}},9228:function(H,X,D){D(7495);var M=D(9565),U=D(6840),K=D(7323),B=D(9039),ie=D(8227),O=D(6699),q=ie("species"),Y=RegExp.prototype;H.exports=function(V,ee,oe,he){var pe=ie(V),re=!B((function(){var ye={};return ye[pe]=function(){return 7},""[V](ye)!==7})),L=re&&!B((function(){var ye=!1,ve=/a/;if(V==="split"){var be={};be[q]=function(){return ve},(ve={constructor:be,flags:""})[pe]=/./[pe]}return ve.exec=function(){return ye=!0,null},ve[pe](""),!ye}));if(!re||!L||oe){var R=/./[pe],ne=ee(pe,""[V],(function(ye,ve,be,Be,we){var Ae=ve.exec;return Ae===K||Ae===Y.exec?re&&!we?{done:!0,value:M(R,ve,be,Be)}:{done:!0,value:M(ye,be,ve,Be)}:{done:!1}}));U(String.prototype,V,ne[0]),U(Y,pe,ne[1])}he&&O(Y[pe],"sham",!0)}},8745:function(H,X,D){var M=D(616),U=Function.prototype,K=U.apply,B=U.call;H.exports=typeof Reflect=="object"&&Reflect.apply||(M?B.bind(K):function(){return B.apply(K,arguments)})},6080:function(H,X,D){var M=D(7476),U=D(9306),K=D(616),B=M(M.bind);H.exports=function(ie,O){return U(ie),O===void 0?ie:K?B(ie,O):function(){return ie.apply(O,arguments)}}},616:function(H,X,D){var M=D(9039);H.exports=!M((function(){var U=(function(){}).bind();return typeof U!="function"||U.hasOwnProperty("prototype")}))},566:function(H,X,D){var M=D(9504),U=D(9306),K=D(34),B=D(9297),ie=D(7680),O=D(616),q=Function,Y=M([].concat),V=M([].join),ee={};H.exports=O?q.bind:function(oe){var he=U(this),pe=he.prototype,re=ie(arguments,1),L=function(){var R=Y(re,ie(arguments));return this instanceof L?(function(ne,ye,ve){if(!B(ee,ye)){for(var be=[],Be=0;Be]*>)/g,Y=/\$([$&'`]|\d{1,2})/g;H.exports=function(V,ee,oe,he,pe,re){var L=oe+V.length,R=he.length,ne=Y;return pe!==void 0&&(pe=U(pe),ne=q),ie(re,ne,(function(ye,ve){var be;switch(B(ve,0)){case"$":return"$";case"&":return V;case"`":return O(ee,0,oe);case"'":return O(ee,L);case"<":be=pe[O(ve,1,-1)];break;default:var Be=+ve;if(Be===0)return ye;if(Be>R){var we=K(Be/10);return we===0?ye:we<=R?he[we-1]===void 0?B(ve,1):he[we-1]+B(ve,1):ye}be=he[Be-1]}return be===void 0?"":be}))}},4576:function(H,X,D){var M=function(U){return U&&U.Math===Math&&U};H.exports=M(typeof globalThis=="object"&&globalThis)||M(typeof window=="object"&&window)||M(typeof self=="object"&&self)||M(typeof D.g=="object"&&D.g)||M(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},9297:function(H,X,D){var M=D(9504),U=D(8981),K=M({}.hasOwnProperty);H.exports=Object.hasOwn||function(B,ie){return K(U(B),ie)}},421:function(H){H.exports={}},397:function(H,X,D){var M=D(7751);H.exports=M("document","documentElement")},5917:function(H,X,D){var M=D(3724),U=D(9039),K=D(4055);H.exports=!M&&!U((function(){return Object.defineProperty(K("div"),"a",{get:function(){return 7}}).a!==7}))},7055:function(H,X,D){var M=D(9504),U=D(9039),K=D(2195),B=Object,ie=M("".split);H.exports=U((function(){return!B("z").propertyIsEnumerable(0)}))?function(O){return K(O)==="String"?ie(O,""):B(O)}:B},3167:function(H,X,D){var M=D(4901),U=D(34),K=D(2967);H.exports=function(B,ie,O){var q,Y;return K&&M(q=ie.constructor)&&q!==O&&U(Y=q.prototype)&&Y!==O.prototype&&K(B,Y),B}},3706:function(H,X,D){var M=D(9504),U=D(4901),K=D(7629),B=M(Function.toString);U(K.inspectSource)||(K.inspectSource=function(ie){return B(ie)}),H.exports=K.inspectSource},1181:function(H,X,D){var M,U,K,B=D(8622),ie=D(4576),O=D(34),q=D(6699),Y=D(9297),V=D(7629),ee=D(6119),oe=D(421),he="Object already initialized",pe=ie.TypeError,re=ie.WeakMap;if(B||V.state){var L=V.state||(V.state=new re);L.get=L.get,L.has=L.has,L.set=L.set,M=function(ne,ye){if(L.has(ne))throw new pe(he);return ye.facade=ne,L.set(ne,ye),ye},U=function(ne){return L.get(ne)||{}},K=function(ne){return L.has(ne)}}else{var R=ee("state");oe[R]=!0,M=function(ne,ye){if(Y(ne,R))throw new pe(he);return ye.facade=ne,q(ne,R,ye),ye},U=function(ne){return Y(ne,R)?ne[R]:{}},K=function(ne){return Y(ne,R)}}H.exports={set:M,get:U,has:K,enforce:function(ne){return K(ne)?U(ne):M(ne,{})},getterFor:function(ne){return function(ye){var ve;if(!O(ye)||(ve=U(ye)).type!==ne)throw new pe("Incompatible receiver, "+ne+" required");return ve}}}},4209:function(H,X,D){var M=D(8227),U=D(6269),K=M("iterator"),B=Array.prototype;H.exports=function(ie){return ie!==void 0&&(U.Array===ie||B[K]===ie)}},4376:function(H,X,D){var M=D(2195);H.exports=Array.isArray||function(U){return M(U)==="Array"}},4901:function(H){var X=typeof document=="object"&&document.all;H.exports=X===void 0&&X!==void 0?function(D){return typeof D=="function"||D===X}:function(D){return typeof D=="function"}},3517:function(H,X,D){var M=D(9504),U=D(9039),K=D(4901),B=D(6955),ie=D(7751),O=D(3706),q=function(){},Y=ie("Reflect","construct"),V=/^\s*(?:class|function)\b/,ee=M(V.exec),oe=!V.test(q),he=function(re){if(!K(re))return!1;try{return Y(q,[],re),!0}catch{return!1}},pe=function(re){if(!K(re))return!1;switch(B(re)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oe||!!ee(V,O(re))}catch{return!0}};pe.sham=!0,H.exports=!Y||U((function(){var re;return he(he.call)||!he(Object)||!he((function(){re=!0}))||re}))?pe:he},2796:function(H,X,D){var M=D(9039),U=D(4901),K=/#|\.prototype\./,B=function(V,ee){var oe=O[ie(V)];return oe===Y||oe!==q&&(U(ee)?M(ee):!!ee)},ie=B.normalize=function(V){return String(V).replace(K,".").toLowerCase()},O=B.data={},q=B.NATIVE="N",Y=B.POLYFILL="P";H.exports=B},2087:function(H,X,D){var M=D(34),U=Math.floor;H.exports=Number.isInteger||function(K){return!M(K)&&isFinite(K)&&U(K)===K}},4117:function(H){H.exports=function(X){return X==null}},34:function(H,X,D){var M=D(4901);H.exports=function(U){return typeof U=="object"?U!==null:M(U)}},3925:function(H,X,D){var M=D(34);H.exports=function(U){return M(U)||U===null}},6395:function(H){H.exports=!1},5810:function(H,X,D){var M=D(34),U=D(1181).get;H.exports=function(K){if(!M(K))return!1;var B=U(K);return!!B&&B.type==="RawJSON"}},788:function(H,X,D){var M=D(34),U=D(2195),K=D(8227)("match");H.exports=function(B){var ie;return M(B)&&((ie=B[K])!==void 0?!!ie:U(B)==="RegExp")}},757:function(H,X,D){var M=D(7751),U=D(4901),K=D(1625),B=D(7040),ie=Object;H.exports=B?function(O){return typeof O=="symbol"}:function(O){var q=M("Symbol");return U(q)&&K(q.prototype,ie(O))}},9539:function(H,X,D){var M=D(9565),U=D(8551),K=D(5966);H.exports=function(B,ie,O){var q,Y;U(B);try{if(!(q=K(B,"return"))){if(ie==="throw")throw O;return O}q=M(q,B)}catch(V){Y=!0,q=V}if(ie==="throw")throw O;if(Y)throw q;return U(q),O}},3994:function(H,X,D){var M=D(7657).IteratorPrototype,U=D(2360),K=D(6980),B=D(687),ie=D(6269),O=function(){return this};H.exports=function(q,Y,V,ee){var oe=Y+" Iterator";return q.prototype=U(M,{next:K(+!ee,V)}),B(q,oe,!1,!0),ie[oe]=O,q}},1088:function(H,X,D){var M=D(6518),U=D(9565),K=D(6395),B=D(350),ie=D(4901),O=D(3994),q=D(2787),Y=D(2967),V=D(687),ee=D(6699),oe=D(6840),he=D(8227),pe=D(6269),re=D(7657),L=B.PROPER,R=B.CONFIGURABLE,ne=re.IteratorPrototype,ye=re.BUGGY_SAFARI_ITERATORS,ve=he("iterator"),be="keys",Be="values",we="entries",Ae=function(){return this};H.exports=function(Le,Ee,_e,Me,He,Fe,Xe){O(_e,Ee,Me);var xe,We,Pe,Ke=function(vt){if(vt===He&&nt)return nt;if(!ye&&vt&&vt in Te)return Te[vt];switch(vt){case be:case Be:case we:return function(){return new _e(this,vt)}}return function(){return new _e(this)}},Ve=Ee+" Iterator",Ce=!1,Te=Le.prototype,$e=Te[ve]||Te["@@iterator"]||He&&Te[He],nt=!ye&&$e||Ke(He),bt=Ee==="Array"&&Te.entries||$e;if(bt&&(xe=q(bt.call(new Le)))!==Object.prototype&&xe.next&&(K||q(xe)===ne||(Y?Y(xe,ne):ie(xe[ve])||oe(xe,ve,Ae)),V(xe,Ve,!0,!0),K&&(pe[Ve]=Ae)),L&&He===Be&&$e&&$e.name!==Be&&(!K&&R?ee(Te,"name",Be):(Ce=!0,nt=function(){return U($e,this)})),He)if(We={values:Ke(Be),keys:Fe?nt:Ke(be),entries:Ke(we)},Xe)for(Pe in We)(ye||Ce||!(Pe in Te))&&oe(Te,Pe,We[Pe]);else M({target:Ee,proto:!0,forced:ye||Ce},We);return K&&!Xe||Te[ve]===nt||oe(Te,ve,nt,{name:He}),pe[Ee]=nt,We}},7657:function(H,X,D){var M,U,K,B=D(9039),ie=D(4901),O=D(34),q=D(2360),Y=D(2787),V=D(6840),ee=D(8227),oe=D(6395),he=ee("iterator"),pe=!1;[].keys&&("next"in(K=[].keys())?(U=Y(Y(K)))!==Object.prototype&&(M=U):pe=!0),!O(M)||B((function(){var re={};return M[he].call(re)!==re}))?M={}:oe&&(M=q(M)),ie(M[he])||V(M,he,(function(){return this})),H.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:pe}},6269:function(H){H.exports={}},6198:function(H,X,D){var M=D(8014);H.exports=function(U){return M(U.length)}},283:function(H,X,D){var M=D(9504),U=D(9039),K=D(4901),B=D(9297),ie=D(3724),O=D(350).CONFIGURABLE,q=D(3706),Y=D(1181),V=Y.enforce,ee=Y.get,oe=String,he=Object.defineProperty,pe=M("".slice),re=M("".replace),L=M([].join),R=ie&&!U((function(){return he((function(){}),"length",{value:8}).length!==8})),ne=String(String).split("String"),ye=H.exports=function(ve,be,Be){pe(oe(be),0,7)==="Symbol("&&(be="["+re(oe(be),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Be&&Be.getter&&(be="get "+be),Be&&Be.setter&&(be="set "+be),(!B(ve,"name")||O&&ve.name!==be)&&(ie?he(ve,"name",{value:be,configurable:!0}):ve.name=be),R&&Be&&B(Be,"arity")&&ve.length!==Be.arity&&he(ve,"length",{value:Be.arity});try{Be&&B(Be,"constructor")&&Be.constructor?ie&&he(ve,"prototype",{writable:!1}):ve.prototype&&(ve.prototype=void 0)}catch{}var we=V(ve);return B(we,"source")||(we.source=L(ne,typeof be=="string"?be:"")),ve};Function.prototype.toString=ye((function(){return K(this)&&ee(this).source||q(this)}),"toString")},741:function(H){var X=Math.ceil,D=Math.floor;H.exports=Math.trunc||function(M){var U=+M;return(U>0?D:X)(U)}},7819:function(H,X,D){var M=D(9039);H.exports=!M((function(){var U="9007199254740993",K=JSON.rawJSON(U);return!JSON.isRawJSON(K)||JSON.stringify(K)!==U}))},5749:function(H,X,D){var M=D(788),U=TypeError;H.exports=function(K){if(M(K))throw new U("The method doesn't accept regular expressions");return K}},4213:function(H,X,D){var M=D(3724),U=D(9504),K=D(9565),B=D(9039),ie=D(1072),O=D(3717),q=D(8773),Y=D(8981),V=D(7055),ee=Object.assign,oe=Object.defineProperty,he=U([].concat);H.exports=!ee||B((function(){if(M&&ee({b:1},ee(oe({},"a",{enumerable:!0,get:function(){oe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var pe={},re={},L=Symbol("assign detection"),R="abcdefghijklmnopqrst";return pe[L]=7,R.split("").forEach((function(ne){re[ne]=ne})),ee({},pe)[L]!==7||ie(ee({},re)).join("")!==R}))?function(pe,re){for(var L=Y(pe),R=arguments.length,ne=1,ye=O.f,ve=q.f;R>ne;)for(var be,Be=V(arguments[ne++]),we=ye?he(ie(Be),ye(Be)):ie(Be),Ae=we.length,Le=0;Ae>Le;)be=we[Le++],M&&!K(ve,Be,be)||(L[be]=Be[be]);return L}:ee},2360:function(H,X,D){var M,U=D(8551),K=D(6801),B=D(8727),ie=D(421),O=D(397),q=D(4055),Y=D(6119),V="prototype",ee="script",oe=Y("IE_PROTO"),he=function(){},pe=function(R){return"<"+ee+">"+R+""},re=function(R){R.write(pe("")),R.close();var ne=R.parentWindow.Object;return R=null,ne},L=function(){try{M=new ActiveXObject("htmlfile")}catch{}var R,ne,ye;L=typeof document<"u"?document.domain&&M?re(M):(ne=q("iframe"),ye="java"+ee+":",ne.style.display="none",O.appendChild(ne),ne.src=String(ye),(R=ne.contentWindow.document).open(),R.write(pe("document.F=Object")),R.close(),R.F):re(M);for(var ve=B.length;ve--;)delete L[V][B[ve]];return L()};ie[oe]=!0,H.exports=Object.create||function(R,ne){var ye;return R!==null?(he[V]=U(R),ye=new he,he[V]=null,ye[oe]=R):ye=L(),ne===void 0?ye:K.f(ye,ne)}},6801:function(H,X,D){var M=D(3724),U=D(8686),K=D(4913),B=D(8551),ie=D(5397),O=D(1072);X.f=M&&!U?Object.defineProperties:function(q,Y){B(q);for(var V,ee=ie(Y),oe=O(Y),he=oe.length,pe=0;he>pe;)K.f(q,V=oe[pe++],ee[V]);return q}},4913:function(H,X,D){var M=D(3724),U=D(5917),K=D(8686),B=D(8551),ie=D(6969),O=TypeError,q=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,V="enumerable",ee="configurable",oe="writable";X.f=M?K?function(he,pe,re){if(B(he),pe=ie(pe),B(re),typeof he=="function"&&pe==="prototype"&&"value"in re&&oe in re&&!re[oe]){var L=Y(he,pe);L&&L[oe]&&(he[pe]=re.value,re={configurable:ee in re?re[ee]:L[ee],enumerable:V in re?re[V]:L[V],writable:!1})}return q(he,pe,re)}:q:function(he,pe,re){if(B(he),pe=ie(pe),B(re),U)try{return q(he,pe,re)}catch{}if("get"in re||"set"in re)throw new O("Accessors not supported");return"value"in re&&(he[pe]=re.value),he}},7347:function(H,X,D){var M=D(3724),U=D(9565),K=D(8773),B=D(6980),ie=D(5397),O=D(6969),q=D(9297),Y=D(5917),V=Object.getOwnPropertyDescriptor;X.f=M?V:function(ee,oe){if(ee=ie(ee),oe=O(oe),Y)try{return V(ee,oe)}catch{}if(q(ee,oe))return B(!U(K.f,ee,oe),ee[oe])}},298:function(H,X,D){var M=D(2195),U=D(5397),K=D(8480).f,B=D(7680),ie=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];H.exports.f=function(O){return ie&&M(O)==="Window"?(function(q){try{return K(q)}catch{return B(ie)}})(O):K(U(O))}},8480:function(H,X,D){var M=D(1828),U=D(8727).concat("length","prototype");X.f=Object.getOwnPropertyNames||function(K){return M(K,U)}},3717:function(H,X){X.f=Object.getOwnPropertySymbols},2787:function(H,X,D){var M=D(9297),U=D(4901),K=D(8981),B=D(6119),ie=D(2211),O=B("IE_PROTO"),q=Object,Y=q.prototype;H.exports=ie?q.getPrototypeOf:function(V){var ee=K(V);if(M(ee,O))return ee[O];var oe=ee.constructor;return U(oe)&&ee instanceof oe?oe.prototype:ee instanceof q?Y:null}},1625:function(H,X,D){var M=D(9504);H.exports=M({}.isPrototypeOf)},1828:function(H,X,D){var M=D(9504),U=D(9297),K=D(5397),B=D(9617).indexOf,ie=D(421),O=M([].push);H.exports=function(q,Y){var V,ee=K(q),oe=0,he=[];for(V in ee)!U(ie,V)&&U(ee,V)&&O(he,V);for(;Y.length>oe;)U(ee,V=Y[oe++])&&(~B(he,V)||O(he,V));return he}},1072:function(H,X,D){var M=D(1828),U=D(8727);H.exports=Object.keys||function(K){return M(K,U)}},8773:function(H,X){var D={}.propertyIsEnumerable,M=Object.getOwnPropertyDescriptor,U=M&&!D.call({1:2},1);X.f=U?function(K){var B=M(this,K);return!!B&&B.enumerable}:D},2551:function(H,X,D){var M=D(6395),U=D(4576),K=D(9039),B=D(3607);H.exports=M||!K((function(){if(!(B&&B<535)){var ie=Math.random();__defineSetter__.call(null,ie,(function(){})),delete U[ie]}}))},2967:function(H,X,D){var M=D(6706),U=D(34),K=D(7750),B=D(3506);H.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var ie,O=!1,q={};try{(ie=M(Object.prototype,"__proto__","set"))(q,[]),O=q instanceof Array}catch{}return function(Y,V){return K(Y),B(V),U(Y)&&(O?ie(Y,V):Y.__proto__=V),Y}})():void 0)},3179:function(H,X,D){var M=D(2140),U=D(6955);H.exports=M?{}.toString:function(){return"[object "+U(this)+"]"}},4270:function(H,X,D){var M=D(9565),U=D(4901),K=D(34),B=TypeError;H.exports=function(ie,O){var q,Y;if(O==="string"&&U(q=ie.toString)&&!K(Y=M(q,ie))||U(q=ie.valueOf)&&!K(Y=M(q,ie))||O!=="string"&&U(q=ie.toString)&&!K(Y=M(q,ie)))return Y;throw new B("Can't convert object to primitive value")}},5031:function(H,X,D){var M=D(7751),U=D(9504),K=D(8480),B=D(3717),ie=D(8551),O=U([].concat);H.exports=M("Reflect","ownKeys")||function(q){var Y=K.f(ie(q)),V=B.f;return V?O(Y,V(q)):Y}},8235:function(H,X,D){var M=D(9504),U=D(9297),K=SyntaxError,B=parseInt,ie=String.fromCharCode,O=M("".charAt),q=M("".slice),Y=M(/./.exec),V={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` +`)[0]}),F&&i.jsx("span",{className:"text-bambu-gray/50 shrink-0",children:A?i.jsx(Wl,{className:"w-3.5 h-3.5"}):i.jsx(zn,{className:"w-3.5 h-3.5"})})]})},j)})})}),i.jsx("div",{className:"flex items-center justify-between p-3 border-t border-bambu-dark-tertiary text-sm text-bambu-gray",children:m?i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Auto-refreshing every 2 seconds"]}):i.jsx("span",{children:"Click Start to enable live log streaming"})})]})]})}function Mnt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(2)} GB`}function Mi({icon:t,label:e,value:n,subValue:r,color:a="text-bambu-green"}){return i.jsxs("div",{className:"flex items-start gap-3 p-4 bg-bambu-dark rounded-lg",children:[i.jsx("div",{className:`p-2 rounded-lg bg-bambu-dark-tertiary ${a}`,children:i.jsx(t,{className:"w-5 h-5"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm text-bambu-gray",children:e}),i.jsx("p",{className:"text-lg font-semibold text-white truncate",children:n}),r&&i.jsx("p",{className:"text-xs text-bambu-gray mt-0.5",children:r})]})]})}function ZY({percent:t,color:e="bg-bambu-green"}){return i.jsx("div",{className:"w-full h-2 bg-bambu-dark rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full ${e} transition-all duration-300`,style:{width:`${Math.min(100,t)}%`}})})}function Zm({title:t,icon:e,children:n}){return i.jsxs(At,{className:"p-6",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[i.jsx(e,{className:"w-5 h-5 text-bambu-green"}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:t})]}),n]})}function Ent(){const{t}=jt(),e=cn(),[n,r]=w.useState(null),[a,s]=w.useState(!1),[o,l]=w.useState(!1),{data:c,isLoading:d,refetch:u,isFetching:m}=Je({queryKey:["systemInfo"],queryFn:fe.getSystemInfo,refetchInterval:3e4}),{data:p}=Je({queryKey:["debugLogging"],queryFn:Zb.getDebugLoggingState,staleTime:10*1e3,refetchInterval:10*1e3}),{data:f}=Je({queryKey:["settings"],queryFn:fe.getSettings}),{data:y}=Je({queryKey:["library-stats"],queryFn:fe.getLibraryStats}),v=f?.time_format||"system",b=async()=>{l(!0);try{const C=await Zb.setDebugLogging(!p?.enabled);e.setQueryData(["debugLogging"],C)}catch(C){console.error("Failed to toggle debug logging:",C)}finally{l(!1)}},g=async()=>{r(null),s(!0);try{await Zb.downloadSupportBundle()}catch(C){r(C instanceof Error?C.message:"Failed to download support bundle")}finally{s(!1)}};if(d)return i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx(ft,{className:"w-8 h-8 text-bambu-green animate-spin"})});if(!c)return i.jsx("div",{className:"p-6 text-center text-bambu-gray",children:t("system.failedToLoad","Failed to load system information")});const _=c.storage.disk_percent_used>90?"bg-red-500":c.storage.disk_percent_used>75?"bg-yellow-500":"bg-bambu-green",N=c.memory.percent_used>90?"bg-red-500":c.memory.percent_used>75?"bg-yellow-500":"bg-bambu-green";return i.jsxs("div",{className:"p-6 space-y-6",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-2xl font-bold text-white",children:t("system.title","System Information")}),i.jsx("p",{className:"text-bambu-gray mt-1",children:t("system.subtitle","Monitor system resources and database statistics")})]}),i.jsxs("button",{onClick:()=>u(),disabled:m,className:"flex items-center gap-2 px-4 py-2 bg-bambu-dark-secondary hover:bg-bambu-dark-tertiary rounded-lg transition-colors disabled:opacity-50",children:[i.jsx(vr,{className:`w-4 h-4 ${m?"animate-spin":""}`}),t("common.refresh","Refresh")]})]}),i.jsx(Zm,{title:t("system.application","Application"),icon:qp,children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx(Mi,{icon:qp,label:t("system.version","Version"),value:`v${c.app.version}`}),i.jsx(Mi,{icon:Zn,label:t("system.uptime","System Uptime"),value:c.system.uptime_formatted}),i.jsx(Mi,{icon:qp,label:t("system.hostname","Hostname"),value:c.system.hostname})]})}),i.jsx(Zm,{title:t("support.title","Support & Troubleshooting"),icon:Jfe,children:i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-sm text-bambu-gray",children:t("support.description","Enable debug logging to capture detailed information, then download a support bundle to share when reporting issues.")}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`p-2 rounded-lg ${p?.enabled?"bg-amber-500/20 text-amber-500":"bg-bambu-dark-tertiary text-bambu-gray"}`,children:i.jsx(px,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-white",children:t("support.debugLogging","Debug Logging")}),i.jsxs("p",{className:"text-sm text-bambu-gray",children:[p?.enabled?t("support.debugLoggingEnabled","Capturing detailed logs"):t("support.debugLoggingDisabled","Normal logging level"),p?.enabled&&p.duration_seconds!==null&&i.jsxs("span",{className:"text-amber-400 ml-2",children:["(",Math.floor(p.duration_seconds/60),"m ",p.duration_seconds%60,"s)"]})]})]})]}),i.jsxs("button",{onClick:b,disabled:o,className:`px-4 py-2 rounded-lg font-medium transition-colors flex items-center gap-2 ${p?.enabled?"bg-amber-500/20 text-amber-400 hover:bg-amber-500/30":"bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30"} disabled:opacity-50`,children:[o&&i.jsx(ft,{className:"w-4 h-4 animate-spin"}),p?.enabled?t("support.disableDebug","Disable"):t("support.enableDebug","Enable")]})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"p-2 rounded-lg bg-bambu-dark-tertiary text-bambu-green",children:i.jsx(fi,{className:"w-5 h-5"})}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-white",children:t("support.supportBundle","Support Bundle")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("support.supportBundleDescription","Download system info and logs as a ZIP file")})]})]}),i.jsxs("button",{onClick:g,disabled:a||!p?.enabled,className:"px-4 py-2 rounded-lg font-medium bg-bambu-green/20 text-bambu-green hover:bg-bambu-green/30 transition-colors flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed",title:p?.enabled?void 0:t("support.enableDebugFirst","Enable debug logging first"),children:[a&&i.jsx(ft,{className:"w-4 h-4 animate-spin"}),t("common.download","Download")]})]}),n&&i.jsx("div",{className:"p-3 bg-red-500/20 border border-red-500/30 rounded-lg text-red-400 text-sm",children:n}),!p?.enabled&&i.jsx("div",{className:"p-4 bg-bambu-dark-tertiary/50 rounded-lg",children:i.jsxs("p",{className:"text-sm text-bambu-gray",children:[i.jsx("span",{className:"text-amber-400 font-medium",children:t("support.instructions","To report an issue:")}),i.jsx("br",{}),"1. ",t("support.step1","Enable debug logging"),i.jsx("br",{}),"2. ",t("support.step2","Reproduce the issue"),i.jsx("br",{}),"3. ",t("support.step3","Download the support bundle"),i.jsx("br",{}),"4. ",t("support.step4","Attach the ZIP file to your issue report")]})}),i.jsxs("div",{className:"p-4 bg-bambu-dark rounded-lg space-y-3",children:[i.jsx("p",{className:"text-sm font-medium text-white",children:t("support.privacyTitle","What's in the support bundle?")}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-bambu-green font-medium mb-1",children:t("support.collected","Collected:")}),i.jsxs("ul",{className:"text-bambu-gray space-y-0.5",children:[i.jsxs("li",{children:["• ",t("support.collectItem1","App version and debug mode")]}),i.jsxs("li",{children:["• ",t("support.collectItem2","OS, architecture, Python version")]}),i.jsxs("li",{children:["• ",t("support.collectItem3","Database statistics (counts only)")]}),i.jsxs("li",{children:["• ",t("support.collectItem4","Printer models and nozzle counts")]}),i.jsxs("li",{children:["• ",t("support.collectItem5","Non-sensitive settings (themes, formats)")]}),i.jsxs("li",{children:["• ",t("support.collectItem6","Debug logs (sanitized)")]}),i.jsxs("li",{children:["• ",t("support.collectItem7","Printer connectivity and firmware versions")]}),i.jsxs("li",{children:["• ",t("support.collectItem8","Integration status (Spoolman, MQTT, HA)")]}),i.jsxs("li",{children:["• ",t("support.collectItem9","Network interfaces (subnets only)")]}),i.jsxs("li",{children:["• ",t("support.collectItem10","Python package versions")]}),i.jsxs("li",{children:["• ",t("support.collectItem11","Database health checks")]}),i.jsxs("li",{children:["• ",t("support.collectItem12","Docker environment details")]})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-red-400 font-medium mb-1",children:t("support.notCollected","NOT collected:")}),i.jsxs("ul",{className:"text-bambu-gray space-y-0.5",children:[i.jsxs("li",{children:["• ",t("support.notItem1","Printer names and serial numbers")]}),i.jsxs("li",{children:["• ",t("support.notItem2","Access codes and passwords")]}),i.jsxs("li",{children:["• ",t("support.notItem3","Email addresses")]}),i.jsxs("li",{children:["• ",t("support.notItem4","API keys and tokens")]}),i.jsxs("li",{children:["• ",t("support.notItem5","Webhook URLs")]}),i.jsxs("li",{children:["• ",t("support.notItem6","Your hostname or username")]}),i.jsxs("li",{children:["• ",t("support.notItem7","IP addresses")]})]})]})]}),i.jsx("p",{className:"text-xs text-bambu-gray/70",children:t("support.privacyNote","Email addresses in logs are replaced with [EMAIL], printer names with [PRINTER], serial numbers with [SERIAL], and IP addresses with [IP].")})]}),i.jsx(Pnt,{})]})}),i.jsxs(Zm,{title:t("system.database","Database"),icon:fd,children:[i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[i.jsx(Mi,{icon:Gs,label:t("system.totalArchives","Total Archives"),value:c.database.archives}),i.jsx(Mi,{icon:_c,label:t("system.completed","Completed"),value:c.database.archives_completed,color:"text-green-500"}),i.jsx(Mi,{icon:Ki,label:t("system.failed","Failed"),value:c.database.archives_failed,color:"text-red-500"}),i.jsx(Mi,{icon:ft,label:t("system.printing","Printing"),value:c.database.archives_printing,color:"text-yellow-500"})]}),i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[i.jsx(Mi,{icon:Nr,label:t("system.printers","Printers"),value:c.database.printers}),i.jsx(Mi,{icon:Nw,label:t("system.filaments","Filaments"),value:c.database.filaments}),i.jsx(Mi,{icon:Ns,label:t("system.projects","Projects"),value:c.database.projects}),i.jsx(Mi,{icon:Hl,label:t("system.smartPlugs","Smart Plugs"),value:c.database.smart_plugs})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[i.jsx(Mi,{icon:Zn,label:t("system.totalPrintTime","Total Print Time"),value:c.database.total_print_time_formatted}),i.jsx(Mi,{icon:Gs,label:t("system.totalFilament","Total Filament Used"),value:`${c.database.total_filament_kg} kg`,subValue:`${c.database.total_filament_grams.toLocaleString()} g`})]})]}),i.jsxs(Zm,{title:t("system.connectedPrinters","Connected Printers"),icon:Nr,children:[i.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[i.jsx("div",{className:"text-3xl font-bold text-bambu-green",children:c.printers.connected}),i.jsx("div",{className:"text-bambu-gray",children:t("system.ofTotal","of {{total}} printers connected",{total:c.printers.total})})]}),c.printers.connected_list.length>0?i.jsx("div",{className:"space-y-2",children:c.printers.connected_list.map(C=>i.jsxs("div",{className:"flex items-center justify-between p-3 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-2 h-2 rounded-full bg-bambu-green"}),i.jsx("span",{className:"font-medium text-white",children:C.name})]}),i.jsxs("div",{className:"flex items-center gap-4 text-sm text-bambu-gray",children:[i.jsx("span",{children:C.model}),i.jsx("span",{className:`px-2 py-0.5 rounded ${C.state==="RUNNING"?"bg-bambu-green/20 text-bambu-green":C.state==="IDLE"?"bg-blue-500/20 text-blue-400":"bg-bambu-dark-tertiary"}`,children:C.state})]})]},C.id))}):i.jsx("p",{className:"text-bambu-gray",children:t("system.noPrintersConnected","No printers connected")})]}),i.jsx(Zm,{title:t("system.storage","Storage"),icon:Kx,children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-bambu-gray",children:t("system.diskUsage","Disk Usage")}),i.jsxs("span",{className:"text-white",children:[c.storage.disk_used_formatted," / ",c.storage.disk_total_formatted]})]}),i.jsx(ZY,{percent:c.storage.disk_percent_used,color:_}),i.jsxs("p",{className:"text-xs text-bambu-gray mt-1",children:[c.storage.disk_free_formatted," ",t("system.free","free")," (",(100-c.storage.disk_percent_used).toFixed(1),"%)"]})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[i.jsx(Mi,{icon:Gs,label:t("system.archiveStorage","Archive Storage"),value:c.storage.archive_size_formatted}),i.jsx(Mi,{icon:fd,label:t("system.databaseSize","Database Size"),value:c.storage.database_size_formatted}),y&&i.jsx(Mi,{icon:Ec,label:t("system.fileManagerStorage","File Manager"),value:Mnt(y.total_size_bytes),subValue:`${y.total_files} files, ${y.total_folders} folders`})]})]})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsx(Zm,{title:t("system.memory","Memory"),icon:Ege,children:i.jsx("div",{className:"space-y-4",children:i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[i.jsx("span",{className:"text-bambu-gray",children:t("system.memoryUsage","Memory Usage")}),i.jsxs("span",{className:"text-white",children:[c.memory.used_formatted," / ",c.memory.total_formatted]})]}),i.jsx(ZY,{percent:c.memory.percent_used,color:N}),i.jsxs("p",{className:"text-xs text-bambu-gray mt-1",children:[c.memory.available_formatted," ",t("system.available","available")]})]})})}),i.jsx(Zm,{title:t("system.cpu","CPU"),icon:g_,children:i.jsx("div",{className:"space-y-4",children:i.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[i.jsx(Mi,{icon:g_,label:t("system.cores","Cores"),value:c.cpu.count,subValue:`${c.cpu.count_logical} logical`}),i.jsx(Mi,{icon:g_,label:t("system.usage","Usage"),value:`${c.cpu.percent}%`})]})})})]}),i.jsx(Zm,{title:t("system.systemDetails","System Details"),icon:qp,children:i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[i.jsx(Mi,{icon:qp,label:t("system.os","Operating System"),value:c.system.platform,subValue:c.system.platform_release}),i.jsx(Mi,{icon:g_,label:t("system.architecture","Architecture"),value:c.system.architecture}),i.jsx(Mi,{icon:qp,label:t("system.python","Python"),value:c.system.python_version}),i.jsx(Mi,{icon:Zn,label:t("system.bootTime","Boot Time"),value:zf(c.system.boot_time,v)})]})})]})}function jnt(){const t=Mo(),{t:e}=jt(),{login:n}=kr(),{showToast:r}=pn(),{mode:a}=og(),[s,o]=w.useState(""),[l,c]=w.useState(""),[d,u]=w.useState(!1),[m,p]=w.useState(""),{data:f}=Je({queryKey:["advancedAuthStatus"],queryFn:()=>fe.getAdvancedAuthStatus()}),y=ht({mutationFn:()=>n(s,l),onSuccess:()=>{r(e("login.loginSuccess")),t("/")},onError:_=>{r(_.message||e("login.loginFailed"),"error")}}),v=ht({mutationFn:_=>fe.forgotPassword({email:_}),onSuccess:_=>{r(_.message,"success"),u(!1),p("")},onError:_=>{r(_.message,"error")}}),b=_=>{if(_.preventDefault(),!s||!l){r(e("login.enterCredentials"),"error");return}y.mutate()},g=_=>{if(_.preventDefault(),!m){r("Please enter your email address","error");return}v.mutate(m)};return i.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-bambu-dark p-4",children:[i.jsxs("div",{className:"max-w-md w-full space-y-8 p-8 bg-gradient-to-br from-bambu-card to-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary shadow-lg",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"flex items-center justify-center mb-6",children:i.jsx("img",{src:a==="dark"?"/img/bambuddy_logo_dark_transparent.png":"/img/bambuddy_logo_light.png",alt:"Bambuddy",className:"h-16"})}),i.jsx("h2",{className:"text-3xl font-bold text-white",children:e("login.title")}),i.jsx("p",{className:"mt-2 text-sm text-bambu-gray",children:e("login.subtitle")})]}),i.jsxs("form",{className:"mt-8 space-y-6",onSubmit:b,children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-white mb-2",children:f?.advanced_auth_enabled?e("login.usernameOrEmail")||"Username or Email":e("login.username")}),i.jsx("input",{id:"username",type:"text",required:!0,value:s,onChange:_=>o(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:f?.advanced_auth_enabled?e("login.usernameOrEmailPlaceholder")||"Enter your username or email":e("login.usernamePlaceholder"),autoComplete:"username"})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-white mb-2",children:e("login.password")}),i.jsx("input",{id:"password",type:"password",required:!0,value:l,onChange:_=>c(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("login.passwordPlaceholder"),autoComplete:"current-password"})]})]}),i.jsx("div",{children:i.jsx("button",{type:"submit",disabled:y.isPending,className:"w-full flex justify-center py-3 px-4 bg-bambu-green hover:bg-bambu-green-light text-white font-medium rounded-lg shadow-lg shadow-bambu-green/20 hover:shadow-bambu-green/30 focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:ring-offset-2 focus:ring-offset-bambu-dark-secondary transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-bambu-green",children:y.isPending?e("login.signingIn"):e("login.signIn")})}),f?.advanced_auth_enabled&&i.jsx("div",{className:"text-center",children:i.jsx("button",{type:"button",onClick:()=>u(!0),className:"text-sm text-bambu-gray hover:text-bambu-green transition-colors",children:e("login.forgotPassword")})})]})]}),d&&i.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",onClick:()=>u(!1),children:i.jsxs(At,{className:"w-full max-w-md",onClick:_=>_.stopPropagation(),children:[i.jsx(Hn,{children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(gx,{className:"w-5 h-5 text-bambu-green"}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:e("login.forgotPasswordTitle")})]}),i.jsx(Ie,{variant:"ghost",size:"sm",onClick:()=>{u(!1),p("")},children:i.jsx(qt,{className:"w-5 h-5"})})]})}),i.jsx(Et,{children:f?.advanced_auth_enabled?i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[i.jsx("p",{className:"text-bambu-gray text-sm",children:e("login.forgotPasswordEmailMessage")||"Enter your email address and we'll send you a new password."}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"forgot-email",className:"block text-sm font-medium text-white mb-2",children:e("login.emailAddress")||"Email Address"}),i.jsx("input",{id:"forgot-email",type:"email",required:!0,value:m,onChange:_=>p(_.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("login.emailPlaceholder")||"your.email@example.com"})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(Ie,{type:"button",variant:"secondary",className:"flex-1",onClick:()=>{u(!1),p("")},children:e("login.cancel")||"Cancel"}),i.jsx(Ie,{type:"submit",className:"flex-1",disabled:v.isPending,children:v.isPending?e("login.sending")||"Sending...":e("login.sendResetEmail")||"Send Reset Email"})]})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsx("p",{className:"text-bambu-gray",children:e("login.forgotPasswordMessage")}),i.jsxs("div",{className:"bg-bambu-dark rounded-lg p-4 space-y-2",children:[i.jsx("p",{className:"text-sm text-white font-medium",children:e("login.howToReset")}),i.jsxs("ol",{className:"text-sm text-bambu-gray space-y-1 list-decimal list-inside",children:[i.jsx("li",{children:e("login.resetStep1")}),i.jsx("li",{children:e("login.resetStep2")}),i.jsx("li",{children:e("login.resetStep3")}),i.jsx("li",{children:e("login.resetStep4")})]})]}),i.jsx(Ie,{variant:"secondary",className:"w-full",onClick:()=>u(!1),children:e("login.gotIt")})]})})]})})]})}function Dnt(){const t=Mo(),{t:e}=jt(),{showToast:n}=pn(),{mode:r}=og(),{refreshAuth:a}=kr(),[s,o]=w.useState(!1),[l,c]=w.useState(""),[d,u]=w.useState(""),[m,p]=w.useState(""),f=ht({mutationFn:()=>fe.setupAuth({auth_enabled:s,admin_username:s?l:void 0,admin_password:s?d:void 0}),onSuccess:async v=>{await a(),v.auth_enabled?v.admin_created?(n(e("setup.toast.authEnabledAdminCreated")),t("/login")):(n(e("setup.toast.authEnabledExistingAdmins")),t("/login")):(n(e("setup.toast.setupCompleted")),t("/"))},onError:v=>{n(v.message,"error")}}),y=v=>{if(v.preventDefault(),s&&(l||d)){if(!l||!d){n(e("setup.toast.enterBothCredentials"),"error");return}if(d!==m){n(e("setup.toast.passwordsDoNotMatch"),"error");return}if(d.length<6){n(e("setup.toast.passwordTooShort"),"error");return}}f.mutate()};return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-bambu-dark p-4",children:i.jsxs("div",{className:"max-w-md w-full space-y-8 p-8 bg-gradient-to-br from-bambu-card to-bambu-dark-secondary rounded-xl border border-bambu-dark-tertiary shadow-lg",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"flex items-center justify-center mb-6",children:i.jsx("img",{src:r==="dark"?"/img/bambuddy_logo_dark_transparent.png":"/img/bambuddy_logo_light.png",alt:"Bambuddy",className:"h-16"})}),i.jsx("h2",{className:"text-3xl font-bold text-white",children:e("setup.title")}),i.jsx("p",{className:"mt-2 text-sm text-bambu-gray",children:e("setup.subtitle")})]}),i.jsxs("form",{className:"mt-8 space-y-6",onSubmit:y,children:[i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center p-4 bg-bambu-dark-secondary/50 rounded-lg border border-bambu-dark-tertiary",children:[i.jsx("input",{id:"auth-enabled",type:"checkbox",checked:s,onChange:v=>o(v.target.checked),className:"h-4 w-4 text-bambu-green focus:ring-bambu-green border-bambu-dark-tertiary rounded bg-bambu-dark-secondary"}),i.jsx("label",{htmlFor:"auth-enabled",className:"ml-3 block text-sm font-medium text-white",children:e("setup.enableAuth")})]}),s&&i.jsxs("div",{className:"space-y-4 mt-4",children:[i.jsx("div",{className:"p-3 bg-bambu-dark-secondary/50 border border-bambu-dark-tertiary rounded-lg",children:i.jsxs("div",{className:"flex items-start gap-2",children:[i.jsx($s,{className:"w-4 h-4 text-bambu-green mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"text-sm text-bambu-gray",children:[i.jsx("p",{className:"text-white font-medium mb-1",children:e("setup.adminAccount")}),i.jsx("p",{children:e("setup.adminAccountDesc")})]})]})}),i.jsxs("div",{children:[i.jsxs("label",{htmlFor:"admin-username",className:"block text-sm font-medium text-white mb-2",children:[e("setup.adminUsername")," ",i.jsx("span",{className:"text-bambu-gray text-xs",children:e("setup.optionalIfAdminExists")})]}),i.jsx("input",{id:"admin-username",type:"text",value:l,onChange:v=>c(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.adminUsernamePlaceholder"),autoComplete:"username"})]}),i.jsxs("div",{children:[i.jsxs("label",{htmlFor:"admin-password",className:"block text-sm font-medium text-white mb-2",children:[e("setup.adminPassword")," ",i.jsx("span",{className:"text-bambu-gray text-xs",children:e("setup.optionalIfAdminExists")})]}),i.jsx("input",{id:"admin-password",type:"password",value:d,onChange:v=>u(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.adminPasswordPlaceholder"),minLength:6,autoComplete:"new-password"})]}),d&&i.jsxs("div",{children:[i.jsx("label",{htmlFor:"confirm-password",className:"block text-sm font-medium text-white mb-2",children:e("setup.confirmPassword")}),i.jsx("input",{id:"confirm-password",type:"password",value:m,onChange:v=>p(v.target.value),className:"block w-full px-4 py-3 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:border-bambu-green transition-colors",placeholder:e("setup.confirmPasswordPlaceholder"),minLength:6,autoComplete:"new-password"})]})]})]}),i.jsx("div",{children:i.jsx("button",{type:"submit",disabled:f.isPending,className:"w-full flex justify-center py-3 px-4 bg-bambu-green hover:bg-bambu-green-light text-white font-medium rounded-lg shadow-lg shadow-bambu-green/20 hover:shadow-bambu-green/30 focus:outline-none focus:ring-2 focus:ring-bambu-green/50 focus:ring-offset-2 focus:ring-offset-bambu-dark-secondary transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-bambu-green",children:f.isPending?e("setup.settingUp"):e("setup.completeSetup")})})]})]})})}function Fnt(){const{t}=jt(),{user:e}=kr(),{showToast:n}=pn(),r=cn(),a=Mo(),[s,o]=w.useState(!0),[l,c]=w.useState(!0),[d,u]=w.useState(!0),[m,p]=w.useState(!0),[f,y]=w.useState(!1),{data:v,isLoading:b}=Je({queryKey:["advancedAuthStatus"],queryFn:fe.getAdvancedAuthStatus,staleTime:300*1e3}),{data:g,isLoading:_}=Je({queryKey:["settings"],queryFn:fe.getSettings,staleTime:300*1e3}),{data:N,isLoading:C}=Je({queryKey:["user-email-preferences"],queryFn:()=>fe.getUserEmailPreferences()});w.useEffect(()=>{(v&&!v.advanced_auth_enabled||g&&!g.user_notifications_enabled)&&a("/settings",{replace:!0})},[v,g,a]),w.useEffect(()=>{N&&(o(N.notify_print_start),c(N.notify_print_complete),u(N.notify_print_failed),p(N.notify_print_stopped),y(!1))},[N]);const k=ht({mutationFn:()=>fe.updateUserEmailPreferences({notify_print_start:s,notify_print_complete:l,notify_print_failed:d,notify_print_stopped:m}),onSuccess:()=>{r.invalidateQueries({queryKey:["user-email-preferences"]}),y(!1),n(t("notifications.userEmail.saveSuccess"),"success")},onError:T=>{n(T.message||t("notifications.userEmail.saveError"),"error")}}),P=(T,j)=>{T(!j),y(!0)};return C||b||_?i.jsx("div",{className:"flex items-center justify-center h-64",children:i.jsx(ft,{className:"w-8 h-8 animate-spin text-bambu-green"})}):i.jsxs("div",{className:"p-4 md:p-6 max-w-2xl mx-auto",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx(Ah,{className:"w-7 h-7 text-bambu-green"}),i.jsx("h1",{className:"text-2xl font-bold text-white",children:t("notifications.userEmail.title")})]}),i.jsx(At,{className:"mb-6 border-blue-500/30 bg-blue-500/5",children:i.jsx(Et,{className:"py-4",children:i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center bg-blue-500/20 flex-shrink-0",children:i.jsx(gx,{className:"w-5 h-5 text-blue-400"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"text-white font-medium",children:t("notifications.userEmail.emailNotifications")}),i.jsx("p",{className:"text-sm text-bambu-gray mt-1",children:t("notifications.userEmail.emailNotificationsDesc")}),e?.email?i.jsxs("p",{className:"text-sm text-blue-400 mt-2",children:[t("notifications.userEmail.sendingTo"),": ",i.jsx("strong",{children:e.email})]}):i.jsx("p",{className:"text-sm text-yellow-400 mt-2",children:t("notifications.userEmail.noEmailWarning")})]})]})})}),i.jsxs(At,{className:"mb-6",children:[i.jsxs(Hn,{children:[i.jsx("h2",{className:"text-lg font-semibold text-white",children:t("notifications.userEmail.printJobNotifications")}),i.jsx("p",{className:"text-sm text-bambu-gray mt-1",children:t("notifications.userEmail.printJobNotificationsDesc")})]}),i.jsxs(Et,{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${s?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${s?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobStarts")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobStartsDesc")})]})]}),i.jsx("button",{onClick:()=>P(o,s),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${s?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":s,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${s?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${l?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${l?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobFinishes")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobFinishesDesc")})]})]}),i.jsx("button",{onClick:()=>P(c,l),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${l?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":l,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${l?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${d?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${d?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printErrors")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printErrorsDesc")})]})]}),i.jsx("button",{onClick:()=>P(u,d),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${d?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":d,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${d?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex items-center justify-between p-4 bg-bambu-dark rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${m?"bg-bambu-green/20":"bg-bambu-dark-tertiary"}`,children:i.jsx(_c,{className:`w-5 h-5 ${m?"text-bambu-green":"text-bambu-gray"}`})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:t("notifications.userEmail.printJobStops")}),i.jsx("p",{className:"text-sm text-bambu-gray",children:t("notifications.userEmail.printJobStopsDesc")})]})]}),i.jsx("button",{onClick:()=>P(p,m),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-bambu-green focus:ring-offset-2 focus:ring-offset-bambu-dark ${m?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,role:"switch","aria-checked":m,children:i.jsx("span",{className:`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${m?"translate-x-6":"translate-x-1"}`})})]})]})]}),i.jsx("div",{className:"flex justify-end",children:i.jsx(Ie,{onClick:()=>k.mutate(),disabled:!f||k.isPending||!e?.email,children:k.isPending?i.jsxs(i.Fragment,{children:[i.jsx(ft,{className:"w-4 h-4 animate-spin"}),t("common.saving")]}):i.jsxs(i.Fragment,{children:[i.jsx(ss,{className:"w-4 h-4"}),t("common.save")]})})})]})}function Rnt(){const t=w.useRef(null),e=w.useRef(null),n=cn(),[r,a]=w.useState(!1),s=w.useRef(new Map),{showToast:o}=pn(),{t:l}=jt(),c=w.useRef(new Set),d=w.useRef(null),u=w.useRef(new Map),m=w.useRef(null),p=w.useRef([]),f=w.useRef(!1),y=w.useRef(()=>{}),v=w.useCallback(()=>{if(f.current||p.current.length===0)return;f.current=!0;const k=()=>{const P=p.current.shift();P?requestAnimationFrame(()=>{y.current(P),p.current.length>0?setTimeout(k,16):f.current=!1}):f.current=!1};k()},[]),b=w.useCallback(()=>{if(t.current?.readyState===WebSocket.OPEN)return;const P=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`,T=new WebSocket(P);let j=null;T.onopen=()=>{console.log("[WebSocket] Connected"),a(!0),j=window.setInterval(()=>{T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:"ping"}))},3e4)},T.onmessage=A=>{try{const F=JSON.parse(A.data);F.type==="printer_status"&&F.printer_id!==void 0&&F.data?y.current(F):(p.current.push(F),v())}catch{}},T.onclose=A=>{console.log("[WebSocket] Closed",A.code,A.reason),j&&(clearInterval(j),j=null),a(!1),t.current=null,e.current=window.setTimeout(()=>{b()},3e3)},T.onerror=A=>{console.error("[WebSocket] Error",A),T.close()},t.current=T},[v]),g=w.useCallback((k,P)=>{const T=u.current.get(k)||{};u.current.set(k,{...T,...P}),m.current||(m.current=window.setTimeout(()=>{const j=new Map(u.current);u.current.clear(),m.current=null,requestAnimationFrame(()=>{j.forEach((A,F)=>{n.setQueryData(["printerStatus",F],G=>{const z={...G,...A};return z.wifi_signal==null&&G?.wifi_signal!=null&&(z.wifi_signal=G.wifi_signal),z})})})},100))},[n]),_=w.useCallback(k=>{c.current.add(k),d.current&&clearTimeout(d.current),d.current=window.setTimeout(()=>{const P=Array.from(c.current);c.current.clear(),d.current=null;let T=0;P.forEach(j=>{setTimeout(()=>{requestAnimationFrame(()=>{n.invalidateQueries({queryKey:[j]})})},T),T+=500})},3e3)},[n]),N=w.useCallback(k=>{switch(k.type){case"printer_status":k.printer_id!==void 0&&k.data&&g(k.printer_id,k.data);break;case"print_start":k.printer_id!==void 0&&n.invalidateQueries({queryKey:["printerStatus",k.printer_id]});break;case"missing_spool_assignment":{if(k.printer_id===void 0||!Array.isArray(k.missing_slots))break;const P=k.missing_slots.map(F=>F&&typeof F.slot=="string"?F.slot:"Unknown").filter(F=>F.length>0);if(P.length===0){s.current.delete(k.printer_id);break}const T=P.join("|");if(s.current.get(k.printer_id)===T)break;s.current.set(k.printer_id,T);const j=k.printer_name||`Printer ${k.printer_id}`,A=l("printers.toast.missingSpoolAssignment",{printer:j,slots:P.join(", ")});o(A,"warning");break}case"print_complete":_("archives"),_("archiveStats");break;case"archive_created":_("archives"),_("archiveStats");break;case"archive_updated":_("archives");break;case"pong":break;case"plate_not_empty":window.dispatchEvent(new CustomEvent("plate-not-empty",{detail:{printer_id:k.printer_id,printer_name:k.printer_name,message:k.message}}));break;case"spool_assignment_changed":_("spool-assignments"),_("slotPresets");break;case"spool_auto_assigned":_("inventory-spools"),_("spool-assignments");break;case"spool_usage_logged":_("inventory-spools");break;case"unknown_tag":window.dispatchEvent(new CustomEvent("unknown-tag",{detail:{printer_id:k.printer_id,ams_id:k.ams_id,tray_id:k.tray_id,tag_uid:k.tag_uid,tray_uuid:k.tray_uuid}}));break;case"background_dispatch":window.dispatchEvent(new CustomEvent("background-dispatch",{detail:k.data||{}}));break;case"spoolbuddy_weight":window.dispatchEvent(new CustomEvent("spoolbuddy-weight",{detail:k}));break;case"spoolbuddy_tag_matched":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-matched",{detail:k})),_("inventory-spools");break;case"spoolbuddy_unknown_tag":window.dispatchEvent(new CustomEvent("spoolbuddy-unknown-tag",{detail:k}));break;case"spoolbuddy_tag_removed":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-removed",{detail:k}));break;case"spoolbuddy_tag_written":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-written",{detail:k})),_("inventory-spools");break;case"spoolbuddy_tag_write_failed":window.dispatchEvent(new CustomEvent("spoolbuddy-tag-write-failed",{detail:k}));break;case"spoolbuddy_online":window.dispatchEvent(new CustomEvent("spoolbuddy-online",{detail:k})),_("spoolbuddy-devices"),_("spoolbuddy-update-check");break;case"spoolbuddy_offline":window.dispatchEvent(new CustomEvent("spoolbuddy-offline",{detail:k})),_("spoolbuddy-devices");break;case"spoolbuddy_update":_("spoolbuddy-devices"),_("spoolbuddy-update-check");break}},[n,_,g,o,l]);w.useEffect(()=>{y.current=N},[N]),w.useEffect(()=>(b(),()=>{e.current&&clearTimeout(e.current),d.current&&clearTimeout(d.current),m.current&&clearTimeout(m.current),t.current&&t.current.close()}),[b]);const C=w.useCallback(k=>{t.current?.readyState===WebSocket.OPEN&&t.current.send(JSON.stringify(k))},[]);return{isConnected:r,sendMessage:C}}function Lnt(){const{authEnabled:t}=kr(),{data:e}=Je({queryKey:["camera-stream-token"],queryFn:()=>fe.getCameraStreamToken(),enabled:t,staleTime:3e3*1e3,refetchInterval:3e3*1e3});w.useEffect(()=>(o6(e?.token??null),()=>o6(null)),[e?.token])}function Ont({selectedPrinterId:t,onPrinterChange:e,deviceOnline:n}){const{t:r}=jt(),[a,s]=w.useState(new Date),{data:o=[]}=Je({queryKey:["printers"],queryFn:()=>fe.getPrinters()}),l=tp({queries:o.map(u=>({queryKey:["printerStatus",u.id],queryFn:()=>fe.getPrinterStatus(u.id),refetchInterval:1e4}))}),c=w.useMemo(()=>o.filter((u,m)=>l[m]?.data?.connected),[o,l]);w.useEffect(()=>{const u=c.some(m=>m.id===t);(!t||!u)&&c.length>0&&e(c[0].id)},[c,t,e]);const{data:d}=Je({queryKey:["settings"],queryFn:fe.getSettings});return w.useEffect(()=>{const u=setInterval(()=>s(new Date),1e3);return()=>clearInterval(u)},[]),i.jsxs("div",{className:"h-12 bg-bambu-dark-secondary border-b border-bambu-dark-tertiary flex items-center px-3 gap-4 shrink-0",children:[i.jsx("div",{className:"flex items-center shrink-0",children:i.jsx("img",{src:"/img/spoolbuddy_logo_dark_small.png",alt:"SpoolBuddy",width:113,height:28,className:"h-7 w-auto"})}),i.jsx("div",{className:"flex-1 flex justify-center",children:i.jsx("select",{value:t??"",onChange:u=>e(Number(u.target.value)),className:"bg-bambu-dark text-white text-base px-4 py-2 rounded border border-bambu-dark-tertiary focus:outline-none focus:border-bambu-green min-w-[180px]",children:c.length===0?i.jsx("option",{value:"",children:r("spoolbuddy.status.noPrinters","No printers online")}):c.map(u=>i.jsx("option",{value:u.id,children:u.name},u.id))})}),i.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[i.jsx("div",{className:"flex items-center",title:n?r("spoolbuddy.status.backend","Backend"):r("spoolbuddy.status.offline","Offline"),children:n?i.jsx("div",{className:"flex items-end gap-0.5 h-4",children:[1,2,3,4].map(u=>i.jsx("div",{className:`w-1 rounded-sm ${u<=4?"bg-white":"bg-bambu-dark-tertiary"}`,style:{height:`${u*4}px`}},u))}):i.jsx(qh,{className:"w-5 h-5 text-red-400"})}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("div",{className:`w-3 h-3 rounded-full ${n?"bg-bambu-green shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-bambu-gray"}`}),i.jsx("span",{className:"text-sm text-white/50",children:n?r("spoolbuddy.status.backend","Backend"):r("spoolbuddy.status.offline","Offline")})]}),i.jsx("span",{className:"text-white/50 text-base font-mono min-w-[50px] text-right",children:kQ(a,d?.time_format||"system")})]})]})}const Int=[{to:"/spoolbuddy",labelKey:"spoolbuddy.nav.dashboard",fallback:"Dashboard",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})},{to:"/spoolbuddy/ams",labelKey:"spoolbuddy.nav.ams",fallback:"AMS",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})},{to:"/spoolbuddy/write-tag",labelKey:"spoolbuddy.nav.writeTag",fallback:"Write",icon:i.jsxs("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.288 15.038a5.25 5.25 0 017.424 0M5.106 11.856c3.807-3.808 9.98-3.808 13.788 0M1.924 8.674c5.565-5.565 14.587-5.565 20.152 0"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12.53 18.22l-.53.53-.53-.53a.75.75 0 011.06 0z"})]})},{to:"/spoolbuddy/inventory",labelKey:"spoolbuddy.nav.inventory",fallback:"Inventory",icon:i.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})})},{to:"/spoolbuddy/settings",labelKey:"spoolbuddy.nav.settings",fallback:"Settings",icon:i.jsxs("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}];function znt(){const{t}=jt();return i.jsx("nav",{className:"h-14 bg-bambu-dark-secondary border-t border-bambu-dark-tertiary flex items-stretch shrink-0",children:Int.map(e=>i.jsxs(Hb,{to:e.to,end:e.to==="/spoolbuddy",className:({isActive:n})=>`flex-1 flex flex-col items-center justify-center gap-1 transition-colors ${n?"text-bambu-green bg-bambu-dark":"text-white/50 hover:text-white/70 hover:bg-bambu-dark-tertiary"}`,children:[e.icon,i.jsx("span",{className:"text-xs font-medium",children:t(e.labelKey,e.fallback)})]},e.to))})}function Unt({alert:t}){const{t:e}=jt(),n=t?t.type==="error"?"bg-red-500":t.type==="warning"?"bg-amber-500":"bg-bambu-green":"bg-bambu-green",r=t?t.type==="error"?"border-red-500":t.type==="warning"?"border-amber-500":"border-bambu-dark-tertiary":"border-bambu-dark-tertiary";return i.jsxs("div",{className:`h-9 bg-bambu-dark-secondary border-t-2 ${r} flex items-center px-3 gap-3 shrink-0`,children:[i.jsx("div",{className:`w-3.5 h-3.5 rounded-full ${n}`}),i.jsx("div",{className:"flex-1 text-sm text-white/50 truncate",children:t?i.jsx("span",{children:t.message}):i.jsx("span",{className:"text-bambu-green",children:e("spoolbuddy.status.systemReady","System Ready")})})]})}const Bnt={weight:null,weightStable:!1,rawAdc:null,matchedSpool:null,unknownTagUid:null,deviceOnline:!1,deviceId:null};function Hnt(t,e){switch(e.type){case"WEIGHT_UPDATE":return{...t,weight:e.weight,weightStable:e.stable,rawAdc:e.rawAdc,deviceId:e.deviceId,deviceOnline:!0};case"TAG_MATCHED":return{...t,matchedSpool:e.spool,unknownTagUid:null,deviceId:e.deviceId};case"UNKNOWN_TAG":return{...t,matchedSpool:null,unknownTagUid:e.tagUid,deviceId:e.deviceId};case"TAG_REMOVED":return{...t,matchedSpool:null,unknownTagUid:null};case"DEVICE_ONLINE":return{...t,deviceOnline:!0,deviceId:e.deviceId};case"DEVICE_OFFLINE":return{...t,deviceOnline:!1,weight:null,weightStable:!1,rawAdc:null};default:return t}}function $nt(){const[t,e]=w.useReducer(Hnt,Bnt),n=w.useCallback(u=>{const m=u.detail;e({type:"WEIGHT_UPDATE",weight:m.weight_grams??m.data?.weight_grams,stable:m.stable??m.data?.stable??!1,rawAdc:m.raw_adc??m.data?.raw_adc??null,deviceId:m.device_id??m.data?.device_id??""})},[]),r=w.useCallback(u=>{const m=u.detail,p=m.spool??m.data?.spool;p&&e({type:"TAG_MATCHED",spool:{id:p.id,tag_uid:m.tag_uid??m.data?.tag_uid??"",material:p.material??"",subtype:p.subtype??null,color_name:p.color_name??null,rgba:p.rgba??null,brand:p.brand??null,label_weight:p.label_weight??0,core_weight:p.core_weight??0,weight_used:p.weight_used??0},deviceId:m.device_id??m.data?.device_id??""})},[]),a=w.useCallback(u=>{const m=u.detail;e({type:"UNKNOWN_TAG",tagUid:m.tag_uid??m.data?.tag_uid??"",deviceId:m.device_id??m.data?.device_id??""})},[]),s=w.useCallback(u=>{const m=u.detail;e({type:"TAG_REMOVED",deviceId:m.device_id??m.data?.device_id??""})},[]),o=w.useCallback(u=>{const m=u.detail;e({type:"DEVICE_ONLINE",deviceId:m.device_id??m.data?.device_id??""})},[]),l=w.useCallback(u=>{const m=u.detail;e({type:"DEVICE_OFFLINE",deviceId:m.device_id??m.data?.device_id??""})},[]);w.useEffect(()=>(window.addEventListener("spoolbuddy-weight",n),window.addEventListener("spoolbuddy-tag-matched",r),window.addEventListener("spoolbuddy-unknown-tag",a),window.addEventListener("spoolbuddy-tag-removed",s),window.addEventListener("spoolbuddy-online",o),window.addEventListener("spoolbuddy-offline",l),()=>{window.removeEventListener("spoolbuddy-weight",n),window.removeEventListener("spoolbuddy-tag-matched",r),window.removeEventListener("spoolbuddy-unknown-tag",a),window.removeEventListener("spoolbuddy-tag-removed",s),window.removeEventListener("spoolbuddy-online",o),window.removeEventListener("spoolbuddy-offline",l)}),[n,r,a,s,o,l]);const c=t.matchedSpool?Math.max(0,t.matchedSpool.label_weight-t.matchedSpool.weight_used):null,d=t.weight!==null&&t.matchedSpool?Math.max(0,t.weight-t.matchedSpool.core_weight):null;return{...t,remainingWeight:c,netWeight:d}}var DN={exports:{}};var qnt=DN.exports,JY;function Vnt(){return JY||(JY=1,(function(t,e){(function(n,r){t.exports=r(ag())})(qnt,(function(n){return(function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&(function(l){if("Element"in l){var c="classList",d="prototype",u=l.Element[d],m=Object,p=String[d].trim||function(){return this.replace(/^\s+|\s+$/g,"")},f=Array[d].indexOf||function(C){for(var k=0,P=this.length;k1?arguments[1]:void 0)}},7916:function(H,X,D){var M=D(6080),U=D(9565),K=D(8981),B=D(6319),ie=D(4209),O=D(3517),q=D(6198),Y=D(4659),V=D(4527),ee=D(81),oe=D(851),he=Array;H.exports=function(pe){var re=K(pe),L=O(this),R=arguments.length,ne=R>1?arguments[1]:void 0,ye=ne!==void 0;ye&&(ne=M(ne,R>2?arguments[2]:void 0));var ve,be,Be,we,Ae,Le,Ee=oe(re),_e=0;if(!Ee||this===he&&ie(Ee))for(ve=q(re),be=L?new this(ve):he(ve);ve>_e;_e++)Le=ye?ne(re[_e],_e):re[_e],Y(be,_e,Le);else for(be=L?new this:[],Ae=(we=ee(re,Ee)).next;!(Be=U(Ae,we)).done;_e++)Le=ye?B(we,ne,[Be.value,_e],!0):Be.value,Y(be,_e,Le);return V(be,_e),be}},9617:function(H,X,D){var M=D(5397),U=D(5610),K=D(6198),B=function(ie){return function(O,q,Y){var V=M(O),ee=K(V);if(ee===0)return!ie&&-1;var oe,he=U(Y,ee);if(ie&&q!=q){for(;ee>he;)if((oe=V[he++])!=oe)return!0}else for(;ee>he;he++)if((ie||he in V)&&V[he]===q)return ie||he||0;return!ie&&-1}};H.exports={includes:B(!0),indexOf:B(!1)}},9213:function(H,X,D){var M=D(6080),U=D(7055),K=D(8981),B=D(6198),ie=D(1469),O=D(4659),q=function(Y){var V=Y===1,ee=Y===2,oe=Y===3,he=Y===4,pe=Y===6,re=Y===7,L=Y===5||pe;return function(R,ne,ye){for(var ve,be,Be=K(R),we=U(Be),Ae=B(we),Le=M(ne,ye),Ee=0,_e=0,Me=V?ie(R,Ae):ee||re?ie(R,0):void 0;Ae>Ee;Ee++)if((L||Ee in we)&&(be=Le(ve=we[Ee],Ee,Be),Y))if(V)O(Me,Ee,be);else if(be)switch(Y){case 3:return!0;case 5:return ve;case 6:return Ee;case 2:O(Me,_e++,ve)}else switch(Y){case 4:return!1;case 7:O(Me,_e++,ve)}return pe?-1:oe||he?he:Me}};H.exports={forEach:q(0),map:q(1),filter:q(2),some:q(3),every:q(4),find:q(5),findIndex:q(6),filterReject:q(7)}},597:function(H,X,D){var M=D(9039),U=D(8227),K=D(9519),B=U("species");H.exports=function(ie){return K>=51||!M((function(){var O=[];return(O.constructor={})[B]=function(){return{foo:1}},O[ie](Boolean).foo!==1}))}},4598:function(H,X,D){var M=D(9039);H.exports=function(U,K){var B=[][U];return!!B&&M((function(){B.call(null,K||function(){return 1},1)}))}},926:function(H,X,D){var M=D(9306),U=D(8981),K=D(7055),B=D(6198),ie=TypeError,O="Reduce of empty array with no initial value",q=function(Y){return function(V,ee,oe,he){var pe=U(V),re=K(pe),L=B(pe);if(M(ee),L===0&&oe<2)throw new ie(O);var R=Y?L-1:0,ne=Y?-1:1;if(oe<2)for(;;){if(R in re){he=re[R],R+=ne;break}if(R+=ne,Y?R<0:L<=R)throw new ie(O)}for(;Y?R>=0:L>R;R+=ne)R in re&&(he=ee(he,re[R],R,pe));return he}};H.exports={left:q(!1),right:q(!0)}},4527:function(H,X,D){var M=D(3724),U=D(4376),K=TypeError,B=Object.getOwnPropertyDescriptor,ie=M&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(O){return O instanceof TypeError}})();H.exports=ie?function(O,q){if(U(O)&&!B(O,"length").writable)throw new K("Cannot set read only .length");return O.length=q}:function(O,q){return O.length=q}},7680:function(H,X,D){var M=D(9504);H.exports=M([].slice)},4488:function(H,X,D){var M=D(7680),U=Math.floor,K=function(B,ie){var O=B.length;if(O<8)for(var q,Y,V=1;V0;)B[Y]=B[--Y];Y!==V++&&(B[Y]=q)}else for(var ee=U(O/2),oe=K(M(B,0,ee),ie),he=K(M(B,ee),ie),pe=oe.length,re=he.length,L=0,R=0;L9007199254740991)throw X("Maximum allowed index exceeded");return D}},7400:function(H){H.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(H,X,D){var M=D(4055)("span").classList,U=M&&M.constructor&&M.constructor.prototype;H.exports=U===Object.prototype?void 0:U},8727:function(H){H.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3709:function(H,X,D){var M=D(2839).match(/firefox\/(\d+)/i);H.exports=!!M&&+M[1]},3763:function(H,X,D){var M=D(2839);H.exports=/MSIE|Trident/.test(M)},6193:function(H,X,D){var M=D(4215);H.exports=M==="NODE"},2839:function(H,X,D){var M=D(4576).navigator,U=M&&M.userAgent;H.exports=U?String(U):""},9519:function(H,X,D){var M,U,K=D(4576),B=D(2839),ie=K.process,O=K.Deno,q=ie&&ie.versions||O&&O.version,Y=q&&q.v8;Y&&(U=(M=Y.split("."))[0]>0&&M[0]<4?1:+(M[0]+M[1])),!U&&B&&(!(M=B.match(/Edge\/(\d+)/))||M[1]>=74)&&(M=B.match(/Chrome\/(\d+)/))&&(U=+M[1]),H.exports=U},3607:function(H,X,D){var M=D(2839).match(/AppleWebKit\/(\d+)\./);H.exports=!!M&&+M[1]},4215:function(H,X,D){var M=D(4576),U=D(2839),K=D(2195),B=function(ie){return U.slice(0,ie.length)===ie};H.exports=B("Bun/")?"BUN":B("Cloudflare-Workers")?"CLOUDFLARE":B("Deno/")?"DENO":B("Node.js/")?"NODE":M.Bun&&typeof Bun.version=="string"?"BUN":M.Deno&&typeof Deno.version=="object"?"DENO":K(M.process)==="process"?"NODE":M.window&&M.document?"BROWSER":"REST"},6518:function(H,X,D){var M=D(4576),U=D(7347).f,K=D(6699),B=D(6840),ie=D(9433),O=D(7740),q=D(2796);H.exports=function(Y,V){var ee,oe,he,pe,re,L=Y.target,R=Y.global,ne=Y.stat;if(ee=R?M:ne?M[L]||ie(L,{}):M[L]&&M[L].prototype)for(oe in V){if(pe=V[oe],he=Y.dontCallGetSet?(re=U(ee,oe))&&re.value:ee[oe],!q(R?oe:L+(ne?".":"#")+oe,Y.forced)&&he!==void 0){if(typeof pe==typeof he)continue;O(pe,he)}(Y.sham||he&&he.sham)&&K(pe,"sham",!0),B(ee,oe,pe,Y)}}},9039:function(H){H.exports=function(X){try{return!!X()}catch{return!0}}},9228:function(H,X,D){D(7495);var M=D(9565),U=D(6840),K=D(7323),B=D(9039),ie=D(8227),O=D(6699),q=ie("species"),Y=RegExp.prototype;H.exports=function(V,ee,oe,he){var pe=ie(V),re=!B((function(){var ye={};return ye[pe]=function(){return 7},""[V](ye)!==7})),L=re&&!B((function(){var ye=!1,ve=/a/;if(V==="split"){var be={};be[q]=function(){return ve},(ve={constructor:be,flags:""})[pe]=/./[pe]}return ve.exec=function(){return ye=!0,null},ve[pe](""),!ye}));if(!re||!L||oe){var R=/./[pe],ne=ee(pe,""[V],(function(ye,ve,be,Be,we){var Ae=ve.exec;return Ae===K||Ae===Y.exec?re&&!we?{done:!0,value:M(R,ve,be,Be)}:{done:!0,value:M(ye,be,ve,Be)}:{done:!1}}));U(String.prototype,V,ne[0]),U(Y,pe,ne[1])}he&&O(Y[pe],"sham",!0)}},8745:function(H,X,D){var M=D(616),U=Function.prototype,K=U.apply,B=U.call;H.exports=typeof Reflect=="object"&&Reflect.apply||(M?B.bind(K):function(){return B.apply(K,arguments)})},6080:function(H,X,D){var M=D(7476),U=D(9306),K=D(616),B=M(M.bind);H.exports=function(ie,O){return U(ie),O===void 0?ie:K?B(ie,O):function(){return ie.apply(O,arguments)}}},616:function(H,X,D){var M=D(9039);H.exports=!M((function(){var U=(function(){}).bind();return typeof U!="function"||U.hasOwnProperty("prototype")}))},566:function(H,X,D){var M=D(9504),U=D(9306),K=D(34),B=D(9297),ie=D(7680),O=D(616),q=Function,Y=M([].concat),V=M([].join),ee={};H.exports=O?q.bind:function(oe){var he=U(this),pe=he.prototype,re=ie(arguments,1),L=function(){var R=Y(re,ie(arguments));return this instanceof L?(function(ne,ye,ve){if(!B(ee,ye)){for(var be=[],Be=0;Be]*>)/g,Y=/\$([$&'`]|\d{1,2})/g;H.exports=function(V,ee,oe,he,pe,re){var L=oe+V.length,R=he.length,ne=Y;return pe!==void 0&&(pe=U(pe),ne=q),ie(re,ne,(function(ye,ve){var be;switch(B(ve,0)){case"$":return"$";case"&":return V;case"`":return O(ee,0,oe);case"'":return O(ee,L);case"<":be=pe[O(ve,1,-1)];break;default:var Be=+ve;if(Be===0)return ye;if(Be>R){var we=K(Be/10);return we===0?ye:we<=R?he[we-1]===void 0?B(ve,1):he[we-1]+B(ve,1):ye}be=he[Be-1]}return be===void 0?"":be}))}},4576:function(H,X,D){var M=function(U){return U&&U.Math===Math&&U};H.exports=M(typeof globalThis=="object"&&globalThis)||M(typeof window=="object"&&window)||M(typeof self=="object"&&self)||M(typeof D.g=="object"&&D.g)||M(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},9297:function(H,X,D){var M=D(9504),U=D(8981),K=M({}.hasOwnProperty);H.exports=Object.hasOwn||function(B,ie){return K(U(B),ie)}},421:function(H){H.exports={}},397:function(H,X,D){var M=D(7751);H.exports=M("document","documentElement")},5917:function(H,X,D){var M=D(3724),U=D(9039),K=D(4055);H.exports=!M&&!U((function(){return Object.defineProperty(K("div"),"a",{get:function(){return 7}}).a!==7}))},7055:function(H,X,D){var M=D(9504),U=D(9039),K=D(2195),B=Object,ie=M("".split);H.exports=U((function(){return!B("z").propertyIsEnumerable(0)}))?function(O){return K(O)==="String"?ie(O,""):B(O)}:B},3167:function(H,X,D){var M=D(4901),U=D(34),K=D(2967);H.exports=function(B,ie,O){var q,Y;return K&&M(q=ie.constructor)&&q!==O&&U(Y=q.prototype)&&Y!==O.prototype&&K(B,Y),B}},3706:function(H,X,D){var M=D(9504),U=D(4901),K=D(7629),B=M(Function.toString);U(K.inspectSource)||(K.inspectSource=function(ie){return B(ie)}),H.exports=K.inspectSource},1181:function(H,X,D){var M,U,K,B=D(8622),ie=D(4576),O=D(34),q=D(6699),Y=D(9297),V=D(7629),ee=D(6119),oe=D(421),he="Object already initialized",pe=ie.TypeError,re=ie.WeakMap;if(B||V.state){var L=V.state||(V.state=new re);L.get=L.get,L.has=L.has,L.set=L.set,M=function(ne,ye){if(L.has(ne))throw new pe(he);return ye.facade=ne,L.set(ne,ye),ye},U=function(ne){return L.get(ne)||{}},K=function(ne){return L.has(ne)}}else{var R=ee("state");oe[R]=!0,M=function(ne,ye){if(Y(ne,R))throw new pe(he);return ye.facade=ne,q(ne,R,ye),ye},U=function(ne){return Y(ne,R)?ne[R]:{}},K=function(ne){return Y(ne,R)}}H.exports={set:M,get:U,has:K,enforce:function(ne){return K(ne)?U(ne):M(ne,{})},getterFor:function(ne){return function(ye){var ve;if(!O(ye)||(ve=U(ye)).type!==ne)throw new pe("Incompatible receiver, "+ne+" required");return ve}}}},4209:function(H,X,D){var M=D(8227),U=D(6269),K=M("iterator"),B=Array.prototype;H.exports=function(ie){return ie!==void 0&&(U.Array===ie||B[K]===ie)}},4376:function(H,X,D){var M=D(2195);H.exports=Array.isArray||function(U){return M(U)==="Array"}},4901:function(H){var X=typeof document=="object"&&document.all;H.exports=X===void 0&&X!==void 0?function(D){return typeof D=="function"||D===X}:function(D){return typeof D=="function"}},3517:function(H,X,D){var M=D(9504),U=D(9039),K=D(4901),B=D(6955),ie=D(7751),O=D(3706),q=function(){},Y=ie("Reflect","construct"),V=/^\s*(?:class|function)\b/,ee=M(V.exec),oe=!V.test(q),he=function(re){if(!K(re))return!1;try{return Y(q,[],re),!0}catch{return!1}},pe=function(re){if(!K(re))return!1;switch(B(re)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oe||!!ee(V,O(re))}catch{return!0}};pe.sham=!0,H.exports=!Y||U((function(){var re;return he(he.call)||!he(Object)||!he((function(){re=!0}))||re}))?pe:he},2796:function(H,X,D){var M=D(9039),U=D(4901),K=/#|\.prototype\./,B=function(V,ee){var oe=O[ie(V)];return oe===Y||oe!==q&&(U(ee)?M(ee):!!ee)},ie=B.normalize=function(V){return String(V).replace(K,".").toLowerCase()},O=B.data={},q=B.NATIVE="N",Y=B.POLYFILL="P";H.exports=B},2087:function(H,X,D){var M=D(34),U=Math.floor;H.exports=Number.isInteger||function(K){return!M(K)&&isFinite(K)&&U(K)===K}},4117:function(H){H.exports=function(X){return X==null}},34:function(H,X,D){var M=D(4901);H.exports=function(U){return typeof U=="object"?U!==null:M(U)}},3925:function(H,X,D){var M=D(34);H.exports=function(U){return M(U)||U===null}},6395:function(H){H.exports=!1},5810:function(H,X,D){var M=D(34),U=D(1181).get;H.exports=function(K){if(!M(K))return!1;var B=U(K);return!!B&&B.type==="RawJSON"}},788:function(H,X,D){var M=D(34),U=D(2195),K=D(8227)("match");H.exports=function(B){var ie;return M(B)&&((ie=B[K])!==void 0?!!ie:U(B)==="RegExp")}},757:function(H,X,D){var M=D(7751),U=D(4901),K=D(1625),B=D(7040),ie=Object;H.exports=B?function(O){return typeof O=="symbol"}:function(O){var q=M("Symbol");return U(q)&&K(q.prototype,ie(O))}},9539:function(H,X,D){var M=D(9565),U=D(8551),K=D(5966);H.exports=function(B,ie,O){var q,Y;U(B);try{if(!(q=K(B,"return"))){if(ie==="throw")throw O;return O}q=M(q,B)}catch(V){Y=!0,q=V}if(ie==="throw")throw O;if(Y)throw q;return U(q),O}},3994:function(H,X,D){var M=D(7657).IteratorPrototype,U=D(2360),K=D(6980),B=D(687),ie=D(6269),O=function(){return this};H.exports=function(q,Y,V,ee){var oe=Y+" Iterator";return q.prototype=U(M,{next:K(+!ee,V)}),B(q,oe,!1,!0),ie[oe]=O,q}},1088:function(H,X,D){var M=D(6518),U=D(9565),K=D(6395),B=D(350),ie=D(4901),O=D(3994),q=D(2787),Y=D(2967),V=D(687),ee=D(6699),oe=D(6840),he=D(8227),pe=D(6269),re=D(7657),L=B.PROPER,R=B.CONFIGURABLE,ne=re.IteratorPrototype,ye=re.BUGGY_SAFARI_ITERATORS,ve=he("iterator"),be="keys",Be="values",we="entries",Ae=function(){return this};H.exports=function(Le,Ee,_e,Me,He,Fe,Xe){O(_e,Ee,Me);var xe,We,Pe,Ke=function(vt){if(vt===He&&nt)return nt;if(!ye&&vt&&vt in Te)return Te[vt];switch(vt){case be:case Be:case we:return function(){return new _e(this,vt)}}return function(){return new _e(this)}},Ve=Ee+" Iterator",Ce=!1,Te=Le.prototype,$e=Te[ve]||Te["@@iterator"]||He&&Te[He],nt=!ye&&$e||Ke(He),bt=Ee==="Array"&&Te.entries||$e;if(bt&&(xe=q(bt.call(new Le)))!==Object.prototype&&xe.next&&(K||q(xe)===ne||(Y?Y(xe,ne):ie(xe[ve])||oe(xe,ve,Ae)),V(xe,Ve,!0,!0),K&&(pe[Ve]=Ae)),L&&He===Be&&$e&&$e.name!==Be&&(!K&&R?ee(Te,"name",Be):(Ce=!0,nt=function(){return U($e,this)})),He)if(We={values:Ke(Be),keys:Fe?nt:Ke(be),entries:Ke(we)},Xe)for(Pe in We)(ye||Ce||!(Pe in Te))&&oe(Te,Pe,We[Pe]);else M({target:Ee,proto:!0,forced:ye||Ce},We);return K&&!Xe||Te[ve]===nt||oe(Te,ve,nt,{name:He}),pe[Ee]=nt,We}},7657:function(H,X,D){var M,U,K,B=D(9039),ie=D(4901),O=D(34),q=D(2360),Y=D(2787),V=D(6840),ee=D(8227),oe=D(6395),he=ee("iterator"),pe=!1;[].keys&&("next"in(K=[].keys())?(U=Y(Y(K)))!==Object.prototype&&(M=U):pe=!0),!O(M)||B((function(){var re={};return M[he].call(re)!==re}))?M={}:oe&&(M=q(M)),ie(M[he])||V(M,he,(function(){return this})),H.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:pe}},6269:function(H){H.exports={}},6198:function(H,X,D){var M=D(8014);H.exports=function(U){return M(U.length)}},283:function(H,X,D){var M=D(9504),U=D(9039),K=D(4901),B=D(9297),ie=D(3724),O=D(350).CONFIGURABLE,q=D(3706),Y=D(1181),V=Y.enforce,ee=Y.get,oe=String,he=Object.defineProperty,pe=M("".slice),re=M("".replace),L=M([].join),R=ie&&!U((function(){return he((function(){}),"length",{value:8}).length!==8})),ne=String(String).split("String"),ye=H.exports=function(ve,be,Be){pe(oe(be),0,7)==="Symbol("&&(be="["+re(oe(be),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Be&&Be.getter&&(be="get "+be),Be&&Be.setter&&(be="set "+be),(!B(ve,"name")||O&&ve.name!==be)&&(ie?he(ve,"name",{value:be,configurable:!0}):ve.name=be),R&&Be&&B(Be,"arity")&&ve.length!==Be.arity&&he(ve,"length",{value:Be.arity});try{Be&&B(Be,"constructor")&&Be.constructor?ie&&he(ve,"prototype",{writable:!1}):ve.prototype&&(ve.prototype=void 0)}catch{}var we=V(ve);return B(we,"source")||(we.source=L(ne,typeof be=="string"?be:"")),ve};Function.prototype.toString=ye((function(){return K(this)&&ee(this).source||q(this)}),"toString")},741:function(H){var X=Math.ceil,D=Math.floor;H.exports=Math.trunc||function(M){var U=+M;return(U>0?D:X)(U)}},7819:function(H,X,D){var M=D(9039);H.exports=!M((function(){var U="9007199254740993",K=JSON.rawJSON(U);return!JSON.isRawJSON(K)||JSON.stringify(K)!==U}))},5749:function(H,X,D){var M=D(788),U=TypeError;H.exports=function(K){if(M(K))throw new U("The method doesn't accept regular expressions");return K}},4213:function(H,X,D){var M=D(3724),U=D(9504),K=D(9565),B=D(9039),ie=D(1072),O=D(3717),q=D(8773),Y=D(8981),V=D(7055),ee=Object.assign,oe=Object.defineProperty,he=U([].concat);H.exports=!ee||B((function(){if(M&&ee({b:1},ee(oe({},"a",{enumerable:!0,get:function(){oe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var pe={},re={},L=Symbol("assign detection"),R="abcdefghijklmnopqrst";return pe[L]=7,R.split("").forEach((function(ne){re[ne]=ne})),ee({},pe)[L]!==7||ie(ee({},re)).join("")!==R}))?function(pe,re){for(var L=Y(pe),R=arguments.length,ne=1,ye=O.f,ve=q.f;R>ne;)for(var be,Be=V(arguments[ne++]),we=ye?he(ie(Be),ye(Be)):ie(Be),Ae=we.length,Le=0;Ae>Le;)be=we[Le++],M&&!K(ve,Be,be)||(L[be]=Be[be]);return L}:ee},2360:function(H,X,D){var M,U=D(8551),K=D(6801),B=D(8727),ie=D(421),O=D(397),q=D(4055),Y=D(6119),V="prototype",ee="script",oe=Y("IE_PROTO"),he=function(){},pe=function(R){return"<"+ee+">"+R+""},re=function(R){R.write(pe("")),R.close();var ne=R.parentWindow.Object;return R=null,ne},L=function(){try{M=new ActiveXObject("htmlfile")}catch{}var R,ne,ye;L=typeof document<"u"?document.domain&&M?re(M):(ne=q("iframe"),ye="java"+ee+":",ne.style.display="none",O.appendChild(ne),ne.src=String(ye),(R=ne.contentWindow.document).open(),R.write(pe("document.F=Object")),R.close(),R.F):re(M);for(var ve=B.length;ve--;)delete L[V][B[ve]];return L()};ie[oe]=!0,H.exports=Object.create||function(R,ne){var ye;return R!==null?(he[V]=U(R),ye=new he,he[V]=null,ye[oe]=R):ye=L(),ne===void 0?ye:K.f(ye,ne)}},6801:function(H,X,D){var M=D(3724),U=D(8686),K=D(4913),B=D(8551),ie=D(5397),O=D(1072);X.f=M&&!U?Object.defineProperties:function(q,Y){B(q);for(var V,ee=ie(Y),oe=O(Y),he=oe.length,pe=0;he>pe;)K.f(q,V=oe[pe++],ee[V]);return q}},4913:function(H,X,D){var M=D(3724),U=D(5917),K=D(8686),B=D(8551),ie=D(6969),O=TypeError,q=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,V="enumerable",ee="configurable",oe="writable";X.f=M?K?function(he,pe,re){if(B(he),pe=ie(pe),B(re),typeof he=="function"&&pe==="prototype"&&"value"in re&&oe in re&&!re[oe]){var L=Y(he,pe);L&&L[oe]&&(he[pe]=re.value,re={configurable:ee in re?re[ee]:L[ee],enumerable:V in re?re[V]:L[V],writable:!1})}return q(he,pe,re)}:q:function(he,pe,re){if(B(he),pe=ie(pe),B(re),U)try{return q(he,pe,re)}catch{}if("get"in re||"set"in re)throw new O("Accessors not supported");return"value"in re&&(he[pe]=re.value),he}},7347:function(H,X,D){var M=D(3724),U=D(9565),K=D(8773),B=D(6980),ie=D(5397),O=D(6969),q=D(9297),Y=D(5917),V=Object.getOwnPropertyDescriptor;X.f=M?V:function(ee,oe){if(ee=ie(ee),oe=O(oe),Y)try{return V(ee,oe)}catch{}if(q(ee,oe))return B(!U(K.f,ee,oe),ee[oe])}},298:function(H,X,D){var M=D(2195),U=D(5397),K=D(8480).f,B=D(7680),ie=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];H.exports.f=function(O){return ie&&M(O)==="Window"?(function(q){try{return K(q)}catch{return B(ie)}})(O):K(U(O))}},8480:function(H,X,D){var M=D(1828),U=D(8727).concat("length","prototype");X.f=Object.getOwnPropertyNames||function(K){return M(K,U)}},3717:function(H,X){X.f=Object.getOwnPropertySymbols},2787:function(H,X,D){var M=D(9297),U=D(4901),K=D(8981),B=D(6119),ie=D(2211),O=B("IE_PROTO"),q=Object,Y=q.prototype;H.exports=ie?q.getPrototypeOf:function(V){var ee=K(V);if(M(ee,O))return ee[O];var oe=ee.constructor;return U(oe)&&ee instanceof oe?oe.prototype:ee instanceof q?Y:null}},1625:function(H,X,D){var M=D(9504);H.exports=M({}.isPrototypeOf)},1828:function(H,X,D){var M=D(9504),U=D(9297),K=D(5397),B=D(9617).indexOf,ie=D(421),O=M([].push);H.exports=function(q,Y){var V,ee=K(q),oe=0,he=[];for(V in ee)!U(ie,V)&&U(ee,V)&&O(he,V);for(;Y.length>oe;)U(ee,V=Y[oe++])&&(~B(he,V)||O(he,V));return he}},1072:function(H,X,D){var M=D(1828),U=D(8727);H.exports=Object.keys||function(K){return M(K,U)}},8773:function(H,X){var D={}.propertyIsEnumerable,M=Object.getOwnPropertyDescriptor,U=M&&!D.call({1:2},1);X.f=U?function(K){var B=M(this,K);return!!B&&B.enumerable}:D},2551:function(H,X,D){var M=D(6395),U=D(4576),K=D(9039),B=D(3607);H.exports=M||!K((function(){if(!(B&&B<535)){var ie=Math.random();__defineSetter__.call(null,ie,(function(){})),delete U[ie]}}))},2967:function(H,X,D){var M=D(6706),U=D(34),K=D(7750),B=D(3506);H.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var ie,O=!1,q={};try{(ie=M(Object.prototype,"__proto__","set"))(q,[]),O=q instanceof Array}catch{}return function(Y,V){return K(Y),B(V),U(Y)&&(O?ie(Y,V):Y.__proto__=V),Y}})():void 0)},3179:function(H,X,D){var M=D(2140),U=D(6955);H.exports=M?{}.toString:function(){return"[object "+U(this)+"]"}},4270:function(H,X,D){var M=D(9565),U=D(4901),K=D(34),B=TypeError;H.exports=function(ie,O){var q,Y;if(O==="string"&&U(q=ie.toString)&&!K(Y=M(q,ie))||U(q=ie.valueOf)&&!K(Y=M(q,ie))||O!=="string"&&U(q=ie.toString)&&!K(Y=M(q,ie)))return Y;throw new B("Can't convert object to primitive value")}},5031:function(H,X,D){var M=D(7751),U=D(9504),K=D(8480),B=D(3717),ie=D(8551),O=U([].concat);H.exports=M("Reflect","ownKeys")||function(q){var Y=K.f(ie(q)),V=B.f;return V?O(Y,V(q)):Y}},8235:function(H,X,D){var M=D(9504),U=D(9297),K=SyntaxError,B=parseInt,ie=String.fromCharCode,O=M("".charAt),q=M("".slice),Y=M(/./.exec),V={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":` `,"\\r":"\r","\\t":" "},ee=/^[\da-f]{4}$/i,oe=/^[\u0000-\u001F]$/;H.exports=function(he,pe){for(var re=!0,L="";pe0&&(!xe.multiline||xe.multiline&&R(Pe,xe.lastIndex-1)!==` `)&&($e="(?: "+$e+")",bt=" "+bt,nt++),Ee=new RegExp("^(?:"+$e+")",Te)),we&&(Ee=new RegExp("^"+$e+"$(?!\\s)",Te)),be&&(_e=xe.lastIndex),Me=K(re,Ce?Ee:xe,bt),Ce?Me?(Me.input=ve(Me.input,nt),Me[0]=ve(Me[0],nt),Me.index=xe.lastIndex,xe.lastIndex+=Me[0].length):xe.lastIndex=0:be&&Me&&(xe.lastIndex=xe.global?Me.index+Me[0].length:_e),we&&Me&&Me.length>1&&K(pe,Me[0],Ee,(function(){for(He=1;Heb)","g");return K.exec("b").groups.a!=="b"||"b".replace(K,"$c")!=="bc"}))},7750:function(H,X,D){var M=D(4117),U=TypeError;H.exports=function(K){if(M(K))throw new U("Can't call method on "+K);return K}},7633:function(H,X,D){var M=D(7751),U=D(2106),K=D(8227),B=D(3724),ie=K("species");H.exports=function(O){var q=M(O);B&&q&&!q[ie]&&U(q,ie,{configurable:!0,get:function(){return this}})}},687:function(H,X,D){var M=D(4913).f,U=D(9297),K=D(8227)("toStringTag");H.exports=function(B,ie,O){B&&!O&&(B=B.prototype),B&&!U(B,K)&&M(B,K,{configurable:!0,value:ie})}},6119:function(H,X,D){var M=D(5745),U=D(3392),K=M("keys");H.exports=function(B){return K[B]||(K[B]=U(B))}},7629:function(H,X,D){var M=D(6395),U=D(4576),K=D(9433),B="__core-js_shared__",ie=H.exports=U[B]||K(B,{});(ie.versions||(ie.versions=[])).push({version:"3.48.0",mode:M?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(H,X,D){var M=D(7629);H.exports=function(U,K){return M[U]||(M[U]=K||{})}},2293:function(H,X,D){var M=D(8551),U=D(5548),K=D(4117),B=D(8227)("species");H.exports=function(ie,O){var q,Y=M(ie).constructor;return Y===void 0||K(q=M(Y)[B])?O:U(q)}},8183:function(H,X,D){var M=D(9504),U=D(1291),K=D(655),B=D(7750),ie=M("".charAt),O=M("".charCodeAt),q=M("".slice),Y=function(V){return function(ee,oe){var he,pe,re=K(B(ee)),L=U(oe),R=re.length;return L<0||L>=R?V?"":void 0:(he=O(re,L))<55296||he>56319||L+1===R||(pe=O(re,L+1))<56320||pe>57343?V?ie(re,L):he:V?q(re,L,L+2):pe-56320+(he-55296<<10)+65536}};H.exports={codeAt:Y(!1),charAt:Y(!0)}},706:function(H,X,D){var M=D(350).PROPER,U=D(9039),K=D(7452);H.exports=function(B){return U((function(){return!!K[B]()||"​…᠎"[B]()!=="​…᠎"||M&&K[B].name!==B}))}},3802:function(H,X,D){var M=D(9504),U=D(7750),K=D(655),B=D(7452),ie=M("".replace),O=RegExp("^["+B+"]+"),q=RegExp("(^|[^"+B+"])["+B+"]+$"),Y=function(V){return function(ee){var oe=K(U(ee));return 1&V&&(oe=ie(oe,O,"")),2&V&&(oe=ie(oe,q,"$1")),oe}};H.exports={start:Y(1),end:Y(2),trim:Y(3)}},4495:function(H,X,D){var M=D(9519),U=D(9039),K=D(4576).String;H.exports=!!Object.getOwnPropertySymbols&&!U((function(){var B=Symbol("symbol detection");return!K(B)||!(Object(B)instanceof Symbol)||!Symbol.sham&&M&&M<41}))},8242:function(H,X,D){var M=D(9565),U=D(7751),K=D(8227),B=D(6840);H.exports=function(){var ie=U("Symbol"),O=ie&&ie.prototype,q=O&&O.valueOf,Y=K("toPrimitive");O&&!O[Y]&&B(O,Y,(function(V){return M(q,this)}),{arity:1})}},1296:function(H,X,D){var M=D(4495);H.exports=M&&!!Symbol.for&&!!Symbol.keyFor},1240:function(H,X,D){var M=D(9504);H.exports=M(1.1.valueOf)},5610:function(H,X,D){var M=D(1291),U=Math.max,K=Math.min;H.exports=function(B,ie){var O=M(B);return O<0?U(O+ie,0):K(O,ie)}},5397:function(H,X,D){var M=D(7055),U=D(7750);H.exports=function(K){return M(U(K))}},1291:function(H,X,D){var M=D(741);H.exports=function(U){var K=+U;return K!=K||K===0?0:M(K)}},8014:function(H,X,D){var M=D(1291),U=Math.min;H.exports=function(K){var B=M(K);return B>0?U(B,9007199254740991):0}},8981:function(H,X,D){var M=D(7750),U=Object;H.exports=function(K){return U(M(K))}},2777:function(H,X,D){var M=D(9565),U=D(34),K=D(757),B=D(5966),ie=D(4270),O=D(8227),q=TypeError,Y=O("toPrimitive");H.exports=function(V,ee){if(!U(V)||K(V))return V;var oe,he=B(V,Y);if(he){if(ee===void 0&&(ee="default"),oe=M(he,V,ee),!U(oe)||K(oe))return oe;throw new q("Can't convert object to primitive value")}return ee===void 0&&(ee="number"),ie(V,ee)}},6969:function(H,X,D){var M=D(2777),U=D(757);H.exports=function(K){var B=M(K,"string");return U(B)?B:B+""}},2140:function(H,X,D){var M={};M[D(8227)("toStringTag")]="z",H.exports=String(M)==="[object z]"},655:function(H,X,D){var M=D(6955),U=String;H.exports=function(K){if(M(K)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return U(K)}},6823:function(H){var X=String;H.exports=function(D){try{return X(D)}catch{return"Object"}}},3392:function(H,X,D){var M=D(9504),U=0,K=Math.random(),B=M(1.1.toString);H.exports=function(ie){return"Symbol("+(ie===void 0?"":ie)+")_"+B(++U+K,36)}},7040:function(H,X,D){var M=D(4495);H.exports=M&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(H,X,D){var M=D(3724),U=D(9039);H.exports=M&&U((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},8622:function(H,X,D){var M=D(4576),U=D(4901),K=M.WeakMap;H.exports=U(K)&&/native code/.test(String(K))},511:function(H,X,D){var M=D(9167),U=D(9297),K=D(1951),B=D(4913).f;H.exports=function(ie){var O=M.Symbol||(M.Symbol={});U(O,ie)||B(O,ie,{value:K.f(ie)})}},1951:function(H,X,D){var M=D(8227);X.f=M},8227:function(H,X,D){var M=D(4576),U=D(5745),K=D(9297),B=D(3392),ie=D(4495),O=D(7040),q=M.Symbol,Y=U("wks"),V=O?q.for||q:q&&q.withoutSetter||B;H.exports=function(ee){return K(Y,ee)||(Y[ee]=ie&&K(q,ee)?q[ee]:V("Symbol."+ee)),Y[ee]}},7452:function(H){H.exports=` @@ -8730,5 +8730,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${a("inventory.assignProfileMismatchMessage",{spoolProfile:p.spoolProfile||a("common.unknown"),trayProfile:p.trayProfile||a("common.unknown"),location:p.location})}`:p.type==="partial_profile"?Ne=`${a("inventory.assignPartialMismatchMessage",{spoolMaterial:p.spoolMaterial,trayMaterial:p.trayMaterial,location:p.location})} -${a("inventory.assignProfileMismatchMessage",{spoolProfile:p.spoolProfile||a("common.unknown"),trayProfile:p.trayProfile||a("common.unknown"),location:p.location})}`:p.type==="profile"&&(Ne=a("inventory.assignProfileMismatchMessage",{spoolProfile:p.spoolProfile||a("common.unknown"),trayProfile:p.trayProfile||a("common.unknown"),location:p.location})),i.jsx(_n,{title:a("inventory.assignMismatchTitle"),message:Ne,confirmText:a("inventory.assignMismatchConfirm"),variant:"warning",isLoading:se.isPending,onConfirm:ae,onCancel:()=>{se.isPending||(m(!1),v(null),f(null))}})})()]})}function hrt({isOpen:t,onClose:e,tagId:n,untaggedSpools:r,onLink:a}){const{t:s}=jt(),[o,l]=w.useState(null),c=w.useCallback(()=>{l(null),e()},[e]),d=w.useCallback(m=>{m.key==="Escape"&&c()},[c]);if(w.useEffect(()=>(t&&(document.addEventListener("keydown",d),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}),[t,d]),!t)return null;const u=()=>{o&&(a(o),l(null))};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 animate-fade-in",onClick:c,children:i.jsxs("div",{className:"bg-zinc-800 rounded-xl shadow-2xl w-full max-w-lg mx-4 animate-slide-up",onClick:m=>m.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-700",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-base font-semibold text-zinc-100",children:s("spoolbuddy.dashboard.linkTagTitle","Link Tag to Spool")}),i.jsx("p",{className:"text-sm text-zinc-500 font-mono",children:n})]}),i.jsx("button",{onClick:c,className:"p-2 rounded-lg text-zinc-500 hover:text-zinc-300 hover:bg-zinc-700 transition-colors",children:i.jsx(qt,{className:"w-5 h-5"})})]}),i.jsxs("div",{className:"px-5 py-4 space-y-3 max-h-[400px] overflow-y-auto",children:[i.jsx("p",{className:"text-sm text-zinc-400",children:s("spoolbuddy.dashboard.selectSpool","Select a spool to link this tag to:")}),r.length===0?i.jsx("div",{className:"text-center py-8 text-zinc-500",children:s("spoolbuddy.dashboard.noUntagged","No spools without tags found")}):i.jsx("div",{className:"space-y-2",children:r.map(m=>i.jsxs("button",{type:"button",onClick:()=>l(m),className:`w-full flex items-center gap-3 p-3 rounded-lg border-2 transition-all text-left ${o?.id===m.id?"border-green-500 bg-green-500/10":"border-zinc-700 hover:border-green-500/50 hover:bg-zinc-700/50"}`,children:[i.jsx(U5,{color:m.rgba?`#${m.rgba.slice(0,6)}`:"#808080",isEmpty:!1,size:40}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-zinc-100 truncate",children:m.color_name||"Unknown color"}),i.jsxs("div",{className:"text-sm text-zinc-400 truncate",children:[m.brand," • ",m.material,m.subtype&&` ${m.subtype}`]})]}),i.jsxs("div",{className:"text-sm font-mono text-zinc-500",children:[Math.max(0,m.label_weight-m.weight_used),"g"]})]},m.id))})]}),i.jsxs("div",{className:"flex justify-end gap-2 px-5 py-4 border-t border-zinc-700",children:[i.jsx("button",{onClick:c,className:"px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors min-h-[44px]",children:s("common.cancel","Cancel")}),i.jsx("button",{onClick:u,disabled:!o,className:"px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors min-h-[44px]",children:s("spoolbuddy.dashboard.linkTag","Link Tag")})]})]})})}const eX=["#00AE42","#FF6B35","#3B82F6","#EF4444","#A855F7","#FBBF24","#14B8A6","#EC4899","#F97316","#22C55E"];function tX(t){return t?t.replace(/[^0-9a-f]/gi,"").toUpperCase():""}function prt(t,e){const n=tX(t),r=tX(e);return!n||!r?!1:n===r?!0:n.endsWith(r)||r.endsWith(n)}function frt(){const{t}=jt(),[e,n]=w.useState(0);w.useEffect(()=>{const a=setInterval(()=>{n(s=>(s+1)%eX.length)},2e3);return()=>clearInterval(a)},[]);const r=eX[e];return i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsxs("div",{className:"relative mb-6 flex items-center justify-center",style:{width:160,height:160},children:[i.jsx("div",{className:"absolute w-24 h-24 rounded-full border-2 border-green-500/30 animate-ping",style:{animationDuration:"2.5s"}}),i.jsx("div",{className:"absolute w-32 h-32 rounded-full border border-green-500/20 animate-ping",style:{animationDuration:"2.5s",animationDelay:"0.4s"}}),i.jsx("div",{className:"absolute w-40 h-40 rounded-full border border-green-500/10 animate-ping",style:{animationDuration:"2.5s",animationDelay:"0.8s"}}),i.jsxs("div",{className:"relative",children:[i.jsx("div",{className:"absolute -inset-4 rounded-full blur-2xl opacity-30 transition-colors duration-1000",style:{backgroundColor:r}}),i.jsx("div",{className:"transition-all duration-1000",children:i.jsx(U5,{color:r,isEmpty:!1,size:100})})]})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xl font-medium text-zinc-300",children:t("spoolbuddy.dashboard.readyToScan","Ready to scan")}),i.jsx("p",{className:"text-sm text-zinc-500",children:t("spoolbuddy.dashboard.idleMessage","Place a spool on the scale to identify it")})]}),i.jsxs("div",{className:"mt-6 flex items-center gap-2 text-sm text-zinc-600",children:[i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:t("spoolbuddy.dashboard.nfcHint","NFC tag will be read automatically")})]})]})}function grt(){const{t}=jt();return i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("div",{className:"relative mb-6 flex items-center justify-center",style:{width:160,height:160},children:i.jsx("div",{className:"w-24 h-24 rounded-full bg-zinc-800 flex items-center justify-center",children:i.jsx("svg",{className:"w-12 h-12 text-zinc-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M18.364 5.636a9 9 0 010 12.728m0 0l-12.728-12.728m12.728 12.728L5.636 5.636m12.728 0a9 9 0 00-12.728 0m0 12.728a9 9 0 010-12.728"})})})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-lg font-medium text-zinc-500",children:t("spoolbuddy.status.deviceOffline","Device Offline")}),i.jsx("p",{className:"text-sm text-zinc-600",children:t("spoolbuddy.status.connectDisplay","Connect the SpoolBuddy display to scan spools")})]}),i.jsxs("div",{className:"mt-6 flex items-center gap-2 text-xs text-zinc-600",children:[i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.14 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"})}),i.jsx("span",{children:t("spoolbuddy.status.waitingConnection","Waiting for device connection...")})]})]})}function brt(){const{sbState:t,selectedPrinterId:e}=bw(),{t:n}=jt(),{data:r=[],refetch:a}=Je({queryKey:["inventory-spools"],queryFn:()=>fe.getSpools(!1)}),{data:s=[]}=Je({queryKey:["printers"],queryFn:()=>fe.getPrinters()}),o=tp({queries:s.map(W=>({queryKey:["printerStatus",W.id],queryFn:()=>fe.getPrinterStatus(W.id),refetchInterval:1e4,select:ae=>({connected:ae?.connected})}))}),[l,c]=w.useState(null),[d,u]=w.useState(null),[m,p]=w.useState(null),[f,y]=w.useState(!1),[v,b]=w.useState(!1),[g,_]=w.useState(!1),[N,C]=w.useState(!1),k=t.matchedSpool?.tag_uid??t.unknownTagUid??null,P=t.weight,T=t.weightStable,j=w.useRef(null);P===null?j.current=null:(j.current===null||Math.abs(P-j.current)>=3||T)&&(j.current=P);const F=j.current,G=w.useMemo(()=>{if(t.matchedSpool?.id){const W=r.find(ae=>ae.id===t.matchedSpool?.id);if(W)return W}return l?r.find(W=>prt(W.tag_uid,l))??null:null},[l,t.matchedSpool,r]),z=w.useMemo(()=>r.filter(W=>!W.tag_uid&&!W.archived_at),[r]);w.useEffect(()=>{if(k){const W=m===k;(l!==null&&l!==k||!W&&l!==k)&&(c(k),u(null),p(null)),!W&&P!==null&&T&&u(Math.round(Math.max(0,P)))}else m&&(c(null),p(null),u(null))},[k,P,T,l,m]);const J=()=>{p(l)},I=async W=>{if(l)try{await fe.linkTagToSpool(W.id,{tag_uid:l,tag_type:"generic",data_origin:"nfc_link"}),y(!1),a()}catch(ae){console.error("Failed to link tag:",ae)}},te=async()=>{if(l){C(!0);try{const W=Z??d;await fe.createSpool({material:"PLA",subtype:null,color_name:null,rgba:null,brand:null,label_weight:1e3,core_weight:250,core_weight_catalog_id:null,weight_used:0,slicer_filament:null,slicer_filament_name:null,nozzle_temp_min:null,nozzle_temp_max:null,note:null,added_full:null,last_used:null,encode_time:null,tag_uid:l,tray_uuid:null,data_origin:"spoolbuddy",tag_type:"generic",cost_per_kg:null,last_scale_weight:W,last_weighed_at:W!==null?new Date().toISOString():null}),_(!1),a()}catch(W){console.error("Failed to quick-add spool:",W)}finally{C(!1)}}},Z=P!==null&&(k===l||k===null&&l!==null)?P:null,de=r.length,me=new Set(r.map(W=>W.material)).size,ue=new Set(r.filter(W=>W.brand).map(W=>W.brand)).size;return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsxs("div",{className:"flex items-center gap-6 px-4 py-1.5 bg-zinc-800/50 rounded-xl border border-zinc-700/50 mb-3 shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:de}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.inventory.spools","Spools")})]}),i.jsx("div",{className:"w-px h-5 bg-zinc-700"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:me}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.material","Materials")})]}),i.jsx("div",{className:"w-px h-5 bg-zinc-700"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:ue}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.brand","Brands")})]})]}),i.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[i.jsxs("div",{className:"w-5/12 flex flex-col min-h-0",children:[i.jsxs("div",{className:"border border-dashed border-zinc-700/50 rounded-xl p-4",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-3",children:n("spoolbuddy.dashboard.device","Device")}),i.jsxs("div",{className:"space-y-2.5",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-2.5 h-2.5 rounded-full ${t.deviceOnline?"bg-green-500 animate-pulse":"bg-red-500"}`}),i.jsx("span",{className:"text-base text-zinc-400",children:t.deviceOnline?n("spoolbuddy.status.online","Online"):n("spoolbuddy.status.offline","Disconnected")})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-zinc-800/50 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("svg",{className:`w-4 h-4 ${t.deviceOnline?"text-green-500":"text-zinc-500"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.scaleWeight","Scale")})]}),i.jsx("span",{className:"text-lg font-mono font-semibold text-zinc-100",children:F!==null?`${Math.abs(F)<=20?0:Math.round(Math.max(0,F))}g`:"—"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-zinc-800/50 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("svg",{className:`w-4 h-4 ${t.deviceOnline?"text-green-500":"text-zinc-500"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A2 2 0 013 12V7a4 4 0 014-4z"})}),i.jsx("span",{className:"text-sm text-zinc-500",children:"NFC"})]}),i.jsx("span",{className:`text-sm font-medium ${k?"text-green-500":"text-zinc-500"}`,children:k?n("spoolbuddy.dashboard.tagDetected","Tag detected"):n("spoolbuddy.dashboard.noTag","No tag")})]})]})]}),s.length>0&&i.jsxs("div",{className:"mt-3 border border-dashed border-zinc-700/50 rounded-xl p-4",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-2.5",children:n("spoolbuddy.dashboard.printers","Printers")}),i.jsx("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:s.map((W,ae)=>{const le=o[ae]?.data?.connected??!1;return i.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-zinc-800/50 rounded-lg",title:`${W.name} — ${le?"Online":"Offline"}`,children:[i.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${le?"bg-green-500":"bg-zinc-600"}`}),i.jsx("span",{className:"text-xs text-zinc-400 truncate max-w-[100px]",children:W.name})]},W.id)})})]})]}),i.jsx("div",{className:"w-7/12 min-h-0",children:i.jsxs("div",{className:"border border-dashed border-zinc-700/50 rounded-xl p-6 h-full flex flex-col",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-4 shrink-0",children:n("spoolbuddy.dashboard.currentSpool","Current Spool")}),i.jsx("div",{className:"flex-1 flex items-center justify-center min-h-0",children:t.deviceOnline?(G||t.matchedSpool)&&l&&m!==l?i.jsx(Znt,{spool:{id:G?.id??t.matchedSpool.id,tag_uid:l,material:G?.material??t.matchedSpool.material,subtype:G?.subtype??t.matchedSpool.subtype,color_name:G?.color_name??t.matchedSpool.color_name,rgba:G?.rgba??t.matchedSpool.rgba,brand:G?.brand??t.matchedSpool.brand,label_weight:G?.label_weight??t.matchedSpool.label_weight,core_weight:G?.core_weight??t.matchedSpool.core_weight,weight_used:G?.weight_used??t.matchedSpool.weight_used},scaleWeight:Z??d,onSyncWeight:()=>a(),onAssignToAms:()=>b(!0),onClose:J}):k&&l&&!G&&!t.matchedSpool&&m!==l?i.jsx(Jnt,{tagUid:l,scaleWeight:Z??d,onLinkSpool:z.length>0?()=>y(!0):void 0,onAddToInventory:()=>_(!0),onClose:J}):i.jsx(frt,{}):i.jsx(grt,{})})]})})]}),G&&l&&i.jsx(mrt,{isOpen:v,onClose:()=>b(!1),spool:G,printerId:e}),l&&i.jsx(hrt,{isOpen:f,onClose:()=>y(!1),tagId:l,untaggedSpools:z,onLink:I}),g&&l&&i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",children:i.jsxs("div",{className:"bg-zinc-800 rounded-2xl p-6 mx-4 max-w-sm w-full border border-zinc-700",children:[i.jsx("h3",{className:"text-lg font-semibold text-zinc-100 mb-3",children:n("spoolbuddy.modal.addToInventory","Add to Inventory")}),i.jsxs("div",{className:"flex gap-2.5 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg mb-4",children:[i.jsx("svg",{className:"w-5 h-5 text-amber-500 shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("p",{className:"text-sm text-amber-200/80",children:n("spoolbuddy.modal.quickAddHint",'For best results, add the spool in the Bambuddy web interface first (with material, color, brand), then use "Link to Spool" here to assign the NFC tag.')})]}),i.jsx("p",{className:"text-sm text-zinc-400 mb-1",children:n("spoolbuddy.modal.quickAddDesc","This will create a basic PLA spool entry with this NFC tag. You can edit the details later in Bambuddy.")}),i.jsx("p",{className:"text-xs text-zinc-500 font-mono mb-5",children:l}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx("button",{onClick:()=>_(!1),className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors min-h-[44px]",children:n("common.cancel","Cancel")}),i.jsx("button",{onClick:te,disabled:N,className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-50 transition-colors min-h-[44px]",children:N?n("common.saving","Saving..."):n("spoolbuddy.modal.addAnyway","Add Anyway")})]})]})})]})}function nX(t){return t<=3?`AMS ${String.fromCharCode(65+t)}`:t>=128&&t<=135?`AMS HT ${String.fromCharCode(65+t-128)}`:`AMS ${t}`}function xrt(t){return t?{O1D:"H2D",O1E:"H2D Pro",O2D:"H2D Pro",O1C:"H2C",O1C2:"H2C",O1S:"H2S","BL-P001":"X1C","BL-P002":"X1","BL-P003":"X1E",C11:"P1S",C12:"P1P",C13:"P2S",N2S:"A1",N1:"A1 Mini",X1C:"X1C",X1:"X1",X1E:"X1E",P1S:"P1S",P1P:"P1P",P2S:"P2S",A1:"A1","A1 Mini":"A1 Mini",H2D:"H2D","H2D Pro":"H2D Pro",H2C:"H2C",H2S:"H2S"}[t]||t:""}function $p(t){return!t.tray_type||t.tray_type===""}function yrt(t){return t?`#${t.slice(0,6)}`:"#808080"}function vrt(){const{selectedPrinterId:t,setAlert:e}=bw(),{t:n}=jt(),r=cn(),{showToast:a}=pn(),{data:s}=Je({queryKey:["printerStatus",t],queryFn:()=>fe.getPrinterStatus(t),enabled:t!==null,staleTime:30*1e3}),{data:o}=Je({queryKey:["printer",t],queryFn:()=>fe.getPrinter(t),enabled:t!==null,staleTime:60*1e3}),{data:l}=Je({queryKey:["slotPresets",t],queryFn:()=>fe.getSlotPresets(t),enabled:t!==null,staleTime:120*1e3}),{data:c}=Je({queryKey:["settings"],queryFn:()=>fe.getSettings(),staleTime:300*1e3}),{data:d}=Je({queryKey:["spoolman-status"],queryFn:fe.getSpoolmanStatus,staleTime:60*1e3}),u=d?.enabled&&d?.connected,{data:m}=Je({queryKey:["linked-spools"],queryFn:fe.getLinkedSpools,enabled:!!u,staleTime:30*1e3}),p=m?.linked,{data:f}=Je({queryKey:["spool-assignments",t],queryFn:()=>fe.getAssignments(t),enabled:t!==null,staleTime:30*1e3}),y=w.useMemo(()=>{const Y={};if(!f)return Y;for(const V of f){const ee=V.spool;if(ee&&ee.label_weight>0&&ee.weight_used!=null){const oe=Math.round(Math.max(0,ee.label_weight-ee.weight_used)/ee.label_weight*100);Y[`${V.ams_id}-${V.tray_id}`]=oe}}return Y},[f]),v=o?.serial_number??"",b=w.useCallback((Y,V,ee)=>{if(!p||!v)return null;const oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase(),he=oe?p[oe]:void 0;return _N(he)},[p,v]),g=s?.connected??!1,_=w.useRef([]);w.useEffect(()=>{s?.ams&&s.ams.length>0&&(_.current=s.ams)},[s?.ams]);const N=w.useMemo(()=>{const Y=s?.ams;return Y&&Y.length>0?Y:_.current??[]},[s?.ams]),C=w.useMemo(()=>N.filter(Y=>!Y.is_ams_ht),[N]),k=w.useMemo(()=>N.filter(Y=>Y.is_ams_ht),[N]),P=w.useMemo(()=>{const Y={};if(!p||!v)return Y;for(const V of C)for(let ee=0;ee<(V.tray?.length??0);ee++){const oe=V.tray[ee],he=b(V.id,ee,$p(oe)?null:oe);he!==null&&(Y[`${V.id}-${ee}`]=he)}return Y},[p,v,C,b]),T=w.useRef(void 0),j=s?.tray_now;j!==void 0&&j!==255?T.current=j:j===255&&(T.current=void 0);const A=j!==void 0&&j!==255?j:T.current,F=o?.nozzle_count===2||s?.temperatures?.nozzle_2!==void 0,G=w.useMemo(()=>[...s?.vt_tray??[]].sort((Y,V)=>(Y.id??254)-(V.id??254)),[s?.vt_tray]),z=c?{humidityGood:Number(c.ams_humidity_good)||40,humidityFair:Number(c.ams_humidity_fair)||60,tempGood:Number(c.ams_temp_good)||28,tempFair:Number(c.ams_temp_fair)||35}:void 0,J=w.useRef({});w.useEffect(()=>{s?.ams_extruder_map&&Object.keys(s.ams_extruder_map).length>0&&(J.current=s.ams_extruder_map)},[s?.ams_extruder_map]);const I=s?.ams_extruder_map&&Object.keys(s.ams_extruder_map).length>0?s.ams_extruder_map:J.current,te=w.useCallback(Y=>{if(!F)return null;const V=I[String(Y)],ee=Y>=128?Y-128:Y;return(V!==void 0?V:ee)===1?"L":"R"},[F,I]),[se,Z]=w.useState(null),[de,me]=w.useState(null),[ue,W]=w.useState(null),[ae,le]=w.useState(null),ge=w.useCallback((Y,V)=>f?.find(ee=>ee.ams_id===Number(Y)&&ee.tray_id===Number(V)),[f]),Ne=w.useCallback((Y,V,ee)=>{if(!p||!v)return;const oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase();return oe?p[oe]:void 0},[p,v]),H=ht({mutationFn:({printerId:Y,amsId:V,trayId:ee})=>fe.unassignSpool(Y,V,ee),onSuccess:()=>{r.invalidateQueries({queryKey:["spool-assignments",t]}),a(n("inventory.unassignSuccess","Spool unassigned"),"success"),me(null)}}),X=ht({mutationFn:Y=>fe.unlinkSpool(Y),onSuccess:Y=>{a(n("spoolman.unlinkSuccess")||Y?.message,"success"),r.invalidateQueries({queryKey:["linked-spools"]}),r.invalidateQueries({queryKey:["unlinked-spools"]}),me(null)},onError:Y=>{a(Y.message||n("spoolman.unlinkFailed"),"error")}}),D=w.useCallback(Y=>A===void 0?null:Y<=3&&Math.floor(A/4)===Y?A%4:Y>=128&&Y<=135&&A===Rx(Y,0,!1)?0:null,[A]),M=w.useCallback((Y,V,ee)=>{const oe=Y>=128?(Y-128)*4+V+64:Y*4+V,he=l?.[oe],pe=I[String(Y)],re=Y>=128?Y-128:Y,L=pe!==void 0?pe:re,R={amsId:Y,trayId:V,trayCount:ee&&Y>=128?1:4,tray:ee,trayType:ee?.tray_type||void 0,trayColor:ee?.tray_color||void 0,traySubBrands:ee?.tray_sub_brands||void 0,trayInfoIdx:ee?.tray_info_idx||void 0,extruderId:F?L:void 0,caliIdx:ee?.cali_idx,savedPresetId:he?.preset_id,location:`${nX(Y)} Slot ${V+1}`};me(R)},[l,I,F]),U=w.useCallback(Y=>{const V=Y.id??254,ee=V-254,oe=l?.[1020+ee],he={amsId:255,trayId:ee,trayCount:1,tray:$p(Y)?null:Y,trayType:Y.tray_type||void 0,trayColor:Y.tray_color||void 0,traySubBrands:Y.tray_sub_brands||void 0,trayInfoIdx:Y.tray_info_idx||void 0,extruderId:F?V===254?1:0:void 0,caliIdx:Y.cali_idx,savedPresetId:oe?.preset_id,location:F?V===254?"Ext-L":"Ext-R":"External"};me(he)},[l,F]),K=w.useCallback(()=>{if(!de)return;const{tray:Y,location:V,...ee}=de;me(null),Z(ee)},[de]),B=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V,trayType:ee,trayColor:oe,location:he}=de;me(null),W({printerId:t,amsId:Y,trayId:V,trayInfo:{type:ee||"",material:ee,color:oe?.slice(0,6)||"",location:he}})},[de,t]),ie=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V,tray:ee}=de,oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase()||"";me(null),le({tagUid:ee?.tag_uid||oe,trayUuid:ee?.tray_uuid||"",printerId:t,amsId:Y,trayId:V})},[de,t,v]),O=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V}=de;H.mutate({printerId:t,amsId:Y,trayId:V})},[de,t,H]);w.useEffect(()=>{if(!g&&t){e({type:"warning",message:n("spoolbuddy.ams.printerDisconnected","Printer disconnected")});return}for(const Y of N){const V=Y.tray||[];for(let ee=0;ee=0&&oe.remain<15&&oe.tray_type){const he=Y.id===254||Y.id===255,pe=!he&&Y.id>=128,re=Jw(Y.id,ee,pe,he);e({type:"warning",message:`Low Filament: ${oe.tray_type} (${re}) - ${oe.remain}% remaining`});return}}}e(null)},[N,g,t,e,n]);const q=w.useMemo(()=>{const Y=[];for(const V of k){const ee=V.tray?.[0]||{id:0,tray_color:null,tray_type:"",tray_sub_brands:null,tray_id_name:null,tray_info_idx:null,remain:-1,k:null,cali_idx:null,tag_uid:null,tray_uuid:null,nozzle_temp_min:null,nozzle_temp_max:null},oe=b(V.id,0,$p(ee)?null:ee),he=y[`${V.id}-0`]??null,pe=ee.remain!=null&&ee.remain>=0?ee.remain:null,re=he===0&&pe!==null&&pe>0?null:he;Y.push({key:`ht-${V.id}`,label:nX(V.id),tray:ee,isEmpty:$p(ee),isActive:D(V.id)===0,temp:V.temp,humidity:V.humidity,nozzleSide:te(V.id),effectiveFill:oe??re??pe,onClick:()=>M(V.id,0,$p(ee)?null:ee)})}for(const V of G){const ee=V.id??254,oe=F&&A===254?ee===254&&s?.active_extruder===1||ee===255&&s?.active_extruder===0:A===ee,he=ee-254,pe=b(255,he,$p(V)?null:V),re=y[`255-${he}`]??null,L=V.remain!=null&&V.remain>=0?V.remain:null,R=re===0&&L!==null&&L>0?null:re;Y.push({key:`ext-${ee}`,label:F?ee===254?n("printers.extL","Ext-L"):n("printers.extR","Ext-R"):n("printers.ext","Ext"),tray:V,isEmpty:$p(V),isActive:oe,nozzleSide:null,effectiveFill:pe??R??L,onClick:()=>U(V)})}return Y},[k,G,F,A,s?.active_extruder,n,D,te,M,U,y,b]);return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsx("div",{className:"flex-1 min-h-0",children:t?g?N.length===0&&G.length===0?i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center text-white/50",children:[i.jsx(Yi,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.noData","No AMS detected")}),i.jsx("p",{className:"text-sm",children:n("spoolbuddy.ams.connectAms","Connect an AMS to see filament slots")})]})}):i.jsxs("div",{className:"flex flex-col gap-3 h-full",children:[i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:C.map(Y=>i.jsx(Ale,{unit:Y,activeSlot:D(Y.id),onConfigureSlot:M,isDualNozzle:F,nozzleSide:te(Y.id),thresholds:z,fillOverrides:y,spoolmanFillOverrides:P},Y.id))}),q.length>0&&i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:q.map(({key:Y,label:V,tray:ee,isEmpty:oe,isActive:he,temp:pe,humidity:re,nozzleSide:L,effectiveFill:R,onClick:ne})=>{const ye=yrt(ee.tray_color);return i.jsxs("div",{className:`bg-bambu-dark-secondary rounded-lg px-3 py-2 cursor-pointer hover:bg-bambu-dark-secondary/80 transition-all flex items-center gap-3 ${he?"ring-2 ring-bambu-green":""}`,onClick:ne,children:[i.jsxs("div",{className:"relative w-10 h-10 flex-shrink-0",children:[oe?i.jsx("div",{className:"w-full h-full rounded-full border-2 border-dashed border-gray-500 flex items-center justify-center",children:i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-gray-600"})}):i.jsxs("svg",{viewBox:"0 0 56 56",className:"w-full h-full",children:[i.jsx("circle",{cx:"28",cy:"28",r:"26",fill:ye}),i.jsx("circle",{cx:"28",cy:"28",r:"20",fill:ye,style:{filter:"brightness(0.85)"}}),i.jsx("ellipse",{cx:"20",cy:"20",rx:"6",ry:"4",fill:"white",opacity:"0.3"}),i.jsx("circle",{cx:"28",cy:"28",r:"8",fill:"#2d2d2d"}),i.jsx("circle",{cx:"28",cy:"28",r:"5",fill:"#1a1a1a"})]}),he&&i.jsx("div",{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 bg-bambu-green rounded-full"})]}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"text-xs text-white/50 font-medium truncate",children:V}),L&&i.jsx(B5,{side:L})]}),i.jsx("div",{className:"text-sm text-white/80 truncate",children:oe?"Empty":ee.tray_type||"?"}),(pe!=null||re!=null)&&i.jsxs("div",{className:"flex items-center gap-1.5",children:[pe!=null&&i.jsx(Tle,{temp:pe,goodThreshold:z?.tempGood,fairThreshold:z?.tempFair}),re!=null&&i.jsx(Cle,{humidity:re,goodThreshold:z?.humidityGood,fairThreshold:z?.humidityFair})]})]}),!oe&&R!=null&&R>=0&&i.jsx("div",{className:"w-1.5 h-8 bg-bambu-dark-tertiary rounded-full overflow-hidden flex-shrink-0 flex flex-col-reverse",children:i.jsx("div",{className:"w-full rounded-full",style:{height:`${R}%`,backgroundColor:lx(R)}})})]},Y)})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsx("div",{className:"text-center text-white/50",children:i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.printerDisconnected","Printer disconnected")})})}):i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center text-white/50",children:[i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.noPrinter","No printer selected")}),i.jsx("p",{className:"text-sm",children:n("spoolbuddy.ams.selectPrinter","Select a printer from the top bar")})]})})}),se&&t&&i.jsx(fie,{isOpen:!!se,onClose:()=>Z(null),printerId:t,slotInfo:se,printerModel:xrt(o?.model??null)||void 0,fullScreen:!0,onSuccess:()=>{r.invalidateQueries({queryKey:["slotPresets",t]}),r.invalidateQueries({queryKey:["printerStatus",t]})}}),de&&t&&(()=>{const Y=ge(de.amsId,de.trayId),V=Ne(de.amsId,de.trayId,de.tray);return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[i.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>me(null)}),i.jsxs("div",{className:"relative w-full max-w-sm mx-4 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-xl shadow-2xl",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-bambu-dark-tertiary",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[de.trayColor&&i.jsx("span",{className:"w-4 h-4 rounded-full border border-black/20",style:{backgroundColor:`#${de.trayColor.slice(0,6)}`}}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:de.location}),de.traySubBrands&&i.jsxs("span",{className:"text-sm text-bambu-gray",children:["(",de.traySubBrands,")"]})]}),i.jsx("button",{onClick:()=>me(null),className:"p-1 text-bambu-gray hover:text-white rounded transition-colors",children:i.jsx(qt,{className:"w-5 h-5"})})]}),i.jsxs("div",{className:"p-4 space-y-2",children:[!u&&Y?.spool&&i.jsxs("div",{className:"p-2.5 bg-bambu-dark rounded-lg border border-bambu-dark-tertiary mb-3",children:[i.jsx("p",{className:"text-xs text-bambu-gray mb-1",children:n("inventory.assignedSpool","Assigned spool")}),i.jsxs("div",{className:"flex items-center gap-2",children:[Y.spool.rgba&&i.jsx("span",{className:"w-3 h-3 rounded-full border border-black/20 flex-shrink-0",style:{backgroundColor:`#${Y.spool.rgba.substring(0,6)}`}}),i.jsxs("span",{className:"text-sm text-white",children:[Y.spool.brand?`${Y.spool.brand} `:"",Y.spool.material,Y.spool.color_name?` - ${Y.spool.color_name}`:""]})]})]}),u&&V&&i.jsxs("div",{className:"p-2.5 bg-bambu-dark rounded-lg border border-bambu-dark-tertiary mb-3",children:[i.jsx("p",{className:"text-xs text-bambu-gray mb-1",children:n("spoolman.linkedSpool","Linked spool")}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("span",{className:"text-sm text-white",children:["Spoolman #",V.id,V.remaining_weight!=null?` (${Math.round(V.remaining_weight)}g)`:""]})})]}),i.jsxs("button",{onClick:K,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-blue transition-colors text-left",children:[i.jsx(wd,{className:"w-5 h-5 text-bambu-blue flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("configureAmsSlot.title")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.configureDesc","Set filament preset, K-profile, and color")})]})]}),!u&&(Y?i.jsxs("button",{onClick:O,disabled:H.isPending,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-amber-500 transition-colors text-left",children:[i.jsx($h,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-amber-400 font-medium",children:n("inventory.unassignSpool","Unassign")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.unassignDesc","Remove inventory spool from this slot")})]})]}):i.jsxs("button",{onClick:B,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-green transition-colors text-left",children:[i.jsx(vi,{className:"w-5 h-5 text-bambu-green flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("inventory.assignSpool")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.assignDesc","Track a spool from your inventory")})]})]})),u&&(V?.id?i.jsxs("button",{onClick:()=>X.mutate(V.id),disabled:X.isPending,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-amber-500 transition-colors text-left",children:[i.jsx($h,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-amber-400 font-medium",children:n("spoolman.unlinkSpool")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.unlinkDesc","Remove Spoolman link from this slot")})]})]}):i.jsxs("button",{onClick:ie,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-green transition-colors text-left",children:[i.jsx(Lu,{className:"w-5 h-5 text-bambu-green flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("spoolman.linkToSpoolman")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.linkDesc","Link a Spoolman spool to this slot")})]})]}))]})]})]})})(),ue&&i.jsx(pie,{isOpen:!!ue,onClose:()=>{W(null),r.invalidateQueries({queryKey:["spool-assignments",t]})},printerId:ue.printerId,amsId:ue.amsId,trayId:ue.trayId,trayInfo:ue.trayInfo}),ae&&i.jsx(hie,{isOpen:!!ae,onClose:()=>le(null),tagUid:ae.tagUid,trayUuid:ae.trayUuid,printerId:ae.printerId,amsId:ae.amsId,trayId:ae.trayId})]})}function wrt({type:t,deviceId:e,onClose:n}){const{t:r}=jt(),[a,s]=w.useState(!1),[o,l]=w.useState(""),[c,d]=w.useState(""),[u,m]=w.useState(!1);w.useEffect(()=>{const y=v=>{v.key==="Escape"&&!a&&n()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a,n]);const p=w.useCallback(async()=>{s(!0),l(""),d(""),m(!0);try{l(r("spoolbuddy.diagnostic.queuing",`Queuing diagnostic on device... +${a("inventory.assignProfileMismatchMessage",{spoolProfile:p.spoolProfile||a("common.unknown"),trayProfile:p.trayProfile||a("common.unknown"),location:p.location})}`:p.type==="profile"&&(Ne=a("inventory.assignProfileMismatchMessage",{spoolProfile:p.spoolProfile||a("common.unknown"),trayProfile:p.trayProfile||a("common.unknown"),location:p.location})),i.jsx(_n,{title:a("inventory.assignMismatchTitle"),message:Ne,confirmText:a("inventory.assignMismatchConfirm"),variant:"warning",isLoading:se.isPending,onConfirm:ae,onCancel:()=>{se.isPending||(m(!1),v(null),f(null))}})})()]})}function hrt({isOpen:t,onClose:e,tagId:n,untaggedSpools:r,onLink:a}){const{t:s}=jt(),[o,l]=w.useState(null),c=w.useCallback(()=>{l(null),e()},[e]),d=w.useCallback(m=>{m.key==="Escape"&&c()},[c]);if(w.useEffect(()=>(t&&(document.addEventListener("keydown",d),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}),[t,d]),!t)return null;const u=()=>{o&&(a(o),l(null))};return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 animate-fade-in",onClick:c,children:i.jsxs("div",{className:"bg-zinc-800 rounded-xl shadow-2xl w-full max-w-lg mx-4 animate-slide-up",onClick:m=>m.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-700",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-base font-semibold text-zinc-100",children:s("spoolbuddy.dashboard.linkTagTitle","Link Tag to Spool")}),i.jsx("p",{className:"text-sm text-zinc-500 font-mono",children:n})]}),i.jsx("button",{onClick:c,className:"p-2 rounded-lg text-zinc-500 hover:text-zinc-300 hover:bg-zinc-700 transition-colors",children:i.jsx(qt,{className:"w-5 h-5"})})]}),i.jsxs("div",{className:"px-5 py-4 space-y-3 max-h-[400px] overflow-y-auto",children:[i.jsx("p",{className:"text-sm text-zinc-400",children:s("spoolbuddy.dashboard.selectSpool","Select a spool to link this tag to:")}),r.length===0?i.jsx("div",{className:"text-center py-8 text-zinc-500",children:s("spoolbuddy.dashboard.noUntagged","No spools without tags found")}):i.jsx("div",{className:"space-y-2",children:r.map(m=>i.jsxs("button",{type:"button",onClick:()=>l(m),className:`w-full flex items-center gap-3 p-3 rounded-lg border-2 transition-all text-left ${o?.id===m.id?"border-green-500 bg-green-500/10":"border-zinc-700 hover:border-green-500/50 hover:bg-zinc-700/50"}`,children:[i.jsx(U5,{color:m.rgba?`#${m.rgba.slice(0,6)}`:"#808080",isEmpty:!1,size:40}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"font-medium text-zinc-100 truncate",children:m.color_name||"Unknown color"}),i.jsxs("div",{className:"text-sm text-zinc-400 truncate",children:[m.brand," • ",m.material,m.subtype&&` ${m.subtype}`]})]}),i.jsxs("div",{className:"text-sm font-mono text-zinc-500",children:[Math.max(0,m.label_weight-m.weight_used),"g"]})]},m.id))})]}),i.jsxs("div",{className:"flex justify-end gap-2 px-5 py-4 border-t border-zinc-700",children:[i.jsx("button",{onClick:c,className:"px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors min-h-[44px]",children:s("common.cancel","Cancel")}),i.jsx("button",{onClick:u,disabled:!o,className:"px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors min-h-[44px]",children:s("spoolbuddy.dashboard.linkTag","Link Tag")})]})]})})}function eX(t){return t?t.replace(/[^0-9a-f]/gi,"").toUpperCase():""}function prt(t,e){const n=eX(t),r=eX(e);return!n||!r?!1:n===r?!0:n.endsWith(r)||r.endsWith(n)}const tX=["#00AE42","#FF6B35","#3B82F6","#EF4444","#A855F7","#FBBF24","#14B8A6","#EC4899","#F97316","#22C55E"];function frt(){const{t}=jt(),[e,n]=w.useState(0);w.useEffect(()=>{const a=setInterval(()=>{n(s=>(s+1)%tX.length)},5e3);return()=>clearInterval(a)},[]);const r=tX[e];return i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsxs("div",{className:"relative mb-6 flex items-center justify-center",style:{width:160,height:160},children:[i.jsx("div",{className:"absolute w-24 h-24 rounded-full border-2 border-green-500/30"}),i.jsx("div",{className:"absolute w-32 h-32 rounded-full border border-green-500/20"}),i.jsx("div",{className:"absolute w-40 h-40 rounded-full border border-green-500/10"}),i.jsx("div",{className:"relative transition-colors duration-[2000ms]",children:i.jsx(U5,{color:r,isEmpty:!1,size:100})})]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-xl font-medium text-zinc-300",children:t("spoolbuddy.dashboard.readyToScan","Ready to scan")}),i.jsx("p",{className:"text-sm text-zinc-500",children:t("spoolbuddy.dashboard.idleMessage","Place a spool on the scale to identify it")})]}),i.jsxs("div",{className:"mt-6 flex items-center gap-2 text-sm text-zinc-600",children:[i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("span",{children:t("spoolbuddy.dashboard.nfcHint","NFC tag will be read automatically")})]})]})}function grt(){const{t}=jt();return i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("div",{className:"relative mb-6 flex items-center justify-center",style:{width:160,height:160},children:i.jsx("div",{className:"w-24 h-24 rounded-full bg-zinc-800 flex items-center justify-center",children:i.jsx("svg",{className:"w-12 h-12 text-zinc-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M18.364 5.636a9 9 0 010 12.728m0 0l-12.728-12.728m12.728 12.728L5.636 5.636m12.728 0a9 9 0 00-12.728 0m0 12.728a9 9 0 010-12.728"})})})}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("p",{className:"text-lg font-medium text-zinc-500",children:t("spoolbuddy.status.deviceOffline","Device Offline")}),i.jsx("p",{className:"text-sm text-zinc-600",children:t("spoolbuddy.status.connectDisplay","Connect the SpoolBuddy display to scan spools")})]}),i.jsxs("div",{className:"mt-6 flex items-center gap-2 text-xs text-zinc-600",children:[i.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.14 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"})}),i.jsx("span",{children:t("spoolbuddy.status.waitingConnection","Waiting for device connection...")})]})]})}function brt(){const{sbState:t,selectedPrinterId:e}=bw(),{t:n}=jt(),{data:r=[],refetch:a}=Je({queryKey:["inventory-spools"],queryFn:()=>fe.getSpools(!1)}),{data:s=[]}=Je({queryKey:["printers"],queryFn:()=>fe.getPrinters()}),o=tp({queries:s.map(W=>({queryKey:["printerStatus",W.id],queryFn:()=>fe.getPrinterStatus(W.id),refetchInterval:1e4,select:ae=>({connected:ae?.connected})}))}),[l,c]=w.useState(null),[d,u]=w.useState(null),[m,p]=w.useState(null),[f,y]=w.useState(!1),[v,b]=w.useState(!1),[g,_]=w.useState(!1),[N,C]=w.useState(!1),k=t.matchedSpool?.tag_uid??t.unknownTagUid??null,P=t.weight,T=t.weightStable,j=w.useRef(null);P===null?j.current=null:(j.current===null||Math.abs(P-j.current)>=3||T)&&(j.current=P);const F=j.current,G=w.useMemo(()=>{if(t.matchedSpool?.id){const W=r.find(ae=>ae.id===t.matchedSpool?.id);if(W)return W}return l?r.find(W=>prt(W.tag_uid,l))??null:null},[l,t.matchedSpool,r]),z=w.useMemo(()=>r.filter(W=>!W.tag_uid&&!W.archived_at),[r]);w.useEffect(()=>{if(k){const W=m===k;(l!==null&&l!==k||!W&&l!==k)&&(c(k),u(null),p(null)),!W&&P!==null&&T&&u(Math.round(Math.max(0,P)))}else m&&(c(null),p(null),u(null))},[k,P,T,l,m]);const J=()=>{p(l)},I=async W=>{if(l)try{await fe.linkTagToSpool(W.id,{tag_uid:l,tag_type:"generic",data_origin:"nfc_link"}),y(!1),a()}catch(ae){console.error("Failed to link tag:",ae)}},te=async()=>{if(l){C(!0);try{const W=Z??d;await fe.createSpool({material:"PLA",subtype:null,color_name:null,rgba:null,brand:null,label_weight:1e3,core_weight:250,core_weight_catalog_id:null,weight_used:0,slicer_filament:null,slicer_filament_name:null,nozzle_temp_min:null,nozzle_temp_max:null,note:null,added_full:null,last_used:null,encode_time:null,tag_uid:l,tray_uuid:null,data_origin:"spoolbuddy",tag_type:"generic",cost_per_kg:null,last_scale_weight:W,last_weighed_at:W!==null?new Date().toISOString():null}),_(!1),a()}catch(W){console.error("Failed to quick-add spool:",W)}finally{C(!1)}}},Z=P!==null&&(k===l||k===null&&l!==null)?P:null,de=r.length,me=new Set(r.map(W=>W.material)).size,ue=new Set(r.filter(W=>W.brand).map(W=>W.brand)).size;return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsxs("div",{className:"flex items-center gap-6 px-4 py-1.5 bg-zinc-800/50 rounded-xl border border-zinc-700/50 mb-3 shrink-0",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:de}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.inventory.spools","Spools")})]}),i.jsx("div",{className:"w-px h-5 bg-zinc-700"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:me}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.material","Materials")})]}),i.jsx("div",{className:"w-px h-5 bg-zinc-700"}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xl font-bold text-zinc-100",children:ue}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.brand","Brands")})]})]}),i.jsxs("div",{className:"flex-1 flex gap-4 min-h-0",children:[i.jsxs("div",{className:"w-5/12 flex flex-col min-h-0",children:[i.jsxs("div",{className:"border border-dashed border-zinc-700/50 rounded-xl p-4",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-3",children:n("spoolbuddy.dashboard.device","Device")}),i.jsxs("div",{className:"space-y-2.5",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:`w-2.5 h-2.5 rounded-full ${t.deviceOnline?"bg-green-500":"bg-red-500"}`}),i.jsx("span",{className:"text-base text-zinc-400",children:t.deviceOnline?n("spoolbuddy.status.online","Online"):n("spoolbuddy.status.offline","Disconnected")})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-zinc-800/50 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("svg",{className:`w-4 h-4 ${t.deviceOnline?"text-green-500":"text-zinc-500"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 6l3 1m0 0l-3 9a5.002 5.002 0 006.001 0M6 7l3 9M6 7l6-2m6 2l3-1m-3 1l-3 9a5.002 5.002 0 006.001 0M18 7l3 9m-3-9l-6-2m0-2v2m0 16V5m0 16H9m3 0h3"})}),i.jsx("span",{className:"text-sm text-zinc-500",children:n("spoolbuddy.spool.scaleWeight","Scale")})]}),i.jsx("span",{className:"text-lg font-mono font-semibold text-zinc-100",children:F!==null?`${Math.abs(F)<=20?0:Math.round(Math.max(0,F))}g`:"—"})]}),i.jsxs("div",{className:"flex items-center justify-between p-3 bg-zinc-800/50 rounded-lg",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("svg",{className:`w-4 h-4 ${t.deviceOnline?"text-green-500":"text-zinc-500"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A2 2 0 013 12V7a4 4 0 014-4z"})}),i.jsx("span",{className:"text-sm text-zinc-500",children:"NFC"})]}),i.jsx("span",{className:`text-sm font-medium ${k?"text-green-500":"text-zinc-500"}`,children:k?n("spoolbuddy.dashboard.tagDetected","Tag detected"):n("spoolbuddy.dashboard.noTag","No tag")})]})]})]}),s.length>0&&i.jsxs("div",{className:"mt-3 border border-dashed border-zinc-700/50 rounded-xl p-4",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-2.5",children:n("spoolbuddy.dashboard.printers","Printers")}),i.jsx("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:s.map((W,ae)=>{const le=o[ae]?.data?.connected??!1;return i.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-zinc-800/50 rounded-lg",title:`${W.name} — ${le?"Online":"Offline"}`,children:[i.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${le?"bg-green-500":"bg-zinc-600"}`}),i.jsx("span",{className:"text-xs text-zinc-400 truncate max-w-[100px]",children:W.name})]},W.id)})})]})]}),i.jsx("div",{className:"w-7/12 min-h-0",children:i.jsxs("div",{className:"border border-dashed border-zinc-700/50 rounded-xl p-6 h-full flex flex-col",children:[i.jsx("h2",{className:"text-sm font-semibold text-zinc-400 uppercase tracking-wide mb-4 shrink-0",children:n("spoolbuddy.dashboard.currentSpool","Current Spool")}),i.jsx("div",{className:"flex-1 flex items-center justify-center min-h-0",children:t.deviceOnline?(G||t.matchedSpool)&&l&&m!==l?i.jsx(Znt,{spool:{id:G?.id??t.matchedSpool.id,tag_uid:l,material:G?.material??t.matchedSpool.material,subtype:G?.subtype??t.matchedSpool.subtype,color_name:G?.color_name??t.matchedSpool.color_name,rgba:G?.rgba??t.matchedSpool.rgba,brand:G?.brand??t.matchedSpool.brand,label_weight:G?.label_weight??t.matchedSpool.label_weight,core_weight:G?.core_weight??t.matchedSpool.core_weight,weight_used:G?.weight_used??t.matchedSpool.weight_used},scaleWeight:Z??d,onSyncWeight:()=>a(),onAssignToAms:()=>b(!0),onClose:J}):k&&l&&!G&&!t.matchedSpool&&m!==l?i.jsx(Jnt,{tagUid:l,scaleWeight:Z??d,onLinkSpool:z.length>0?()=>y(!0):void 0,onAddToInventory:()=>_(!0),onClose:J}):i.jsx(frt,{}):i.jsx(grt,{})})]})})]}),G&&l&&i.jsx(mrt,{isOpen:v,onClose:()=>b(!1),spool:G,printerId:e}),l&&i.jsx(hrt,{isOpen:f,onClose:()=>y(!1),tagId:l,untaggedSpools:z,onLink:I}),g&&l&&i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",children:i.jsxs("div",{className:"bg-zinc-800 rounded-2xl p-6 mx-4 max-w-sm w-full border border-zinc-700",children:[i.jsx("h3",{className:"text-lg font-semibold text-zinc-100 mb-3",children:n("spoolbuddy.modal.addToInventory","Add to Inventory")}),i.jsxs("div",{className:"flex gap-2.5 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg mb-4",children:[i.jsx("svg",{className:"w-5 h-5 text-amber-500 shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),i.jsx("p",{className:"text-sm text-amber-200/80",children:n("spoolbuddy.modal.quickAddHint",'For best results, add the spool in the Bambuddy web interface first (with material, color, brand), then use "Link to Spool" here to assign the NFC tag.')})]}),i.jsx("p",{className:"text-sm text-zinc-400 mb-1",children:n("spoolbuddy.modal.quickAddDesc","This will create a basic PLA spool entry with this NFC tag. You can edit the details later in Bambuddy.")}),i.jsx("p",{className:"text-xs text-zinc-500 font-mono mb-5",children:l}),i.jsxs("div",{className:"flex gap-3",children:[i.jsx("button",{onClick:()=>_(!1),className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors min-h-[44px]",children:n("common.cancel","Cancel")}),i.jsx("button",{onClick:te,disabled:N,className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-50 transition-colors min-h-[44px]",children:N?n("common.saving","Saving..."):n("spoolbuddy.modal.addAnyway","Add Anyway")})]})]})})]})}function nX(t){return t<=3?`AMS ${String.fromCharCode(65+t)}`:t>=128&&t<=135?`AMS HT ${String.fromCharCode(65+t-128)}`:`AMS ${t}`}function xrt(t){return t?{O1D:"H2D",O1E:"H2D Pro",O2D:"H2D Pro",O1C:"H2C",O1C2:"H2C",O1S:"H2S","BL-P001":"X1C","BL-P002":"X1","BL-P003":"X1E",C11:"P1S",C12:"P1P",C13:"P2S",N2S:"A1",N1:"A1 Mini",X1C:"X1C",X1:"X1",X1E:"X1E",P1S:"P1S",P1P:"P1P",P2S:"P2S",A1:"A1","A1 Mini":"A1 Mini",H2D:"H2D","H2D Pro":"H2D Pro",H2C:"H2C",H2S:"H2S"}[t]||t:""}function $p(t){return!t.tray_type||t.tray_type===""}function yrt(t){return t?`#${t.slice(0,6)}`:"#808080"}function vrt(){const{selectedPrinterId:t,setAlert:e}=bw(),{t:n}=jt(),r=cn(),{showToast:a}=pn(),{data:s}=Je({queryKey:["printerStatus",t],queryFn:()=>fe.getPrinterStatus(t),enabled:t!==null,staleTime:30*1e3}),{data:o}=Je({queryKey:["printer",t],queryFn:()=>fe.getPrinter(t),enabled:t!==null,staleTime:60*1e3}),{data:l}=Je({queryKey:["slotPresets",t],queryFn:()=>fe.getSlotPresets(t),enabled:t!==null,staleTime:120*1e3}),{data:c}=Je({queryKey:["settings"],queryFn:()=>fe.getSettings(),staleTime:300*1e3}),{data:d}=Je({queryKey:["spoolman-status"],queryFn:fe.getSpoolmanStatus,staleTime:60*1e3}),u=d?.enabled&&d?.connected,{data:m}=Je({queryKey:["linked-spools"],queryFn:fe.getLinkedSpools,enabled:!!u,staleTime:30*1e3}),p=m?.linked,{data:f}=Je({queryKey:["spool-assignments",t],queryFn:()=>fe.getAssignments(t),enabled:t!==null,staleTime:30*1e3}),y=w.useMemo(()=>{const Y={};if(!f)return Y;for(const V of f){const ee=V.spool;if(ee&&ee.label_weight>0&&ee.weight_used!=null){const oe=Math.round(Math.max(0,ee.label_weight-ee.weight_used)/ee.label_weight*100);Y[`${V.ams_id}-${V.tray_id}`]=oe}}return Y},[f]),v=o?.serial_number??"",b=w.useCallback((Y,V,ee)=>{if(!p||!v)return null;const oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase(),he=oe?p[oe]:void 0;return _N(he)},[p,v]),g=s?.connected??!1,_=w.useRef([]);w.useEffect(()=>{s?.ams&&s.ams.length>0&&(_.current=s.ams)},[s?.ams]);const N=w.useMemo(()=>{const Y=s?.ams;return Y&&Y.length>0?Y:_.current??[]},[s?.ams]),C=w.useMemo(()=>N.filter(Y=>!Y.is_ams_ht),[N]),k=w.useMemo(()=>N.filter(Y=>Y.is_ams_ht),[N]),P=w.useMemo(()=>{const Y={};if(!p||!v)return Y;for(const V of C)for(let ee=0;ee<(V.tray?.length??0);ee++){const oe=V.tray[ee],he=b(V.id,ee,$p(oe)?null:oe);he!==null&&(Y[`${V.id}-${ee}`]=he)}return Y},[p,v,C,b]),T=w.useRef(void 0),j=s?.tray_now;j!==void 0&&j!==255?T.current=j:j===255&&(T.current=void 0);const A=j!==void 0&&j!==255?j:T.current,F=o?.nozzle_count===2||s?.temperatures?.nozzle_2!==void 0,G=w.useMemo(()=>[...s?.vt_tray??[]].sort((Y,V)=>(Y.id??254)-(V.id??254)),[s?.vt_tray]),z=c?{humidityGood:Number(c.ams_humidity_good)||40,humidityFair:Number(c.ams_humidity_fair)||60,tempGood:Number(c.ams_temp_good)||28,tempFair:Number(c.ams_temp_fair)||35}:void 0,J=w.useRef({});w.useEffect(()=>{s?.ams_extruder_map&&Object.keys(s.ams_extruder_map).length>0&&(J.current=s.ams_extruder_map)},[s?.ams_extruder_map]);const I=s?.ams_extruder_map&&Object.keys(s.ams_extruder_map).length>0?s.ams_extruder_map:J.current,te=w.useCallback(Y=>{if(!F)return null;const V=I[String(Y)],ee=Y>=128?Y-128:Y;return(V!==void 0?V:ee)===1?"L":"R"},[F,I]),[se,Z]=w.useState(null),[de,me]=w.useState(null),[ue,W]=w.useState(null),[ae,le]=w.useState(null),ge=w.useCallback((Y,V)=>f?.find(ee=>ee.ams_id===Number(Y)&&ee.tray_id===Number(V)),[f]),Ne=w.useCallback((Y,V,ee)=>{if(!p||!v)return;const oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase();return oe?p[oe]:void 0},[p,v]),H=ht({mutationFn:({printerId:Y,amsId:V,trayId:ee})=>fe.unassignSpool(Y,V,ee),onSuccess:()=>{r.invalidateQueries({queryKey:["spool-assignments",t]}),a(n("inventory.unassignSuccess","Spool unassigned"),"success"),me(null)}}),X=ht({mutationFn:Y=>fe.unlinkSpool(Y),onSuccess:Y=>{a(n("spoolman.unlinkSuccess")||Y?.message,"success"),r.invalidateQueries({queryKey:["linked-spools"]}),r.invalidateQueries({queryKey:["unlinked-spools"]}),me(null)},onError:Y=>{a(Y.message||n("spoolman.unlinkFailed"),"error")}}),D=w.useCallback(Y=>A===void 0?null:Y<=3&&Math.floor(A/4)===Y?A%4:Y>=128&&Y<=135&&A===Rx(Y,0,!1)?0:null,[A]),M=w.useCallback((Y,V,ee)=>{const oe=Y>=128?(Y-128)*4+V+64:Y*4+V,he=l?.[oe],pe=I[String(Y)],re=Y>=128?Y-128:Y,L=pe!==void 0?pe:re,R={amsId:Y,trayId:V,trayCount:ee&&Y>=128?1:4,tray:ee,trayType:ee?.tray_type||void 0,trayColor:ee?.tray_color||void 0,traySubBrands:ee?.tray_sub_brands||void 0,trayInfoIdx:ee?.tray_info_idx||void 0,extruderId:F?L:void 0,caliIdx:ee?.cali_idx,savedPresetId:he?.preset_id,location:`${nX(Y)} Slot ${V+1}`};me(R)},[l,I,F]),U=w.useCallback(Y=>{const V=Y.id??254,ee=V-254,oe=l?.[1020+ee],he={amsId:255,trayId:ee,trayCount:1,tray:$p(Y)?null:Y,trayType:Y.tray_type||void 0,trayColor:Y.tray_color||void 0,traySubBrands:Y.tray_sub_brands||void 0,trayInfoIdx:Y.tray_info_idx||void 0,extruderId:F?V===254?1:0:void 0,caliIdx:Y.cali_idx,savedPresetId:oe?.preset_id,location:F?V===254?"Ext-L":"Ext-R":"External"};me(he)},[l,F]),K=w.useCallback(()=>{if(!de)return;const{tray:Y,location:V,...ee}=de;me(null),Z(ee)},[de]),B=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V,trayType:ee,trayColor:oe,location:he}=de;me(null),W({printerId:t,amsId:Y,trayId:V,trayInfo:{type:ee||"",material:ee,color:oe?.slice(0,6)||"",location:he}})},[de,t]),ie=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V,tray:ee}=de,oe=(ee?.tray_uuid||ee?.tag_uid||_u(v,Y,V))?.toUpperCase()||"";me(null),le({tagUid:ee?.tag_uid||oe,trayUuid:ee?.tray_uuid||"",printerId:t,amsId:Y,trayId:V})},[de,t,v]),O=w.useCallback(()=>{if(!de||!t)return;const{amsId:Y,trayId:V}=de;H.mutate({printerId:t,amsId:Y,trayId:V})},[de,t,H]);w.useEffect(()=>{if(!g&&t){e({type:"warning",message:n("spoolbuddy.ams.printerDisconnected","Printer disconnected")});return}for(const Y of N){const V=Y.tray||[];for(let ee=0;ee=0&&oe.remain<15&&oe.tray_type){const he=Y.id===254||Y.id===255,pe=!he&&Y.id>=128,re=Jw(Y.id,ee,pe,he);e({type:"warning",message:`Low Filament: ${oe.tray_type} (${re}) - ${oe.remain}% remaining`});return}}}e(null)},[N,g,t,e,n]);const q=w.useMemo(()=>{const Y=[];for(const V of k){const ee=V.tray?.[0]||{id:0,tray_color:null,tray_type:"",tray_sub_brands:null,tray_id_name:null,tray_info_idx:null,remain:-1,k:null,cali_idx:null,tag_uid:null,tray_uuid:null,nozzle_temp_min:null,nozzle_temp_max:null},oe=b(V.id,0,$p(ee)?null:ee),he=y[`${V.id}-0`]??null,pe=ee.remain!=null&&ee.remain>=0?ee.remain:null,re=he===0&&pe!==null&&pe>0?null:he;Y.push({key:`ht-${V.id}`,label:nX(V.id),tray:ee,isEmpty:$p(ee),isActive:D(V.id)===0,temp:V.temp,humidity:V.humidity,nozzleSide:te(V.id),effectiveFill:oe??re??pe,onClick:()=>M(V.id,0,$p(ee)?null:ee)})}for(const V of G){const ee=V.id??254,oe=F&&A===254?ee===254&&s?.active_extruder===1||ee===255&&s?.active_extruder===0:A===ee,he=ee-254,pe=b(255,he,$p(V)?null:V),re=y[`255-${he}`]??null,L=V.remain!=null&&V.remain>=0?V.remain:null,R=re===0&&L!==null&&L>0?null:re;Y.push({key:`ext-${ee}`,label:F?ee===254?n("printers.extL","Ext-L"):n("printers.extR","Ext-R"):n("printers.ext","Ext"),tray:V,isEmpty:$p(V),isActive:oe,nozzleSide:null,effectiveFill:pe??R??L,onClick:()=>U(V)})}return Y},[k,G,F,A,s?.active_extruder,n,D,te,M,U,y,b]);return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsx("div",{className:"flex-1 min-h-0",children:t?g?N.length===0&&G.length===0?i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center text-white/50",children:[i.jsx(Yi,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.noData","No AMS detected")}),i.jsx("p",{className:"text-sm",children:n("spoolbuddy.ams.connectAms","Connect an AMS to see filament slots")})]})}):i.jsxs("div",{className:"flex flex-col gap-3 h-full",children:[i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:C.map(Y=>i.jsx(Ale,{unit:Y,activeSlot:D(Y.id),onConfigureSlot:M,isDualNozzle:F,nozzleSide:te(Y.id),thresholds:z,fillOverrides:y,spoolmanFillOverrides:P},Y.id))}),q.length>0&&i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:q.map(({key:Y,label:V,tray:ee,isEmpty:oe,isActive:he,temp:pe,humidity:re,nozzleSide:L,effectiveFill:R,onClick:ne})=>{const ye=yrt(ee.tray_color);return i.jsxs("div",{className:`bg-bambu-dark-secondary rounded-lg px-3 py-2 cursor-pointer hover:bg-bambu-dark-secondary/80 transition-all flex items-center gap-3 ${he?"ring-2 ring-bambu-green":""}`,onClick:ne,children:[i.jsxs("div",{className:"relative w-10 h-10 flex-shrink-0",children:[oe?i.jsx("div",{className:"w-full h-full rounded-full border-2 border-dashed border-gray-500 flex items-center justify-center",children:i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-gray-600"})}):i.jsxs("svg",{viewBox:"0 0 56 56",className:"w-full h-full",children:[i.jsx("circle",{cx:"28",cy:"28",r:"26",fill:ye}),i.jsx("circle",{cx:"28",cy:"28",r:"20",fill:ye,style:{filter:"brightness(0.85)"}}),i.jsx("ellipse",{cx:"20",cy:"20",rx:"6",ry:"4",fill:"white",opacity:"0.3"}),i.jsx("circle",{cx:"28",cy:"28",r:"8",fill:"#2d2d2d"}),i.jsx("circle",{cx:"28",cy:"28",r:"5",fill:"#1a1a1a"})]}),he&&i.jsx("div",{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 bg-bambu-green rounded-full"})]}),i.jsxs("div",{className:"min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx("span",{className:"text-xs text-white/50 font-medium truncate",children:V}),L&&i.jsx(B5,{side:L})]}),i.jsx("div",{className:"text-sm text-white/80 truncate",children:oe?"Empty":ee.tray_type||"?"}),(pe!=null||re!=null)&&i.jsxs("div",{className:"flex items-center gap-1.5",children:[pe!=null&&i.jsx(Tle,{temp:pe,goodThreshold:z?.tempGood,fairThreshold:z?.tempFair}),re!=null&&i.jsx(Cle,{humidity:re,goodThreshold:z?.humidityGood,fairThreshold:z?.humidityFair})]})]}),!oe&&R!=null&&R>=0&&i.jsx("div",{className:"w-1.5 h-8 bg-bambu-dark-tertiary rounded-full overflow-hidden flex-shrink-0 flex flex-col-reverse",children:i.jsx("div",{className:"w-full rounded-full",style:{height:`${R}%`,backgroundColor:lx(R)}})})]},Y)})})]}):i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsx("div",{className:"text-center text-white/50",children:i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.printerDisconnected","Printer disconnected")})})}):i.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:i.jsxs("div",{className:"text-center text-white/50",children:[i.jsx("p",{className:"text-lg mb-2",children:n("spoolbuddy.ams.noPrinter","No printer selected")}),i.jsx("p",{className:"text-sm",children:n("spoolbuddy.ams.selectPrinter","Select a printer from the top bar")})]})})}),se&&t&&i.jsx(fie,{isOpen:!!se,onClose:()=>Z(null),printerId:t,slotInfo:se,printerModel:xrt(o?.model??null)||void 0,fullScreen:!0,onSuccess:()=>{r.invalidateQueries({queryKey:["slotPresets",t]}),r.invalidateQueries({queryKey:["printerStatus",t]})}}),de&&t&&(()=>{const Y=ge(de.amsId,de.trayId),V=Ne(de.amsId,de.trayId,de.tray);return i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[i.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>me(null)}),i.jsxs("div",{className:"relative w-full max-w-sm mx-4 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-xl shadow-2xl",children:[i.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-bambu-dark-tertiary",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[de.trayColor&&i.jsx("span",{className:"w-4 h-4 rounded-full border border-black/20",style:{backgroundColor:`#${de.trayColor.slice(0,6)}`}}),i.jsx("h2",{className:"text-lg font-semibold text-white",children:de.location}),de.traySubBrands&&i.jsxs("span",{className:"text-sm text-bambu-gray",children:["(",de.traySubBrands,")"]})]}),i.jsx("button",{onClick:()=>me(null),className:"p-1 text-bambu-gray hover:text-white rounded transition-colors",children:i.jsx(qt,{className:"w-5 h-5"})})]}),i.jsxs("div",{className:"p-4 space-y-2",children:[!u&&Y?.spool&&i.jsxs("div",{className:"p-2.5 bg-bambu-dark rounded-lg border border-bambu-dark-tertiary mb-3",children:[i.jsx("p",{className:"text-xs text-bambu-gray mb-1",children:n("inventory.assignedSpool","Assigned spool")}),i.jsxs("div",{className:"flex items-center gap-2",children:[Y.spool.rgba&&i.jsx("span",{className:"w-3 h-3 rounded-full border border-black/20 flex-shrink-0",style:{backgroundColor:`#${Y.spool.rgba.substring(0,6)}`}}),i.jsxs("span",{className:"text-sm text-white",children:[Y.spool.brand?`${Y.spool.brand} `:"",Y.spool.material,Y.spool.color_name?` - ${Y.spool.color_name}`:""]})]})]}),u&&V&&i.jsxs("div",{className:"p-2.5 bg-bambu-dark rounded-lg border border-bambu-dark-tertiary mb-3",children:[i.jsx("p",{className:"text-xs text-bambu-gray mb-1",children:n("spoolman.linkedSpool","Linked spool")}),i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("span",{className:"text-sm text-white",children:["Spoolman #",V.id,V.remaining_weight!=null?` (${Math.round(V.remaining_weight)}g)`:""]})})]}),i.jsxs("button",{onClick:K,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-blue transition-colors text-left",children:[i.jsx(wd,{className:"w-5 h-5 text-bambu-blue flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("configureAmsSlot.title")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.configureDesc","Set filament preset, K-profile, and color")})]})]}),!u&&(Y?i.jsxs("button",{onClick:O,disabled:H.isPending,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-amber-500 transition-colors text-left",children:[i.jsx($h,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-amber-400 font-medium",children:n("inventory.unassignSpool","Unassign")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.unassignDesc","Remove inventory spool from this slot")})]})]}):i.jsxs("button",{onClick:B,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-green transition-colors text-left",children:[i.jsx(vi,{className:"w-5 h-5 text-bambu-green flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("inventory.assignSpool")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.assignDesc","Track a spool from your inventory")})]})]})),u&&(V?.id?i.jsxs("button",{onClick:()=>X.mutate(V.id),disabled:X.isPending,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-amber-500 transition-colors text-left",children:[i.jsx($h,{className:"w-5 h-5 text-amber-400 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-amber-400 font-medium",children:n("spoolman.unlinkSpool")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.unlinkDesc","Remove Spoolman link from this slot")})]})]}):i.jsxs("button",{onClick:ie,className:"w-full flex items-center gap-3 p-3 rounded-lg bg-bambu-dark border border-bambu-dark-tertiary hover:border-bambu-green transition-colors text-left",children:[i.jsx(Lu,{className:"w-5 h-5 text-bambu-green flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"text-white font-medium",children:n("spoolman.linkToSpoolman")}),i.jsx("p",{className:"text-xs text-bambu-gray",children:n("spoolbuddy.ams.linkDesc","Link a Spoolman spool to this slot")})]})]}))]})]})]})})(),ue&&i.jsx(pie,{isOpen:!!ue,onClose:()=>{W(null),r.invalidateQueries({queryKey:["spool-assignments",t]})},printerId:ue.printerId,amsId:ue.amsId,trayId:ue.trayId,trayInfo:ue.trayInfo}),ae&&i.jsx(hie,{isOpen:!!ae,onClose:()=>le(null),tagUid:ae.tagUid,trayUuid:ae.trayUuid,printerId:ae.printerId,amsId:ae.amsId,trayId:ae.trayId})]})}function wrt({type:t,deviceId:e,onClose:n}){const{t:r}=jt(),[a,s]=w.useState(!1),[o,l]=w.useState(""),[c,d]=w.useState(""),[u,m]=w.useState(!1);w.useEffect(()=>{const y=v=>{v.key==="Escape"&&!a&&n()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a,n]);const p=w.useCallback(async()=>{s(!0),l(""),d(""),m(!0);try{l(r("spoolbuddy.diagnostic.queuing",`Queuing diagnostic on device... `)),await zi.queueDiagnostics(e,t);let y=null;const v=60;let b=0;for(;bsetTimeout(g,500));try{y=await zi.getDiagnosticResult(e,t);break}catch{b++,b%4===0&&l(g=>g+".")}}if(!y)throw new Error("Diagnostic timed out - device did not report results");l(y.output),y.success||d(`Exit code: ${y.exit_code}`)}catch(y){d(y instanceof Error?y.message:"Unknown error"),l("")}finally{s(!1)}},[t,e,r]),f=t==="scale"?r("spoolbuddy.diagnostic.scaleTitle","Scale Diagnostic"):t==="read_tag"?r("spoolbuddy.diagnostic.readTagTitle","Read Tag Diagnostic"):r("spoolbuddy.diagnostic.nfcTitle","NFC Reader Diagnostic");return i.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 animate-fade-in",onClick:n,children:i.jsxs("div",{className:"bg-zinc-800 rounded-lg shadow-xl w-full max-w-2xl mx-4 max-h-[80vh] flex flex-col animate-slide-up",onClick:y=>y.stopPropagation(),children:[i.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-zinc-700",children:[i.jsx("h2",{className:"text-lg font-semibold text-white",children:f}),i.jsx("button",{onClick:n,className:"text-zinc-400 hover:text-white transition-colors","aria-label":"Close",children:i.jsx(qt,{size:20})})]}),i.jsx("div",{className:"flex-1 overflow-auto p-4 bg-black/50 font-mono text-sm",children:a?i.jsxs("div",{className:"flex items-center gap-2 text-green-400",children:[i.jsx("div",{className:"animate-spin w-4 h-4 border-2 border-green-400 border-t-transparent rounded-full"}),i.jsx("span",{children:r("spoolbuddy.diagnostic.running","Running diagnostic on device...")})]}):o?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"text-green-400 whitespace-pre-wrap break-words",children:o}),c&&i.jsxs("div",{className:"text-red-400 mt-2",children:["❌ ",c]})]}):u?i.jsx("div",{children:c?i.jsxs("div",{className:"text-red-400",children:["ERROR: ",c]}):i.jsx("span",{className:"text-green-400",children:r("spoolbuddy.diagnostic.completed","Diagnostic completed successfully.")})}):i.jsxs("div",{className:"text-zinc-500",children:[r("spoolbuddy.diagnostic.clickStart",'Click "Run Diagnostic" to start the hardware diagnostic on')," ",e,"."]})}),i.jsxs("div",{className:"flex gap-2 p-4 border-t border-zinc-700 bg-zinc-800",children:[i.jsx("button",{onClick:p,disabled:a,className:"flex-1 flex items-center justify-center gap-2 bg-green-600 hover:bg-green-700 disabled:bg-gray-600 disabled:cursor-not-allowed px-4 py-2 rounded font-semibold text-white transition-colors",children:a?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"animate-spin w-4 h-4 border-2 border-white border-t-transparent rounded-full"}),r("spoolbuddy.diagnostic.runningBtn","Running...")]}):u?i.jsxs(i.Fragment,{children:[i.jsx(lbe,{size:16}),r("spoolbuddy.diagnostic.runAgain","Run Again")]}):i.jsxs(i.Fragment,{children:[i.jsx(Ys,{size:16}),r("spoolbuddy.diagnostic.runBtn","Run Diagnostic")]})}),i.jsx("button",{onClick:n,className:"px-4 py-2 rounded bg-zinc-700 hover:bg-zinc-600 text-white font-semibold transition-colors",children:r("spoolbuddy.diagnostic.close","Close")})]})]})})}function Srt(t){if(t<60)return`${t}s`;if(t<3600)return`${Math.floor(t/60)}m`;const e=Math.floor(t/3600),n=Math.floor(t%3600/60);return`${e}h ${n}m`}function _rt(t){if(!t)return"-";try{const e=new Date(t);return e.toLocaleDateString(void 0,{month:"short",day:"numeric"})+" "+e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}catch{return"-"}}const Nrt=[{label:"Off",value:0},{label:"1m",value:60},{label:"2m",value:120},{label:"5m",value:300},{label:"10m",value:600},{label:"30m",value:1800}];function krt({device:t}){const{t:e}=jt(),[n,r]=w.useState(null),[a,s]=w.useState(""),[o,l]=w.useState(""),[c,d]=w.useState(!1),[u,m]=w.useState(null);w.useEffect(()=>{!a&&t.backend_url&&s(t.backend_url)},[t.backend_url,a]);const p=async()=>{if(!a.trim()){m({type:"error",text:e("spoolbuddy.settings.systemFieldsRequired","Backend URL is required.")});return}d(!0),m(null);try{await zi.updateSystemConfig(t.device_id,a.trim(),o.trim()||void 0),m({type:"ok",text:e("spoolbuddy.settings.systemQueued","Config queued.")})}catch(f){m({type:"error",text:f instanceof Error?f.message:e("common.error","Error")})}finally{d(!1)}};return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-2",children:e("spoolbuddy.settings.nfcReader","NFC Reader")}),i.jsxs("div",{className:"space-y-1.5 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.type","Type")}),i.jsx("span",{className:"text-zinc-300 font-mono",children:t.nfc_reader_type||"N/A"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.connection","Connection")}),i.jsx("span",{className:"text-zinc-300 font-mono",children:t.nfc_connection||"N/A"})]}),i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.status.status","Status")}),i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("div",{className:`w-2 h-2 rounded-full ${t.nfc_ok?"bg-green-500":t.nfc_reader_type?"bg-red-500":"bg-zinc-600"}`}),i.jsx("span",{className:t.nfc_ok?"text-green-400":t.nfc_reader_type?"text-red-400":"text-zinc-500",children:t.nfc_ok?e("spoolbuddy.status.nfcReady","Ready"):t.nfc_reader_type?e("common.error","Error"):e("spoolbuddy.settings.notConnected","N/A")})]})]})]})]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-2",children:e("spoolbuddy.settings.deviceInfo","Device Info")}),i.jsxs("div",{className:"space-y-1.5 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.hostname","Host")}),i.jsx("span",{className:"text-zinc-300 truncate ml-2",children:t.hostname})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:"IP"}),i.jsx("span",{className:"text-zinc-300",children:t.ip_address})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.uptime","Uptime")}),i.jsx("span",{className:"text-zinc-300",children:Srt(t.uptime_s)})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:"ID"}),i.jsx("span",{className:"text-zinc-400 font-mono truncate ml-2",children:t.device_id})]})]})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3 space-y-2",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300",children:e("spoolbuddy.settings.systemConfig","Backend & Auth")}),i.jsx("input",{value:a,onChange:f=>s(f.target.value),placeholder:"http://192.168.1.100:5000",className:"w-full px-2 py-1.5 rounded bg-zinc-900 border border-zinc-700 text-zinc-100 text-xs"}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("input",{type:"password",value:o,onChange:f=>l(f.target.value),placeholder:e("spoolbuddy.settings.apiTokenPlaceholder","API token"),className:"flex-1 px-2 py-1.5 rounded bg-zinc-900 border border-zinc-700 text-zinc-100 text-xs"}),i.jsx("button",{onClick:p,disabled:c,className:"px-3 py-1.5 rounded bg-green-700 hover:bg-green-600 disabled:bg-zinc-700 text-xs font-medium text-zinc-100",children:e("spoolbuddy.settings.saveConfig","Save")})]}),u&&i.jsx("div",{className:`text-xs ${u.type==="ok"?"text-green-400":"text-red-400"}`,children:u.text})]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3 flex flex-col gap-2",children:[i.jsxs("button",{onClick:()=>r("nfc"),className:"flex-1 bg-blue-700 hover:bg-blue-600 transition-colors rounded-lg p-2 flex items-center gap-2",children:[i.jsx(bQ,{className:"w-4 h-4 text-blue-300 shrink-0"}),i.jsx("span",{className:"text-xs font-medium text-blue-100",children:e("spoolbuddy.settings.nfcDiagnostic","NFC Diagnostic")})]}),i.jsxs("button",{onClick:()=>r("scale"),className:"flex-1 bg-yellow-700 hover:bg-yellow-600 transition-colors rounded-lg p-2 flex items-center gap-2",children:[i.jsx(Kl,{className:"w-4 h-4 text-yellow-300 shrink-0"}),i.jsx("span",{className:"text-xs font-medium text-yellow-100",children:e("spoolbuddy.settings.scaleDiagnostic","Scale Diagnostic")})]}),i.jsxs("button",{onClick:()=>r("read_tag"),className:"flex-1 bg-emerald-700 hover:bg-emerald-600 transition-colors rounded-lg p-2 flex items-center gap-2",children:[i.jsx(_s,{className:"w-4 h-4 text-emerald-300 shrink-0"}),i.jsx("span",{className:"text-xs font-medium text-emerald-100",children:e("spoolbuddy.settings.readTagDiagnostic","Read Tag")})]})]})]}),n&&t&&i.jsx(wrt,{type:n,deviceId:t.device_id,onClose:()=>r(null)})]})}function Crt({device:t,onBrightnessChange:e,onBlankTimeoutChange:n}){const{t:r}=jt(),[a,s]=w.useState(t.display_brightness),[o,l]=w.useState(t.display_blank_timeout),[c,d]=w.useState(!1),u=w.useRef(void 0),m=w.useRef(void 0);w.useEffect(()=>{s(t.display_brightness),l(t.display_blank_timeout)},[t.display_brightness,t.display_blank_timeout]);const p=w.useCallback(()=>{d(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>d(!1),1500)},[]),f=w.useCallback((b,g)=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{zi.updateDisplay(t.device_id,b,g).then(()=>p()).catch(_=>console.error("Failed to update display:",_))},300)},[t.device_id,p]),y=b=>{s(b),e(b),f(b,o)},v=b=>{l(b),n(b),f(a,b)};return i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center justify-between mb-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300",children:r("spoolbuddy.settings.brightness","Brightness")}),c&&i.jsxs("span",{className:"text-xs text-green-400 flex items-center gap-1 animate-pulse",children:[i.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),r("spoolbuddy.settings.saved","Saved")]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("svg",{className:"w-4 h-4 text-zinc-500 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})}),i.jsx("input",{type:"range",min:0,max:100,value:a,onChange:b=>y(parseInt(b.target.value)),className:"flex-1 h-2 bg-zinc-700 rounded-lg appearance-none cursor-pointer accent-green-500"}),i.jsxs("span",{className:"text-sm font-mono text-zinc-400 w-10 text-right",children:[a,"%"]})]}),!t.has_backlight&&i.jsx("p",{className:"text-xs text-zinc-600 mt-2",children:r("spoolbuddy.settings.noBacklight","No DSI backlight detected. Brightness control requires a DSI display.")})]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-4",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-1",children:r("spoolbuddy.settings.screenBlank","Screen Blank Timeout")}),i.jsx("p",{className:"text-xs text-zinc-500 mb-3",children:r("spoolbuddy.settings.screenBlankDesc","Screen turns off after inactivity. Touch to wake.")}),i.jsx("div",{className:"grid grid-cols-3 gap-2",children:Nrt.map(b=>i.jsx("button",{onClick:()=>v(b.value),className:`px-3 py-2 rounded-lg text-sm font-medium transition-colors min-h-[40px] ${o===b.value?"bg-green-600 text-white":"bg-zinc-700 text-zinc-300 hover:bg-zinc-600"}`,children:b.label},b.value))})]}),i.jsx("p",{className:"text-xs text-zinc-600 text-center",children:r("spoolbuddy.settings.displayNote","Brightness is applied as a software filter.")})]})}function Trt({step:t,labels:e}){return i.jsxs("div",{className:"flex flex-col items-center w-16 shrink-0 pt-1",children:[i.jsx("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold ${t==="tare"?"bg-green-600 text-white":"bg-green-600/20 text-green-400"}`,children:t==="weight"?i.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):"1"}),i.jsx("span",{className:`text-[10px] mt-0.5 ${t==="tare"?"text-green-400 font-medium":"text-green-400/60"}`,children:e.tare}),i.jsx("div",{className:`w-px h-5 my-1 ${t==="weight"?"bg-green-600/40":"bg-zinc-700"}`}),i.jsx("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold ${t==="weight"?"bg-green-600 text-white":"bg-zinc-700 text-zinc-500"}`,children:"2"}),i.jsx("span",{className:`text-[10px] mt-0.5 ${t==="weight"?"text-green-400 font-medium":"text-zinc-600"}`,children:e.weight})]})}function Art({device:t,weight:e,weightStable:n,rawAdc:r}){const{t:a}=jt(),[s,o]=w.useState("idle"),[l,c]=w.useState("500"),[d,u]=w.useState(null),[m,p]=w.useState(!1),[f,y]=w.useState(null),v=_=>{_==="backspace"?c(N=>N.slice(0,-1)||""):_==="."&&!l.includes(".")?c(N=>N+"."):_>="0"&&_<="9"&&c(N=>N==="0"?_:N+_)},b=async()=>{p(!0),y(null);try{await zi.tare(t.device_id),y({type:"ok",msg:a("spoolbuddy.settings.tareSet","Tare command sent. Waiting for device...")})}catch{y({type:"error",msg:a("spoolbuddy.settings.tareFailed","Failed to send tare command")})}finally{p(!1)}},g=async()=>{if(s==="tare"){p(!0),y(null);try{u(r),await zi.tare(t.device_id),y({type:"ok",msg:a("spoolbuddy.settings.zeroSet","Zero point set. Place known weight on scale.")}),o("weight")}catch{y({type:"error",msg:a("spoolbuddy.settings.tareFailed","Failed to send tare command")})}finally{p(!1)}}else if(s==="weight"){const _=parseFloat(l);if(r===null||!_||_<=0)return;p(!0),y(null);try{await zi.setCalibrationFactor(t.device_id,_,r,d??void 0),y({type:"ok",msg:a("spoolbuddy.settings.calibrationDone","Calibration complete!")}),o("idle")}catch{y({type:"error",msg:a("spoolbuddy.settings.calibrationFailed","Calibration failed")})}finally{p(!1)}}};return s==="idle"?i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3 mb-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-2 h-2 rounded-full ${n?"bg-green-500":"bg-amber-500 animate-pulse"}`}),i.jsx("span",{className:"text-lg font-mono text-zinc-200",children:e!==null?`${e.toFixed(1)} g`:"-- g"})]}),i.jsxs("div",{className:"text-xs text-zinc-500 text-right",children:[i.jsxs("span",{children:[a("spoolbuddy.settings.tareOffset","Tare"),": ",t.tare_offset]}),i.jsx("span",{className:"mx-1.5",children:"·"}),i.jsxs("span",{children:[a("spoolbuddy.settings.calFactor","Factor"),": ",t.calibration_factor.toFixed(2)]})]})]}),t.last_calibrated_at&&i.jsxs("div",{className:"text-xs text-zinc-600 mt-1",children:[a("spoolbuddy.settings.lastCalibrated","Last calibrated"),": ",_rt(t.last_calibrated_at)]})]}),f&&i.jsx("div",{className:`rounded-lg px-3 py-2 mb-3 text-sm ${f.type==="ok"?"bg-green-900/30 text-green-300 border border-green-800":"bg-red-900/30 text-red-300 border border-red-800"}`,children:f.msg}),i.jsxs("div",{className:"flex gap-2",children:[i.jsxs("button",{onClick:b,disabled:m,className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-200 hover:bg-zinc-600 disabled:opacity-40 transition-colors min-h-[44px] flex items-center justify-center gap-2",children:[m&&i.jsxs("svg",{className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),a("spoolbuddy.weight.tare","Tare")]}),i.jsx("button",{onClick:()=>{o("tare"),y(null)},className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 transition-colors min-h-[44px]",children:a("spoolbuddy.weight.calibrate","Calibrate")})]})]}):i.jsxs("div",{className:"flex gap-3",children:[i.jsx(Trt,{step:s,labels:{tare:a("spoolbuddy.weight.tare","Tare"),weight:a("spoolbuddy.settings.knownWeight","Known weight")}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("div",{className:"flex items-center gap-2 bg-zinc-800 rounded-lg px-3 py-1.5 mb-1.5",children:[i.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${n?"bg-green-500":"bg-amber-500 animate-pulse"}`}),i.jsx("span",{className:"text-sm font-mono text-zinc-200",children:e!==null?`${e.toFixed(1)} g`:"-- g"}),i.jsx("span",{className:`text-xs ml-auto ${n?"text-green-400":"text-amber-400"}`,children:n?a("spoolbuddy.settings.stable","Stable"):a("spoolbuddy.settings.settling","Settling...")})]}),f&&i.jsx("div",{className:`rounded-lg px-3 py-1.5 mb-1.5 text-xs ${f.type==="ok"?"bg-green-900/30 text-green-300 border border-green-800":"bg-red-900/30 text-red-300 border border-red-800"}`,children:f.msg}),s==="tare"?i.jsx("p",{className:"text-sm text-zinc-300 mb-3",children:a("spoolbuddy.settings.calStep1","Remove all items from the scale and press Set Zero.")}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[i.jsx("span",{className:"text-xs text-zinc-400 shrink-0",children:a("spoolbuddy.settings.knownWeight","Known weight")}),i.jsxs("div",{className:"flex-1 bg-zinc-900 border border-zinc-600 rounded px-3 py-1 text-right text-lg font-mono text-zinc-100",children:[l||"0",i.jsx("span",{className:"text-zinc-500 ml-1",children:"g"})]})]}),i.jsx("div",{className:"grid grid-cols-4 gap-1 mb-1.5",children:["7","8","9","backspace","4","5","6",".","1","2","3","0"].map(_=>i.jsx("button",{onClick:()=>v(_),className:`rounded text-lg font-medium transition-colors h-[48px] active:scale-95 ${_==="backspace"?"bg-zinc-700 text-zinc-300 hover:bg-zinc-600":"bg-zinc-800 text-zinc-100 hover:bg-zinc-700 border border-zinc-700"}`,children:_==="backspace"?"⌫":_},_))})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:()=>{o("idle"),y(null)},className:"flex-1 px-4 py-2 rounded-lg text-sm bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors h-[40px]",children:a("common.cancel","Cancel")}),i.jsxs("button",{onClick:g,disabled:m,className:"flex-1 px-4 py-2 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-40 transition-colors h-[40px] flex items-center justify-center gap-2",children:[m&&i.jsxs("svg",{className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),s==="tare"?a("spoolbuddy.settings.setZero","Set Zero"):a("spoolbuddy.settings.calibrateNow","Calibrate")]})]})]})]})}function Prt({device:t}){const{t:e}=jt(),[n,r]=w.useState(null),[a,s]=w.useState(null),[o,l]=w.useState(!1),[c,d]=w.useState(!1),u=t.update_status==="pending"||t.update_status==="updating";w.useEffect(()=>{u&&n==="applying"&&r(null)},[u,n]),w.useEffect(()=>{const N=()=>{u&&setTimeout(()=>window.location.reload(),1e3)};return window.addEventListener("spoolbuddy-online",N),()=>window.removeEventListener("spoolbuddy-online",N)},[u]);const{data:m,refetch:p}=Je({queryKey:["spoolbuddy-update-check",t.device_id],queryFn:()=>zi.checkDaemonUpdate(t.device_id),staleTime:0}),{data:f}=Je({queryKey:["spoolbuddy-ssh-key"],queryFn:()=>zi.getSSHPublicKey(),enabled:o,staleTime:1/0}),y=async()=>{r("checking"),s(null);try{await p()}finally{r(null)}},v=async()=>{r("applying"),s(null);try{await zi.triggerUpdate(t.device_id)}catch(N){s(N instanceof Error?N.message:"Failed to trigger update"),r(null)}},b=n!=null||u,g=()=>{f?.public_key&&(navigator.clipboard.writeText(f.public_key),d(!0),setTimeout(()=>d(!1),2e3))},_=t.firmware_version||(m?.current_version&&m.current_version!=="0.0.0"?m.current_version:null);return i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3 space-y-3",children:[i.jsxs("div",{className:"flex justify-between items-center text-sm",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.currentVersion","Current Version")}),i.jsx("span",{className:"text-zinc-200 font-mono",children:_||i.jsx("span",{className:"text-zinc-500 italic text-xs",children:e("spoolbuddy.settings.versionPending","Waiting for daemon...")})})]}),b?i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("svg",{className:"w-4 h-4 animate-spin text-green-400 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),i.jsx("span",{className:"text-green-300 text-xs",children:n==="checking"?e("spoolbuddy.settings.checking","Checking for updates..."):t.update_message||e("spoolbuddy.settings.updateWaiting","Updating...")})]}):t.update_status==="error"?i.jsx("p",{className:"text-xs text-red-300",children:t.update_message||e("spoolbuddy.settings.updateFailed","Update failed")}):a?i.jsx("p",{className:"text-xs text-red-300",children:a}):m?.update_available?i.jsxs("p",{className:"text-xs text-green-300",children:[e("spoolbuddy.settings.updateAvailable","Update available"),": ",_," → ",m.latest_version]}):null,!b&&(m?.update_available?i.jsx("button",{onClick:v,disabled:!t.online,className:"w-full px-3 py-2 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-40 transition-colors",children:t.online?e("spoolbuddy.settings.applyUpdate","Apply Update"):e("spoolbuddy.settings.deviceOffline","Device Offline")}):i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:y,className:"flex-1 px-3 py-2 rounded-lg text-xs font-medium bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors",children:e("spoolbuddy.settings.checkUpdates","Check for Updates")}),i.jsx("button",{onClick:v,disabled:!t.online,className:"px-3 py-2 rounded-lg text-xs font-medium bg-zinc-700 text-zinc-400 hover:bg-zinc-600 hover:text-zinc-200 disabled:opacity-40 transition-colors",children:e("spoolbuddy.settings.forceUpdate","Force Update")})]}))]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsxs("button",{onClick:()=>l(!o),className:"w-full flex justify-between items-center text-xs",children:[i.jsx("span",{className:"font-medium text-zinc-400",children:e("spoolbuddy.settings.sshSetup","SSH Setup")}),i.jsx("svg",{className:`w-3 h-3 text-zinc-500 transition-transform ${o?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),o&&i.jsxs("div",{className:"mt-2 space-y-2",children:[i.jsx("p",{className:"text-xs text-zinc-500",children:e("spoolbuddy.settings.sshDescription","SSH key is deployed automatically. For manual setup, add this key to ~/.ssh/authorized_keys on the device.")}),f?.public_key?i.jsxs("div",{className:"relative",children:[i.jsx("pre",{className:"bg-zinc-900 rounded p-2 text-[10px] text-zinc-400 font-mono break-all whitespace-pre-wrap",children:f.public_key}),i.jsx("button",{onClick:g,className:"absolute top-1 right-1 px-1.5 py-0.5 rounded text-[10px] bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors",children:c?e("common.copied","Copied!"):e("common.copy","Copy")})]}):i.jsx("span",{className:"text-[10px] text-zinc-500 italic",children:e("spoolbuddy.settings.sshKeyLoading","Loading...")})]})]})]})}function rX({percent:t,color:e}){return i.jsx("div",{className:"w-full h-2 bg-zinc-700 rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full transition-all ${e}`,style:{width:`${Math.min(100,Math.max(0,t))}%`}})})}function Mrt(t){const e=Math.floor(t/86400),n=Math.floor(t%86400/3600),r=Math.floor(t%3600/60);return e>0?`${e}d ${n}h ${r}m`:n>0?`${n}h ${r}m`:`${r}m`}function Ert({device:t}){const{t:e}=jt(),n=t.system_stats;if(!n)return i.jsx("div",{className:"flex items-center justify-center h-32",children:i.jsx("p",{className:"text-sm text-zinc-500",children:e("spoolbuddy.settings.systemStatsWaiting","Waiting for system stats...")})});const r=n.memory,a=n.disk,s=(n.cpu_temp_c??0)>=80?"text-red-400":(n.cpu_temp_c??0)>=65?"text-amber-400":"text-green-400",o=(r?.percent??0)>=90?"bg-red-500":(r?.percent??0)>=70?"bg-amber-500":"bg-green-500",l=(a?.percent??0)>=90?"bg-red-500":(a?.percent??0)>=70?"bg-amber-500":"bg-green-500";return i.jsxs("div",{className:"space-y-2",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-2",children:"CPU"}),i.jsxs("div",{className:"space-y-1.5 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.cores","Cores")}),i.jsx("span",{className:"text-zinc-300 font-mono",children:n.cpu_count??"-"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.loadAvg","Load Avg")}),i.jsx("span",{className:"text-zinc-300 font-mono",children:n.load_avg?n.load_avg.join(" / "):"-"})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.temp","Temp")}),i.jsx("span",{className:`font-mono font-medium ${s}`,children:n.cpu_temp_c!=null?`${n.cpu_temp_c}°C`:"-"})]})]})]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-2",children:e("spoolbuddy.settings.memory","Memory")}),r?i.jsxs("div",{className:"space-y-1.5",children:[i.jsx(rX,{percent:r.percent??0,color:o}),i.jsxs("div",{className:"space-y-1 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.used","Used")}),i.jsxs("span",{className:"text-zinc-300 font-mono",children:[r.used_mb," / ",r.total_mb," MB"]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.available","Free")}),i.jsxs("span",{className:"text-zinc-300 font-mono",children:[r.available_mb," MB"]})]})]})]}):i.jsx("span",{className:"text-xs text-zinc-500",children:"-"})]})]}),i.jsx("div",{className:"bg-zinc-800 rounded-lg px-3 py-2",children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 shrink-0",children:e("spoolbuddy.settings.disk","Disk")}),a?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex-1",children:i.jsx(rX,{percent:a.percent??0,color:l})}),i.jsxs("span",{className:"text-xs text-zinc-300 font-mono shrink-0",children:[a.used_gb," / ",a.total_gb," GB"]})]}):i.jsx("span",{className:"text-xs text-zinc-500",children:"-"})]})}),i.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-1.5",children:e("spoolbuddy.settings.osInfo","OS")}),i.jsxs("div",{className:"space-y-1 text-xs",children:[n.os?.os&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.distro","Distro")}),i.jsx("span",{className:"text-zinc-300 truncate ml-2",children:n.os.os})]}),n.os?.kernel&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.kernel","Kernel")}),i.jsx("span",{className:"text-zinc-300 font-mono truncate ml-2",children:n.os.kernel})]}),n.os?.arch&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.arch","Arch")}),i.jsx("span",{className:"text-zinc-300 font-mono",children:n.os.arch})]})]})]}),i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-3",children:[i.jsx("h3",{className:"text-sm font-semibold text-zinc-300 mb-1.5",children:e("spoolbuddy.settings.runtime","Runtime")}),i.jsxs("div",{className:"space-y-1 text-xs",children:[n.os?.python&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:"Python"}),i.jsx("span",{className:"text-zinc-300 font-mono",children:n.os.python})]}),n.system_uptime_s!=null&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:e("spoolbuddy.settings.systemUptime","Uptime")}),i.jsx("span",{className:"text-zinc-300",children:Mrt(n.system_uptime_s)})]})]})]})]})]})}function jrt(){const{sbState:t,setDisplayBrightness:e,setDisplayBlankTimeout:n}=bw(),{t:r}=jt(),[a,s]=w.useState("device"),{data:o=[]}=Je({queryKey:["spoolbuddy-devices"],queryFn:()=>zi.getDevices(),refetchInterval:1e4}),l=t.deviceId?o.find(d=>d.device_id===t.deviceId)??o[0]:o[0],c=[{id:"device",label:r("spoolbuddy.settings.tabDevice","Device")},{id:"display",label:r("spoolbuddy.settings.tabDisplay","Display")},{id:"scale",label:r("spoolbuddy.settings.tabScale","Scale")},{id:"updates",label:r("spoolbuddy.settings.tabUpdates","Updates")},{id:"system",label:r("spoolbuddy.settings.tabSystem","System")}];return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsx("h1",{className:"text-xl font-semibold text-zinc-100 mb-3",children:r("spoolbuddy.nav.settings","Settings")}),i.jsx("div",{className:"flex gap-1 bg-zinc-800/50 rounded-lg p-1 mb-4",children:c.map(d=>i.jsx("button",{onClick:()=>s(d.id),className:`flex-1 px-2 py-2 rounded-md text-sm font-medium transition-colors min-h-[36px] ${a===d.id?"bg-zinc-700 text-zinc-100":"text-zinc-500 hover:text-zinc-300"}`,children:d.label},d.id))}),i.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:l?i.jsxs(i.Fragment,{children:[a==="device"&&i.jsx(krt,{device:l}),a==="display"&&i.jsx(Crt,{device:l,onBrightnessChange:e,onBlankTimeoutChange:n}),a==="scale"&&i.jsx(Art,{device:l,weight:t.weight,weightStable:t.weightStable,rawAdc:t.rawAdc}),a==="updates"&&i.jsx(Prt,{device:l}),a==="system"&&i.jsx(Ert,{device:l})]}):i.jsx("div",{className:"flex items-center justify-center h-32",children:i.jsx("div",{className:"text-center text-zinc-500",children:i.jsx("p",{className:"text-sm",children:r("spoolbuddy.settings.noDevice","No SpoolBuddy device found")})})})})]})}function Drt({device:t,weight:e,weightStable:n,rawAdc:r}){const{t:a}=jt(),[s,o]=w.useState(!1),[l,c]=w.useState("idle"),[d,u]=w.useState("500"),[m,p]=w.useState(null),[f,y]=w.useState(!1),v=N=>{N==="backspace"?u(C=>C.slice(0,-1)||""):N==="."&&!d.includes(".")?u(C=>C+"."):N>="0"&&N<="9"&&u(C=>C==="0"?N:C+N)},b=async()=>{y(!0);try{await zi.tare(t.device_id)}catch(N){console.error("Failed to tare:",N)}finally{y(!1)}},g=()=>{c("tare")},_=async()=>{if(l==="tare"){o(!0);try{p(r),await zi.tare(t.device_id),c("weight")}catch(N){console.error("Failed to tare:",N)}finally{o(!1)}}else if(l==="weight"){const N=parseFloat(d);if(r===null||!N||N<=0)return;o(!0);try{await zi.setCalibrationFactor(t.device_id,N,r,m??void 0),c("idle")}catch(C){console.error("Failed to calibrate:",C)}finally{o(!1)}}};return i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"bg-zinc-800 rounded-lg p-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-sm text-zinc-400",children:a("spoolbuddy.settings.currentWeight","Current weight")}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:`w-2 h-2 rounded-full ${n?"bg-green-500":"bg-amber-500 animate-pulse"}`}),i.jsx("span",{className:"text-lg font-mono text-zinc-200",children:e!==null?`${e.toFixed(1)} g`:"-- g"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-3 text-xs",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:a("spoolbuddy.settings.tareOffset","Tare offset")}),i.jsx("span",{className:"text-zinc-400 font-mono",children:t.tare_offset})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-zinc-500",children:a("spoolbuddy.settings.calFactor","Cal. factor")}),i.jsx("span",{className:"text-zinc-400 font-mono",children:t.calibration_factor.toFixed(2)})]})]})]}),l==="idle"?i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:b,disabled:f,className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-zinc-700 text-zinc-200 hover:bg-zinc-600 disabled:opacity-40 transition-colors min-h-[44px]",children:f?"...":a("spoolbuddy.weight.tare","Tare")}),i.jsx("button",{onClick:g,className:"flex-1 px-4 py-2.5 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 transition-colors min-h-[44px]",children:a("spoolbuddy.weight.calibrate","Calibrate")})]}):i.jsxs("div",{className:"bg-zinc-800 border border-zinc-700 rounded-lg p-3 space-y-2",children:[i.jsx("div",{className:"text-sm font-medium text-zinc-200",children:l==="tare"?a("spoolbuddy.settings.calStep1","Step 1: Remove all items from the scale"):a("spoolbuddy.settings.calStep2","Step 2: Place known weight on scale")}),l==="weight"&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-xs text-zinc-400",children:a("spoolbuddy.settings.knownWeight","Known weight (g)")}),i.jsxs("div",{className:"flex-1 bg-zinc-900 border border-zinc-600 rounded px-3 py-1.5 text-right text-base font-mono text-zinc-100",children:[d||"0",i.jsx("span",{className:"text-zinc-500 ml-1",children:"g"})]})]}),i.jsx("div",{className:"grid grid-cols-4 gap-1",children:["7","8","9","backspace","4","5","6",".","1","2","3","0"].map(N=>i.jsx("button",{onClick:()=>v(N),className:`py-2 rounded text-sm font-medium transition-colors min-h-[36px] ${N==="backspace"?"bg-zinc-700 text-zinc-300 hover:bg-zinc-600":"bg-zinc-800 text-zinc-100 hover:bg-zinc-700 border border-zinc-700"}`,children:N==="backspace"?"⌫":N},N))})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx("button",{onClick:()=>c("idle"),className:"flex-1 px-4 py-2 rounded-lg text-sm bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors min-h-[40px]",children:a("common.cancel","Cancel")}),i.jsx("button",{onClick:_,disabled:s,className:"flex-1 px-4 py-2 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700 disabled:opacity-40 transition-colors min-h-[40px]",children:s?"...":l==="tare"?a("spoolbuddy.settings.setZero","Set Zero"):a("spoolbuddy.settings.calibrateNow","Calibrate")})]})]})]})}function Frt(){const{sbState:t}=bw(),{t:e}=jt(),n=Mo(),{data:r=[]}=Je({queryKey:["spoolbuddy-devices"],queryFn:()=>zi.getDevices(),refetchInterval:1e4}),a=t.deviceId?r.find(s=>s.device_id===t.deviceId)??r[0]:r[0];return i.jsxs("div",{className:"h-full flex flex-col p-4",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("button",{onClick:()=>n("/spoolbuddy/settings"),className:"p-1.5 rounded-lg text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800 transition-colors",children:i.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}),i.jsx("h1",{className:"text-xl font-semibold text-zinc-100",children:e("spoolbuddy.settings.scaleCalibration","Scale Calibration")})]}),i.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:a?i.jsx(Drt,{device:a,weight:t.weight,weightStable:t.weightStable,rawAdc:t.rawAdc}):i.jsx("div",{className:"flex items-center justify-center h-32",children:i.jsx("div",{className:"text-center text-zinc-500",children:i.jsx("p",{className:"text-sm",children:e("spoolbuddy.settings.noDevice","No SpoolBuddy device found")})})})})]})}const Rrt=["PLA","PETG","ABS","ASA","TPU","PA","PC","PVA","HIPS"];function Lrt(){const{t}=jt(),{sbState:e}=bw(),[n,r]=w.useState("existing"),[a,s]=w.useState(null),[o,l]=w.useState(""),[c,d]=w.useState("idle"),[u,m]=w.useState(""),[p,f]=w.useState(!1),[y,v]=w.useState(!1),[b,g]=w.useState(null),{data:_=[],refetch:N}=Je({queryKey:["inventory-spools"],queryFn:()=>fe.getSpools(!1),refetchInterval:1e4}),{data:C=[]}=Je({queryKey:["spoolbuddy-devices"],queryFn:()=>zi.getDevices(),refetchInterval:5e3}),{data:k}=Je({queryKey:["settings"],queryFn:fe.getSettings}),P=C[0],T=e.deviceOnline,j=bo(k?.currency||"USD"),A=w.useMemo(()=>{let ue;if(n==="existing")ue=_.filter(W=>!W.tag_uid&&!W.archived_at);else if(n==="replace")ue=_.filter(W=>(W.tag_uid||W.tray_uuid)&&!W.archived_at);else return[];if(o){const W=o.toLowerCase();ue=ue.filter(ae=>ae.material?.toLowerCase().includes(W)||ae.color_name?.toLowerCase().includes(W)||ae.brand?.toLowerCase().includes(W)||ae.subtype?.toLowerCase().includes(W))}return ue},[_,n,o]),F=w.useCallback(ue=>{const W=ue.detail;(W.sak??W.data?.sak)===0&&(v(!0),g(W.tag_uid??W.data?.tag_uid??null))},[]),G=w.useCallback(ue=>{const W=ue.detail;v(!0),g(W.tag_uid??W.data?.tag_uid??null)},[]),z=w.useCallback(()=>{v(!1),g(null)},[]),J=w.useCallback(ue=>{const W=ue.detail;(W.spool_id===a?.id||W.data?.spool_id===a?.id)&&(d("success"),m(t("spoolbuddy.writeTag.writeSuccess","Tag written successfully!")),N(),setTimeout(()=>{d("idle"),s(null),m("")},5e3))},[a,t,N]),I=w.useCallback(ue=>{const W=ue.detail;(W.spool_id===a?.id||W.data?.spool_id===a?.id)&&(d("error"),m(W.message??W.data?.message??t("spoolbuddy.writeTag.writeFailed","Write failed")))},[a,t]);w.useEffect(()=>(window.addEventListener("spoolbuddy-unknown-tag",F),window.addEventListener("spoolbuddy-tag-matched",G),window.addEventListener("spoolbuddy-tag-removed",z),window.addEventListener("spoolbuddy-tag-written",J),window.addEventListener("spoolbuddy-tag-write-failed",I),()=>{window.removeEventListener("spoolbuddy-unknown-tag",F),window.removeEventListener("spoolbuddy-tag-matched",G),window.removeEventListener("spoolbuddy-tag-removed",z),window.removeEventListener("spoolbuddy-tag-written",J),window.removeEventListener("spoolbuddy-tag-write-failed",I)}),[F,G,z,J,I]),w.useEffect(()=>{s(null),d("idle"),m(""),l("")},[n]);const te=async()=>{if(!(!a||!P)){d("writing"),m(t("spoolbuddy.writeTag.waiting","Waiting for SpoolBuddy..."));try{await zi.writeTag(P.device_id,a.id)}catch{d("error"),m(t("spoolbuddy.writeTag.queueFailed","Failed to queue write command"))}}},se=async()=>{if(P){try{await zi.cancelWrite(P.device_id)}catch{}d("idle"),m("")}},Z=async()=>{if(!(!a||!iX(a))){f(!0),d("idle"),m("");try{await fe.linkTagToSpool(a.id,{tag_uid:"",tray_uuid:"",data_origin:"manual"}),await N(),s(null),d("success"),m(t("spoolbuddy.writeTag.untagSuccess","Tag removed from spool")),setTimeout(()=>{d("idle"),m("")},2500)}catch{d("error"),m(t("spoolbuddy.writeTag.untagFailed","Failed to remove tag from spool"))}finally{f(!1)}}},de=w.useCallback(ue=>{s(ue),d("idle"),m(""),N()},[N]),me=a&&T&&c!=="writing"&&c!=="success";return i.jsxs("div",{className:"flex flex-col h-full",children:[i.jsx("div",{className:"flex border-b border-bambu-dark-tertiary shrink-0",children:[{key:"existing",label:t("spoolbuddy.writeTag.tabExisting","Existing Spool")},{key:"new",label:t("spoolbuddy.writeTag.tabNew","New Spool")},{key:"replace",label:t("spoolbuddy.writeTag.tabReplace","Replace Tag")}].map(ue=>i.jsx("button",{onClick:()=>r(ue.key),className:`flex-1 py-3 text-sm font-medium transition-colors ${n===ue.key?"text-bambu-green border-b-2 border-bambu-green bg-bambu-dark":"text-zinc-400 hover:text-zinc-200 hover:bg-bambu-dark-tertiary"}`,children:ue.label},ue.key))}),i.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[i.jsx("div",{className:"flex-1 flex flex-col overflow-hidden border-r border-bambu-dark-tertiary",children:n==="new"?i.jsx(Irt,{currencySymbol:j,onCreated:de,selectedSpool:a,t}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"p-3 shrink-0",children:i.jsx("input",{type:"text",value:o,onChange:ue=>l(ue.target.value),placeholder:t("spoolbuddy.writeTag.searchPlaceholder","Search by material, color, brand..."),className:"w-full px-3 py-2 bg-bambu-dark-tertiary border border-bambu-dark-tertiary rounded text-sm text-white placeholder-zinc-500 focus:outline-none focus:border-bambu-green"})}),i.jsx("div",{className:"flex-1 overflow-y-auto px-3 pb-3 space-y-2",children:A.length===0?i.jsx("div",{className:"text-center text-zinc-500 py-8 text-sm",children:n==="existing"?t("spoolbuddy.writeTag.noUntaggedSpools","No spools without tags"):t("spoolbuddy.writeTag.noTaggedSpools","No spools with tags")}):A.map(ue=>i.jsx(Ort,{spool:ue,selected:a?.id===ue.id,showTag:n==="replace",onClick:()=>{s(ue),d("idle"),m("")}},ue.id))})]})}),i.jsx("div",{className:"w-[340px] flex flex-col items-center justify-center p-6 shrink-0",children:i.jsx(zrt,{writeStatus:c,writeMessage:u,selectedSpool:a,tagOnReader:y,tagUid:b,deviceOnline:T,canWrite:!!me,isReplace:n==="replace",canUntag:n==="replace"&&!!a&&iX(a),untagging:p,onWrite:te,onUntag:Z,onCancel:se,onRetry:()=>{d("idle"),m("")},t})})]})]})}function iX(t){return!!(t.tag_uid||t.tray_uuid)}function Ort({spool:t,selected:e,showTag:n,onClick:r}){const a=t.rgba?`#${t.rgba.slice(0,6)}`:"#666",s=Math.max(0,t.label_weight-t.weight_used),o=t.label_weight>0?Math.round(s/t.label_weight*100):0;return i.jsxs("button",{onClick:r,className:`w-full flex items-center gap-3 p-3 rounded-lg text-left transition-colors ${e?"bg-bambu-green/15 border border-bambu-green/50":"bg-bambu-dark-secondary hover:bg-bambu-dark-tertiary border border-transparent"}`,children:[i.jsx("div",{className:"w-8 h-8 rounded-full shrink-0 border border-white/10",style:{backgroundColor:a}}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("div",{className:"flex items-center gap-2",children:i.jsxs("span",{className:"text-sm font-medium text-white truncate",children:[t.brand?`${t.brand} `:"",t.material,t.subtype?` ${t.subtype}`:""]})}),i.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-400",children:[t.color_name&&i.jsx("span",{children:t.color_name}),i.jsxs("span",{children:[s,"g / ",t.label_weight,"g (",o,"%)"]})]}),n&&t.tag_uid&&i.jsx("div",{className:"text-xs text-zinc-500 mt-0.5 font-mono",children:t.tag_uid})]}),e&&i.jsx("svg",{className:"w-5 h-5 text-bambu-green shrink-0",fill:"currentColor",viewBox:"0 0 20 20",children:i.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})}function Irt({currencySymbol:t,onCreated:e,selectedSpool:n,t:r}){const[a,s]=w.useState("simple"),[o,l]=w.useState("filament"),[c,d]=w.useState(LL),[u,m]=w.useState({}),[p,f]=w.useState(!1),[y,v]=w.useState(1),[b,g]=w.useState(!1),[_,N]=w.useState(null),[C,k]=w.useState(!1),[P,T]=w.useState(!1),[j,A]=w.useState([]),[F,G]=w.useState([]),[z,J]=w.useState([]),[I,te]=w.useState([]),[se,Z]=w.useState(""),[de,me]=w.useState([]),[ue,W]=w.useState([]),[ae,le]=w.useState(new Set),[ge,Ne]=w.useState(new Set);w.useEffect(()=>{me(gle())},[]),w.useEffect(()=>{(async()=>{if(a==="full"){T(!0);try{const pe=await fe.getCloudStatus();if(k(pe.is_authenticated),pe.is_authenticated){const re=await fe.getFilamentPresets();A(re)}}catch{k(!1)}finally{T(!1)}fe.getSpoolCatalog().then(J).catch(()=>{}),fe.getColorCatalog().then(te).catch(()=>{}),fe.getLocalPresets().then(pe=>G(pe.filament)).catch(()=>{});try{const pe=await fe.getPrinters(),re=await Promise.all(pe.map(R=>fe.getPrinterStatus(R.id).catch(()=>null))),L=[];for(let R=0;R({cali_idx:we.slot_id,filament_id:we.filament_id,setting_id:we.setting_id||"",name:we.name,k_value:parseFloat(we.k_value)||0,n_coef:parseFloat(we.n_coef)||0,extruder_id:we.extruder_id,nozzle_diameter:we.nozzle_diameter}))}catch{}L.push({printer:{...ne,connected:ve},calibrations:be})}W(L)}catch{}}})()},[a]),w.useEffect(()=>{ue.length>0&&Ne(new Set(ue.map(he=>String(he.printer.id))))},[ue]);const H=w.useMemo(()=>ple(j,new Set,F),[j,F]),X=w.useMemo(()=>fle(c.slicer_filament,H),[c.slicer_filament,H]),D=w.useMemo(()=>{const he=hle(j,F),pe=I.map(re=>re.manufacturer?.trim()).filter(re=>!!re);return Array.from(new Set([...he,...pe])).sort((re,L)=>re.localeCompare(L))},[j,F,I]),M=w.useMemo(()=>{const he=I.map(pe=>pe.material?.trim()).filter(pe=>!!pe);return Array.from(new Set([...dle,...he])).sort((pe,re)=>pe.localeCompare(re))},[I]),U=w.useMemo(()=>{const he=[];for(const pe of I){const re=pe.manufacturer?.trim(),L=pe.material?.trim();re&&L&&he.push({brand:re,material:L})}for(const pe of j){const re=ep(pe.name);re.brand&&re.material&&he.push({brand:re.brand,material:re.material})}for(const pe of F){const re=ep(pe.name),L=pe.filament_vendor?.trim()||re.brand,R=re.material;L&&R&&he.push({brand:L,material:R})}return he},[j,I,F]),K=w.useMemo(()=>{const he=new Map;for(const pe of U){const re=pe.brand.toLowerCase(),L=pe.material.toLowerCase();he.has(re)||he.set(re,new Set),he.get(re).add(L)}return he},[U]),B=w.useMemo(()=>{const he=new Map;for(const pe of U){const re=pe.brand.toLowerCase(),L=pe.material.toLowerCase();he.has(L)||he.set(L,new Set),he.get(L).add(re)}return he},[U]),ie=w.useMemo(()=>{if(!c.material)return D;const he=c.material.toLowerCase(),pe=B.get(he);return!pe||pe.size===0?D:D.filter(re=>pe.has(re.toLowerCase()))},[D,c.material,B]),O=w.useMemo(()=>{if(!c.brand)return M;const he=c.brand.toLowerCase(),pe=K.get(he);return!pe||pe.size===0?M:M.filter(re=>pe.has(re.toLowerCase()))},[M,c.brand,K]),q=(he,pe)=>{d(re=>({...re,[he]:pe})),u[he]&&m(re=>({...re,[he]:void 0}))},Y=he=>{me(pe=>ble(he,pe))},V=async he=>{if(ae.size===0){try{await fe.saveSpoolKProfiles(he,[])}catch{}return}const pe=[];for(const re of ae){const[L,R,ne]=re.split(":"),ye=parseInt(L),ve=parseInt(R),be=ne==="null"?0:parseInt(ne),Be=ue.find(we=>we.printer.id===ye);if(Be){const we=Be.calibrations.find(Ae=>Ae.cali_idx===ve);we&&pe.push({printer_id:ye,extruder:be,nozzle_diameter:we.nozzle_diameter||"0.4",k_value:we.k_value,name:we.name||null,cali_idx:we.cali_idx,setting_id:we.setting_id||null})}}pe.length>0&&await fe.saveSpoolKProfiles(he,pe)},ee=async()=>{N(null);const he=cle(c,a==="simple"?!0:p);if(!he.isValid){m(he.errors),l("filament");return}const pe=X?.displayName||se||null,re={material:c.material,subtype:c.subtype||null,brand:c.brand||null,color_name:c.color_name||null,rgba:c.rgba||null,label_weight:c.label_weight,core_weight:c.core_weight,core_weight_catalog_id:c.core_weight_catalog_id,weight_used:c.weight_used,slicer_filament:c.slicer_filament||null,slicer_filament_name:pe,nozzle_temp_min:null,nozzle_temp_max:null,note:c.note||null,cost_per_kg:c.cost_per_kg,added_full:null,last_used:null,encode_time:null,tag_uid:null,tray_uuid:null,data_origin:null,tag_type:null,last_scale_weight:null,last_weighed_at:null};g(!0);try{if(y>1){const L=await fe.bulkCreateSpools(re,y);for(const R of L)await V(R.id);L.length>0&&e(L[0])}else{const L=await fe.createSpool(re);await V(L.id),e(L)}}catch{N(r("spoolbuddy.writeTag.createFailed","Failed to create spool"))}finally{g(!1)}},oe=`#${(c.rgba||"808080FF").slice(0,6)}`;return i.jsxs("div",{className:"p-3 space-y-3 overflow-y-auto h-full",children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-2 bg-bambu-dark-secondary rounded-lg border border-bambu-dark-tertiary",children:[i.jsx("span",{className:"text-sm text-zinc-200",children:r("spoolbuddy.writeTag.viewMode","View")}),i.jsxs("div",{className:"flex rounded-lg overflow-hidden border border-bambu-dark-tertiary",children:[i.jsx("button",{type:"button",onClick:()=>s("simple"),className:`px-3 py-1.5 text-xs font-medium ${a==="simple"?"bg-bambu-green/20 text-bambu-green":"bg-bambu-dark text-zinc-400"}`,children:r("spoolbuddy.writeTag.simpleView","Simple")}),i.jsx("button",{type:"button",onClick:()=>s("full"),className:`px-3 py-1.5 text-xs font-medium ${a==="full"?"bg-bambu-green/20 text-bambu-green":"bg-bambu-dark text-zinc-400"}`,children:r("spoolbuddy.writeTag.fullView","Full")})]})]}),a==="simple"?n?i.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg",children:[i.jsx("div",{className:"w-12 h-12 rounded-full mb-4 border border-white/10",style:{backgroundColor:n.rgba?`#${n.rgba.slice(0,6)}`:"#666"}}),i.jsxs("p",{className:"text-white font-medium",children:[n.brand?`${n.brand} `:"",n.material]}),n.color_name&&i.jsx("p",{className:"text-zinc-400 text-sm",children:n.color_name}),i.jsxs("p",{className:"text-zinc-500 text-xs mt-1",children:[n.label_weight,"g"]}),i.jsx("p",{className:"text-bambu-green text-sm mt-4",children:r("spoolbuddy.writeTag.spoolCreated","Spool created! Ready to write.")})]}):i.jsxs("div",{className:"p-4 space-y-4 overflow-y-auto bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg",children:[i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:r("spoolbuddy.writeTag.material","Material")}),i.jsx("select",{value:c.material,onChange:he=>q("material",he.target.value),className:"w-full px-3 py-2 bg-bambu-dark-tertiary border border-bambu-dark-tertiary rounded text-sm text-white focus:outline-none focus:border-bambu-green",children:Rrt.map(he=>i.jsx("option",{value:he,children:he},he))})]}),i.jsxs("div",{className:"flex gap-3",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:r("spoolbuddy.writeTag.colorName","Color Name")}),i.jsx("input",{type:"text",value:c.color_name,onChange:he=>q("color_name",he.target.value),placeholder:"Jade White",className:"w-full px-3 py-2 bg-bambu-dark-tertiary border border-bambu-dark-tertiary rounded text-sm text-white placeholder-zinc-500 focus:outline-none focus:border-bambu-green"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:r("spoolbuddy.writeTag.color","Color")}),i.jsx("input",{type:"color",value:oe,onChange:he=>q("rgba",he.target.value.replace("#","").toUpperCase()+"FF"),className:"w-10 h-9 bg-transparent border border-bambu-dark-tertiary rounded cursor-pointer"})]})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:r("spoolbuddy.writeTag.brand","Brand")}),i.jsx("input",{type:"text",value:c.brand,onChange:he=>q("brand",he.target.value),placeholder:"Polymaker",className:"w-full px-3 py-2 bg-bambu-dark-tertiary border border-bambu-dark-tertiary rounded text-sm text-white placeholder-zinc-500 focus:outline-none focus:border-bambu-green"})]}),i.jsxs("div",{children:[i.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:r("spoolbuddy.writeTag.weight","Weight (g)")}),i.jsx("input",{type:"number",value:c.label_weight,onChange:he=>q("label_weight",parseInt(he.target.value)||0),min:0,max:1e4,className:"w-full px-3 py-2 bg-bambu-dark-tertiary border border-bambu-dark-tertiary rounded text-sm text-white focus:outline-none focus:border-bambu-green"})]}),i.jsx("button",{onClick:ee,disabled:b||!c.material,className:"w-full py-2.5 bg-bambu-green hover:bg-bambu-green/80 disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium rounded transition-colors",children:b?r("spoolbuddy.writeTag.creating","Creating..."):r("spoolbuddy.writeTag.createSpool","Create Spool")})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center justify-between px-2 py-2 bg-bambu-dark-secondary rounded-lg border border-bambu-dark-tertiary",children:[i.jsx("span",{className:"text-sm text-zinc-200",children:r("inventory.quickAdd","Quick Add")}),i.jsx("button",{type:"button",onClick:()=>f(he=>!he),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${p?"bg-bambu-green":"bg-bambu-dark-tertiary"}`,children:i.jsx("span",{className:`inline-block h-4.5 w-4.5 rounded-full bg-white transition-transform ${p?"translate-x-6":"translate-x-1"}`})})]}),i.jsxs("div",{className:"flex border border-bambu-dark-tertiary rounded-lg overflow-hidden",children:[i.jsx("button",{onClick:()=>l("filament"),className:`flex-1 py-2.5 text-sm font-medium ${o==="filament"?"bg-bambu-green/15 text-bambu-green":"bg-bambu-dark-secondary text-zinc-400"}`,children:r("inventory.filamentInfoTab","Filament")}),!p&&i.jsx("button",{onClick:()=>l("pa-profile"),className:`flex-1 py-2.5 text-sm font-medium ${o==="pa-profile"?"bg-bambu-green/15 text-bambu-green":"bg-bambu-dark-secondary text-zinc-400"}`,children:r("inventory.paProfileTab","PA Profile")})]}),i.jsx("div",{className:"bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg p-3",children:o==="filament"?i.jsxs("div",{className:"space-y-4",children:[i.jsx(xle,{formData:c,updateField:q,cloudAuthenticated:C,loadingCloudPresets:P,presetInputValue:se,setPresetInputValue:Z,selectedPresetOption:X,filamentOptions:H,availableBrands:ie,availableMaterials:O,quickAdd:p,quantity:y,onQuantityChange:v,errors:u}),i.jsx(yle,{formData:c,updateField:q,recentColors:de,onColorUsed:Y,catalogColors:I}),i.jsx(vle,{formData:c,updateField:q,spoolCatalog:z,currencySymbol:t})]}):i.jsx(wle,{formData:c,updateField:q,printersWithCalibrations:ue,selectedProfiles:ae,setSelectedProfiles:le,expandedPrinters:ge,setExpandedPrinters:Ne})})]}),_&&i.jsx("div",{className:"text-sm text-red-400 bg-red-900/20 border border-red-900/40 rounded-lg px-3 py-2",children:_}),a==="full"&&i.jsx("button",{onClick:ee,disabled:b,className:"w-full py-3 bg-bambu-green hover:bg-bambu-green/80 disabled:opacity-50 disabled:cursor-not-allowed text-white text-sm font-medium rounded transition-colors",children:b?r("spoolbuddy.writeTag.creating","Creating..."):r("spoolbuddy.writeTag.createSpool","Create Spool")}),a==="full"&&n&&i.jsxs("div",{className:"flex flex-col items-center justify-center p-4 text-center bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg",children:[i.jsx("div",{className:"w-12 h-12 rounded-full mb-4 border border-white/10",style:{backgroundColor:n.rgba?`#${n.rgba.slice(0,6)}`:"#666"}}),i.jsxs("p",{className:"text-white font-medium",children:[n.brand?`${n.brand} `:"",n.material]}),n.color_name&&i.jsx("p",{className:"text-zinc-400 text-sm",children:n.color_name}),i.jsxs("p",{className:"text-zinc-500 text-xs mt-1",children:[n.label_weight,"g"]}),i.jsx("p",{className:"text-bambu-green text-sm mt-4",children:r("spoolbuddy.writeTag.spoolCreated","Spool created! Ready to write.")})]})]})}function zrt({writeStatus:t,writeMessage:e,selectedSpool:n,tagOnReader:r,tagUid:a,deviceOnline:s,canWrite:o,isReplace:l,canUntag:c,untagging:d,onWrite:u,onUntag:m,onCancel:p,onRetry:f,t:y}){if(t==="success")return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[i.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/20 flex items-center justify-center",children:i.jsx("svg",{className:"w-8 h-8 text-green-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),i.jsx("p",{className:"text-green-400 font-medium",children:e}),n&&i.jsxs("p",{className:"text-zinc-400 text-sm",children:[n.brand?`${n.brand} `:"",n.material,n.color_name?` - ${n.color_name}`:""]})]});if(t==="error")return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[i.jsx("div",{className:"w-16 h-16 rounded-full bg-red-500/20 flex items-center justify-center",children:i.jsx("svg",{className:"w-8 h-8 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),i.jsx("p",{className:"text-red-400 font-medium",children:e}),i.jsx("button",{onClick:f,className:"px-4 py-2 bg-bambu-dark-tertiary hover:bg-bambu-dark-secondary text-white text-sm rounded transition-colors",children:y("spoolbuddy.writeTag.tryAgain","Try Again")})]});if(t==="writing")return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[i.jsxs("div",{className:"relative w-16 h-16",children:[i.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-bambu-green/30 animate-ping"}),i.jsx("div",{className:"absolute inset-2 rounded-full border-2 border-bambu-green/50 animate-pulse"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(Fv,{className:"w-8 h-8 text-bambu-green"})})]}),i.jsx("p",{className:"text-bambu-green font-medium",children:y("spoolbuddy.writeTag.writing","Writing tag...")}),i.jsx("p",{className:"text-zinc-500 text-xs",children:e}),i.jsx("button",{onClick:p,className:"px-4 py-2 bg-bambu-dark-tertiary hover:bg-bambu-dark-secondary text-zinc-400 text-sm rounded transition-colors",children:y("spoolbuddy.writeTag.cancel","Cancel")})]});if(!s)return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-3",children:[i.jsx(Fv,{className:"w-12 h-12 text-zinc-600"}),i.jsx("p",{className:"text-zinc-500 text-sm",children:y("spoolbuddy.writeTag.deviceOffline","SpoolBuddy is offline")})]});if(!n)return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-3",children:[i.jsx(Fv,{className:"w-12 h-12 text-zinc-600"}),i.jsx("p",{className:"text-zinc-400 text-sm",children:y("spoolbuddy.writeTag.selectSpool","Select a spool, then place a blank NTAG on the reader")})]});const v=n.rgba?`#${n.rgba.slice(0,6)}`:"#666";return i.jsxs("div",{className:"flex flex-col items-center text-center space-y-4 w-full",children:[i.jsx("div",{className:"relative w-16 h-16",children:r?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute inset-0 rounded-full bg-bambu-green/10"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(Fv,{className:"w-8 h-8 text-bambu-green"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-zinc-600 animate-pulse"}),i.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:i.jsx(Fv,{className:"w-8 h-8 text-zinc-500"})})]})}),r?i.jsxs("div",{className:"space-y-1",children:[i.jsx("p",{className:"text-bambu-green text-sm font-medium",children:y("spoolbuddy.writeTag.tagReady","Tag detected — ready to write")}),a&&i.jsx("p",{className:"text-zinc-500 text-xs font-mono",children:a})]}):i.jsx("p",{className:"text-zinc-400 text-sm",children:y("spoolbuddy.writeTag.placeTag","Place an NTAG on the reader")}),i.jsxs("div",{className:"w-full bg-bambu-dark-secondary rounded-lg p-3 space-y-2",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-full border border-white/10 shrink-0",style:{backgroundColor:v}}),i.jsxs("div",{className:"text-left min-w-0",children:[i.jsxs("p",{className:"text-white text-sm font-medium truncate",children:[n.brand?`${n.brand} `:"",n.material]}),n.color_name&&i.jsx("p",{className:"text-zinc-400 text-xs",children:n.color_name})]})]}),i.jsxs("div",{className:"text-xs text-zinc-500",children:[n.label_weight,"g"]})]}),l&&n.tag_uid&&i.jsx("p",{className:"text-yellow-500/80 text-xs",children:y("spoolbuddy.writeTag.replaceWarning","Old tag will be unlinked. New tag will replace it.")}),i.jsx("button",{onClick:u,disabled:!o,className:"w-full py-3 bg-bambu-green hover:bg-bambu-green/80 disabled:opacity-40 disabled:cursor-not-allowed text-white font-medium rounded-lg transition-colors text-sm",children:l?y("spoolbuddy.writeTag.replaceTag","Replace Tag"):y("spoolbuddy.writeTag.writeTag","Write Tag")}),l&&c&&i.jsx("button",{onClick:m,disabled:d,className:"w-full py-2.5 bg-bambu-dark-tertiary hover:bg-bambu-dark-secondary disabled:opacity-40 disabled:cursor-not-allowed text-zinc-200 rounded-lg transition-colors text-sm",children:d?y("spoolbuddy.writeTag.untagging","Removing tag..."):y("spoolbuddy.writeTag.untagSpool","Untag Selected Spool")})]})}function Fv({className:t}){return i.jsxs("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:[i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.288 15.038a5.25 5.25 0 017.424 0M5.106 11.856c3.807-3.808 9.98-3.808 13.788 0M1.924 8.674c5.565-5.565 14.587-5.565 20.152 0"}),i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12.53 18.22l-.53.53-.53-.53a.75.75 0 011.06 0z"})]})}function Ple(t){return t.rgba?`#${t.rgba.substring(0,6)}`:"#808080"}function Mle(t){return Math.max(0,t.label_weight-t.weight_used)}function Ele(t){return t.label_weight<=0?0:Math.max(0,Math.min(100,(t.label_weight-t.weight_used)/t.label_weight*100))}function jle(t){const e=[t.material];return t.subtype&&e.push(t.subtype),e.join(" ")}function Dle(t){const e=t.ams_id===254||t.ams_id===255,n=!e&&t.ams_id>=128;return Jw(t.ams_id,t.tray_id,n,e)}function Fle({color:t,size:e=56}){return i.jsxs("svg",{width:e,height:e,viewBox:"0 0 56 56",children:[i.jsx("circle",{cx:"28",cy:"28",r:"26",fill:t}),i.jsx("circle",{cx:"28",cy:"28",r:"20",fill:t,style:{filter:"brightness(0.85)"}}),i.jsx("ellipse",{cx:"20",cy:"20",rx:"6",ry:"4",fill:"white",opacity:"0.3"}),i.jsx("circle",{cx:"28",cy:"28",r:"8",fill:"#2d2d2d"}),i.jsx("circle",{cx:"28",cy:"28",r:"5",fill:"#1a1a1a"})]})}function Urt(){const{t}=jt(),[e,n]=w.useState(""),[r,a]=w.useState("all"),[s,o]=w.useState(null),{data:l}=Je({queryKey:["spoolman-settings"],queryFn:fe.getSpoolmanSettings,staleTime:300*1e3}),{data:c=[],isLoading:d}=Je({queryKey:["inventory-spools"],queryFn:()=>fe.getSpools(!1),refetchInterval:3e4}),{data:u=[]}=Je({queryKey:["spool-assignments"],queryFn:()=>fe.getAssignments(),refetchInterval:3e4}),m=w.useMemo(()=>{const _={};return u.forEach(N=>{_[N.spool_id]=N}),_},[u]),p=w.useMemo(()=>c.filter(_=>!_.archived_at),[c]),f=w.useMemo(()=>new Set(u.map(_=>_.spool_id)),[u]),y=w.useMemo(()=>p.filter(_=>f.has(_.id)).length,[p,f]),v=w.useMemo(()=>{const _=new Set;return p.forEach(N=>_.add(N.material)),Array.from(_).sort()},[p]),b=w.useMemo(()=>{let _=p;if(r==="in_ams"?_=_.filter(N=>f.has(N.id)):r!=="all"&&(_=_.filter(N=>N.material===r)),e.trim()){const N=e.toLowerCase().trim();_=_.filter(C=>C.material.toLowerCase().includes(N)||C.subtype&&C.subtype.toLowerCase().includes(N)||C.brand&&C.brand.toLowerCase().includes(N)||C.color_name&&C.color_name.toLowerCase().includes(N)||C.note&&C.note.toLowerCase().includes(N))}return[..._].sort((N,C)=>{const k=f.has(N.id)?0:1,P=f.has(C.id)?0:1;return k!==P?k-P:new Date(C.updated_at).getTime()-new Date(N.updated_at).getTime()})},[p,r,e,f]);return l?.spoolman_enabled==="true"&&l?.spoolman_url?i.jsx("div",{className:"h-full flex flex-col",children:i.jsx("iframe",{src:`${l.spoolman_url.replace(/\/+$/,"")}/spool`,className:"flex-1 w-full border-0",title:"Spoolman",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"})}):i.jsxs("div",{className:"h-full flex flex-col",children:[i.jsxs("div",{className:"px-3 pt-3 pb-2 space-y-2.5",children:[i.jsxs("div",{className:"relative",children:[i.jsx(Ar,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/40"}),i.jsx("input",{type:"text",value:e,onChange:_=>n(_.target.value),placeholder:t("spoolbuddy.inventory.searchPlaceholder","Search spools..."),className:"w-full pl-9 pr-8 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-sm text-white placeholder-white/30 focus:outline-none focus:border-bambu-green"}),e&&i.jsx("button",{onClick:()=>n(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-white/40 hover:text-white/60",children:i.jsx(qt,{className:"w-4 h-4"})})]}),i.jsxs("div",{className:"flex gap-1.5 overflow-x-auto no-scrollbar",children:[i.jsx(m3,{active:r==="all",onClick:()=>a("all"),label:`${t("spoolbuddy.inventory.all","All")} (${p.length})`,green:!0}),y>0&&i.jsx(m3,{active:r==="in_ams",onClick:()=>a("in_ams"),label:`${t("spoolbuddy.inventory.inAms","In AMS")} (${y})`}),v.map(_=>i.jsx(m3,{active:r===_,onClick:()=>a(r===_?"all":_),label:_},_))]})]}),i.jsx("div",{className:"flex-1 overflow-y-auto px-3 pb-3",children:d?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-8 h-8 border-2 border-bambu-green border-t-transparent rounded-full animate-spin"})}):b.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-white/30",children:[i.jsx(vi,{className:"w-12 h-12 mb-3"}),i.jsx("p",{className:"text-sm",children:e||r!=="all"?t("spoolbuddy.inventory.noResults","No spools match your filters"):t("spoolbuddy.inventory.empty","No spools in inventory")})]}):i.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(130px,1fr))] gap-2",children:b.map(_=>i.jsx(Brt,{spool:_,assignment:m[_.id],onClick:()=>o(_.id)},_.id))})}),s!=null&&(()=>{const _=c.find(N=>N.id===s);return _?i.jsx(Hrt,{spool:_,assignment:m[_.id],onClose:()=>o(null)}):null})()]})}function m3({active:t,onClick:e,label:n,green:r}){return i.jsx("button",{onClick:e,className:`px-4 py-1.5 rounded-full text-sm font-medium border whitespace-nowrap shrink-0 transition-colors ${t?r?"bg-bambu-green/20 text-bambu-green border-bambu-green/50":"bg-white/10 text-white border-white/20":"bg-transparent text-white/40 border-bambu-dark-tertiary hover:text-white/60"}`,children:n})}function Brt({spool:t,assignment:e,onClick:n}){const r=Ple(t),a=Ele(t),s=Mle(t),o=Zw(t.color_name,t.rgba);return i.jsxs("button",{onClick:n,className:"bg-bambu-dark-secondary rounded-xl p-3 flex flex-col items-center text-center gap-1.5 border border-transparent hover:border-bambu-green/50 transition-colors",children:[i.jsx(Fle,{color:r,size:56}),i.jsx("p",{className:"text-xs font-semibold text-white leading-tight truncate w-full",children:jle(t)}),i.jsxs("div",{className:"flex items-center gap-1 min-w-0 max-w-full",children:[i.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0 border border-white/10",style:{backgroundColor:r}}),i.jsx("span",{className:"text-[11px] text-white/50 truncate",children:o||"-"})]}),i.jsxs("div",{className:"w-full space-y-0.5",children:[i.jsx("div",{className:"h-1.5 bg-bambu-dark-tertiary rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full ${a>50?"bg-bambu-green":a>20?"bg-yellow-500":"bg-red-500"}`,style:{width:`${Math.min(a,100)}%`}})}),i.jsxs("p",{className:"text-[11px] text-white/40",children:[Math.round(s),"g (",Math.round(a),"%)"]})]}),e&&i.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-bambu-green/20 text-bambu-green",children:Dle(e)})]})}function Hrt({spool:t,assignment:e,onClose:n}){const{t:r}=jt(),a=Ple(t),s=Ele(t),o=Mle(t),l=Zw(t.color_name,t.rgba);return i.jsx("div",{className:"fixed inset-0 z-50",onClick:n,children:i.jsxs("div",{className:"h-full w-full bg-bambu-dark overflow-y-auto",onClick:c=>c.stopPropagation(),children:[i.jsxs("div",{className:"flex items-center gap-4 p-4 pb-3",children:[i.jsx(Fle,{color:a,size:72}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h2",{className:"text-lg font-semibold text-white",children:jle(t)}),t.brand&&i.jsx("p",{className:"text-sm text-white/50",children:t.brand}),i.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[i.jsx("span",{className:"w-3 h-3 rounded-full border border-white/10",style:{backgroundColor:a}}),i.jsx("span",{className:"text-sm text-white/60",children:l||"-"})]})]})]}),i.jsxs("div",{className:"px-4 pb-4 space-y-4",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex justify-between text-xs text-white/50 mb-1.5",children:[i.jsx("span",{children:r("spoolbuddy.inventory.remaining","Remaining")}),i.jsxs("span",{children:[Math.round(o),"g (",Math.round(s),"%)"]})]}),i.jsx("div",{className:"h-3 bg-bambu-dark-secondary rounded-full overflow-hidden",children:i.jsx("div",{className:`h-full rounded-full transition-all ${s>50?"bg-bambu-green":s>20?"bg-yellow-500":"bg-red-500"}`,style:{width:`${Math.min(s,100)}%`}})})]}),e&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"px-2.5 py-1 rounded-md text-xs font-bold bg-bambu-green/20 text-bambu-green",children:Dle(e)}),e.printer_name&&i.jsx("span",{className:"text-xs text-white/40",children:e.printer_name})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-2.5",children:[i.jsx(gu,{label:r("spoolbuddy.inventory.labelWeight","Label Weight"),value:`${t.label_weight}g`}),i.jsx(gu,{label:r("spoolbuddy.inventory.weightUsed","Used"),value:t.weight_used>0?`${Math.round(t.weight_used)}g`:"-"}),i.jsx(gu,{label:r("spoolbuddy.inventory.coreWeight","Core Weight"),value:t.core_weight>0?`${t.core_weight}g`:"-"}),i.jsx(gu,{label:r("spoolbuddy.inventory.grossWeight","Gross Weight"),value:`${t.label_weight+t.core_weight}g`}),t.nozzle_temp_min!=null&&t.nozzle_temp_max!=null&&i.jsx(gu,{label:r("spoolbuddy.inventory.nozzleTemp","Nozzle Temp"),value:`${t.nozzle_temp_min}-${t.nozzle_temp_max}°C`}),t.cost_per_kg!=null&&t.cost_per_kg>0&&i.jsx(gu,{label:r("spoolbuddy.inventory.costPerKg","Cost/kg"),value:`${t.cost_per_kg.toFixed(2)}/kg`}),t.last_scale_weight!=null&&i.jsx(gu,{label:r("spoolbuddy.inventory.lastScaleWeight","Scale Weight"),value:`${Math.round(t.last_scale_weight)}g`}),t.tag_uid&&i.jsx(gu,{label:r("spoolbuddy.inventory.tagId","Tag"),value:t.tag_uid,mono:!0}),(t.slicer_filament_name||t.slicer_filament)&&i.jsx(gu,{label:r("spoolbuddy.inventory.slicerFilament","Slicer Filament"),value:t.slicer_filament_name||t.slicer_filament||""})]}),t.k_profiles&&t.k_profiles.length>0&&i.jsxs("div",{children:[i.jsx("p",{className:"text-xs text-white/40 mb-1.5",children:r("spoolbuddy.inventory.kProfiles","PA K-Profiles")}),i.jsx("div",{className:"space-y-1",children:t.k_profiles.map(c=>i.jsxs("div",{className:"flex items-center justify-between bg-bambu-dark-secondary rounded-lg px-3 py-2",children:[i.jsx("span",{className:"text-sm text-white/70 truncate",children:c.name||`${c.nozzle_diameter}mm ${c.nozzle_type||""}`}),i.jsx("span",{className:"text-sm font-mono text-bambu-green shrink-0 ml-2",children:c.k_value.toFixed(3)})]},c.id))})]}),t.note&&i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg p-3",children:[i.jsx("p",{className:"text-xs text-white/40 mb-1",children:r("spoolbuddy.inventory.note","Note")}),i.jsx("p",{className:"text-sm text-white/70",children:t.note})]}),i.jsx("button",{onClick:n,className:"w-full py-3 rounded-xl bg-bambu-dark-secondary hover:bg-bambu-dark-tertiary text-white/60 hover:text-white text-sm font-medium transition-colors",children:r("spoolbuddy.inventory.close","Close")})]})]})})}function gu({label:t,value:e,mono:n}){return i.jsxs("div",{className:"bg-bambu-dark-secondary rounded-lg px-3 py-2",children:[i.jsx("p",{className:"text-[10px] text-white/40 uppercase tracking-wide",children:t}),i.jsx("p",{className:`text-sm text-white mt-0.5 truncate ${n?"font-mono text-xs":""}`,children:e})]})}const $rt=new Phe({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}});function qrt(){return Lnt(),null}function aX({children:t}){return Rnt(),i.jsx(i.Fragment,{children:t})}function sX({children:t}){const{authEnabled:e,loading:n,user:r}=kr();return n?i.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):e&&!r?i.jsx(mx,{to:"/login",replace:!0}):i.jsx(i.Fragment,{children:t})}function h3({children:t}){const{authEnabled:e,loading:n,user:r,isAdmin:a}=kr();return n?i.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):e?r?a?i.jsx(i.Fragment,{children:t}):i.jsx(mx,{to:"/",replace:!0}):i.jsx(mx,{to:"/login",replace:!0}):i.jsx(i.Fragment,{children:t})}function Vrt({children:t}){const{authEnabled:e,loading:n}=kr();return n?i.jsx("div",{className:"min-h-screen flex items-center justify-center",children:"Loading..."}):e?i.jsx(mx,{to:"/login",replace:!0}):i.jsx(i.Fragment,{children:t})}function Grt(){return i.jsx(Nxe,{children:i.jsx(jxe,{children:i.jsx(Mhe,{client:$rt,children:i.jsxs(Mxe,{children:[i.jsx(qrt,{}),i.jsx(Yme,{children:i.jsxs(Nme,{children:[i.jsx(_r,{path:"/setup",element:i.jsx(Vrt,{children:i.jsx(Dnt,{})})}),i.jsx(_r,{path:"/login",element:i.jsx(jnt,{})}),i.jsx(_r,{path:"/camera/:printerId",element:i.jsx(tnt,{})}),i.jsx(_r,{path:"/overlay/:printerId",element:i.jsx(ant,{})}),i.jsxs(_r,{element:i.jsx(sX,{children:i.jsx(aX,{children:i.jsx(Xnt,{})})}),children:[i.jsx(_r,{path:"spoolbuddy",element:i.jsx(brt,{})}),i.jsx(_r,{path:"spoolbuddy/ams",element:i.jsx(vrt,{})}),i.jsx(_r,{path:"spoolbuddy/write-tag",element:i.jsx(Lrt,{})}),i.jsx(_r,{path:"spoolbuddy/inventory",element:i.jsx(Urt,{})}),i.jsx(_r,{path:"spoolbuddy/settings",element:i.jsx(jrt,{})}),i.jsx(_r,{path:"spoolbuddy/calibration",element:i.jsx(Frt,{})})]}),i.jsxs(_r,{element:i.jsx(sX,{children:i.jsx(aX,{children:i.jsx(Gxe,{})})}),children:[i.jsx(_r,{index:!0,element:i.jsx(GVe,{})}),i.jsx(_r,{path:"archives",element:i.jsx(IZe,{})}),i.jsx(_r,{path:"queue",element:i.jsx(Net,{})}),i.jsx(_r,{path:"stats",element:i.jsx(Het,{})}),i.jsx(_r,{path:"profiles",element:i.jsx(jtt,{})}),i.jsx(_r,{path:"maintenance",element:i.jsx(Ott,{})}),i.jsx(_r,{path:"projects",element:i.jsx(ztt,{})}),i.jsx(_r,{path:"projects/:id",element:i.jsx(qtt,{})}),i.jsx(_r,{path:"inventory",element:i.jsx(Nnt,{})}),i.jsx(_r,{path:"files",element:i.jsx(Qtt,{})}),i.jsx(_r,{path:"settings",element:i.jsx(h3,{children:i.jsx(xtt,{})})}),i.jsx(_r,{path:"groups/new",element:i.jsx(h3,{children:i.jsx(GY,{})})}),i.jsx(_r,{path:"groups/:id/edit",element:i.jsx(h3,{children:i.jsx(GY,{})})}),i.jsx(_r,{path:"users",element:i.jsx(mx,{to:"/settings?tab=users",replace:!0})}),i.jsx(_r,{path:"groups",element:i.jsx(mx,{to:"/settings?tab=users",replace:!0})}),i.jsx(_r,{path:"system",element:i.jsx(Ent,{})}),i.jsx(_r,{path:"notifications",element:i.jsx(Fnt,{})}),i.jsx(_r,{path:"external/:id",element:i.jsx(snt,{})})]})]})})]})})})})}yde.createRoot(document.getElementById("root")).render(i.jsx(w.StrictMode,{children:i.jsx(Grt,{})})); diff --git a/static/assets/index-DWwO6mIe.css b/static/assets/index-DWwO6mIe.css deleted file mode 100644 index 16fac62d9..000000000 --- a/static/assets/index-DWwO6mIe.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-lime-500:oklch(76.8% .233 130.85);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-violet-500:oklch(60.6% .25 292.717);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-2xl:40px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bambu-green:var(--accent);--color-bambu-green-light:var(--accent-light);--color-bambu-green-dark:var(--accent-dark);--color-status-ok:var(--status-ok);--color-status-error:var(--status-error);--color-status-warning:var(--status-warning);--color-bambu-dark:var(--bg-primary);--color-bambu-dark-secondary:var(--bg-secondary);--color-bambu-dark-tertiary:var(--bg-tertiary);--color-bambu-gray:var(--text-muted);--color-bambu-gray-light:var(--text-secondary);--color-bambu-gray-dark:var(--text-tertiary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-4{inset:calc(var(--spacing)*-4)}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-top-0\.5{top:calc(var(--spacing)*-.5)}.-top-1{top:calc(var(--spacing)*-1)}.-top-1\.5{top:calc(var(--spacing)*-1.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\.5{top:calc(var(--spacing)*.5)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-2\.5{top:calc(var(--spacing)*2.5)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-\[2px\]{top:2px}.top-\[3px\]{top:3px}.top-\[52px\]{top:52px}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing)*-.5)}.-right-1{right:calc(var(--spacing)*-1)}.-right-1\.5{right:calc(var(--spacing)*-1.5)}.-right-2{right:calc(var(--spacing)*-2)}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-1\.5{right:calc(var(--spacing)*1.5)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-12{right:calc(var(--spacing)*12)}.right-20{right:calc(var(--spacing)*20)}.right-\[5\.5rem\]{right:5.5rem}.right-full{right:100%}.-bottom-0\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-2{bottom:calc(var(--spacing)*-2)}.-bottom-7{bottom:calc(var(--spacing)*-7)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-20{bottom:calc(var(--spacing)*20)}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing)*-2)}.left-0{left:calc(var(--spacing)*0)}.left-0\.5{left:calc(var(--spacing)*.5)}.left-1{left:calc(var(--spacing)*1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-2\.5{left:calc(var(--spacing)*2.5)}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.left-10{left:calc(var(--spacing)*10)}.left-12{left:calc(var(--spacing)*12)}.left-\[2px\]{left:2px}.left-\[3px\]{left:3px}.left-full{left:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-60,.z-\[60\]{z-index:60}.z-\[100\]{z-index:100}.z-\[101\]{z-index:101}.z-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-full{grid-column:1/-1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-m-4{margin:calc(var(--spacing)*-4)}.-mx-4{margin-inline:calc(var(--spacing)*-4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-5{margin-inline:calc(var(--spacing)*5)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.-mt-0\.5{margin-top:calc(var(--spacing)*-.5)}.-mt-2{margin-top:calc(var(--spacing)*-2)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-14{margin-top:calc(var(--spacing)*14)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-1{margin-left:calc(var(--spacing)*-1)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-1\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-6{margin-left:calc(var(--spacing)*6)}.ml-7{margin-left:calc(var(--spacing)*7)}.ml-9{margin-left:calc(var(--spacing)*9)}.ml-14{margin-left:calc(var(--spacing)*14)}.ml-16{margin-left:calc(var(--spacing)*16)}.ml-64{margin-left:calc(var(--spacing)*64)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.h-0{height:calc(var(--spacing)*0)}.h-0\.5{height:calc(var(--spacing)*.5)}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-40{height:calc(var(--spacing)*40)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-80{height:calc(var(--spacing)*80)}.h-\[18px\]{height:18px}.h-\[38px\]{height:38px}.h-\[40px\]{height:40px}.h-\[48px\]{height:48px}.h-\[80vh\]{height:80vh}.h-\[160px\]{height:160px}.h-\[300px\]{height:300px}.h-\[calc\(100\%-40px\)\]{height:calc(100% - 40px)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-40{max-height:calc(var(--spacing)*40)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.max-h-\[600px\]{max-height:600px}.max-h-\[calc\(90vh-80px\)\]{max-height:calc(90vh - 80px)}.max-h-\[calc\(100vh-320px\)\]{max-height:calc(100vh - 320px)}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[36px\]{min-height:36px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[48px\]{min-height:48px}.min-h-\[80px\]{min-height:80px}.min-h-\[120px\]{min-height:120px}.min-h-\[300px\]{min-height:300px}.min-h-\[400px\]{min-height:400px}.min-h-\[calc\(100vh-64px\)\]{min-height:calc(100vh - 64px)}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-0\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-5\/12{width:41.6667%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-7\/12{width:58.3333%}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-40{width:calc(var(--spacing)*40)}.w-44{width:calc(var(--spacing)*44)}.w-48{width:calc(var(--spacing)*48)}.w-52{width:calc(var(--spacing)*52)}.w-56{width:calc(var(--spacing)*56)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-96{width:calc(var(--spacing)*96)}.w-\[240px\]{width:240px}.w-\[340px\]{width:340px}.w-\[420px\]{width:420px}.w-\[560px\]{width:560px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-32{max-width:calc(var(--spacing)*32)}.max-w-\[40\%\]{max-width:40%}.max-w-\[50\%\]{max-width:50%}.max-w-\[80px\]{max-width:80px}.max-w-\[90vw\]{max-width:90vw}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[600px\]{max-width:600px}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-48{min-width:calc(var(--spacing)*48)}.min-w-\[16px\]{min-width:16px}.min-w-\[18px\]{min-width:18px}.min-w-\[32px\]{min-width:32px}.min-w-\[40px\]{min-width:40px}.min-w-\[48px\]{min-width:48px}.min-w-\[50px\]{min-width:50px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[130px\]{min-width:130px}.min-w-\[140px\]{min-width:140px}.min-w-\[150px\]{min-width:150px}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-\[2_1_190px\]{flex:2 190px}.flex-shrink{flex-shrink:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3\.5{--tw-translate-x:calc(var(--spacing)*3.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-5{--tw-translate-x:calc(var(--spacing)*5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-6{--tw-translate-x:calc(var(--spacing)*6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-\[1\.02\]{scale:1.02}.-rotate-90{rotate:-90deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.cursor-se-resize{cursor:se-resize}.touch-manipulation{touch-action:manipulation}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.\[appearance\:textfield\]{appearance:textfield}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[auto_1fr_100px_100px_100px_80px\]{grid-template-columns:auto 1fr 100px 100px 100px 80px}.grid-cols-\[auto_1fr_120px_100px_100px_100px_80px\]{grid-template-columns:auto 1fr 120px 100px 100px 100px 80px}.grid-cols-\[repeat\(auto-fill\,minmax\(130px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-\[3px\]{gap:3px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing)*3)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-6{column-gap:calc(var(--spacing)*6)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-3{row-gap:calc(var(--spacing)*3)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-bambu-dark-tertiary>:not(:last-child)),:where(.divide-bambu-dark-tertiary\/30>:not(:last-child)){border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){:where(.divide-bambu-dark-tertiary\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}:where(.divide-bambu-gray\/20>:not(:last-child)){border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){:where(.divide-bambu-gray\/20>:not(:last-child)){border-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.\!rounded-l-none{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-tl{border-top-left-radius:.25rem}.\!rounded-r-none{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-\[5px\]{border-top-style:var(--tw-border-style);border-top-width:5px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.\!border-r-0{border-right-style:var(--tw-border-style)!important;border-right-width:0!important}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-\[5px\]{border-right-style:var(--tw-border-style);border-right-width:5px}.border-r-\[6px\]{border-right-style:var(--tw-border-style);border-right-width:6px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-\[6px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:6px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[5px\]{border-left-style:var(--tw-border-style);border-left-width:5px}.border-l-\[6px\]{border-left-style:var(--tw-border-style);border-left-width:6px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.\!border-green-500{border-color:var(--color-green-500)!important}.\!border-yellow-500{border-color:var(--color-yellow-500)!important}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-bambu-dark-secondary{border-color:var(--color-bambu-dark-secondary)}.border-bambu-dark-tertiary,.border-bambu-dark-tertiary\/20{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/20{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)20%,transparent)}}.border-bambu-dark-tertiary\/30{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/30{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.border-bambu-dark-tertiary\/40{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/40{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)40%,transparent)}}.border-bambu-dark-tertiary\/50{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.border-bambu-dark-tertiary\/50{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.border-bambu-gray,.border-bambu-gray\/20{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/20{border-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.border-bambu-gray\/30{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/30{border-color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.border-bambu-gray\/50{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.border-bambu-gray\/50{border-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.border-bambu-green,.border-bambu-green\/20{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/20{border-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.border-bambu-green\/30{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/30{border-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.border-bambu-green\/40{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/40{border-color:color-mix(in oklab,var(--color-bambu-green)40%,transparent)}}.border-bambu-green\/50{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.border-bambu-green\/50{border-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.border-black\/20{border-color:#0003}@supports (color:color-mix(in lab,red,red)){.border-black\/20{border-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.border-blue-400\/20{border-color:#54a2ff33}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/20{border-color:color-mix(in oklab,var(--color-blue-400)20%,transparent)}}.border-blue-400\/50{border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/50{border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\/20{border-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/20{border-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.border-blue-500\/40{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/40{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.border-blue-500\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400\/20{border-color:#99a1af33}@supports (color:color-mix(in lab,red,red)){.border-gray-400\/20{border-color:color-mix(in oklab,var(--color-gray-400)20%,transparent)}}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-500\/20{border-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.border-gray-500\/20{border-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.border-gray-700{border-color:var(--color-gray-700)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-500\/10{border-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.border-green-500\/10{border-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.border-green-500\/20{border-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.border-green-500\/20{border-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500)30%,transparent)}}.border-green-500\/40{border-color:#00c75866}@supports (color:color-mix(in lab,red,red)){.border-green-500\/40{border-color:color-mix(in oklab,var(--color-green-500)40%,transparent)}}.border-green-500\/50{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.border-green-500\/50{border-color:color-mix(in oklab,var(--color-green-500)50%,transparent)}}.border-green-800{border-color:var(--color-green-800)}.border-orange-400\/20{border-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.border-orange-400\/20{border-color:color-mix(in oklab,var(--color-orange-400)20%,transparent)}}.border-orange-400\/50{border-color:#ff8b1a80}@supports (color:color-mix(in lab,red,red)){.border-orange-400\/50{border-color:color-mix(in oklab,var(--color-orange-400)50%,transparent)}}.border-orange-500\/20{border-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/20{border-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.border-purple-400\/20{border-color:#c07eff33}@supports (color:color-mix(in lab,red,red)){.border-purple-400\/20{border-color:color-mix(in oklab,var(--color-purple-400)20%,transparent)}}.border-purple-500{border-color:var(--color-purple-500)}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.border-red-500\/40{border-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.border-red-500\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-800{border-color:var(--color-red-800)}.border-red-800\/70{border-color:#9f0712b3}@supports (color:color-mix(in lab,red,red)){.border-red-800\/70{border-color:color-mix(in oklab,var(--color-red-800)70%,transparent)}}.border-red-900\/40{border-color:#82181a66}@supports (color:color-mix(in lab,red,red)){.border-red-900\/40{border-color:color-mix(in oklab,var(--color-red-900)40%,transparent)}}.border-slate-500{border-color:var(--color-slate-500)}.border-status-error\/20{border-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.border-status-error\/20{border-color:color-mix(in oklab,var(--color-status-error)20%,transparent)}}.border-status-ok,.border-status-ok\/20{border-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.border-status-ok\/20{border-color:color-mix(in oklab,var(--color-status-ok)20%,transparent)}}.border-status-warning\/20{border-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.border-status-warning\/20{border-color:color-mix(in oklab,var(--color-status-warning)20%,transparent)}}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.border-yellow-400\/20{border-color:#fac80033}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/20{border-color:color-mix(in oklab,var(--color-yellow-400)20%,transparent)}}.border-yellow-400\/30{border-color:#fac8004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/30{border-color:color-mix(in oklab,var(--color-yellow-400)30%,transparent)}}.border-yellow-400\/50{border-color:#fac80080}@supports (color:color-mix(in lab,red,red)){.border-yellow-400\/50{border-color:color-mix(in oklab,var(--color-yellow-400)50%,transparent)}}.border-yellow-500{border-color:var(--color-yellow-500)}.border-yellow-500\/20{border-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/20{border-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.border-yellow-500\/50{border-color:#edb20080}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/50{border-color:color-mix(in oklab,var(--color-yellow-500)50%,transparent)}}.border-zinc-500{border-color:var(--color-zinc-500)}.border-zinc-600{border-color:var(--color-zinc-600)}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\/50{border-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\/50{border-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-t-bambu-dark-tertiary{border-top-color:var(--color-bambu-dark-tertiary)}.border-t-transparent{border-top-color:#0000}.border-r-transparent{border-right-color:#0000}.border-b-bambu-dark-tertiary{border-bottom-color:var(--color-bambu-dark-tertiary)}.border-l-transparent{border-left-color:#0000}.border-l-yellow-500{border-left-color:var(--color-yellow-500)}.\!bg-bambu-green{background-color:var(--color-bambu-green)!important}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-amber-600\/20{background-color:#dd740033}@supports (color:color-mix(in lab,red,red)){.bg-amber-600\/20{background-color:color-mix(in oklab,var(--color-amber-600)20%,transparent)}}.bg-bambu-dark{background-color:var(--color-bambu-dark)}.bg-bambu-dark-secondary,.bg-bambu-dark-secondary\/30{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/30{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)30%,transparent)}}.bg-bambu-dark-secondary\/50{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/50{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)50%,transparent)}}.bg-bambu-dark-secondary\/60{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/60{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)60%,transparent)}}.bg-bambu-dark-secondary\/90{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/90{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)90%,transparent)}}.bg-bambu-dark-secondary\/95{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-secondary\/95{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)95%,transparent)}}.bg-bambu-dark-tertiary,.bg-bambu-dark-tertiary\/20{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/20{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)20%,transparent)}}.bg-bambu-dark-tertiary\/30{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/30{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.bg-bambu-dark-tertiary\/40{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/40{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)40%,transparent)}}.bg-bambu-dark-tertiary\/50{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/50{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.bg-bambu-dark-tertiary\/70{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/70{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)70%,transparent)}}.bg-bambu-dark-tertiary\/80{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark-tertiary\/80{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.bg-bambu-dark\/20{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/20{background-color:color-mix(in oklab,var(--color-bambu-dark)20%,transparent)}}.bg-bambu-dark\/30{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/30{background-color:color-mix(in oklab,var(--color-bambu-dark)30%,transparent)}}.bg-bambu-dark\/50{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/50{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.bg-bambu-dark\/80{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/80{background-color:color-mix(in oklab,var(--color-bambu-dark)80%,transparent)}}.bg-bambu-dark\/90{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-dark\/90{background-color:color-mix(in oklab,var(--color-bambu-dark)90%,transparent)}}.bg-bambu-gray,.bg-bambu-gray\/10{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/10{background-color:color-mix(in oklab,var(--color-bambu-gray)10%,transparent)}}.bg-bambu-gray\/20{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/20{background-color:color-mix(in oklab,var(--color-bambu-gray)20%,transparent)}}.bg-bambu-gray\/30{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/30{background-color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.bg-bambu-gray\/50{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/50{background-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.bg-bambu-gray\/60{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/60{background-color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.bg-bambu-gray\/90{background-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-gray\/90{background-color:color-mix(in oklab,var(--color-bambu-gray)90%,transparent)}}.bg-bambu-green,.bg-bambu-green\/5{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/5{background-color:color-mix(in oklab,var(--color-bambu-green)5%,transparent)}}.bg-bambu-green\/10{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/10{background-color:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.bg-bambu-green\/15{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/15{background-color:color-mix(in oklab,var(--color-bambu-green)15%,transparent)}}.bg-bambu-green\/20{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/20{background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.bg-bambu-green\/30{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/30{background-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.bg-bambu-green\/50{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/50{background-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.bg-bambu-green\/75{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/75{background-color:color-mix(in oklab,var(--color-bambu-green)75%,transparent)}}.bg-bambu-green\/90{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.bg-bambu-green\/90{background-color:color-mix(in oklab,var(--color-bambu-green)90%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab,red,red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/90{background-color:#000000e6}@supports (color:color-mix(in lab,red,red)){.bg-black\/90{background-color:color-mix(in oklab,var(--color-black)90%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/10{background-color:color-mix(in oklab,var(--color-blue-400)10%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\/30{background-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/30{background-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.bg-blue-500\/90{background-color:#3080ffe6}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/90{background-color:color-mix(in oklab,var(--color-blue-500)90%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\/20{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\/20{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.bg-blue-700{background-color:var(--color-blue-700)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.bg-cyan-600\/20{background-color:#0092b533}@supports (color:color-mix(in lab,red,red)){.bg-cyan-600\/20{background-color:color-mix(in oklab,var(--color-cyan-600)20%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.bg-emerald-600\/20{background-color:#00976733}@supports (color:color-mix(in lab,red,red)){.bg-emerald-600\/20{background-color:color-mix(in oklab,var(--color-emerald-600)20%,transparent)}}.bg-emerald-700{background-color:var(--color-emerald-700)}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-400{background-color:var(--color-gray-400)}.bg-gray-400\/10{background-color:#99a1af1a}@supports (color:color-mix(in lab,red,red)){.bg-gray-400\/10{background-color:color-mix(in oklab,var(--color-gray-400)10%,transparent)}}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500)20%,transparent)}}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\/15{background-color:#00c75826}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/15{background-color:color-mix(in oklab,var(--color-green-500)15%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-600\/20{background-color:#00a54433}@supports (color:color-mix(in lab,red,red)){.bg-green-600\/20{background-color:color-mix(in oklab,var(--color-green-600)20%,transparent)}}.bg-green-600\/40{background-color:#00a54466}@supports (color:color-mix(in lab,red,red)){.bg-green-600\/40{background-color:color-mix(in oklab,var(--color-green-600)40%,transparent)}}.bg-green-700{background-color:var(--color-green-700)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab,red,red)){.bg-green-900\/30{background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}}.bg-green-900\/50{background-color:#0d542b80}@supports (color:color-mix(in lab,red,red)){.bg-green-900\/50{background-color:color-mix(in oklab,var(--color-green-900)50%,transparent)}}.bg-indigo-500\/20{background-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/20{background-color:color-mix(in oklab,var(--color-indigo-500)20%,transparent)}}.bg-lime-500{background-color:var(--color-lime-500)}.bg-orange-400\/10{background-color:#ff8b1a1a}@supports (color:color-mix(in lab,red,red)){.bg-orange-400\/10{background-color:color-mix(in oklab,var(--color-orange-400)10%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-orange-600{background-color:var(--color-orange-600)}.bg-orange-600\/20{background-color:#f0510033}@supports (color:color-mix(in lab,red,red)){.bg-orange-600\/20{background-color:color-mix(in oklab,var(--color-orange-600)20%,transparent)}}.bg-purple-400\/10{background-color:#c07eff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-400\/10{background-color:color-mix(in oklab,var(--color-purple-400)10%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-purple-500\/80{background-color:#ac4bffcc}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/80{background-color:color-mix(in oklab,var(--color-purple-500)80%,transparent)}}.bg-purple-500\/90{background-color:#ac4bffe6}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/90{background-color:color-mix(in oklab,var(--color-purple-500)90%,transparent)}}.bg-purple-700{background-color:var(--color-purple-700)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500)5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-500\/30{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/30{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.bg-red-500\/40{background-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/40{background-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.bg-red-500\/80{background-color:#fb2c36cc}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/80{background-color:color-mix(in oklab,var(--color-red-500)80%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.bg-red-950\/70{background-color:#460809b3}@supports (color:color-mix(in lab,red,red)){.bg-red-950\/70{background-color:color-mix(in oklab,var(--color-red-950)70%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500)20%,transparent)}}.bg-rose-600\/20{background-color:#e7004433}@supports (color:color-mix(in lab,red,red)){.bg-rose-600\/20{background-color:color-mix(in oklab,var(--color-rose-600)20%,transparent)}}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-500\/20{background-color:#00a5ef33}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/20{background-color:color-mix(in oklab,var(--color-sky-500)20%,transparent)}}.bg-status-error,.bg-status-error\/10{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/10{background-color:color-mix(in oklab,var(--color-status-error)10%,transparent)}}.bg-status-error\/20{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/20{background-color:color-mix(in oklab,var(--color-status-error)20%,transparent)}}.bg-status-error\/80{background-color:var(--color-status-error)}@supports (color:color-mix(in lab,red,red)){.bg-status-error\/80{background-color:color-mix(in oklab,var(--color-status-error)80%,transparent)}}.bg-status-ok,.bg-status-ok\/10{background-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.bg-status-ok\/10{background-color:color-mix(in oklab,var(--color-status-ok)10%,transparent)}}.bg-status-ok\/20{background-color:var(--color-status-ok)}@supports (color:color-mix(in lab,red,red)){.bg-status-ok\/20{background-color:color-mix(in oklab,var(--color-status-ok)20%,transparent)}}.bg-status-warning,.bg-status-warning\/10{background-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-status-warning\/10{background-color:color-mix(in oklab,var(--color-status-warning)10%,transparent)}}.bg-status-warning\/20{background-color:var(--color-status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-status-warning\/20{background-color:color-mix(in oklab,var(--color-status-warning)20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-500\/20{background-color:#00baa733}@supports (color:color-mix(in lab,red,red)){.bg-teal-500\/20{background-color:color-mix(in oklab,var(--color-teal-500)20%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-500{background-color:var(--color-violet-500)}.bg-white{background-color:var(--color-white)}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\/70{background-color:color-mix(in oklab,var(--color-white)70%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-400\/10{background-color:#fac8001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\/10{background-color:color-mix(in oklab,var(--color-yellow-400)10%,transparent)}}.bg-yellow-400\/20{background-color:#fac80033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-400\/20{background-color:color-mix(in oklab,var(--color-yellow-400)20%,transparent)}}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500)5%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)}}.bg-yellow-700{background-color:var(--color-yellow-700)}.bg-zinc-600{background-color:var(--color-zinc-600)}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-bambu-dark-secondary{--tw-gradient-from:var(--color-bambu-dark-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-bambu-green\/10{--tw-gradient-from:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.from-bambu-green\/10{--tw-gradient-from:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.from-bambu-green\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500\/5{--tw-gradient-from:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.from-blue-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.from-blue-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500\/10{--tw-gradient-from:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.from-blue-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.from-blue-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gray-500\/10{--tw-gradient-from:#6a72821a}@supports (color:color-mix(in lab,red,red)){.from-gray-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-gray-500)10%,transparent)}}.from-gray-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500\/10{--tw-gradient-from:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.from-purple-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white\/10{--tw-gradient-from:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.from-white\/10{--tw-gradient-from:color-mix(in oklab,var(--color-white)10%,transparent)}}.from-white\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-yellow-500\/10{--tw-gradient-from:#edb2001a}@supports (color:color-mix(in lab,red,red)){.from-yellow-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-yellow-500)10%,transparent)}}.from-yellow-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-black\/60{--tw-gradient-via:#0009}@supports (color:color-mix(in lab,red,red)){.via-black\/60{--tw-gradient-via:color-mix(in oklab,var(--color-black)60%,transparent)}}.via-black\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-bambu-dark-secondary{--tw-gradient-to:var(--color-bambu-dark-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-bambu-dark-tertiary{--tw-gradient-to:var(--color-bambu-dark-tertiary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.fill-yellow-400{fill:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-left{object-position:left}.p-0{padding:calc(var(--spacing)*0)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.\!px-1\.5{padding-inline:calc(var(--spacing)*1.5)!important}.\!px-3{padding-inline:calc(var(--spacing)*3)!important}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.py-20{padding-block:calc(var(--spacing)*20)}.py-24{padding-block:calc(var(--spacing)*24)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-6{padding-right:calc(var(--spacing)*6)}.pr-7{padding-right:calc(var(--spacing)*7)}.pr-8{padding-right:calc(var(--spacing)*8)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-2{padding-left:calc(var(--spacing)*2)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-6{padding-left:calc(var(--spacing)*6)}.pl-7{padding-left:calc(var(--spacing)*7)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[6px\]{font-size:6px}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-green-400{color:var(--color-green-400)!important}.\!text-white{color:var(--color-white)!important}.\!text-yellow-400{color:var(--color-yellow-400)!important}.text-amber-200{color:var(--color-amber-200)}.text-amber-200\/80{color:#fee685cc}@supports (color:color-mix(in lab,red,red)){.text-amber-200\/80{color:color-mix(in oklab,var(--color-amber-200)80%,transparent)}}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/60{color:#ffd23699}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/60{color:color-mix(in oklab,var(--color-amber-300)60%,transparent)}}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/70{color:color-mix(in oklab,var(--color-amber-300)70%,transparent)}}.text-amber-300\/80{color:#ffd236cc}@supports (color:color-mix(in lab,red,red)){.text-amber-300\/80{color:color-mix(in oklab,var(--color-amber-300)80%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/70{color:#fcbb00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-400\/70{color:color-mix(in oklab,var(--color-amber-400)70%,transparent)}}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\/80{color:#f99c00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-500\/80{color:color-mix(in oklab,var(--color-amber-500)80%,transparent)}}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-bambu-dark-tertiary{color:var(--color-bambu-dark-tertiary)}.text-bambu-gray{color:var(--color-bambu-gray)}.text-bambu-gray-dark{color:var(--color-bambu-gray-dark)}.text-bambu-gray-light{color:var(--color-bambu-gray-light)}.text-bambu-gray\/30{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/30{color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.text-bambu-gray\/40{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/40{color:color-mix(in oklab,var(--color-bambu-gray)40%,transparent)}}.text-bambu-gray\/50{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/50{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.text-bambu-gray\/60{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/60{color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.text-bambu-gray\/70{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/70{color:color-mix(in oklab,var(--color-bambu-gray)70%,transparent)}}.text-bambu-gray\/80{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.text-bambu-gray\/80{color:color-mix(in oklab,var(--color-bambu-gray)80%,transparent)}}.text-bambu-green,.text-bambu-green\/70{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.text-bambu-green\/70{color:color-mix(in oklab,var(--color-bambu-green)70%,transparent)}}.text-black{color:var(--color-black)}.text-black\/80{color:#000c}@supports (color:color-mix(in lab,red,red)){.text-black\/80{color:color-mix(in oklab,var(--color-black)80%,transparent)}}.text-blue-100{color:var(--color-blue-100)}.text-blue-300{color:var(--color-blue-300)}.text-blue-300\/70{color:#90c5ffb3}@supports (color:color-mix(in lab,red,red)){.text-blue-300\/70{color:color-mix(in oklab,var(--color-blue-300)70%,transparent)}}.text-blue-300\/80{color:#90c5ffcc}@supports (color:color-mix(in lab,red,red)){.text-blue-300\/80{color:color-mix(in oklab,var(--color-blue-300)80%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-500\/70{color:#3080ffb3}@supports (color:color-mix(in lab,red,red)){.text-blue-500\/70{color:color-mix(in oklab,var(--color-blue-500)70%,transparent)}}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-200{color:var(--color-green-200)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-400\/60{color:#05df7299}@supports (color:color-mix(in lab,red,red)){.text-green-400\/60{color:color-mix(in oklab,var(--color-green-400)60%,transparent)}}.text-green-500{color:var(--color-green-500)}.text-green-500\/60{color:#00c75899}@supports (color:color-mix(in lab,red,red)){.text-green-500\/60{color:color-mix(in oklab,var(--color-green-500)60%,transparent)}}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-indigo-400{color:var(--color-indigo-400)}.text-orange-200{color:var(--color-orange-200)}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-purple-300{color:var(--color-purple-300)}.text-purple-300\/70{color:#d9b3ffb3}@supports (color:color-mix(in lab,red,red)){.text-purple-300\/70{color:color-mix(in oklab,var(--color-purple-300)70%,transparent)}}.text-purple-400{color:var(--color-purple-400)}.text-purple-400\/80{color:#c07effcc}@supports (color:color-mix(in lab,red,red)){.text-purple-400\/80{color:color-mix(in oklab,var(--color-purple-400)80%,transparent)}}.text-purple-500{color:var(--color-purple-500)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300)80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-400\/50{color:#ff656880}@supports (color:color-mix(in lab,red,red)){.text-red-400\/50{color:color-mix(in oklab,var(--color-red-400)50%,transparent)}}.text-red-400\/60{color:#ff656899}@supports (color:color-mix(in lab,red,red)){.text-red-400\/60{color:color-mix(in oklab,var(--color-red-400)60%,transparent)}}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\/70{color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-sky-400{color:var(--color-sky-400)}.text-slate-300{color:var(--color-slate-300)}.text-status-error{color:var(--color-status-error)}.text-status-ok{color:var(--color-status-ok)}.text-status-warning{color:var(--color-status-warning)}.text-teal-400{color:var(--color-teal-400)}.text-white{color:var(--color-white)}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.text-white\/30{color:color-mix(in oklab,var(--color-white)30%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white)40%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white)50%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white)90%,transparent)}}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-200{color:var(--color-yellow-200)}.text-yellow-200\/70{color:#fff085b3}@supports (color:color-mix(in lab,red,red)){.text-yellow-200\/70{color:color-mix(in oklab,var(--color-yellow-200)70%,transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-500\/70{color:#edb200b3}@supports (color:color-mix(in lab,red,red)){.text-yellow-500\/70{color:color-mix(in oklab,var(--color-yellow-500)70%,transparent)}}.text-yellow-500\/80{color:#edb200cc}@supports (color:color-mix(in lab,red,red)){.text-yellow-500\/80{color:color-mix(in oklab,var(--color-yellow-500)80%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.placeholder-bambu-gray::placeholder{color:var(--color-bambu-gray)}.placeholder-bambu-gray-dark::placeholder{color:var(--color-bambu-gray-dark)}.placeholder-bambu-gray\/40::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/40::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)40%,transparent)}}.placeholder-bambu-gray\/50::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/50::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.placeholder-bambu-gray\/60::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder-bambu-gray\/60::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)60%,transparent)}}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.placeholder-white\/30::placeholder{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.placeholder-white\/30::placeholder{color:color-mix(in oklab,var(--color-white)30%,transparent)}}.placeholder-zinc-500::placeholder{color:var(--color-zinc-500)}.accent-amber-500{accent-color:var(--color-amber-500)}.accent-bambu-green{accent-color:var(--color-bambu-green)}.accent-green-500{accent-color:var(--color-green-500)}.\[color-scheme\:dark\]{color-scheme:dark}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_6px_rgba\(34\,197\,94\,0\.5\)\]{--tw-shadow:0 0 6px var(--tw-shadow-color,#22c55e80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow\/depth{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-bambu-green\/20{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.shadow-bambu-green\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-bambu-green\/25{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.shadow-bambu-green\/25{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)25%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-bambu-green,.ring-bambu-green\/30{--tw-ring-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.ring-bambu-green\/30{--tw-ring-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.ring-blue-400\/50{--tw-ring-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.ring-blue-400\/50{--tw-ring-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.ring-green-500{--tw-ring-color:var(--color-green-500)}.ring-white{--tw-ring-color:var(--color-white)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bambu-dark{--tw-ring-offset-color:var(--color-bambu-dark)}.ring-offset-bambu-dark-secondary{--tw-ring-offset-color:var(--color-bambu-dark-secondary)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-lg));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:bg-bambu-green\/20:is(:where(.group):hover *){background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-bambu-green\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.group-hover\:text-bambu-gray:is(:where(.group):hover *){color:var(--color-bambu-gray)}.group-hover\:text-bambu-green:is(:where(.group):hover *){color:var(--color-bambu-green)}.group-hover\:opacity-50:is(:where(.group):hover *){opacity:.5}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/resize\:opacity-100:is(:where(.group\/resize):hover *){opacity:1}.group-hover\/thumb\:block:is(:where(.group\/thumb):hover *){display:block}}.peer-checked\:bg-amber-500:is(:where(.peer):checked~*){background-color:var(--color-amber-500)}.peer-checked\:bg-bambu-green:is(:where(.peer):checked~*){background-color:var(--color-bambu-green)}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.placeholder\:text-bambu-gray::placeholder,.placeholder\:text-bambu-gray\/50::placeholder{color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-bambu-gray\/50::placeholder{color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-0:before{content:var(--tw-content);top:calc(var(--spacing)*0)}.before\:right-0:before{content:var(--tw-content);right:calc(var(--spacing)*0)}.before\:left-0:before{content:var(--tw-content);left:calc(var(--spacing)*0)}.before\:h-0\.5:before{content:var(--tw-content);height:calc(var(--spacing)*.5)}.before\:bg-bambu-green:before{content:var(--tw-content);background-color:var(--color-bambu-green)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing)*4)}.after\:h-5:after{content:var(--tw-content);height:calc(var(--spacing)*5)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing)*4)}.after\:w-5:after{content:var(--tw-content);width:calc(var(--spacing)*5)}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-gray-300:after{content:var(--tw-content);border-color:var(--color-gray-300)}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-bambu-green:focus-within{border-color:var(--color-bambu-green)}@media(hover:hover){.hover\:z-20:hover{z-index:20}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-amber-500:hover{border-color:var(--color-amber-500)}.hover\:border-bambu-dark-tertiary\/80:hover{border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-dark-tertiary\/80:hover{border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.hover\:border-bambu-gray:hover{border-color:var(--color-bambu-gray)}.hover\:border-bambu-gray-dark:hover{border-color:var(--color-bambu-gray-dark)}.hover\:border-bambu-gray\/50:hover{border-color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-gray\/50:hover{border-color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.hover\:border-bambu-green:hover,.hover\:border-bambu-green\/50:hover{border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:border-bambu-green\/50:hover{border-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-green-500\/50:hover{border-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.hover\:border-green-500\/50:hover{border-color:color-mix(in oklab,var(--color-green-500)50%,transparent)}}.hover\:border-white:hover{border-color:var(--color-white)}.hover\:border-white\/40:hover{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/40:hover{border-color:color-mix(in oklab,var(--color-white)40%,transparent)}}.hover\:\!bg-bambu-green\/80:hover{background-color:var(--color-bambu-green)!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-bambu-green\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)!important}}.hover\:\!bg-green-500\/20:hover{background-color:#00c75833!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-green-500\/20:hover{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)!important}}.hover\:\!bg-yellow-500\/20:hover{background-color:#edb20033!important}@supports (color:color-mix(in lab,red,red)){.hover\:\!bg-yellow-500\/20:hover{background-color:color-mix(in oklab,var(--color-yellow-500)20%,transparent)!important}}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.hover\:bg-amber-500\/30:hover{background-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/30:hover{background-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.hover\:bg-bambu-dark:hover{background-color:var(--color-bambu-dark)}.hover\:bg-bambu-dark-secondary:hover,.hover\:bg-bambu-dark-secondary\/50:hover{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-secondary\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)50%,transparent)}}.hover\:bg-bambu-dark-secondary\/80:hover{background-color:var(--color-bambu-dark-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-secondary)80%,transparent)}}.hover\:bg-bambu-dark-tertiary:hover,.hover\:bg-bambu-dark-tertiary\/30:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/30:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)30%,transparent)}}.hover\:bg-bambu-dark-tertiary\/50:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.hover\:bg-bambu-dark-tertiary\/70:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/70:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)70%,transparent)}}.hover\:bg-bambu-dark-tertiary\/80:hover{background-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark-tertiary\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)80%,transparent)}}.hover\:bg-bambu-dark\/50:hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.hover\:bg-bambu-dark\/80:hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-dark\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-dark)80%,transparent)}}.hover\:bg-bambu-gray-dark:hover{background-color:var(--color-bambu-gray-dark)}.hover\:bg-bambu-green:hover{background-color:var(--color-bambu-green)}.hover\:bg-bambu-green-dark:hover{background-color:var(--color-bambu-green-dark)}.hover\:bg-bambu-green-light:hover{background-color:var(--color-bambu-green-light)}.hover\:bg-bambu-green\/10:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/10:hover{background-color:color-mix(in oklab,var(--color-bambu-green)10%,transparent)}}.hover\:bg-bambu-green\/20:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/20:hover{background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.hover\:bg-bambu-green\/30:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/30:hover{background-color:color-mix(in oklab,var(--color-bambu-green)30%,transparent)}}.hover\:bg-bambu-green\/50:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/50:hover{background-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.hover\:bg-bambu-green\/80:hover{background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-bambu-green\/80:hover{background-color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)}}.hover\:bg-black\/40:hover{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/40:hover{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.hover\:bg-black\/70:hover{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/70:hover{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.hover\:bg-black\/80:hover{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/80:hover{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.hover\:bg-blue-500\/30:hover{background-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/30:hover{background-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-emerald-600:hover{background-color:var(--color-emerald-600)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-700:hover{background-color:var(--color-gray-700)}.hover\:bg-green-500\/20:hover{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.hover\:bg-green-500\/20:hover{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-orange-400\/20:hover{background-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-400\/20:hover{background-color:color-mix(in oklab,var(--color-orange-400)20%,transparent)}}.hover\:bg-purple-600\/90:hover{background-color:#9810fae6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-600\/90:hover{background-color:color-mix(in oklab,var(--color-purple-600)90%,transparent)}}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-400\/10:hover{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-400\/10:hover{background-color:color-mix(in oklab,var(--color-red-400)10%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-red-500\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\:bg-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\:bg-yellow-500\/30:hover{background-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-yellow-500\/30:hover{background-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.hover\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\:bg-zinc-700:hover{background-color:var(--color-zinc-700)}.hover\:bg-zinc-700\/50:hover{background-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.hover\:bg-zinc-700\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-bambu-gray:hover{color:var(--color-bambu-gray)}.hover\:text-bambu-green:hover{color:var(--color-bambu-green)}.hover\:text-bambu-green-light:hover{color:var(--color-bambu-green-light)}.hover\:text-bambu-green\/70:hover{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:text-bambu-green\/70:hover{color:color-mix(in oklab,var(--color-bambu-green)70%,transparent)}}.hover\:text-bambu-green\/80:hover{color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:text-bambu-green\/80:hover{color:color-mix(in oklab,var(--color-bambu-green)80%,transparent)}}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-orange-300:hover{color:var(--color-orange-300)}.hover\:text-red-200:hover{color:var(--color-red-200)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-white\/60:hover{color:#fff9}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/60:hover{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.hover\:text-white\/70:hover{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/70:hover{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.hover\:text-white\/80:hover{color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:text-white\/80:hover{color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\:text-yellow-400:hover{color:var(--color-yellow-400)}.hover\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-70:hover{opacity:.7}.hover\:opacity-80:hover{opacity:.8}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-bambu-green\/5:hover{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-bambu-green\/5:hover{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)5%,transparent)var(--tw-shadow-alpha),transparent)}}.hover\:shadow-bambu-green\/30:hover{--tw-shadow-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-bambu-green\/30:hover{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-bambu-green)30%,transparent)var(--tw-shadow-alpha),transparent)}}}.focus\:border-amber-500\/50:focus{border-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.focus\:border-amber-500\/50:focus{border-color:color-mix(in oklab,var(--color-amber-500)50%,transparent)}}.focus\:border-bambu-green:focus{border-color:var(--color-bambu-green)}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:border-transparent:focus{border-color:#0000}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-bambu-gray:focus{--tw-ring-color:var(--color-bambu-gray)}.focus\:ring-bambu-green:focus,.focus\:ring-bambu-green\/50:focus{--tw-ring-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.focus\:ring-bambu-green\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-bambu-green)50%,transparent)}}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-bambu-dark:focus{--tw-ring-offset-color:var(--color-bambu-dark)}.focus\:ring-offset-bambu-dark-secondary:focus{--tw-ring-offset-color:var(--color-bambu-dark-secondary)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-600:disabled{background-color:var(--color-gray-600)}.disabled\:bg-zinc-700:disabled{background-color:var(--color-zinc-700)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:bg-bambu-green:disabled:hover{background-color:var(--color-bambu-green)}}@media not all and (min-width:640px){.max-\[640px\]\:hidden{display:none}.max-\[640px\]\:w-full{width:100%}.max-\[640px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.max-\[640px\]\:flex-col{flex-direction:column}.max-\[640px\]\:flex-wrap{flex-wrap:wrap}.max-\[640px\]\:items-center{align-items:center}.max-\[640px\]\:items-start{align-items:flex-start}}@media not all and (min-width:550px){.max-\[550px\]\:order-1{order:1}.max-\[550px\]\:order-2{order:2}.max-\[550px\]\:order-3{order:3}.max-\[550px\]\:order-4{order:4}.max-\[550px\]\:mt-1{margin-top:calc(var(--spacing)*1)}.max-\[550px\]\:w-full{width:100%}.max-\[550px\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.max-\[550px\]\:flex-col{flex-direction:column}.max-\[550px\]\:flex-wrap{flex-wrap:wrap}.max-\[550px\]\:items-center{align-items:center}.max-\[550px\]\:items-start{align-items:flex-start}.max-\[550px\]\:justify-end{justify-content:flex-end}.max-\[550px\]\:gap-1\.5{gap:calc(var(--spacing)*1.5)}.max-\[550px\]\:gap-3{gap:calc(var(--spacing)*3)}.max-\[550px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:mt-2{margin-top:calc(var(--spacing)*2)}.sm\:mt-3{margin-top:calc(var(--spacing)*3)}.sm\:mr-1{margin-right:calc(var(--spacing)*1)}.sm\:mb-4{margin-bottom:calc(var(--spacing)*4)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:h-2{height:calc(var(--spacing)*2)}.sm\:h-3{height:calc(var(--spacing)*3)}.sm\:h-3\.5{height:calc(var(--spacing)*3.5)}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-5{height:calc(var(--spacing)*5)}.sm\:h-6{height:calc(var(--spacing)*6)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:w-3{width:calc(var(--spacing)*3)}.sm\:w-3\.5{width:calc(var(--spacing)*3.5)}.sm\:w-4{width:calc(var(--spacing)*4)}.sm\:w-5{width:calc(var(--spacing)*5)}.sm\:w-6{width:calc(var(--spacing)*6)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-14{width:calc(var(--spacing)*14)}.sm\:w-16{width:calc(var(--spacing)*16)}.sm\:w-40{width:calc(var(--spacing)*40)}.sm\:w-auto{width:auto}.sm\:max-w-none{max-width:none}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:flex-1{flex:1}.sm\:flex-none{flex:none}.sm\:cursor-default{cursor:default}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:gap-1{gap:calc(var(--spacing)*1)}.sm\:gap-1\.5{gap:calc(var(--spacing)*1.5)}.sm\:gap-2{gap:calc(var(--spacing)*2)}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-6{gap:calc(var(--spacing)*6)}:where(.sm\:space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.sm\:border-bambu-dark-tertiary{border-color:var(--color-bambu-dark-tertiary)}.sm\:p-1\.5{padding:calc(var(--spacing)*1.5)}.sm\:p-2{padding:calc(var(--spacing)*2)}.sm\:p-3{padding:calc(var(--spacing)*3)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:px-2{padding-inline:calc(var(--spacing)*2)}.sm\:px-3{padding-inline:calc(var(--spacing)*3)}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}}@media(min-width:48rem){.md\:top-\[2px\]{top:2px}.md\:left-\[2px\]{left:2px}.md\:mx-0{margin-inline:calc(var(--spacing)*0)}.md\:block{display:block}.md\:inline{display:inline}.md\:h-4{height:calc(var(--spacing)*4)}.md\:h-5{height:calc(var(--spacing)*5)}.md\:min-h-0{min-height:calc(var(--spacing)*0)}.md\:w-4{width:calc(var(--spacing)*4)}.md\:w-9{width:calc(var(--spacing)*9)}.md\:min-w-\[200px\]{min-width:200px}.md\:flex-1{flex:1}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:flex-wrap{flex-wrap:wrap}.md\:items-center{align-items:center}.md\:gap-4{gap:calc(var(--spacing)*4)}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:p-8{padding:calc(var(--spacing)*8)}.md\:px-0{padding-inline:calc(var(--spacing)*0)}.md\:py-2{padding-block:calc(var(--spacing)*2)}.md\:pb-0{padding-bottom:calc(var(--spacing)*0)}}@media(min-width:64rem){.lg\:static{position:static}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[calc\(100vh-64px\)\]{height:calc(100vh - 64px)}.lg\:w-1\/3{width:33.3333%}.lg\:w-2\/3{width:66.6667%}.lg\:w-80{width:calc(var(--spacing)*80)}.lg\:w-\[480px\]{width:480px}.lg\:max-w-md{max-width:var(--container-md)}.lg\:max-w-sm{max-width:var(--container-sm)}.lg\:max-w-xl{max-width:var(--container-xl)}.lg\:flex-shrink-0{flex-shrink:0}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:gap-4{gap:calc(var(--spacing)*4)}.lg\:gap-6{gap:calc(var(--spacing)*6)}.lg\:gap-8{gap:calc(var(--spacing)*8)}.lg\:overflow-y-auto{overflow-y:auto}.lg\:p-8{padding:calc(var(--spacing)*8)}}@media(min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:96rem){.\32xl\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}.dark\:border-amber-700:where(.dark,.dark *){border-color:var(--color-amber-700)}.dark\:border-amber-800:where(.dark,.dark *){border-color:var(--color-amber-800)}.dark\:border-bambu-dark-tertiary:where(.dark,.dark *),.dark\:border-bambu-dark-tertiary\/50:where(.dark,.dark *){border-color:var(--color-bambu-dark-tertiary)}@supports (color:color-mix(in lab,red,red)){.dark\:border-bambu-dark-tertiary\/50:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-bambu-dark-tertiary)50%,transparent)}}.dark\:border-bambu-green\/40:where(.dark,.dark *){border-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:border-bambu-green\/40:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-bambu-green)40%,transparent)}}.dark\:border-gray-600:where(.dark,.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:where(.dark,.dark *){border-color:var(--color-gray-700)}.dark\:border-red-500\/30:where(.dark,.dark *){border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-500\/30:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.dark\:border-red-500\/40:where(.dark,.dark *){border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-500\/40:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.dark\:bg-amber-500\/10:where(.dark,.dark *){background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.dark\:bg-amber-900\/20:where(.dark,.dark *){background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-amber-900)20%,transparent)}}.dark\:bg-bambu-dark:where(.dark,.dark *){background-color:var(--color-bambu-dark)}.dark\:bg-bambu-dark-secondary:where(.dark,.dark *){background-color:var(--color-bambu-dark-secondary)}.dark\:bg-bambu-green\/20:where(.dark,.dark *){background-color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-bambu-green\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-bambu-green)20%,transparent)}}.dark\:bg-black\/80:where(.dark,.dark *){background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/80:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.dark\:bg-blue-500\/10:where(.dark,.dark *){background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.dark\:bg-blue-500\/20:where(.dark,.dark *){background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-500\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.dark\:bg-blue-900\/20:where(.dark,.dark *){background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-blue-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:bg-gray-700:where(.dark,.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:where(.dark,.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:where(.dark,.dark *){background-color:var(--color-gray-900)}.dark\:bg-red-500\/10:where(.dark,.dark *){background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/10:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.dark\:bg-red-500\/20:where(.dark,.dark *){background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-500\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.dark\:text-amber-200:where(.dark,.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:where(.dark,.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:where(.dark,.dark *){color:var(--color-amber-400)}.dark\:text-bambu-gray:where(.dark,.dark *),.dark\:text-bambu-gray\/30:where(.dark,.dark *){color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-gray\/30:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-gray)30%,transparent)}}.dark\:text-bambu-gray\/50:where(.dark,.dark *){color:var(--color-bambu-gray)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-gray\/50:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-gray)50%,transparent)}}.dark\:text-bambu-green:where(.dark,.dark *),.dark\:text-bambu-green\/60:where(.dark,.dark *){color:var(--color-bambu-green)}@supports (color:color-mix(in lab,red,red)){.dark\:text-bambu-green\/60:where(.dark,.dark *){color:color-mix(in oklab,var(--color-bambu-green)60%,transparent)}}.dark\:text-blue-200:where(.dark,.dark *){color:var(--color-blue-200)}.dark\:text-blue-200\/80:where(.dark,.dark *){color:#bedbffcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-blue-200\/80:where(.dark,.dark *){color:color-mix(in oklab,var(--color-blue-200)80%,transparent)}}.dark\:text-blue-300:where(.dark,.dark *){color:var(--color-blue-300)}.dark\:text-blue-300\/60:where(.dark,.dark *){color:#90c5ff99}@supports (color:color-mix(in lab,red,red)){.dark\:text-blue-300\/60:where(.dark,.dark *){color:color-mix(in oklab,var(--color-blue-300)60%,transparent)}}.dark\:text-blue-400:where(.dark,.dark *){color:var(--color-blue-400)}.dark\:text-gray-300:where(.dark,.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:where(.dark,.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:where(.dark,.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:where(.dark,.dark *){color:var(--color-gray-600)}.dark\:text-green-400:where(.dark,.dark *){color:var(--color-green-400)}.dark\:text-orange-200:where(.dark,.dark *){color:var(--color-orange-200)}.dark\:text-orange-400:where(.dark,.dark *){color:var(--color-orange-400)}.dark\:text-red-400:where(.dark,.dark *){color:var(--color-red-400)}.dark\:text-red-400\/70:where(.dark,.dark *){color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-red-400\/70:where(.dark,.dark *){color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.dark\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\:text-yellow-200:where(.dark,.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-200\/70:where(.dark,.dark *){color:#fff085b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-yellow-200\/70:where(.dark,.dark *){color:color-mix(in oklab,var(--color-yellow-200)70%,transparent)}}@media(hover:hover){.dark\:hover\:border-gray-500:where(.dark,.dark *):hover{border-color:var(--color-gray-500)}.dark\:hover\:bg-bambu-dark-tertiary:where(.dark,.dark *):hover{background-color:var(--color-bambu-dark-tertiary)}.dark\:hover\:bg-bambu-dark\/50:where(.dark,.dark *):hover{background-color:var(--color-bambu-dark)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-bambu-dark\/50:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-bambu-dark)50%,transparent)}}.dark\:hover\:bg-gray-600:where(.dark,.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-red-500\/30:where(.dark,.dark *):hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-500\/30:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.dark\:hover\:text-amber-200:where(.dark,.dark *):hover{color:var(--color-amber-200)}.dark\:hover\:text-gray-300:where(.dark,.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-white:where(.dark,.dark *):hover{color:var(--color-white)}}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:h-3::-webkit-slider-thumb{height:calc(var(--spacing)*3)}.\[\&\:\:-webkit-slider-thumb\]\:w-3::-webkit-slider-thumb{width:calc(var(--spacing)*3)}.\[\&\:\:-webkit-slider-thumb\]\:cursor-pointer::-webkit-slider-thumb{cursor:pointer}.\[\&\:\:-webkit-slider-thumb\]\:appearance-none::-webkit-slider-thumb{appearance:none}.\[\&\:\:-webkit-slider-thumb\]\:rounded-full::-webkit-slider-thumb{border-radius:3.40282e38px}.\[\&\:\:-webkit-slider-thumb\]\:bg-bambu-green::-webkit-slider-thumb{background-color:var(--color-bambu-green)}}:root{--accent:#00ae42;--accent-light:#00c64d;--accent-dark:#009438;--status-ok:#22c55e;--status-error:#ef4444;--status-warning:#f59e0b;--bg-primary:#f5f5f5;--bg-secondary:#fff;--bg-tertiary:#e5e5e5;--text-primary:#1a1a1a;--text-secondary:#4a4a4a;--text-muted:#6b6b6b;--text-tertiary:gray;--border-color:#d4d4d4;--card-shadow:0 2px 8px #00000014;--glow-color:transparent;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,system-ui,sans-serif;font-weight:400;line-height:1.5}.dark{--bg-primary:#1a1a1a;--bg-secondary:#2d2d2d;--bg-tertiary:#3d3d3d;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:gray;--text-tertiary:#4a4a4a;--border-color:#3d3d3d;--card-shadow:0 4px 16px #0006}.bg-warm{--bg-primary:#faf8f5;--bg-secondary:#fffefa;--bg-tertiary:#e8e4dd;--text-primary:#2d2a26;--text-secondary:#5c5750;--text-muted:#7a756c;--text-tertiary:#9a9590;--border-color:#d8d4cc}.bg-cool{--bg-primary:#f0f4f8;--bg-secondary:#fff;--bg-tertiary:#dce4ec;--text-primary:#1a2530;--text-secondary:#4a5568;--text-muted:#6b7a8a;--text-tertiary:#8a9aaa;--border-color:#c8d4e0}.dark.bg-neutral{--bg-primary:#1a1a1a;--bg-secondary:#2d2d2d;--bg-tertiary:#3d3d3d;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:gray;--text-tertiary:#4a4a4a;--border-color:#3d3d3d}.dark.bg-warm{--bg-primary:#1c1a18;--bg-secondary:#2e2a26;--bg-tertiary:#3e3a36;--text-primary:#f5f0ea;--text-secondary:#b0a898;--text-muted:#8a8278;--text-tertiary:#5a5248;--border-color:#3e3a36}.dark.bg-cool{--bg-primary:#181c20;--bg-secondary:#262c32;--bg-tertiary:#363e46;--text-primary:#f0f4f8;--text-secondary:#98a8b8;--text-muted:#788898;--text-tertiary:#4a5a6a;--border-color:#363e46}.dark.bg-oled{--bg-primary:#000;--bg-secondary:#141414;--bg-tertiary:#1f1f1f;--text-primary:#fff;--text-secondary:#a0a0a0;--text-muted:#707070;--text-tertiary:#404040;--border-color:#2a2a2a}.dark.bg-slate{--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--text-primary:#f1f5f9;--text-secondary:#94a3b8;--text-muted:#64748b;--text-tertiary:#475569;--border-color:#334155}.dark.bg-forest{--bg-primary:#121a16;--bg-secondary:#1c2a22;--bg-tertiary:#2a3d30;--text-primary:#e8f5ec;--text-secondary:#8aa894;--text-muted:#6a8874;--text-tertiary:#4a6854;--border-color:#2a3d30}.printer-control-buttons-container{container-type:inline-size}@container (max-width:220px){.printer-control-buttons{flex-direction:column;align-items:stretch}.printer-control-buttons>button{width:100%}}.style-glow{--card-shadow:0 2px 8px #00000014,0 0 25px var(--accent)}@supports (color:color-mix(in lab,red,red)){.style-glow{--card-shadow:0 2px 8px #00000014,0 0 25px color-mix(in srgb,var(--accent)12%,transparent)}}.dark.style-glow{--card-shadow:0 4px 20px #00000080,0 0 40px var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark.style-glow{--card-shadow:0 4px 20px #00000080,0 0 40px color-mix(in srgb,var(--accent)15%,transparent)}}.style-vibrant{--card-shadow:0 8px 30px #00000026,0 2px 8px #0000001a}.dark.style-vibrant{--card-shadow:0 10px 40px #0009,0 4px 12px #0006}.accent-green{--accent:#00ae42;--accent-light:#00c64d;--accent-dark:#009438}.accent-teal{--accent:#14b8a6;--accent-light:#2dd4bf;--accent-dark:#0d9488}.accent-blue{--accent:#3b82f6;--accent-light:#60a5fa;--accent-dark:#2563eb}.accent-orange{--accent:#f97316;--accent-light:#fb923c;--accent-dark:#ea580c}.accent-purple{--accent:#8b5cf6;--accent-light:#a78bfa;--accent-dark:#7c3aed}.accent-red{--accent:#ef4444;--accent-light:#f87171;--accent-dark:#dc2626}body{background-color:var(--bg-primary);color:var(--text-primary);min-height:100vh;margin:0;transition:background-color .2s,color .2s}#root{min-height:100vh}.text-white{color:var(--text-primary)}.bg-bambu-dark,.bg-bambu-dark-secondary,.bg-bambu-dark-tertiary,.border-bambu-dark-tertiary{transition:background-color .2s,border-color .2s}@keyframes slide-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:.2s ease-out slide-in}.icon-theme{opacity:.5}.dark .icon-theme{filter:invert();opacity:.4}.icon-green{filter:invert(48%)sepia(89%)saturate(459%)hue-rotate(93deg)brightness(95%)contrast(92%);opacity:1}.icon-heating{filter:invert(50%)sepia()saturate(1000%)hue-rotate(360deg)brightness()contrast();opacity:1}.dark .jogpad-theme{filter:brightness(.35)contrast(1.2)}.ams-empty-slot{background:repeating-linear-gradient(45deg,#444,#444 2px,#222 2px 4px)}.dark .ams-empty-slot{background:repeating-linear-gradient(45deg,#555,#555 2px,#333 2px 4px)}.touch-manipulation{touch-action:manipulation}.safe-area-bottom{padding-bottom:env(safe-area-inset-bottom,0)}.safe-area-top{padding-top:env(safe-area-inset-top,0)}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}@keyframes slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.animate-slide-in-left{animation:.3s ease-out slide-in-left}.card-shadow{box-shadow:var(--card-shadow)}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl{flex-direction:column;height:90vh;max-height:90vh;display:flex}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:first-child,[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:last-child{flex-shrink:0}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl>div:nth-child(2){flex:auto;min-height:0;overflow-y:auto}[data-spoolbuddy-kiosk] .fixed .relative.max-w-2xl .max-h-96{max-height:none}.calendar-scroll{scrollbar-width:thin;scrollbar-color:var(--text-muted)transparent}@supports (color:color-mix(in lab,red,red)){.calendar-scroll{scrollbar-color:color-mix(in srgb,var(--text-muted)60%,transparent)transparent}}.calendar-scroll::-webkit-scrollbar{width:8px}.calendar-scroll::-webkit-scrollbar-track{background:0 0}.calendar-scroll::-webkit-scrollbar-thumb{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb{background-color:color-mix(in srgb,var(--text-muted)60%,transparent)}}.calendar-scroll::-webkit-scrollbar-thumb{border:2px solid var(--bg-secondary);border-radius:999px}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb{border:2px solid color-mix(in srgb,var(--bg-secondary)70%,transparent)}}.calendar-scroll::-webkit-scrollbar-thumb:hover{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.calendar-scroll::-webkit-scrollbar-thumb:hover{background-color:color-mix(in srgb,var(--text-muted)80%,transparent)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}.hg-theme-default{background-color:#ececec;border-radius:5px;box-sizing:border-box;font-family:HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;overflow:hidden;padding:5px;touch-action:manipulation;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.hg-theme-default .hg-button span,.hg-theme-default .hg-button span svg{pointer-events:none}.hg-theme-default button.hg-button{border-width:0;font-size:inherit}.hg-theme-default .hg-button{display:inline-block;flex-grow:1}.hg-theme-default .hg-row{display:flex}.hg-theme-default .hg-row:not(:last-child){margin-bottom:5px}.hg-theme-default .hg-row .hg-button-container,.hg-theme-default .hg-row .hg-button:not(:last-child){margin-right:5px}.hg-theme-default .hg-row>div:last-child{margin-right:0}.hg-theme-default .hg-row .hg-button-container{display:flex}.hg-theme-default .hg-button{align-items:center;background:#fff;border-bottom:1px solid #b5b5b5;border-radius:5px;box-shadow:0 0 3px -1px #0000004d;box-sizing:border-box;cursor:pointer;display:flex;height:40px;justify-content:center;padding:5px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.hg-theme-default .hg-button.hg-standardBtn{width:20px}.hg-theme-default .hg-button.hg-activeButton{background:#efefef}.hg-theme-default.hg-layout-numeric .hg-button{align-items:center;display:flex;height:60px;justify-content:center;width:33.3%}.hg-theme-default .hg-button.hg-button-numpadadd,.hg-theme-default .hg-button.hg-button-numpadenter{height:85px}.hg-theme-default .hg-button.hg-button-numpad0{width:105px}.hg-theme-default .hg-button.hg-button-com{max-width:85px}.hg-theme-default .hg-button.hg-standardBtn.hg-button-at{max-width:45px}.hg-theme-default .hg-button.hg-selectedButton{background:#05194687;color:#fff}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn=".com"]{max-width:82px}.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"]{max-width:60px}.hg-candidate-box{background:#ececec;border-bottom:2px solid #b5b5b5;border-radius:5px;display:inline-flex;margin-top:-10px;position:absolute;transform:translateY(-100%);-webkit-user-select:none;-moz-user-select:none;user-select:none}ul.hg-candidate-box-list{display:flex;flex:1;list-style:none;margin:0;padding:0}li.hg-candidate-box-list-item{align-items:center;display:flex;height:40px;justify-content:center;width:40px}li.hg-candidate-box-list-item:hover{background:#00000008;cursor:pointer}li.hg-candidate-box-list-item:active{background:#0000001a}.hg-candidate-box-prev:before{content:"◄"}.hg-candidate-box-next:before{content:"►"}.hg-candidate-box-next,.hg-candidate-box-prev{align-items:center;color:#969696;cursor:pointer;display:flex;padding:0 10px}.hg-candidate-box-next{border-bottom-right-radius:5px;border-top-right-radius:5px}.hg-candidate-box-prev{border-bottom-left-radius:5px;border-top-left-radius:5px}.hg-candidate-box-btn-active{color:#444}.simple-keyboard.vkb-theme{background:#1a1a1a;border-top:1px solid #333;padding:8px 4px;font-family:inherit}.simple-keyboard.vkb-theme .hg-row{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px;margin-bottom:4px}.simple-keyboard.vkb-theme .hg-row:last-child{margin-bottom:0}.simple-keyboard.vkb-theme .hg-button{display:inline-flex!important;align-items:center;justify-content:center;flex-grow:1;flex-shrink:1;flex-basis:auto;background:#2d2d2d;color:#e0e0e0;border:none;border-radius:6px;height:44px;font-size:16px;font-weight:500;box-shadow:0 1px 2px #0000004d;transition:background .1s;cursor:pointer;padding:0 2px;min-width:0}.simple-keyboard.vkb-theme .hg-button:active{background:#00ae42;color:#fff}.simple-keyboard.vkb-theme .hg-button-bksp,.simple-keyboard.vkb-theme .hg-button-shift,.simple-keyboard.vkb-theme .hg-button-lock{background:#3a3a3a;color:#aaa;flex-grow:1.5}.simple-keyboard.vkb-theme .hg-button-close{background:#3a3a3a;color:#aaa;flex-grow:2;font-weight:600}.simple-keyboard.vkb-theme .hg-button-close:active{background:#555}.simple-keyboard.vkb-theme .hg-button-space{flex-grow:7}.simple-keyboard.vkb-theme .hg-activeButton{background:#00ae42;color:#fff} diff --git a/static/index.html b/static/index.html index 698349d33..6f1eab505 100644 --- a/static/index.html +++ b/static/index.html @@ -23,8 +23,8 @@ - - + +