@stacksjs/ts-cloud 0.7.77 → 0.7.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/bin/cli.js +3 -3
  2. package/dist/{chunk-z7djhs5g.js → chunk-23pnrvex.js} +7 -3
  3. package/dist/{chunk-r54226j9.js → chunk-qk1qcsrh.js} +1 -1
  4. package/dist/deploy/index.js +2 -2
  5. package/dist/drivers/index.js +1 -1
  6. package/dist/drivers/shared/compute-deploy.d.ts +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/ui/account/automation.html +3 -3
  9. package/dist/ui/account/security.html +2 -2
  10. package/dist/ui/applications/compose.html +4 -4
  11. package/dist/ui/applications/new.html +2 -2
  12. package/dist/ui/data/backups.html +3 -3
  13. package/dist/ui/data/services.html +4 -4
  14. package/dist/ui/data/volumes.html +4 -4
  15. package/dist/ui/index.html +4 -4
  16. package/dist/ui/operations/alerts.html +4 -4
  17. package/dist/ui/operations/configuration.html +4 -4
  18. package/dist/ui/operations/jobs.html +4 -4
  19. package/dist/ui/operations/maintenance.html +4 -4
  20. package/dist/ui/operations/observability.html +4 -4
  21. package/dist/ui/operations/previews.html +4 -4
  22. package/dist/ui/operations/queue.html +4 -4
  23. package/dist/ui/operations/regions.html +3 -3
  24. package/dist/ui/operations/releases.html +4 -4
  25. package/dist/ui/operations/workloads.html +3 -3
  26. package/dist/ui/security.html +2 -2
  27. package/dist/ui/server/actions.html +4 -4
  28. package/dist/ui/server/activity.html +2 -2
  29. package/dist/ui/server/capacity.html +4 -4
  30. package/dist/ui/server/database.html +3 -3
  31. package/dist/ui/server/deployments.html +4 -4
  32. package/dist/ui/server/diagnostics.html +2 -2
  33. package/dist/ui/server/firewall.html +4 -4
  34. package/dist/ui/server/fleet.html +4 -4
  35. package/dist/ui/server/logs.html +4 -4
  36. package/dist/ui/server/metrics.html +4 -4
  37. package/dist/ui/server/security.html +2 -2
  38. package/dist/ui/server/services.html +2 -2
  39. package/dist/ui/server/sites.html +4 -4
  40. package/dist/ui/server/ssh-keys.html +4 -4
  41. package/dist/ui/server/team.html +4 -4
  42. package/dist/ui/server/terminal.html +2 -2
  43. package/dist/ui/serverless/alarms.html +4 -4
  44. package/dist/ui/serverless/assets.html +2 -2
  45. package/dist/ui/serverless/cost.html +2 -2
  46. package/dist/ui/serverless/data.html +4 -4
  47. package/dist/ui/serverless/firewall.html +2 -2
  48. package/dist/ui/serverless/functions.html +4 -4
  49. package/dist/ui/serverless/logs.html +4 -4
  50. package/dist/ui/serverless/metrics.html +2 -2
  51. package/dist/ui/serverless/queues.html +3 -3
  52. package/dist/ui/serverless/secrets.html +4 -4
  53. package/dist/ui/serverless/traces.html +4 -4
  54. package/dist/ui/serverless.html +4 -4
  55. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html><html lang="en" data-theme="dark"><head><meta name="title" content="stx Project"><meta name="description" content="A website built with stx templating engine"><meta property="og:title" content="stx Project"><meta property="og:description" content="A website built with stx templating engine"><meta property="og:type" content="website"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="stx Project"><meta name="twitter:description" content="A website built with stx templating engine"><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ts-cloud · Data services</title><link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect x='3' y='3' width='26' height='26' rx='8' fill='%235a8be0'/%3E%3C/svg%3E"><link rel="preconnect" href="https://fonts.googleapis.com"><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"><style> :root { --bg: #0a0e15; --bg2: #0b0f18; --panel: rgba(255,255,255,0.03); --panel-br: rgba(255,255,255,0.072); --txt: #e9edf5; --txt2: #94a1b8; --txt3: #5a6577; --accent: #5a8be0; --accent-dim: rgba(90,139,224,0.14); --accent-ink: #061019; --ok: #35d19b; --okbg: rgba(53,209,155,0.11); --bad: #f0736e; --badbg: rgba(240,115,110,0.11); --warn: #edb949; --warnbg: rgba(237,185,73,0.11); --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; } * { box-sizing: border-box; margin: 0; padding: 0; } html { background: var(--bg); min-height: 100%; } body { font-family: 'Inter', system-ui, sans-serif; color: var(--txt); min-height: 100vh; /* One calm accent wash, no AI blue-purple mesh. */ background: radial-gradient(900px 460px at 88% -8%, rgba(90,139,224,0.06), transparent 62%), linear-gradient(175deg, var(--bg), var(--bg2)); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1, 'ss01' 1; padding-left: 248px; overflow-x: hidden; } /* Tabular monospaced numerals wherever a value is read at a glance (density 7). */ .stat, .gauge .pct, .vital .vval, .health-hero .hmeta .item b, .kv > b, td.mono { font-variant-numeric: tabular-nums; } .stat, .gauge .pct { font-family: var(--mono); letter-spacing: -0.03em; } a { color: inherit; text-decoration: none; } .wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px 64px; min-width: 0; } .skip-link { position: fixed; z-index: 100; top: 8px; left: 264px; transform: translateY(-150%); background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 800; } .skip-link:focus { transform: translateY(0); } .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; display: flex; flex-direction: column; background: rgba(9,13,20,0.96); border-right: 1px solid var(--panel-br); backdrop-filter: blur(18px); padding: 18px 14px 14px; overflow-y: auto; overscroll-behavior: contain; } .brand { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 8px; font-weight: 800; font-size: 17px; letter-spacing: -0.02em; } .brand .dot { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); } .sidebar-context { display: grid; gap: 3px; margin-top: 16px; padding: 12px; border: 1px solid var(--panel-br); border-radius: 12px; background: rgba(255,255,255,0.025); } .sidebar-context strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .context-label { color: var(--txt3); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; } .context-detail { color: var(--txt3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .environment-picker { display: grid; gap: 6px; margin: 14px 4px 4px; } .environment-picker details { position: relative; } .environment-current { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; cursor: pointer; list-style: none; border: 1px solid var(--panel-br); border-radius: 10px; background: rgba(255,255,255,0.03); } .environment-current::-webkit-details-marker { display: none; } .environment-current::after { content: '⌄'; margin-left: auto; color: var(--txt3); } .environment-current > span { min-width: 36px; padding: 3px 5px; border-radius: 5px; background: var(--accent-dim); color: var(--accent); font: 800 9px var(--mono); text-align: center; letter-spacing: .06em; } .environment-current.production > span { background: var(--warnbg); color: var(--warn); } .environment-current strong { font-size: 12px; text-transform: capitalize; } .environment-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; padding: 5px; border: 1px solid var(--panel-br); border-radius: 11px; background: #111722; box-shadow: 0 14px 36px rgba(0,0,0,.4); } .environment-menu a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border-radius: 7px; font-size: 12px; text-transform: capitalize; } .environment-menu a:hover, .environment-menu a.active { background: var(--accent-dim); color: var(--accent); } .environment-menu small { color: var(--txt3); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; } .command-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: calc(100% - 8px); margin: 12px 4px 0; padding: 8px 9px; border: 1px solid var(--panel-br); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--txt2); font: 600 12px inherit; text-align: left; } .command-trigger:hover { border-color: rgba(90,139,224,.35); color: var(--txt); } .command-trigger kbd { padding: 2px 5px; border: 1px solid var(--panel-br); border-radius: 5px; background: rgba(255,255,255,.04); color: var(--txt3); font: 600 10px var(--mono); } .nav-groups { display: grid; gap: 18px; margin-top: 20px; } .nav-group { display: grid; gap: 2px; } .nav-group h2 { padding: 0 10px 5px; color: var(--txt3); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; } .nav-group a { position: relative; display: flex; align-items: center; min-height: 34px; padding: 7px 10px; border-radius: 8px; color: var(--txt2); font-size: 12.5px; font-weight: 600; } .nav-group a:hover { color: var(--txt); background: rgba(255,255,255,.035); } .nav-group a.active { color: var(--accent); background: var(--accent-dim); } .nav-group a.active::before { content: ''; position: absolute; left: -4px; width: 3px; height: 16px; border-radius: 4px; background: var(--accent); } .context-bar { position: sticky; top: 0; z-index: 20; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 28px; border-bottom: 1px solid var(--panel-br); background: rgba(10,14,21,.78); backdrop-filter: blur(14px); } .context-path { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; } .context-breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--txt2); font-size: 12px; } .context-breadcrumb i { color: var(--txt3); font-style: normal; } .context-breadcrumb strong { color: var(--txt); text-transform: capitalize; } .context-breadcrumb small { margin-left: 7px; padding-left: 14px; border-left: 1px solid var(--panel-br); color: var(--txt3); white-space: nowrap; } .context-filters { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; } .filter-chip { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(90,139,224,.25); border-radius: 999px; background: var(--accent-dim); color: var(--accent); font: 700 10px var(--mono); } .filter-chip:hover { border-color: var(--accent); } .scope-safety { flex: 0 0 auto; padding: 4px 9px; border: 1px solid rgba(90,139,224,.25); border-radius: 999px; background: var(--accent-dim); color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; } .scope-safety.production { border-color: rgba(237,185,73,.3); background: var(--warnbg); color: var(--warn); } .env { padding: 4px 10px; border-radius: 999px; background: var(--okbg); color: var(--ok); font-weight: 600; font-size: 12px; } .signout { display: flex; margin-top: auto; padding: 18px 4px 0; } .signout button { width: 100%; appearance: none; border: 1px solid var(--panel-br); background: rgba(255,255,255,0.035); color: var(--txt2); border-radius: 8px; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: color .12s, border-color .12s; } .signout button:hover { color: var(--txt); border-color: rgba(255,255,255,0.16); } .nav-toggle-button, .nav-scrim { display: none; } .nav-toggle-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } .state-page { min-height: calc(100vh - 48px); display: grid; align-content: center; justify-items: start; gap: 12px; max-width: 620px; padding: 48px 0; } .state-page .state-code { color: var(--accent); font: 800 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; } .state-page h1 { font-size: clamp(28px, 5vw, 48px); letter-spacing: -.035em; } .state-page p { color: var(--txt2); max-width: 560px; font-size: 15px; line-height: 1.65; } .state-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; } .auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; } .auth-card { width: min(460px, 100%); display: grid; gap: 24px; padding: 28px; border: 1px solid var(--panel-br); border-radius: 18px; background: var(--panel); box-shadow: 0 24px 70px rgba(0,0,0,.35); } .auth-card .brand { padding: 0; } .auth-card h1 { margin-top: 7px; font-size: 28px; } .auth-card p { margin-top: 6px; color: var(--txt2); line-height: 1.55; } .auth-form { display: grid; gap: 14px; } .auth-form .field-block { display: grid; gap: 6px; } .auth-form .field-block input { width: 100%; } .auth-form small { color: var(--txt3); font-size: 11px; } .auth-form .btn { justify-self: stretch; } .auth-status { min-height: 20px; color: var(--txt2); font-size: 12px; } .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; } .command-palette { width: min(660px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 40px)); margin: 9vh auto 0; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: #0f151f; color: var(--txt); box-shadow: 0 28px 90px rgba(0,0,0,.58); } .command-palette::backdrop { background: rgba(2,5,9,.72); backdrop-filter: blur(5px); } .command-search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--panel-br); } .command-search > span { color: var(--txt3); font-size: 22px; } .command-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--txt); font: 500 15px inherit; } .command-search input::placeholder { color: var(--txt3); } .command-close { padding: 4px 7px; border: 1px solid var(--panel-br); border-radius: 6px; color: var(--txt3); font: 700 10px var(--mono); } .command-status { padding: 12px 16px; color: var(--txt3); font-size: 12px; } .saved-views { display: grid; gap: 8px; padding: 0 14px 12px; border-bottom: 1px solid var(--panel-br); } .saved-views-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .saved-views h3, .command-group > h3 { color: var(--txt3); font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; } .save-view-form { display: flex; align-items: center; gap: 6px; } .save-view-form input { width: 150px; min-width: 0; padding: 5px 7px; border: 1px solid var(--panel-br); border-radius: 7px; background: rgba(255,255,255,.035); color: var(--txt); font-size: 11px; } .save-view-form button, .saved-view-row button { padding: 5px 7px; border: 1px solid var(--panel-br); border-radius: 7px; color: var(--txt2); font-size: 10px; } .saved-view-list { display: flex; flex-wrap: wrap; gap: 6px; } .saved-view-row { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--panel-br); border-radius: 8px; } .saved-view-row a { padding: 5px 8px; color: var(--txt2); font-size: 11px; } .saved-view-row button { border: 0; border-left: 1px solid var(--panel-br); border-radius: 0; color: var(--txt3); } .saved-views.empty .saved-view-list::after { content: 'No saved views yet'; color: var(--txt3); font-size: 11px; } .tag-result-form { display: grid; grid-template-columns: 1fr 150px 32px auto; align-items: center; gap: 7px; padding: 9px 14px; border-bottom: 1px solid var(--panel-br); } .tag-result-form label { color: var(--txt3); font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; } .tag-result-form input:not(.tag-color) { min-width: 0; padding: 5px 7px; border: 1px solid var(--panel-br); border-radius: 7px; background: rgba(255,255,255,.035); color: var(--txt); font-size: 11px; } .tag-result-form .tag-color { width: 32px; height: 27px; padding: 2px; border: 1px solid var(--panel-br); border-radius: 7px; background: transparent; } .tag-result-form button { padding: 5px 8px; border: 1px solid var(--panel-br); border-radius: 7px; color: var(--txt2); font-size: 10px; } .tag-result-form button:disabled { opacity: .45; cursor: not-allowed; } .command-results { display: grid; gap: 3px; max-height: 430px; overflow-y: auto; padding: 0 7px 10px; } .command-group { display: grid; gap: 3px; } .command-group > h3 { padding: 8px 10px 2px; } .command-result-row { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; } .command-results a { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: center; min-width: 0; padding: 10px; border-radius: 9px; } .command-results a:hover, .command-results a.selected { background: var(--accent-dim); } .favorite-result { display: grid; place-content: center; width: 30px; height: 30px; border-radius: 8px; color: var(--txt3); font-size: 17px; } .favorite-result:hover, .favorite-result.active { color: var(--warn); background: var(--warnbg); } .command-type { color: var(--txt3); font: 800 9px var(--mono); text-transform: uppercase; letter-spacing: .07em; } .command-copy { display: grid; gap: 3px; min-width: 0; } .command-copy strong, .command-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .command-copy strong { font-size: 13px; } .command-copy small { color: var(--txt3); font-size: 11px; } .command-copy mark { border-radius: 2px; background: var(--warnbg); color: var(--warn); } .command-palette footer { display: flex; flex-wrap: wrap; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--panel-br); color: var(--txt3); font-size: 10px; } @media (max-width: 820px) { body { padding-left: 0; } .wrap { padding-left: 16px; padding-right: 16px; } .context-bar { padding: 8px 14px 8px 58px; } .context-breadcrumb small { display: none; } .nav-toggle-button { position: fixed; top: 9px; left: 12px; z-index: 50; width: 36px; height: 30px; display: grid; place-content: center; gap: 4px; border: 1px solid var(--panel-br); border-radius: 8px; background: #111722; cursor: pointer; } .nav-toggle-button span { display: block; width: 15px; height: 1px; background: var(--txt2); } .app-sidebar { transform: translateX(-102%); transition: transform .18s ease; box-shadow: 18px 0 48px rgba(0,0,0,.45); } .nav-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.58); } body.nav-open .nav-scrim { display: block; } body.nav-open .app-sidebar { transform: translateX(0); } .skip-link { left: 56px; } } @media (max-width: 420px) { .context-filters { display: none; } .saved-views-heading { align-items: stretch; flex-direction: column; } .save-view-form input { width: auto; flex: 1; } .tag-result-form { grid-template-columns: 1fr 32px auto; } .tag-result-form label { grid-column: 1 / -1; } .scope-safety { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } header.page { padding-top: 22px; } header.page h1 { font-size: 23px; } .cards, .cards-3, .cards-2, .vitals { grid-template-columns: 1fr; } .panel { padding: 15px; } table { display: block; overflow-x: auto; } } header.page { padding: 30px 0 22px; display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; } header.page h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; } header.page p { color: var(--txt2); margin-top: 4px; font-size: 14px; } .server-line { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; color: var(--txt2); font-size: 13px; } .server-line b { color: var(--txt); font-weight: 600; } .header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; } /* Breadcrumb / back link for drill-down pages */ .crumbs { display: flex; align-items: center; gap: 8px; padding-top: 26px; font-size: 13px; color: var(--txt3); } .crumbs a { color: var(--txt2); } .crumbs a:hover { color: var(--accent); } .crumbs .sep { color: var(--txt3); } .grid { display: grid; gap: 16px; } .cards { grid-template-columns: repeat(4, 1fr); } .cards-3 { grid-template-columns: repeat(3, 1fr); } .cards-2 { grid-template-columns: repeat(2, 1fr); } @media (max-width: 880px) { .cards, .cards-3, .cards-2 { grid-template-columns: repeat(2, 1fr); } } .panel { background: var(--panel); border: 1px solid var(--panel-br); border-radius: 16px; padding: 18px; backdrop-filter: blur(6px); } a.panel { display: block; transition: border-color .15s, transform .15s; } a.panel:hover { border-color: rgba(90,139,224,0.5); transform: translateY(-1px); } .panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--txt3); font-weight: 700; } .stat { font-size: 28px; font-weight: 800; margin-top: 8px; letter-spacing: -0.02em; } .stat small { font-size: 14px; color: var(--txt2); font-weight: 500; } .bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.07); margin-top: 12px; overflow: hidden; } .bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); } .section { margin-top: 30px; } .section > h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .section > h2 .more { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; color: var(--accent); } .section > h2 .more a { color: var(--accent); } .cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; } @media (max-width: 880px) { .cols { grid-template-columns: 1fr; } } table { width: 100%; border-collapse: collapse; font-size: 14px; } th { text-align: left; color: var(--txt3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 0 12px 10px; } td { padding: 12px; border-top: 1px solid rgba(255,255,255,0.05); } tr:hover td { background: rgba(255,255,255,0.02); } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--txt2); } .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; } .pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; } .pill.ok { background: var(--okbg); color: var(--ok); } .pill.bad { background: var(--badbg); color: var(--bad); } .pill.warn { background: var(--warnbg); color: var(--warn); } .tag { padding: 2px 8px; border-radius: 6px; background: rgba(90,139,224,0.12); color: var(--accent); font-size: 12px; font-weight: 600; } .kv { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; gap: 16px; } .kv:first-of-type { border-top: 0; } .kv > span { color: var(--txt2); white-space: nowrap; } .kv > b { text-align: right; word-break: break-all; } .deploy { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; } .deploy:first-of-type { border-top: 0; } .deploy .when { margin-left: auto; color: var(--txt3); font-size: 12px; } .btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; white-space: nowrap; transition: filter .12s, transform .12s; } .btn:hover { filter: brightness(1.06); } .btn:active { transform: translateY(1px); } .btn.ghost { background: rgba(255,255,255,0.045); border: 1px solid var(--panel-br); color: var(--txt); } .btn.ghost:hover { background: rgba(255,255,255,0.075); filter: none; } .btn.danger { background: transparent; border: 1px solid var(--badbg); color: var(--bad); } .btn.danger:hover { background: var(--badbg); filter: none; } .btn.sm { padding: 6px 12px; font-size: 12px; } .data-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; } .data-item:first-of-type { border-top: 0; } .data-item .detail { color: var(--txt3); font-size: 12px; } .data-item .st { margin-left: auto; } .secret { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; } .secret:first-of-type { border-top: 0; } .secret .val { margin-left: auto; color: var(--txt3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: 2px; } /* Drill-down extras */ .spark { display: flex; align-items: flex-end; gap: 3px; height: 48px; margin-top: 12px; } .spark > i { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(90,139,224,0.25)); border-radius: 3px 3px 0 0; min-height: 2px; } .logs { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.7; color: var(--txt2); max-height: 360px; overflow: auto; } .logs .ts { color: var(--txt3); } .logs .err { color: var(--bad); } .log-list { display: grid; gap: 10px; max-height: 680px; overflow: auto; padding-right: 4px; } .log-row { border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; background: rgba(255,255,255,0.025); padding: 12px 14px; } .log-row.warn { border-color: rgba(251,191,36,0.18); background: rgba(251,191,36,0.04); } .log-row.error { border-color: rgba(248,113,113,0.2); background: rgba(248,113,113,0.045); } .log-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--txt3); font-size: 12px; margin-bottom: 9px; } .log-row pre { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--txt2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.55; } .timeline { display: grid; gap: 11px; } .timeline-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 13px; align-items: start; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; background: rgba(255,255,255,0.025); padding: 12px 14px; } .timeline-row .type { color: var(--txt3); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; } .timeline-row .title { font-weight: 800; } .timeline-row .detail { color: var(--txt2); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; } .timeline-row .when { color: var(--txt3); font-size: 12px; white-space: nowrap; } .check-list { display: grid; gap: 10px; } .check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 13px 0; border-top: 1px solid rgba(255,255,255,0.05); } .check:first-child { border-top: 0; padding-top: 0; } .check .mark { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--ok); box-shadow: 0 0 0 4px var(--okbg); } .check.warn .mark { background: var(--warn); box-shadow: 0 0 0 4px var(--warnbg); } .check.fail .mark { background: var(--bad); box-shadow: 0 0 0 4px var(--badbg); } .check .name { font-weight: 800; } .check .detail { color: var(--txt2); font-size: 13px; margin-top: 3px; line-height: 1.45; } .port-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } @media (max-width: 880px) { .port-grid { grid-template-columns: 1fr; } } .port-card { border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; background: rgba(255,255,255,0.025); padding: 13px 14px; min-width: 0; } .port-card .top { display: flex; align-items: center; gap: 8px; justify-content: space-between; } .port-card .listen { margin-top: 8px; font-weight: 800; overflow-wrap: anywhere; } .port-card .proc { color: var(--txt3); font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; } .action-runner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .action-runner select { background: rgba(255,255,255,0.05); border: 1px solid var(--panel-br); border-radius: 10px; padding: 8px 10px; color: var(--txt); font-family: inherit; font-size: 13px; min-width: 150px; } .action-output { margin-top: 12px; white-space: pre-wrap; overflow: auto; max-height: 260px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); background: rgba(0,0,0,0.22); padding: 12px; color: var(--txt2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; } .op-confirm { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .op-confirm-input { flex: 0 0 200px; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-br); border-radius: 10px; padding: 8px 12px; color: var(--txt); font-family: inherit; font-size: 14px; } .op-confirm-input:focus { outline: none; border-color: var(--accent); } .note { color: var(--txt3); font-size: 12px; margin-top: 10px; } .row-actions { display: flex; gap: 8px; } .field { display: flex; gap: 8px; margin-top: 12px; } .field input { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-br); border-radius: 10px; padding: 9px 12px; color: var(--txt); font-family: inherit; font-size: 14px; } .field input:focus { outline: none; border-color: var(--accent); } .empty { display: grid; place-items: center; gap: 6px; min-height: 132px; text-align: center; color: var(--txt3); border: 1px dashed rgba(255,255,255,0.12); border-radius: 14px; background: rgba(255,255,255,0.025); padding: 22px; } .empty strong { color: var(--txt); font-size: 14px; } .empty span { max-width: 540px; font-size: 13px; line-height: 1.5; } .empty.compact { min-height: 74px; margin-top: 10px; padding: 14px; } .form-grid { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.4fr); gap: 14px; align-items: end; } .field-block { display: flex; flex-direction: column; gap: 7px; } .field-block.wide { grid-column: 1 / -1; } .field-block label, .select-filter span { color: var(--txt3); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; } .field-block input, .field-block textarea, .select-filter select { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-br); border-radius: 10px; padding: 10px 12px; color: var(--txt); font-family: inherit; font-size: 14px; } .field-block textarea { resize: vertical; min-height: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; } .field-block input:focus, .field-block textarea:focus, .select-filter select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,139,224,0.12); } .form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .msg { color: var(--txt3); font-size: 13px; } .msg.ok { color: var(--ok); } .msg.bad { color: var(--bad); } .table-actions { text-align: right; white-space: nowrap; } .filters { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 16px 0; } .segmented { display: inline-flex; padding: 4px; border: 1px solid var(--panel-br); background: rgba(255,255,255,0.035); border-radius: 12px; gap: 2px; } .segmented button { appearance: none; border: 0; background: transparent; color: var(--txt2); border-radius: 9px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; } .segmented button.active { background: rgba(90,139,224,0.18); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(90,139,224,0.18); } .select-filter { display: inline-flex; align-items: center; gap: 8px; } .select-filter select { min-width: 150px; padding: 8px 10px; } @media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .filters { align-items: stretch; } .segmented, .select-filter, .select-filter select { width: 100%; } .segmented button { flex: 1; } } /* Honest action affordance: a copyable CLI command (static dashboard has no backend - the buttons would POST nowhere, so we show the exact command). */ .cmd { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-br); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--txt); white-space: nowrap; } .cmd::before { content: '$'; color: var(--txt3); } .cmd.accent { border-color: rgba(90,139,224,0.4); color: var(--accent); } .cmds { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } /* Server dashboard components */ .svc { display: flex; flex-wrap: wrap; gap: 10px; } .svc .item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--panel-br); font-size: 13px; font-weight: 500; } .key { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 14px; } .key:first-of-type { border-top: 0; } .key .fp { margin-left: auto; color: var(--txt3); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } .chart-panel { overflow: hidden; } .chart-panel.subtle { padding: 0; margin-bottom: 14px; background: transparent; border: 0; } svg.chart { display: block; width: 100%; height: auto; min-height: 150px; } svg.chart .chart-shell { fill: rgba(255,255,255,0.025); stroke: rgba(255,255,255,0.07); } svg.chart .chart-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; } svg.chart .chart-axis, svg.chart .chart-label { fill: var(--txt3); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; } svg.chart .chart-value { fill: var(--txt); font-size: 12px; font-weight: 800; } svg.chart .chart-empty-title { fill: var(--txt); font-size: 15px; font-weight: 800; } svg.chart .chart-empty-sub { fill: var(--txt3); font-size: 12px; } svg.chart .bar-mark.ok rect { fill: var(--ok); opacity: 0.85; } svg.chart .bar-mark.warn rect { fill: var(--warn); opacity: 0.88; } svg.chart .bar-mark.bad rect { fill: var(--bad); opacity: 0.9; } svg.chart .spark-path { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; } svg.chart circle.ok { fill: var(--ok); } svg.chart circle.bad { fill: var(--bad); } svg.chart.disabled { opacity: 0.86; } /* ───────────── Health / vital signs (server metrics) ───────────── */ /* Overall status banner - at-a-glance "is the box OK?" verdict. */ .health-hero { --hue: var(--ok); --huebg: var(--okbg); display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; margin-top: 8px; background: radial-gradient(700px 200px at 0% 0%, var(--huebg), transparent 70%), var(--panel); border: 1px solid var(--panel-br); border-radius: 18px; padding: 18px 22px; backdrop-filter: blur(6px); } .health-hero.warn { --hue: var(--warn); --huebg: var(--warnbg); } .health-hero.bad { --hue: var(--bad); --huebg: var(--badbg); } .health-hero .status { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; color: var(--hue); } .health-hero .status .led { width: 13px; height: 13px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 0 4px var(--huebg); animation: hb-pulse 2.4s ease-in-out infinite; } .health-hero .status small { display: block; color: var(--txt3); font-size: 12px; font-weight: 500; margin-top: 2px; letter-spacing: 0; } @keyframes hb-pulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.5 } } .health-hero .hmeta { margin-left: auto; display: flex; flex-wrap: wrap; gap: 22px 26px; color: var(--txt2); font-size: 13px; } .health-hero .hmeta .item { display: flex; flex-direction: column; gap: 2px; } .health-hero .hmeta .item span { color: var(--txt3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; } .health-hero .hmeta .item b { color: var(--txt); font-weight: 600; font-size: 14px; } /* Radial gauges - the centerpiece read for CPU / memory / disk. */ .gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; } @media (max-width: 760px) { .gauges { grid-template-columns: 1fr; } } .gauge { --g: var(--ok); --gbg: var(--okbg); background: var(--panel); border: 1px solid var(--panel-br); border-radius: 18px; padding: 20px 20px 18px; backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: border-color .15s, transform .15s; } .gauge:hover { border-color: color-mix(in srgb, var(--g) 45%, transparent); transform: translateY(-1px); } .gauge.warn { --g: var(--warn); --gbg: var(--warnbg); } .gauge.bad { --g: var(--bad); --gbg: var(--badbg); } .gauge .ghead { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--txt3); font-weight: 700; } .gauge .ghead svg { width: 15px; height: 15px; color: var(--g); } .gauge .ring { position: relative; width: 172px; height: 172px; margin: 6px 0 2px; border-radius: 50%; background: conic-gradient(var(--g) calc(var(--pct) * 1%), rgba(255,255,255,0.07) 0); } .gauge .ring::after { content: ''; position: absolute; inset: 15px; border-radius: 50%; background: linear-gradient(160deg, #10151f, #0c1017); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035); } .gauge .center { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; } .gauge .pct { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; } .gauge .pct sup { font-size: 17px; font-weight: 700; color: var(--txt2); margin-left: 1px; top: -0.7em; } .gauge .punit { font-size: 11px; color: var(--txt3); font-weight: 600; margin-top: 7px; text-transform: uppercase; letter-spacing: 0.07em; } .gauge .gsub { color: var(--txt2); font-size: 14px; font-weight: 500; } .gauge .gsub b { color: var(--txt); font-weight: 700; } .gauge .gtag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; background: var(--gbg); color: var(--g); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; } /* Vital-sign tiles - the secondary numbers (free RAM, uptime, etc.). */ .vitals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; } @media (max-width: 880px) { .vitals { grid-template-columns: repeat(2, 1fr); } } .vital { background: var(--panel); border: 1px solid var(--panel-br); border-radius: 14px; padding: 14px 16px; } .vital .vlabel { display: flex; align-items: center; gap: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--txt3); font-weight: 700; } .vital .vlabel svg { width: 13px; height: 13px; } .vital .vval { font-size: 21px; font-weight: 700; margin-top: 7px; letter-spacing: -0.01em; } .vital .vval small { font-size: 12.5px; color: var(--txt2); font-weight: 500; } .vital .vnote { font-size: 12px; color: var(--txt3); margin-top: 3px; } /* Tone-colored progress bars (shared with index health cards). */ .bar.ok > i { background: var(--ok); } .bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); } /* Load trend chart - sparkline with capacity guide + axis labels. */ .chart { position: relative; } .chart .spark { height: 124px; align-items: flex-end; } .chart .spark > i { background: linear-gradient(180deg, var(--accent), rgba(90,139,224,0.22)); transition: height .6s ease; } .chart .spark > i.hot { background: linear-gradient(180deg, var(--warn), rgba(251,191,36,0.22)); } .chart .spark > i.peak { background: linear-gradient(180deg, var(--bad), rgba(248,113,113,0.25)); } .chart .xaxis { display: flex; justify-content: space-between; margin-top: 9px; color: var(--txt3); font-size: 11px; } .grid > *, .panel, header.page > *, .cols > * { min-width: 0; } @media (max-width: 420px) { .cards, .cards-3, .cards-2, .vitals, .gauges, .cols { grid-template-columns: minmax(0, 1fr); } .stat { max-width: 100%; font-size: 25px; overflow-wrap: anywhere; } .stat small { display: block; margin-top: 5px; letter-spacing: 0; } .header-actions { width: 100%; margin-left: 0; justify-content: flex-end; } .context-breadcrumb { overflow: hidden; } .context-breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .timeline-row { grid-template-columns: 1fr; } .timeline-row .when { white-space: normal; } .field, .action-runner, .op-confirm { align-items: stretch; flex-direction: column; } .field input, .op-confirm-input, .action-runner select { flex: 1 1 auto; width: 100%; min-width: 0; } } </style> <script data-stx-scoped>
2
- function __stx_setup_1785198917973_3() {
2
+ function __stx_setup_1785199200132_6() {
3
3
  const { state, derived, effect, batch, onMount, onDestroy, defineStore, useStore, useFetch, useRef, useQuery, useMutation, useOptimistic, useDebounce, useDebouncedValue, useThrottle, useInterval, useTimeout, useToggle, useCounter, useClickOutside, useFocus, useAsync, useLocalStorage, useSessionStorage, useCookie, useReactiveProp, useEventListener, useWebSocket, useColorMode, useDark, useHead, useSeoMeta, definePageMeta, useRoute, useSearchParams, navigate, goBack, goForward, provide, ref, reactive, computed, watch, watchEffect, defineProps, withDefaults, defineEmits, defineExpose, defineSlots } = window.stx;
4
4
 
5
5
 
@@ -243,8 +243,8 @@ async function copy(value, label) {
243
243
  }
244
244
  return { usePolling, services, operations, search, engineFilter, providerFilter, statusFilter, selected, plan, guidance, oneTime, notice, actionError, busy, createOpen, operationAction, actionLabels, api, load, pollingState, pollingError, lastUpdatedAt, refresh, tone, when, filtered, formBody, createService, inspect, previewAction, runAction, runConfiguredAction, chooseAction, reveal, serviceOperations, observationEntries, copy };
245
245
  }
246
- if(window.stx)window.stx._latestSetup=__stx_setup_1785198917973_3;
247
- </script> <style data-stx-cloak>[x-cloak]{display:none !important}</style><style data-crosswind="generated"> /* ! Tailwind CSS Preflight | MIT License | https://tailwindcss.com */ *, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: var(--border-color, currentColor); } ::before, ::after { --hw-content: ''; } html, :host { line-height: 1.5; -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; font-family: ui-sans-serif, system-ui, sans-serif; font-feature-settings: normal; font-variation-settings: normal; -webkit-tap-highlight-color: transparent; } body { margin: 0; line-height: inherit; } hr { height: 0; color: inherit; border-top-width: 1px; } abbr:where([title]) { text-decoration: underline dotted; } h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } a { color: inherit; text-decoration: inherit; } b, strong { font-weight: bolder; } code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } table { text-indent: 0; border-color: var(--border-color, inherit); border-collapse: collapse; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; } button, select { text-transform: none; } button, input:where([type='button']), input:where([type='reset']), input:where([type='submit']) { -webkit-appearance: button; background-color: transparent; background-image: none; } :-moz-focusring { outline: auto; } :-moz-ui-invalid { box-shadow: none; } progress { vertical-align: baseline; } ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } [type='search'] { -webkit-appearance: textfield; outline-offset: -2px; } ::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } summary { display: list-item; } blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } fieldset { margin: 0; padding: 0; } legend { padding: 0; } ol, ul, menu { list-style: none; margin: 0; padding: 0; } dialog { padding: 0; } textarea { resize: vertical; } input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; } button, [role="button"] { cursor: pointer; } :disabled { cursor: default; } img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; } img, video { max-width: 100%; height: auto; } [hidden] { display: none; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } </style></head><body data-stx="__stx_setup_1785198917973_3"><a data-stx-scope="stx_scope_nav_6" class="skip-link" href="#main-content">Skip to content</a><button class="nav-toggle-button" type="button" aria-label="Open navigation" aria-controls="primary-navigation" aria-expanded="false"><span></span><span></span><span></span></button><button class="nav-scrim" type="button" aria-label="Close navigation"></button><aside class="app-sidebar" id="primary-navigation" aria-label="Primary navigation"><a class="brand" href="/?env=production"><span class="dot"></span><span>ts-cloud</span></a><div class="sidebar-context"><span class="context-label">Project</span><strong>Project</strong></div><div class="environment-picker" aria-label="Environment"><span class="context-label">Environment</span><details><summary class="environment-current production"><span>PROD</span><strong>production</strong></summary></details></div><button class="command-trigger" type="button" aria-keyshortcuts="Meta+K Control+K"><span>Search resources</span><kbd>⌘ K</kbd></button><div class="nav-groups"><section class="nav-group"><h2>Overview</h2><a class="" href="/?env=production">Dashboard</a><a href="/server/activity?env=production">Activity</a></section><section class="nav-group"><h2>Applications</h2><a class="" href="/server/sites?env=production">Services</a><a class="" href="/server/deployments?env=production">Deployments</a><a class="" href="/server/logs?env=production">Logs</a><a class="" href="/integrations?env=production">Git integrations</a><a class="" href="/applications/new?env=production">Create application</a><a class="" href="/applications/compose?env=production">Compose applications</a></section><section class="nav-group"><h2>Operations</h2><a class="" href="/operations/queue?env=production">Deployment queue</a><a class="" href="/operations/previews?env=production">Preview environments</a><a class="" href="/operations/releases?env=production">Releases & promotion</a><a class="" href="/operations/regions?env=production">Regions & failover</a><a class="" href="/operations/maintenance?env=production">Maintenance & DR</a><a class="" href="/operations/workloads?env=production">Workloads</a><a class="" href="/operations/observability?env=production">Observability</a><a class="" href="/operations/alerts?env=production">Alerts & health</a><a href="/server/metrics?env=production">Metrics</a><a href="/server/services?env=production">Runtime services</a><a class="" href="/operations/jobs?env=production">Workers & schedules</a><a class="" href="/operations/configuration?env=production">Environment &amp; secrets</a><a class="" href="/data/backups?env=production">Backups &amp; recovery</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/actions?env=production">Run operations</a></section><section class="nav-group"><h2>Infrastructure</h2><a class="active" href="/data/services?env=production">Data services</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/firewall?env=production">Network & firewall</a><a href="/server/ssh-keys?env=production">SSH keys</a><a class="" href="/server/fleet?env=production">Fleet inventory</a><a class="" href="/server/capacity?env=production">Capacity & placement</a><a href="/security?env=production">Security posture</a><a href="/server/terminal?env=production">Terminal</a></section><section class="nav-group"><h2>Organization</h2><a class="" href="/server/team?env=production">People & access</a><a class="" href="/account/automation?env=production">API & automation</a></section><section class="nav-group"><h2>Account</h2><a class="" href="/account/security?env=production">Sign-in & security</a></section></div><form method="post" action="/api/logout" class="signout"><button type="submit">Sign out</button></form></aside><dialog class="command-palette" aria-labelledby="command-title"><div class="command-search"><span aria-hidden="true">⌕</span><input type="search" placeholder="Search services, domains, deployments…" aria-label="Search resources" autocomplete="off"><button type="button" class="command-close" aria-label="Close search">Esc</button></div><h2 id="command-title" class="sr-only">Search resources and navigation</h2><div class="command-status" role="status">Start typing to search this project.</div><section class="saved-views" aria-labelledby="saved-views-title"><div class="saved-views-heading"><h3 id="saved-views-title">Saved views</h3><form class="save-view-form"><label class="sr-only" for="save-view-name">Saved view name</label><input id="save-view-name" maxlength="64" placeholder="Name this view" autocomplete="off"><button type="submit">Save current filters</button></form></div><div class="saved-view-list"></div></section><form class="tag-result-form"><label for="tag-result-name">Tag selected resource</label><input id="tag-result-name" maxlength="32" placeholder="customer-facing" pattern="[A-Za-z0-9][A-Za-z0-9 -]{0,31}" autocomplete="off"><input class="tag-color" type="color" value="#5a8be0" aria-label="Tag color"><button type="submit">Add tag</button></form><div class="command-results" role="listbox" aria-label="Search results"></div><footer><span>↑ ↓ navigate</span><span>Enter open</span><span>Esc close</span></footer></dialog><div class="context-bar" aria-label="Current scope"><div class="context-path"><div class="context-breadcrumb"><span>Project</span><i>/</i><strong>production</strong></div><div class="context-filters" aria-label="Active filters"></div></div><span class="scope-safety production">Production scope</span></div> <script data-stx-scoped>if(!window.__stx_early_mounts)window.__stx_early_mounts=[];if(!window.__stx_early_destroys)window.__stx_early_destroys=[];if(!window.onMount)window.onMount=function(fn){window.__stx_early_mounts.push(fn)};if(!window.onDestroy)window.onDestroy=function(fn){window.__stx_early_destroys.push(fn)};(function(){var cloakStyle=document.createElement("style");cloakStyle.textContent="[x-cloak] { display: none !important; }";document.head.appendChild(cloakStyle);let activeEffect=null;const effectStack=[];const pendingEffects=new Set;let isBatching=false;var __stxDevtoolsTracking=false;var __stxDevtoolsStats={signalSets:0,effectRuns:0};var __stxEffectId=0;var __stxDevtoolsIfTrace=[];var __stxDevtoolsQueries=[];var __stxDevtoolsMutations=[];var __stxSignalId=0;function __stxDevtoolsNow(){return typeof performance!=="undefined"&&performance.now?performance.now():Date.now()};function __stxDevtoolsRecordIf(rec){if(!__stxDevtoolsTracking)return;__stxDevtoolsIfTrace.push(rec);if(__stxDevtoolsIfTrace.length>100)__stxDevtoolsIfTrace.shift()};function __stxDevtoolsRecordQuery(rec){if(!__stxDevtoolsTracking)return;__stxDevtoolsQueries.push(rec);if(__stxDevtoolsQueries.length>100)__stxDevtoolsQueries.shift()};function __stxShort(v){try{if(typeof v==="string")return v.length>40?v.slice(0,40)+"…":v;if(v===null||typeof v!=="object")return v;var s=JSON.stringify(v);return s.length>60?s.slice(0,60)+"…":s}catch(e){return"[unserializable]"}}async function __stxFetch(source,url,opts){var t0=__stxDevtoolsNow();var method=opts&&opts.method||"GET";try{var r=await fetch(url,opts);__stxDevtoolsRecordQuery({source,url:String(url),method,status:r.status,ok:r.ok,ms:__stxDevtoolsNow()-t0});return r}catch(e){__stxDevtoolsRecordQuery({source,url:String(url),method,status:0,ok:false,error:String(e&&e.message||e),ms:__stxDevtoolsNow()-t0});throw e}};let activeDisposers=null;const targetMap=new WeakMap;const globalHelpers={fmt(n){if(n==null)return"0";n=Number(n);if(n>=1e6)return(n/1e6).toFixed(1)+"M";if(n>=1000)return(n/1000).toFixed(1)+"K";return String(n)},formatDate(date,format="YYYY-MM-DD"){if(!date)return"";const d=date instanceof Date?date:new Date(date);if(isNaN(d.getTime()))return"";const year=d.getFullYear();const month=String(d.getMonth()+1).padStart(2,"0");const day=String(d.getDate()).padStart(2,"0");const hours=String(d.getHours()).padStart(2,"0");const minutes=String(d.getMinutes()).padStart(2,"0");const seconds=String(d.getSeconds()).padStart(2,"0");return format.replace("YYYY",year).replace("MM",month).replace("DD",day).replace("HH",hours).replace("mm",minutes).replace("ss",seconds)},timeAgo(date){if(!date)return"";const d=date instanceof Date?date:new Date(date);const now=new Date;const seconds=Math.floor((now-d)/1000);if(seconds<60)return"just now";if(seconds<3600)return Math.floor(seconds/60)+"m ago";if(seconds<86400)return Math.floor(seconds/3600)+"h ago";if(seconds<604800)return Math.floor(seconds/86400)+"d ago";return d.toLocaleDateString()},debounce(fn,delay=300){let timeout;return function(...args){clearTimeout(timeout);timeout=setTimeout(()=>fn.apply(this,args),delay)}},throttle(fn,limit=300){let inThrottle;return function(...args){if(!inThrottle){fn.apply(this,args);inThrottle=true;setTimeout(()=>inThrottle=false,limit)}}},capitalize(str){if(!str)return"";return str.charAt(0).toUpperCase()+str.slice(1)},truncate(str,length=50,suffix="..."){if(!str||str.length<=length)return str||"";return str.slice(0,length)+suffix},json(value,indent=2){try{return JSON.stringify(value,null,indent)}catch(e){return String(value)}},pluralize(count,singular,plural){const p=plural||singular+"s";return count===1?singular:p},clamp(value,min,max){return Math.min(Math.max(value,min),max)},currency(value,symbol="$",decimals=2){if(value==null)return symbol+"0.00";return symbol+Number(value).toFixed(decimals).replace(/\B(?=(\d{3})+(?!\d))/g,",")},percent(value,decimals=0){if(value==null)return"0%";return(Number(value)*100).toFixed(decimals)+"%"}};function track(target,key){if(!activeEffect)return;let depsMap=targetMap.get(target);if(!depsMap)targetMap.set(target,depsMap=new Map);let deps=depsMap.get(key);if(!deps)depsMap.set(key,deps=new Set);deps.add(activeEffect)};function trigger(target,key){const depsMap=targetMap.get(target);if(!depsMap)return;const deps=depsMap.get(key);if(deps){if(isBatching){deps.forEach((effect)=>pendingEffects.add(effect))}else{deps.forEach((effect)=>effect())}}};function createAutoUnwrapProxy(scope){return new Proxy(scope,{get(target,prop){const val=target[prop];if(val&&typeof val==="function"&&(val._isSignal||val._isDerived)){return val()}if(val&&typeof val==="object"&&val._isStxStore){return createAutoUnwrapProxy(val)}return val},set(target,prop,value){const cur=target[prop];if(cur&&typeof cur==="function"&&cur._isSignal&&typeof cur.set==="function"){cur.set(value);return true}target[prop]=value;return true}})};function parsePipeExpression(expr,scope){let pipeIndex=-1;let inString=false;let stringChar="";let depth=0;for(let i=0;i<expr.length;i++){const char=expr[i];const prevChar=i>0?expr[i-1]:"";const nextChar=i<expr.length-1?expr[i+1]:"";if((char==='"'||char==="'"||char==="`")&&prevChar!=="\\"){if(!inString){inString=true;stringChar=char}else if(char===stringChar){inString=false}continue}if(inString)continue;if(char==="("||char==="["||char==="{")depth++;if(char===")"||char==="]"||char==="}")depth--;if(depth!==0)continue;if(char==="|"){if(nextChar==="|"){i++;continue}if(prevChar==="|")continue;if(prevChar==="?")continue;pipeIndex=i;break}}if(pipeIndex===-1)return null;const valueExpr=expr.slice(0,pipeIndex).trim();const pipeChain=expr.slice(pipeIndex+1).trim();const pipes=[];let currentPipe="";inString=false;stringChar="";depth=0;for(let i=0;i<pipeChain.length;i++){const char=pipeChain[i];const prevChar=i>0?pipeChain[i-1]:"";const nextChar=i<pipeChain.length-1?pipeChain[i+1]:"";if((char==='"'||char==="'"||char==="`")&&prevChar!=="\\"){if(!inString){inString=true;stringChar=char}else if(char===stringChar){inString=false}currentPipe+=char;continue}if(inString){currentPipe+=char;continue}if(char==="("||char==="["||char==="{")depth++;if(char===")"||char==="]"||char==="}")depth--;if(depth===0&&char==="|"&&nextChar!=="|"&&prevChar!=="|"&&prevChar!=="?"){if(currentPipe.trim()){const parts=currentPipe.trim().split(":");pipes.push({name:parts[0].trim(),args:parts.slice(1).map((a)=>a.trim())})}currentPipe=""}else{currentPipe+=char}}if(currentPipe.trim()){const parts=currentPipe.trim().split(":");pipes.push({name:parts[0].trim(),args:parts.slice(1).map((a)=>a.trim())})}if(pipes.length===0)return null;return{valueExpr,pipes}};function executePipeExpression(valueExpr,pipes,scope){let value;try{const fn=new Function(...Object.keys(scope),"return "+valueExpr);value=fn(...Object.values(scope))}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Pipe base expression error:",valueExpr,e);return""}for(const pipe of pipes){const filterFn=scope[pipe.name]||globalHelpers[pipe.name];if(typeof filterFn==="function"){try{const parsedArgs=pipe.args.map((arg)=>{if(/^-?\d+(\.\d+)?$/.test(arg))return Number(arg);if(/^['"].*['"]$/.test(arg))return arg.slice(1,-1);try{const fn=new Function(...Object.keys(scope),"return "+arg);return fn(...Object.values(scope))}catch(e){return arg}});value=filterFn(value,...parsedArgs)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Pipe filter error:",pipe.name,e)}}else{console.warn("[STX] Unknown pipe/filter:",pipe.name)}}return value};function state(initialValue){let value=initialValue;const subscribers=new Set;const effects=new Set;const signal=()=>{if(activeEffect){effects.add(activeEffect)}return value};signal.set=(newValue)=>{if(!Object.is(newValue,value)){if(__stxDevtoolsTracking){signal._setCount++;__stxDevtoolsStats.signalSets++;__stxDevtoolsMutations.push({sid:signal._stxSignalId,prev:__stxShort(value),next:__stxShort(newValue)});if(__stxDevtoolsMutations.length>100)__stxDevtoolsMutations.shift()};const prev=value;value=newValue;subscribers.forEach((cb)=>cb(value,prev));if(isBatching){effects.forEach((effect)=>pendingEffects.add(effect))}else{effects.forEach((effect)=>effect())}}};signal.update=(fn)=>signal.set(fn(value));signal.subscribe=(cb)=>{subscribers.add(cb);return()=>subscribers.delete(cb)};signal._isSignal=true;signal._effects=effects;signal._setCount=0;signal._stxSignalId=++__stxSignalId;Object.defineProperty(signal,"value",{get(){return signal()},set(v){signal.set(v)},configurable:true});return signal};function derived(compute){let cached;let isDirty=true;const effects=new Set;const markDirty=()=>{if(!isDirty){isDirty=true;if(isBatching){effects.forEach((e)=>pendingEffects.add(e))}else{effects.forEach((e)=>e())}}};const signal=()=>{if(activeEffect)effects.add(activeEffect);if(isDirty){const prev=activeEffect;activeEffect=markDirty;effectStack.push(markDirty);try{cached=compute()}finally{effectStack.pop();activeEffect=prev}isDirty=false}return cached};signal._isDerived=true;signal._effects=effects;Object.defineProperty(signal,"value",{get(){return signal()},configurable:true});return signal};function effect(fn,options={}){let cleanup;let isDisposed=false;const runEffect=()=>{if(isDisposed)return;if(__stxDevtoolsTracking){runEffect._runCount++;__stxDevtoolsStats.effectRuns++}if(cleanup){cleanup();cleanup=undefined};const prev=activeEffect;activeEffect=runEffect;effectStack.push(runEffect);try{cleanup=fn()}catch(e){isDisposed=true;if(e instanceof ReferenceError){}else{throw e}}finally{effectStack.pop();activeEffect=prev}};runEffect._isStxEffect=true;runEffect._stxId=++__stxEffectId;runEffect._runCount=0;if(options.immediate!==false)runEffect();const dispose=()=>{isDisposed=true;if(cleanup)cleanup()};if(activeDisposers)activeDisposers.push(dispose);return dispose};function trackEffects(fn){var parentDisposers=activeDisposers;var disposers=[];activeDisposers=disposers;try{fn()}finally{activeDisposers=parentDisposers;if(parentDisposers){disposers.forEach(function(d){parentDisposers.push(d)})}}return function disposeAll(){disposers.forEach(function(d){try{d()}catch(e){console.warn("[stx] dispose error:",e)}});disposers.length=0}};function batch(fn){if(isBatching){fn();return}isBatching=true;fn();isBatching=false;pendingEffects.forEach((e)=>e());pendingEffects.clear()};function isSignal(v){return typeof v==="function"&&v._isSignal===true};function untrack(v){return isSignal(v)||typeof v==="function"&&v._isDerived?v():v};function peek(fn){const prev=activeEffect;activeEffect=null;try{return fn()}finally{activeEffect=prev}};const mountCallbacks=[];const destroyCallbacks=[];function onMount(fn){mountCallbacks.push(fn)};function onDestroy(fn){destroyCallbacks.push(fn)}if(window.__stx_early_mounts){window.__stx_early_mounts.forEach(function(fn){mountCallbacks.push(fn)});window.__stx_early_mounts=null}if(window.__stx_early_destroys){window.__stx_early_destroys.forEach(function(fn){destroyCallbacks.push(fn)});window.__stx_early_destroys=null};function useWebSocket(url,options){options=options||{};var ws=state(null);var status=state("CLOSED");var lastMessage=state(null);var error=state(null);var reconnectAttempts=0;var maxReconnects=options.reconnect===false?0:options.maxReconnects||10;var reconnectDelay=options.reconnectDelay||1000;var reconnectTimer=null;var manualClose=false;var listeners={};function connect(){if(ws()&&ws().readyState<=1)return;manualClose=false;status.set("CONNECTING");error.set(null);var socket=new WebSocket(url);socket.onopen=function(){status.set("OPEN");reconnectAttempts=0;if(options.onOpen)options.onOpen(socket)};socket.onmessage=function(event){var data=event.data;try{data=JSON.parse(data)}catch(e){}lastMessage.set(data);if(options.onMessage)options.onMessage(data,event);if(data&&data.channel&&data.event){var key=data.channel+":"+data.event;var fns=listeners[key];if(fns){for(var i=0;i<fns.length;i++){fns[i](data.data)}}}};socket.onerror=function(event){error.set(event);if(options.onError)options.onError(event)};socket.onclose=function(event){status.set("CLOSED");ws.set(null);if(options.onClose)options.onClose(event);if(!manualClose&&reconnectAttempts<maxReconnects){reconnectAttempts++;var delay=reconnectDelay*Math.min(reconnectAttempts,5);reconnectTimer=setTimeout(connect,delay)}};ws.set(socket)};function send(data){var socket=ws();if(socket&&socket.readyState===WebSocket.OPEN){socket.send(typeof data==="string"?data:JSON.stringify(data))}};function close(){manualClose=true;if(reconnectTimer){clearTimeout(reconnectTimer);reconnectTimer=null};var socket=ws();if(socket)socket.close()};function subscribe(channel){send({type:"subscribe",channel});return{listen:function(event,handler){var key=channel+":"+event;if(!listeners[key])listeners[key]=[];listeners[key].push(handler);return this},leave:function(){send({type:"unsubscribe",channel});var prefix=channel+":";for(var key in listeners){if(key.indexOf(prefix)===0){delete listeners[key]}}}}}if(options.immediate!==false){connect()}onDestroy(function(){close();listeners={}});return{ws,status,lastMessage,error,send,close,connect,subscribe}};function useFetch(urlOrFn,options={}){const data=state(options.initialData??null);const loading=state(true);const error=state(null);if(options.suspense)registerSuspense(loading,error);const fetchData=async()=>{loading.set(true);error.set(null);try{const url=typeof urlOrFn==="function"?urlOrFn():urlOrFn;if(!url){loading.set(false);return};const fetchOptions={method:options.method||"GET",headers:{"Content-Type":"application/json",...options.headers||{}}};if(options.body){fetchOptions.body=typeof options.body==="string"?options.body:JSON.stringify(options.body)};const response=await __stxFetch("useFetch",url,fetchOptions);if(!response.ok){throw new Error(`HTTP ${response.status}: ${response.statusText}`)};const result=await response.json();const transformed=options.transform?options.transform(result):result;data.set(transformed)}catch(e){console.error("[STX] useFetch error:",e);error.set(e instanceof Error?e:new Error(String(e)));if(options.onError)options.onError(e)}finally{loading.set(false)}};if(options.immediate!==false){onMount(fetchData)}if(typeof urlOrFn==="function"){effect(()=>{const url=urlOrFn();if(url&&options.immediate!==false){fetchData()}})}return{data,loading,error,refetch:fetchData,get isLoading(){return loading()},get hasError(){return!!error()},get isEmpty(){return!loading()&&!data()}}};function useRef(name){return{get current(){return componentScope.$refs?componentScope.$refs[name]:null},get value(){return this.current}}};function navigate(url,forceReload){if(forceReload){window.location.href=url;return}if(window.stxRouter&&typeof window.stxRouter.navigate==="function"){window.stxRouter.navigate(url)}else{window.location.href=url}};function goBack(){window.history.back()};function goForward(){window.history.forward()};var _routeParams=state({});function setRouteParams(params){_routeParams.set(params||{})}window.addEventListener("stx:navigate",function(e){if(e.detail&&e.detail.params){_routeParams.set(e.detail.params)}});if(window.stx&&window.stx._rp||window.__stx_rp){_routeParams.set(window.stx?._rp||window.__stx_rp)};function useRoute(){return{get path(){return window.location.pathname},get fullPath(){return window.location.pathname+window.location.search+window.location.hash},get hash(){return window.location.hash},get query(){var params={};new URLSearchParams(window.location.search).forEach(function(v,k){params[k]=v});return params},get params(){return _routeParams()}}};function useSearchParams(){var params=state(Object.fromEntries(new URLSearchParams(window.location.search)));var syncFromUrl=function(){params.set(Object.fromEntries(new URLSearchParams(window.location.search)))};window.addEventListener("popstate",syncFromUrl);window.addEventListener("stx:navigate",syncFromUrl);return{data:params,get:function(key){return params()[key]},set:function(key,value){var url=new URL(window.location.href);url.searchParams.set(key,value);window.history.pushState({},"",url);syncFromUrl()},setAll:function(obj){var url=new URL(window.location.href);Object.keys(obj).forEach(function(k){url.searchParams.set(k,obj[k])});window.history.pushState({},"",url);syncFromUrl()}}};var _queryCache={};function suspenseRegistry(){if(typeof window==="undefined")return[];return window.__stx_suspense_registry||(window.__stx_suspense_registry=[])};function registerSuspense(loading,error){var el=typeof window!=="undefined"&&window.__STX_CURRENT_ELEMENT__||null;suspenseRegistry().push({el,loading,error})};function useQuery(url,options){options=options||{};var staleTime=options.staleTime||0;var cacheTime=options.cacheTime||300000;var cacheKey=options.cacheKey||(typeof url==="function"?null:url);var data=state(options.initialData||null);var loading=state(true);var error=state(null);var isStale=state(false);if(options.suspense)registerSuspense(loading,error);var fetchData=async function(){var resolvedUrl=typeof url==="function"?url():url;if(!resolvedUrl){loading.set(false);return};var key=cacheKey||resolvedUrl;var cached=_queryCache[key];if(cached&&Date.now()-cached.timestamp<staleTime){data.set(cached.data);loading.set(false);isStale.set(false);if(options.onSuccess)options.onSuccess(cached.data);return}if(cached){data.set(cached.data);isStale.set(true)}loading.set(true);error.set(null);try{var fetchOpts={method:"GET",headers:{"Content-Type":"application/json",...options.headers||{}}};var response=await __stxFetch("useQuery",resolvedUrl,fetchOpts);if(!response.ok)throw new Error("HTTP "+response.status+": "+response.statusText);var result=await response.json();var transformed=options.transform?options.transform(result):result;data.set(transformed);isStale.set(false);_queryCache[key]={data:transformed,timestamp:Date.now()};if(options.onSuccess)options.onSuccess(transformed);setTimeout(function(){delete _queryCache[key]},cacheTime)}catch(e){error.set(e.message||"Query failed");if(options.onError)options.onError(e)}finally{loading.set(false)}};if(options.immediate!==false){onMount(fetchData)}if(options.refetchOnFocus){document.addEventListener("visibilitychange",function(){if(!document.hidden)fetchData()})}if(options.refetchInterval){var intervalId=setInterval(fetchData,options.refetchInterval);onDestroy(function(){clearInterval(intervalId)})}return{data,loading,error,isStale,refetch:fetchData,invalidate:function(){var key=cacheKey||(typeof url==="function"?url():url);delete _queryCache[key];return fetchData()}}};function useMutation(url,options){options=options||{};var data=state(null);var loading=state(false);var error=state(null);var mutate=async function(body){loading.set(true);error.set(null);var previousData=data();if(options.optimisticData){var optimistic=typeof options.optimisticData==="function"?options.optimisticData(body):options.optimisticData;data.set(optimistic)}try{var resolvedUrl=typeof url==="function"?url():url;var fetchOpts={method:options.method||"POST",headers:{"Content-Type":"application/json",...options.headers||{}},body:typeof body==="string"?body:JSON.stringify(body)};var response=await __stxFetch("useMutation",resolvedUrl,fetchOpts);if(!response.ok)throw new Error("HTTP "+response.status+": "+response.statusText);var result=await response.json();var transformed=options.transform?options.transform(result):result;data.set(transformed);if(options.onSuccess)options.onSuccess(transformed);if(options.invalidateQueries){options.invalidateQueries.forEach(function(key){delete _queryCache[key]})}return transformed}catch(e){error.set(e.message||"Mutation failed");if(options.optimisticData)data.set(previousData);if(options.onError)options.onError(e);throw e}finally{loading.set(false)}};return{data,loading,error,mutate,reset:function(){data.set(null);error.set(null);loading.set(false)}}};function useOptimistic(base,reducer){var readBase=typeof base==="function"?base:function(){return base};var pending=state([]);var optimistic=derived(function(){return pending().reduce(function(acc,entry){return reducer(acc,entry.action)},readBase())});var primed=false;effect(function(){readBase();if(!primed){primed=true;return}if(peek(function(){return pending().length}))pending.set([])});function addOptimistic(action,settleWhen){var entry={action};pending.set(pending().concat([entry]));var settle=function(){var next=pending().filter(function(e){return e!==entry});if(next.length!==pending().length)pending.set(next)};if(settleWhen&&typeof settleWhen.then==="function"){Promise.resolve(settleWhen).then(settle,settle)}return settle}return[optimistic,addOptimistic]};let componentScope={$refs:{}};let currentElement=null;function findElementScope(el){let current=el;while(current&&current!==document){if(current.__stx_scope){return current.__stx_scope}if(current.hasAttribute&&current.hasAttribute("data-stx-scope")){const scopeId=current.getAttribute("data-stx-scope");if(window.stx._scopes&&window.stx._scopes[scopeId]){return window.stx._scopes[scopeId]}}current=current.parentElement||current.parentNode}return null};function toValue(expr,el,enableAutoUnwrap=true){try{if(/^__[A-Z_]+__$/.test(expr.trim())){return expr};const elementScope=findElementScope(el||currentElement);const baseScope={...componentScope,...elementScope||{},...globalHelpers};const pipeResult=parsePipeExpression(expr,baseScope);if(pipeResult){const unwrapScope=enableAutoUnwrap?createAutoUnwrapProxy(baseScope):baseScope;const piped=executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope);return piped&&typeof piped==="function"&&(piped._isSignal||piped._isDerived)?piped():piped};const scope=enableAutoUnwrap?createAutoUnwrapProxy(baseScope):baseScope;const fn=new Function(...Object.keys(baseScope),"return "+expr);const result=fn(...Object.values(scope));return result&&typeof result==="function"&&(result._isSignal||result._isDerived)?result():result}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expr,e);return""}};function parseEventShorthand(expr,scope){const trimmed=expr.trim();if(/^!\w+$/.test(trimmed)){const varName=trimmed.slice(1);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.set(!signal())}return null}if(/^\w+\+\+$/.test(trimmed)){const varName=trimmed.slice(0,-2);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.update((n)=>n+1)}return null}if(/^\w+--$/.test(trimmed)){const varName=trimmed.slice(0,-2);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.update((n)=>n-1)}return null};const assignMatch=trimmed.match(/^(\w+)\s*([+\-*\/])=\s*(.+)$/);if(assignMatch){const[,varName,op,valueExpr]=assignMatch;const signal=scope[varName];if(signal&&signal._isSignal){return()=>{const addValue=toValue(valueExpr,null,true);signal.update((n)=>{switch(op){case"+":return n+addValue;case"-":return n-addValue;case"*":return n*addValue;case"/":return n/addValue;default:return n}})}}return null};const simpleAssignMatch=trimmed.match(/^(\w+)\s*=\s*(.+)$/);if(simpleAssignMatch&&!trimmed.includes("==")&&!trimmed.includes("=>")){const[,varName,valueExpr]=simpleAssignMatch;const signal=scope[varName];if(signal&&signal._isSignal){return()=>{const newValue=toValue(valueExpr,null,true);signal.set(newValue)}}return null};const bareIdMatch=trimmed.match(/^([a-zA-Z_$][\w$]*)$/);if(bareIdMatch){const fn=scope[bareIdMatch[1]];if(typeof fn==="function"&&!fn._isSignal){return($event)=>fn($event)}}return null};function executeHandler(expr,event,el){try{if(/^__[A-Z_]+__$/.test(expr.trim())){return};const elementScope=findElementScope(el||currentElement);const scope={...componentScope,...elementScope||{},...globalHelpers};const shorthandFn=parseEventShorthand(expr,scope);if(shorthandFn){shorthandFn(event);return};const fn=new Function(...Object.keys(scope),"$event",expr);fn(...Object.values(scope),event)}catch(e){console.warn("[STX] Handler error:",expr,e)}};function deferHydration(el,trigger,scope){if(el.__stx_hydration_scheduled)return;el.__stx_hydration_scheduled=true;var run=function(){if(el.__stx_hydrated)return;el.__stx_hydrated=true;el.__stx_hydration_cancel=null;el.removeAttribute("stx-hydrate");var sid=el.getAttribute&&el.getAttribute("data-stx-scope");var finishHydrate=function(){var effectiveScope=scope;if(sid){var reg=window.stx._scopes?window.stx._scopes[sid]:null;if(reg)effectiveScope=Object.assign({},scope||{},reg)}Array.from(el.children).forEach(function(child){processElement(child,effectiveScope)});processAttributesOnly(el,effectiveScope);var sv=sid&&window.stx._scopes?window.stx._scopes[sid]:null;if(sv&&sv.__mountCallbacks&&!sv.__mounted){sv.__mounted=true;sv.__mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}})}window.dispatchEvent(new CustomEvent("stx:hydrated",{detail:{el,trigger}}))};var islandScript=sid?document.querySelector('script[data-stx-island="'+sid+'"]'):null;if(islandScript&&!islandScript.__stx_ran){islandScript.__stx_ran=true;var chunkSrc=islandScript.getAttribute&&islandScript.getAttribute("data-stx-src");if(chunkSrc){var s=document.createElement("script");s.src=chunkSrc;var integ=islandScript.getAttribute("data-stx-integrity");if(integ)s.integrity=integ;s.onload=finishHydrate;s.onerror=function(){console.error("[stx] island chunk load failed:",sid,chunkSrc);window.dispatchEvent(new CustomEvent("stx:island-error",{detail:{el,scopeId:sid,src:chunkSrc}}));finishHydrate()};document.head.appendChild(s);return}try{new Function(islandScript.textContent)()}catch(e){console.error("[stx] island setup error:",sid,e)}}finishHydrate()};if(trigger==="idle"){if(typeof requestIdleCallback==="function"){var idleId=requestIdleCallback(run,{timeout:2000});el.__stx_hydration_cancel=function(){if(typeof cancelIdleCallback==="function")cancelIdleCallback(idleId)}}else{var idleTimer=setTimeout(run,200);el.__stx_hydration_cancel=function(){clearTimeout(idleTimer)}}}else if(trigger==="visible"){if(typeof IntersectionObserver==="function"){var io=new IntersectionObserver(function(entries){entries.forEach(function(e){if(e.isIntersecting){io.disconnect();run()}})},{rootMargin:"50px"});io.observe(el);el.__stx_hydration_cancel=function(){io.disconnect()}}else{run()}}else if(trigger==="interaction"){var events=["mouseenter","click","focusin","touchstart"];var handler=function(){events.forEach(function(ev){el.removeEventListener(ev,handler)});run()};events.forEach(function(ev){el.addEventListener(ev,handler,{once:true,passive:true})});el.__stx_hydration_cancel=function(){events.forEach(function(ev){el.removeEventListener(ev,handler)})}}else if(trigger&&trigger.indexOf("media:")===0){var query=trigger.slice(6);var mql=window.matchMedia(query);if(mql.matches)run();else{var mqHandler=function(e){if(e.matches){mql.removeEventListener("change",mqHandler);run()}};mql.addEventListener("change",mqHandler);el.__stx_hydration_cancel=function(){mql.removeEventListener("change",mqHandler)}}}else{run()}};function processAttributesOnly(el,scope){el.__stx_hydrated=true;processElement(el,scope)};function processElement(el,scope=componentScope){if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute){if(el.hasAttribute("x-class")||el.hasAttribute("@click")){}}if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydrated){var trigger=el.getAttribute("stx-hydrate")||"idle";deferHydration(el,trigger,scope);return}if(el.nodeType===Node.ELEMENT_NODE&&el.tagName==="BUTTON"&&el.hasAttribute&&el.hasAttribute("@click")){}if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute){if(el.hasAttribute("x-data")||el.hasAttribute("data-stx-xdata")||el.__stx_scope){var xdScope=el.__stx_scope||(findElementScope(el)||{});if(xdScope&&Object.keys(xdScope).length>0){scope={...scope,...xdScope}}}if(el.hasAttribute("data-stx-memo")){var memoExpr=el.getAttribute("data-stx-memo");try{var memoScope={...scope,...findElementScope(el)||{},...globalHelpers};var memoFn=new Function(...Object.keys(memoScope),"return "+memoExpr);var memoVals=JSON.stringify(memoFn(...Object.values(memoScope)));if(el.__stx_memo_prev===memoVals){return}el.__stx_memo_prev=memoVals}catch(e){}}}if(el.nodeType===Node.TEXT_NODE){const text=el.textContent;if(text&&text.includes("{{")){const parts=text.split(/(\{\{[^}]+\}\})/g);if(parts.length>1){const fragment=document.createDocumentFragment();const parentEl=el.parentNode;const capturedScope={...scope,...findElementScope(parentEl)||{},...globalHelpers};parts.forEach((part)=>{const match=part.match(/^\{\{\s*(.+?)\s*\}\}$/);if(match){const expr=match[1];if(/^__[A-Z_]+__$/.test(expr.trim())){fragment.appendChild(document.createTextNode(part));return};const span=document.createElement("span");fragment.appendChild(span);effect(()=>{try{const pipeResult=parsePipeExpression(expr,capturedScope);if(pipeResult){const unwrapScope=createAutoUnwrapProxy(capturedScope);span.textContent=executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope)}else{const unwrapScope=createAutoUnwrapProxy(capturedScope);const fn=new Function(...Object.keys(capturedScope),"return "+expr);span.textContent=fn(...Object.values(unwrapScope))}}catch(e){try{const fn=new Function(...Object.keys(capturedScope),"return "+expr);span.textContent=fn(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expr,e2);span.textContent=""}}})}else if(part){fragment.appendChild(document.createTextNode(part))}});el.replaceWith(fragment)}}return}if(el.nodeType!==Node.ELEMENT_NODE)return;if(el.hasAttribute("data-stx-suspense")&&!el.__stx_suspense_bound){bindSuspense(el,scope);return}if(el.hasAttribute("@for")||el.hasAttribute(":for")||el.hasAttribute("x-for")){var forAttr=el.hasAttribute(":for")?":for":el.hasAttribute("x-for")?"x-for":"@for";bindFor(el,scope,forAttr);return}if(el.__stx_chain_member&&!el.isConnected)return;if(!el.__stx_chain_member){var orphanElse=getElseAttrInfo(el);if(orphanElse){console.warn("[STX] "+orphanElse.name+" has no matching preceding x-if/:if/@if sibling; rendering as a plain element.");el.removeAttribute(orphanElse.name)}}if(el.hasAttribute("@if")||el.hasAttribute(":if")||el.hasAttribute("x-if")){var ifAttr=el.hasAttribute(":if")?":if":el.hasAttribute("x-if")?"x-if":"@if";var ifChain=findIfChain(el,ifAttr);if(ifChain.length>1)bindIfChain(ifChain,scope);else bindIf(el,scope,ifAttr);return}if(el.hasAttribute("@show")||el.hasAttribute(":show")||el.hasAttribute("x-show")){var showAttr=el.hasAttribute(":show")?":show":el.hasAttribute("x-show")?"x-show":"@show";bindShow(el,el.getAttribute(showAttr),scope,showAttr)}if(el.hasAttribute("@model")||el.hasAttribute(":model")||el.hasAttribute("x-model")){var modelAttr=el.hasAttribute(":model")?":model":el.hasAttribute("x-model")?"x-model":"@model";bindModel(el,el.getAttribute(modelAttr),scope,modelAttr)};const attrCapturedScope={...scope,...findElementScope(el)||{},...globalHelpers};const maybeUnwrapSignal=(v)=>{if(v&&typeof v==="function"&&(v._isSignal||v._isDerived))return v();return v};const evalAttrExpr=(rawExpr)=>{var expr=rawExpr.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x27;/g,"'");try{if(/^__[A-Z_]+__$/.test(expr.trim()))return expr;const pipeResult=parsePipeExpression(expr,attrCapturedScope);if(pipeResult){const unwrapScope=createAutoUnwrapProxy(attrCapturedScope);return maybeUnwrapSignal(executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope))};const unwrapScope=createAutoUnwrapProxy(attrCapturedScope);const fn=new Function(...Object.keys(attrCapturedScope),"return "+expr);return maybeUnwrapSignal(fn(...Object.values(unwrapScope)))}catch(e){try{const fn=new Function(...Object.keys(attrCapturedScope),"return "+expr);return maybeUnwrapSignal(fn(...Object.values(attrCapturedScope)))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Attribute expression error:",expr,e2);return""}}};var DIRECTIVE_NAMES={class:1,style:1,text:1,html:1,show:1,model:1,if:1,for:1,ref:1};var EVENT_RE=/^(click|dblclick|mousedown|mouseup|mousemove|mouseenter|mouseleave|keydown|keyup|keypress|input|change|submit|focus|blur|scroll|resize|touchstart|touchend|touchmove|contextmenu|wheel|pointerdown|pointerup|pointermove)/;var KEY_MAP={enter:"Enter",tab:"Tab",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",delete:"Delete",backspace:"Backspace"};if(el.hasAttribute&&(el.hasAttribute("x-class")||el.hasAttribute("@click"))){}Array.from(el.attributes).forEach((attr)=>{const name=attr.name;const value=attr.value;if(el.hasAttribute&&(el.hasAttribute("x-class")||el.hasAttribute("@click"))){};var X_HANDLED={"x-text":1,"x-html":1,"x-model":1,"x-show":1,"x-if":1,"x-for":1,"x-cloak":1,"x-ref":1,"x-data":1,"x-bind":1,"x-class":1,"x-style":1,"x-tooltip":1,"x-tooltip-position":1};if(name.startsWith("@bind:")||name.startsWith("x-bind:")||name.startsWith(":")&&!name.startsWith("::")&&!DIRECTIVE_NAMES[name.slice(1).split(".")[0]]&&!EVENT_RE.test(name.slice(1))||name.startsWith("x-")&&!X_HANDLED[name.split(".")[0]]&&!X_HANDLED[name]){const attrName=name.startsWith("@bind:")?name.slice(6):name.startsWith("x-bind:")?name.slice(7):name.startsWith("x-")?name.slice(2):name.slice(1);effect(()=>{const v=evalAttrExpr(value);if(v===false||v===null||v===undefined){el.removeAttribute(attrName)}else if(v===true){el.setAttribute(attrName,"")}else{el.setAttribute(attrName,v)}});el.removeAttribute(name)}else if(name==="@class"||name===":class"||name==="x-class"){bindClass(el,value,scope);el.removeAttribute(name)}else if(name==="@style"||name===":style"||name==="x-style"){bindStyle(el,value,scope);el.removeAttribute(name)}else if(name==="@text"||name===":text"||name==="x-text"){effect(()=>{el.textContent=evalAttrExpr(value)});el.removeAttribute(name)}else if(name==="@html"||name===":html"||name==="x-html"){effect(()=>{el.innerHTML=evalAttrExpr(value)??""});el.removeAttribute(name)}else if(name==="ref"||name===":ref"||name==="x-ref"||name==="data-stx-ref"){if(scope.$refs)scope.$refs[value]=el;if(componentScope.$refs)componentScope.$refs[value]=el}else if(name.startsWith("@")||name.startsWith(":")){const parts=name.slice(1).split(".");const eventName=parts[0];const modifiers=parts.slice(1);if(["if","for","show","model","class","style","text","html","ref"].includes(eventName)){return};var eventKey="__stx_evt_"+eventName+"_"+value.substring(0,20);if(el[eventKey]){el.removeAttribute(name);return}el[eventKey]=true;const eventCapturedScope={...scope,...findElementScope(el)||{},...globalHelpers};el.addEventListener(eventName,(event)=>{if(eventName==="click"){var ancestor=el;while(ancestor){if(ancestor.__stx_shown_at&&performance.now()-ancestor.__stx_shown_at<50)return;ancestor=ancestor.parentElement}}if(modifiers.includes("self")&&event.target!==el)return;if(modifiers.includes("ctrl")&&!event.ctrlKey)return;if(modifiers.includes("alt")&&!event.altKey)return;if(modifiers.includes("shift")&&!event.shiftKey)return;if(modifiers.includes("meta")&&!event.metaKey)return;for(var mi=0;mi<modifiers.length;mi++){if(KEY_MAP[modifiers[mi]]&&event.key!==KEY_MAP[modifiers[mi]])return}if(modifiers.includes("prevent"))event.preventDefault();if(modifiers.includes("stop"))event.stopPropagation();try{if(!value||/^__[A-Z_]+__$/.test(value.trim()))return;var shorthandFn=parseEventShorthand(value,eventCapturedScope);if(shorthandFn){shorthandFn(event);return};var hasSignals=Object.values(eventCapturedScope).some(function(v){return v&&typeof v==="function"&&v._isSignal});var isDirectAssignment=hasSignals&&/^[a-zA-Z_$]\w*\s*=/.test(value.trim())&&!value.trim().startsWith("==");if(isDirectAssignment){var getVars=Object.keys(eventCapturedScope).map(function(k){return"var "+k+' = __s["'+k+'"] && typeof __s["'+k+'"] === "function" && __s["'+k+'"]._isSignal ? __s["'+k+'"]() : __s["'+k+'"]'}).join(";");var setVars=Object.keys(eventCapturedScope).filter(function(k){var v=eventCapturedScope[k];return v&&typeof v==="function"&&v._isSignal}).map(function(k){return"if("+k+' !== __s["'+k+'"]()) __s["'+k+'"].set('+k+")"}).join(";");var body=getVars+";"+value+";"+setVars;var fn2=new Function("__s","$event",body);fn2(eventCapturedScope,event)}else if(hasSignals){var unwrapVars=Object.keys(eventCapturedScope).map(function(k){var v=eventCapturedScope[k];if(v&&typeof v==="function"&&v._isSignal&&value.includes(k+".set(")){return"var "+k+' = __s["'+k+'"]'}return"var "+k+' = __s["'+k+'"] && typeof __s["'+k+'"] === "function" && __s["'+k+'"]._isSignal ? __s["'+k+'"]() : __s["'+k+'"]'}).join(";");var fn3=new Function("__s","$event",unwrapVars+";"+value);fn3(eventCapturedScope,event)}else{var fn=new Function(...Object.keys(eventCapturedScope),"$event",value);fn(...Object.values(eventCapturedScope),event)}}catch(e){console.warn("[STX] Handler error:",value,e)}},{capture:modifiers.includes("capture"),passive:modifiers.includes("passive"),once:modifiers.includes("once")});el.removeAttribute(name)}});if(el.tagName!=="SCRIPT"&&el.tagName!=="STYLE"){var children=Array.from(el.childNodes);children.forEach(function(child){if(child.nodeType!==Node.ELEMENT_NODE){processElement(child,scope);return}if(child.tagName==="SCRIPT")return;if(child.__stx_scope){return}if(child.hasAttribute&&child.hasAttribute("data-stx-scope"))return;processElement(child,scope)})}};function bindSuspense(el,scope){if(el.__stx_suspense_bound)return;el.__stx_suspense_bound=true;var fallbackEl=el.querySelector("[data-stx-suspense-fallback]");var errorEl=el.querySelector("[data-stx-suspense-error]");var contentEl=el.querySelector("[data-stx-suspense-content]")||el;var claimed=suspenseRegistry().filter(function(entry){return entry.el&&el.contains(entry.el)&&entry.el.closest("[data-stx-suspense]")===el});var anyLoading=derived(function(){for(var i=0;i<claimed.length;i++){if(claimed[i].loading&&claimed[i].loading())return true}return false});var firstError=derived(function(){for(var i=0;i<claimed.length;i++){var err=claimed[i].error?claimed[i].error():null;if(err)return err}return null});function setHidden(node,hidden){if(!node||node===el)return;if(hidden)node.setAttribute("hidden","");else node.removeAttribute("hidden")}effect(function(){var err=firstError();var loading=anyLoading();if(err&&errorEl){setHidden(errorEl,false);setHidden(fallbackEl,true);setHidden(contentEl,true)}else if(loading){setHidden(fallbackEl,false);setHidden(contentEl,true);setHidden(errorEl,true)}else{setHidden(contentEl,false);setHidden(fallbackEl,true);setHidden(errorEl,true)}});var contentRoot=contentEl===el?el:contentEl;Array.from(contentRoot.childNodes).forEach(function(child){processElement(child,scope)})};function bindShow(el,expr,passedScope=componentScope,attrName="@show"){if(el.__stx_show_bound)return;el.__stx_show_bound=true;const currentDisplay=el.style.display;const originalDisplay=currentDisplay&&currentDisplay!=="none"?currentDisplay:"";const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const directSignal=capturedScope[expr];if(directSignal&&directSignal._isSignal){effect(()=>{const value=directSignal();el.style.display=value?originalDisplay:"none"})}else{effect(()=>{var value;try{var unwrapScope=createAutoUnwrapProxy(capturedScope);var fn=new Function(...Object.keys(capturedScope),"return "+expr);value=fn(...Object.values(unwrapScope))}catch(e1){try{var fn2=new Function(...Object.keys(capturedScope),"return "+expr);value=fn2(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Show expression error:",expr,e2);el.style.display="none";return}};var wasHidden=el.style.display==="none";el.style.display=value?originalDisplay:"none";if(value&&wasHidden){el.__stx_shown_at=performance.now()}})}el.removeAttribute(attrName)};function bindModel(el,expr,passedScope=componentScope,attrName="@model"){if(el.__stx_model_bound)return;el.__stx_model_bound=true;const tag=el.tagName.toLowerCase();const type=el.type;const getValue=()=>toValue(expr,el);const setValue=(val)=>{try{const elementScope=findElementScope(el);const scope={...passedScope,...elementScope||{}};if(scope[expr]&&scope[expr]._isSignal){scope[expr].set(val)}else{const fn=new Function(...Object.keys(scope),"v",expr+" = v");fn(...Object.values(scope),val)}}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] "+attrName+" set error:",expr,e)}};if(tag==="input"&&(type==="checkbox"||type==="radio")){effect(()=>{el.checked=getValue()});el.addEventListener("change",()=>setValue(el.checked))}else if(tag==="select"){effect(()=>{el.value=getValue()});el.addEventListener("change",()=>setValue(el.value))}else{effect(()=>{el.value=getValue()??""});el.addEventListener("input",()=>setValue(el.value))}el.removeAttribute(attrName)};function bindClass(el,expr,passedScope=componentScope){const originalClasses=el.className;const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const keys=Object.keys(capturedScope);const safeKeys=keys.filter((k)=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k));let fn;try{fn=new Function(...safeKeys,"return "+expr)}catch(e){console.warn("[STX] bindClass compile error:",expr,e);return}effect(()=>{for(let i=0;i<safeKeys.length;i++){const v=capturedScope[safeKeys[i]];if(v&&typeof v==="function"&&(v._isSignal||v._isDerived)){v()}};let value;try{const unwrapScope=createAutoUnwrapProxy(capturedScope);value=fn.apply(null,safeKeys.map((k)=>unwrapScope[k]))}catch(e1){try{value=fn.apply(null,safeKeys.map((k)=>capturedScope[k]))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Class expression error:",expr,e2);value=""}}if(typeof value==="object"&&value!==null&&!Array.isArray(value)){Object.keys(value).forEach((cls)=>{const tokens=cls.split(/\s+/).filter(Boolean);if(value[cls])tokens.forEach((t)=>el.classList.add(t));else tokens.forEach((t)=>el.classList.remove(t))})}else if(Array.isArray(value)){el.className=originalClasses+" "+value.filter(Boolean).join(" ")}else{el.className=originalClasses+(value?" "+value:"")}})};function bindStyle(el,expr,passedScope=componentScope){const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const evalExpr=()=>{try{const unwrapScope=createAutoUnwrapProxy(capturedScope);const fn=new Function(...Object.keys(capturedScope),"return "+expr);return fn(...Object.values(unwrapScope))}catch(e1){try{const fn2=new Function(...Object.keys(capturedScope),"return "+expr);return fn2(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Style expression error:",expr,e2);return{}}}};effect(()=>{const value=evalExpr();if(typeof value==="object"&&value!==null){Object.assign(el.style,value)}else if(typeof value==="string"){el.style.cssText=value}})};function tgDurationMs(el){try{var cs=typeof getComputedStyle==="function"?getComputedStyle(el):null;if(cs){var raw=(cs.transitionDuration||"").split(",")[0].trim();var ms=raw.indexOf("ms")>=0?parseFloat(raw):parseFloat(raw)*1000;if(ms>0)return ms}}catch(e){}return 300};function tgOnEnd(el,cb){var done=false;function finish(){if(done)return;done=true;try{el.removeEventListener("transitionend",finish)}catch(e){}cb()}try{el.addEventListener("transitionend",finish)}catch(e){}setTimeout(finish,tgDurationMs(el)+60)};function tgRaf2(fn){var raf=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(f){return setTimeout(f,16)};raf(function(){raf(fn)})};function tgEnter(el,name){if(!el||el.nodeType!==1||!el.classList)return;el.classList.add(name+"-enter-from",name+"-enter-active");tgRaf2(function(){el.classList.remove(name+"-enter-from");el.classList.add(name+"-enter-to");tgOnEnd(el,function(){el.classList.remove(name+"-enter-active",name+"-enter-to")})})};function tgLeave(el,name){if(!el||el.nodeType!==1||!el.classList)return false;el.classList.add(name+"-leave-from",name+"-leave-active");tgRaf2(function(){el.classList.remove(name+"-leave-from");el.classList.add(name+"-leave-to");tgOnEnd(el,function(){if(el.parentNode)el.parentNode.removeChild(el)})});return true};function tgSnapshot(els){var m=new Map;for(var i=0;i<els.length;i++){var el=els[i];if(el&&el.nodeType===1&&el.getBoundingClientRect){try{m.set(el,el.getBoundingClientRect())}catch(e){}}}return m};function tgFlip(els,first,name){var moved=[];for(var i=0;i<els.length;i++){var el=els[i];if(!el||el.nodeType!==1||!first.has(el)||!el.getBoundingClientRect)continue;var last,f=first.get(el);try{last=el.getBoundingClientRect()}catch(e){continue};var dx=f.left-last.left,dy=f.top-last.top;if(dx||dy){el.style.transform="translate("+dx+"px,"+dy+"px)";el.style.transitionDuration="0s";moved.push(el)}}if(!moved.length)return;if(els[0]&&typeof els[0].offsetHeight==="number")els[0].offsetHeight;var raf=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(f){return setTimeout(f,16)};raf(function(){moved.forEach(function(el){el.classList.add(name+"-move");el.style.transform="";el.style.transitionDuration="";tgOnEnd(el,function(){el.classList.remove(name+"-move");el.style.transform="";el.style.transitionDuration=""})})})};function bindFor(el,passedScope=componentScope,attrName="@for"){if(el.__stx_for_bound)return;el.__stx_for_bound=true;const expr=el.getAttribute(attrName);const match=expr.match(/^\s*\(?\s*(\w+)(?:\s*,\s*(\w+))?\s*\)?\s+(?:in|of)\s+(.+)\s*$/);if(!match){console.warn("[STX] Invalid "+attrName+":",expr);return}const[,itemName,indexName,listExpr]=match;const parent=el.parentNode;if(!parent){console.warn("[STX] bindFor: element has no parent, skipping");return};const placeholder=document.createComment("stx-for");const isTemplate=el.tagName==="TEMPLATE";const ifExpr=el.getAttribute("@if")||el.getAttribute(":if");const loadingExpr=el.getAttribute("@loading");const emptyExpr=el.getAttribute("@empty");let loadingTemplate=null;let emptyTemplate=null;let sibling=el.nextElementSibling;while(sibling){if(sibling.hasAttribute("@for-loading")){loadingTemplate=sibling.cloneNode(true);loadingTemplate.removeAttribute("@for-loading");sibling.remove();sibling=el.nextElementSibling;continue}if(sibling.hasAttribute("@for-empty")){emptyTemplate=sibling.cloneNode(true);emptyTemplate.removeAttribute("@for-empty");sibling.remove();sibling=el.nextElementSibling;continue}break};const capturedScope=findElementScope(el)||findElementScope(parent);parent.insertBefore(placeholder,el);parent.removeChild(el);const keyExpr=el.getAttribute(":key")||el.getAttribute("x-bind:key");let templateContent;if(isTemplate){templateContent=el.content}else{const wrapper=el.cloneNode(true);wrapper.removeAttribute("@for");wrapper.removeAttribute(":for");wrapper.removeAttribute("x-for");wrapper.removeAttribute("@loading");wrapper.removeAttribute("@empty");wrapper.removeAttribute(":key");wrapper.removeAttribute("x-bind:key");if(ifExpr){wrapper.removeAttribute("@if");wrapper.removeAttribute(":if");wrapper.removeAttribute("x-if")}templateContent=wrapper};let currentElements=[];let currentKeys=[];let loadingElement=null;let emptyElement=null;const evalExpr=(expression,extraScope={})=>{try{if(/^__[A-Z_]+__$/.test(expression.trim())){return expression};const scope={...passedScope,...capturedScope||{},...globalHelpers,...extraScope};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function(...Object.keys(scope),"return "+expression);return fn(...Object.values(unwrapScope))}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expression,e);return""}};const evalLazy=(expression,extraScope={})=>{try{if(/^__[A-Z_]+__$/.test(expression.trim()))return expression;const scope={...passedScope,...capturedScope||{},...globalHelpers,...extraScope};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn(unwrapScope)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expression,e);return""}};const showLoading=()=>{hideLoading();hideEmpty();if(loadingTemplate){loadingElement=loadingTemplate.cloneNode(true);parent.insertBefore(loadingElement,placeholder)}};const hideLoading=()=>{if(loadingElement){loadingElement.remove();loadingElement=null}};const showEmpty=()=>{hideLoading();hideEmpty();if(emptyTemplate){emptyElement=emptyTemplate.cloneNode(true);parent.insertBefore(emptyElement,placeholder);processElement(emptyElement)}};const hideEmpty=()=>{if(emptyElement){emptyElement.remove();emptyElement=null}};const itemSignalMap=new Map;const createItemElements=(item,index,key)=>{const itemSignal=state(item);const indexSignal=state(index);if(key)itemSignalMap.set(key,{item:itemSignal,index:indexSignal});const itemScope={...passedScope,...capturedScope||{},...globalHelpers};itemScope[itemName]=itemSignal;if(indexName)itemScope[indexName]=indexSignal;const elements=[];if(isTemplate){Array.from(templateContent.childNodes).forEach((node)=>{const clone=node.cloneNode(true);if(clone.nodeType===1){processElement(clone,itemScope);clone.removeAttribute("x-cloak");clone.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"))}elements.push(clone)})}else{const clone=templateContent.cloneNode(true);processElement(clone,itemScope);clone.removeAttribute("x-cloak");clone.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"));elements.push(clone)}return elements};const getItemKey=(item,index)=>{if(!keyExpr)return String(index);try{const scope={[itemName]:item};if(indexName)scope[indexName]=index;const fn=new Function(itemName,indexName||"_idx","return "+keyExpr);return String(fn(item,index))}catch(e){return String(index)}};effect(()=>{if(loadingExpr){const isLoading=evalLazy(loadingExpr);if(isLoading){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];showLoading();return}}hideLoading();let list=evalLazy(listExpr);var trailingParens=/\(\s*\)\s*$/;if(!Array.isArray(list)&&trailingParens.test(listExpr)){list=evalLazy(listExpr.replace(trailingParens,""))}if(!Array.isArray(list)&&typeof list==="function"&&(list._isSignal||list._isDerived)){try{list=list()}catch{}}if(ifExpr){const ifValue=evalLazy(ifExpr);if(!ifValue){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];hideEmpty();return}}if(!Array.isArray(list)){var diagScope;try{var diagMerged={...passedScope,...capturedScope||{},...globalHelpers};var firstIdent=listExpr.match(/^[A-Za-z_$][\w$]*/);var rootName=firstIdent?firstIdent[0]:"?";var rootInScope=Object.prototype.hasOwnProperty.call(diagMerged,rootName);var rootVal=rootInScope?diagMerged[rootName]:"<NOT-IN-SCOPE>";var rootKeys=rootVal&&typeof rootVal==="object"?Object.keys(rootVal).slice(0,8).join(","):"-";diagScope="[root="+rootName+" inScope="+rootInScope+" type="+typeof rootVal+" isStxStore="+!!(rootVal&&rootVal._isStxStore)+" keys="+rootKeys+"]"}catch(_e){diagScope="[diag-error]"}console.warn("[STX] :for expected an array; got "+(list===""?"empty/error":typeof list)+' for expression "'+listExpr+'". '+diagScope+" If this is a signal call, try the bare reference (signal instead of signal()).");return}if(list.length===0){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];if(emptyExpr){const emptyContent=evalLazy(emptyExpr);if(emptyContent&&typeof emptyContent==="string"){const textNode=document.createTextNode(emptyContent);parent.insertBefore(textNode,placeholder);currentElements.push(textNode)}}else if(emptyTemplate){showEmpty()}return}hideEmpty();var tgIsGroup=!!(parent&&parent.hasAttribute&&parent.hasAttribute("data-stx-transition-group"));var tgName=tgIsGroup?parent.getAttribute("data-stx-transition-group")||"v":null;var tgReady=tgIsGroup&&!!parent.__stx_tg_init;var tgFirst=tgReady?tgSnapshot(currentElements):null;const newKeys=list.map((item,i)=>getItemKey(item,i));const oldKeyMap=new Map;for(let i=0;i<currentKeys.length;i++){const k=currentKeys[i];if(!oldKeyMap.has(k))oldKeyMap.set(k,[]);oldKeyMap.get(k).push(currentElements[i])};const newElements=[];const usedKeys=new Set;for(let i=0;i<list.length;i++){const key=newKeys[i];const existing=oldKeyMap.get(key);if(existing&&existing.length>0&&!usedKeys.has(key)){const el=existing.shift();parent.insertBefore(el,placeholder);newElements.push(el);usedKeys.add(key);const signals=itemSignalMap.get(key);if(signals){signals.item.set(list[i]);signals.index.set(i)}}else{const elements=createItemElements(list[i],i,key);elements.forEach((el)=>{parent.insertBefore(el,placeholder);if(tgReady)tgEnter(el,tgName)});newElements.push(...elements)}}for(const[key,elements]of oldKeyMap){if(!usedKeys.has(key)){elements.forEach((el)=>{disposeSubtreeScopes(el);if(!(tgReady&&tgLeave(el,tgName)))el.remove()});itemSignalMap.delete(key)}}currentElements=newElements;currentKeys=newKeys;if(tgReady&&tgFirst)tgFlip(newElements,tgFirst,tgName);if(tgIsGroup)parent.__stx_tg_init=true})};var __bindIfCounter=0;function getElseAttrInfo(el){if(!el||!el.hasAttribute)return null;if(el.hasAttribute(":else-if"))return{name:":else-if",terminal:false};if(el.hasAttribute("x-else-if"))return{name:"x-else-if",terminal:false};if(el.hasAttribute("@else-if"))return{name:"@else-if",terminal:false};if(el.hasAttribute(":else"))return{name:":else",terminal:true};if(el.hasAttribute("x-else"))return{name:"x-else",terminal:true};if(el.hasAttribute("@else"))return{name:"@else",terminal:true};return null};function findIfChain(el,ifAttr){var chain=[{el,attr:ifAttr,expr:el.getAttribute(ifAttr),terminal:false}];var sib=el.nextElementSibling;while(sib){var info=getElseAttrInfo(sib);if(!info)break;chain.push({el:sib,attr:info.name,expr:info.terminal?null:sib.getAttribute(info.name),terminal:info.terminal});if(info.terminal)break;sib=sib.nextElementSibling}return chain};function bindIfChain(chain,passedScope=componentScope){var head=chain[0].el;if(head.__stx_if_bound){return};var parent=head.parentNode;if(!parent){console.warn("[STX] bindIfChain: head element has no parent, skipping");return};var capturedComponentScope={...passedScope};chain.forEach(function(b){b.el.__stx_if_bound=true;b.el.__stx_chain_member=true;b.capturedElementScope=findElementScope(b.el);b.placeholder=document.createComment("stx-if-chain");parent.insertBefore(b.placeholder,b.el);b.el.removeAttribute(b.attr);b.el.remove();b.childrenProcessed=false});function evalBranch(b){var expression=b.expr;if(/^__[A-Z_]+__$/.test(expression.trim()))return expression;var scope={...capturedComponentScope,...b.capturedElementScope||{},...globalHelpers};try{var unwrapScope=createAutoUnwrapProxy(scope);var fn=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn(unwrapScope)}catch(e1){try{var fn2=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn2(scope)}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expression,e2);return""}}};var currentIdx=-1;effect(function(){var pickedIdx=-1;for(var i=0;i<chain.length;i++){var b=chain[i];var matched=b.terminal?true:!!evalBranch(b);if(matched&&pickedIdx===-1)pickedIdx=i}if(__stxDevtoolsTracking){var __ifScope=null;try{__ifScope=head&&head.closest?head.closest("[data-stx-scope]"):null}catch(e){__ifScope=null}__stxDevtoolsRecordIf({scopeId:__ifScope?__ifScope.getAttribute("data-stx-scope"):null,branches:chain.map(function(c){return c.attr}),picked:pickedIdx,pickedAttr:pickedIdx>=0?chain[pickedIdx].attr:null,prev:currentIdx})}if(pickedIdx===currentIdx)return;if(currentIdx!==-1){chain[currentIdx].el.remove()}if(pickedIdx!==-1){var pick=chain[pickedIdx];pick.placeholder.parentNode.insertBefore(pick.el,pick.placeholder.nextSibling);pick.el.__stx_shown_at=performance.now();if(!pick.childrenProcessed){pick.childrenProcessed=true;(function(branch){setTimeout(function(){var childScope={...capturedComponentScope,...branch.capturedElementScope||{},...globalHelpers};processElement(branch.el,childScope);branch.el.removeAttribute("x-cloak");branch.el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})},0)})(pick)}}currentIdx=pickedIdx})};function bindIf(el,passedScope=componentScope,attrName="@if"){if(el.__stx_if_bound){return}el.__stx_if_bound=true;const expr=el.getAttribute(attrName);const parent=el.parentNode;if(!parent){console.warn("[STX] bindIf: element has no parent, skipping");return};const placeholder=document.createComment("stx-if");let isInserted=true;let currentNodes=[];const isTemplate=el.tagName==="TEMPLATE";const capturedElementScope=findElementScope(el);const capturedComponentScope={...passedScope};parent.insertBefore(placeholder,el);el.removeAttribute(attrName);if(isTemplate){const content=el.content;currentNodes=Array.from(content.childNodes).map((n)=>n.cloneNode(true));currentNodes.forEach((node)=>parent.insertBefore(node,placeholder.nextSibling));el.remove()};const evalExpr=(expression)=>{if(/^__[A-Z_]+__$/.test(expression.trim())){return expression}try{const scope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function(...Object.keys(scope),"return "+expression);return fn(...Object.values(unwrapScope))}catch(e1){try{const scope2={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const fn2=new Function(...Object.keys(scope2),"return "+expression);return fn2(...Object.values(scope2))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expression,e2);return""}}};let childrenProcessed=false;const processChildrenWithScope=()=>{const childScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};Array.from(el.childNodes).forEach((child)=>processElement(child,childScope));childrenProcessed=true};const fullScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const directSignal=fullScope[expr];if(directSignal){}effect(()=>{var value;if(directSignal&&(directSignal._isSignal||directSignal._isDerived)){value=directSignal()}else{for(var sk in fullScope){var sv=fullScope[sk];if(sv&&typeof sv==="function"&&(sv._isSignal||sv._isDerived))sv()}value=evalExpr(expr)}if(isTemplate){if(value&&!isInserted){currentNodes=Array.from(el.content.childNodes).map((n)=>n.cloneNode(true));currentNodes.forEach((node)=>parent.insertBefore(node,placeholder.nextSibling));const childScope={...componentScope,...capturedElementScope||{}};currentNodes.forEach((node)=>{if(node.nodeType===1){processElement(node,childScope);node.removeAttribute("x-cloak");node.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"))}});currentNodes.forEach(function(n){if(n.nodeType===1)n.__stx_shown_at=performance.now()});isInserted=true}else if(!value&&isInserted){currentNodes.forEach((node)=>node.remove());currentNodes=[];isInserted=false}}else{if(value&&!isInserted){parent.insertBefore(el,placeholder.nextSibling);el.__stx_shown_at=performance.now();isInserted=true}else if(!value&&isInserted){el.remove();isInserted=false}if(value&&isInserted&&!childrenProcessed){childrenProcessed=true;setTimeout(function(){var childScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};processElement(el,childScope);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})},0)}}})};function $computed(fn){return derived(fn)};function $watch(deps,fn){effect(()=>{const values=Array.isArray(deps)?deps.map((d)=>{if(typeof d==="function"&&(d._isSignal||d._isDerived))return d();return d}):typeof deps==="function"&&(deps._isSignal||deps._isDerived)?[deps()]:[deps];fn(...values)})};function provide(name,value){window[name]=value};function useDebounce(fn,delay){delay=delay||250;var timer=null;var lastArgs=null;var debounced=function(){lastArgs=Array.prototype.slice.call(arguments);if(timer!==null)clearTimeout(timer);var args=lastArgs;timer=setTimeout(function(){timer=null;lastArgs=null;fn.apply(null,args)},delay)};debounced.cancel=function(){if(timer!==null){clearTimeout(timer);timer=null;lastArgs=null}};debounced.flush=function(){if(timer!==null&&lastArgs!==null){clearTimeout(timer);timer=null;var args=lastArgs;lastArgs=null;fn.apply(null,args)}};debounced.pending=function(){return timer!==null};onDestroy(debounced.cancel);return debounced};function useDebouncedValue(getter,delay){delay=delay||250;var current=getter();var listeners=[];var timer=null;function schedule(){if(timer!==null)clearTimeout(timer);timer=setTimeout(function(){timer=null;var next=getter();if(next!==current){current=next;listeners.forEach(function(fn){fn(current)})}},delay)}schedule();onDestroy(function(){if(timer!==null)clearTimeout(timer);listeners=[]});return{get value(){return current},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useThrottle(fn,limit){limit=limit||250;var timer=null;var lastRan=0;var throttled=function(){var args=Array.prototype.slice.call(arguments);var now=Date.now();var remaining=limit-(now-lastRan);if(remaining<=0){if(timer!==null){clearTimeout(timer);timer=null}lastRan=now;fn.apply(null,args)}else if(timer===null){timer=setTimeout(function(){lastRan=Date.now();timer=null;fn.apply(null,args)},remaining)}};throttled.cancel=function(){if(timer!==null){clearTimeout(timer);timer=null}};onDestroy(throttled.cancel);return throttled};function useInterval(interval,options){interval=interval||1000;options=options||{};var count=0;var id=null;var running=false;var listeners=[];function tick(){count++;listeners.forEach(function(fn){fn(count)})};function resume(){if(running)return;running=true;id=setInterval(tick,interval);if(options.immediate)tick()};function pause(){if(!running)return;running=false;if(id!==null){clearInterval(id);id=null}};function reset(){pause();count=0;listeners.forEach(function(fn){fn(count)});resume()}resume();onDestroy(function(){pause();listeners=[]});return{get counter(){return count},pause,resume,reset,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useTimeout(callback,delay){delay=delay||1000;var timer=null;var pending=false;var listeners=[];function setPending(v){if(v!==pending){pending=v;listeners.forEach(function(fn){fn(pending)})}};function start(){stop();setPending(true);timer=setTimeout(function(){timer=null;setPending(false);callback()},delay)};function stop(){if(timer!==null){clearTimeout(timer);timer=null}setPending(false)}start();onDestroy(stop);return{get isPending(){return pending},start,stop,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useToggle(initial){var current=!!initial;var listeners=[];function notify(){listeners.forEach(function(fn){fn(current)})};function toggle(){current=!current;notify()};function set(v){v=!!v;if(v!==current){current=v;notify()}};var ref={get value(){return current},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}};return[ref,toggle,set]};function useCounter(initial,options){initial=initial||0;options=options||{};var min=options.min!=null?options.min:-1/0;var max=options.max!=null?options.max:1/0;function clamp(v){return Math.min(max,Math.max(min,v))};var current=clamp(initial);var listeners=[];function notify(){listeners.forEach(function(fn){fn(current)})}return{get count(){return current},inc:function(step){current=clamp(current+(step||1));notify()},dec:function(step){current=clamp(current-(step||1));notify()},set:function(v){current=clamp(v);notify()},reset:function(){current=clamp(initial);notify()},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useClickOutside(target,handler){function listener(event){var el=typeof target==="string"?document.querySelector(target):target;if(!el)return;if(el===event.target||el.contains(event.target))return;handler(event)}document.addEventListener("pointerdown",listener,true);function remove(){document.removeEventListener("pointerdown",listener,true)}onDestroy(remove);return{remove}};function useFocus(target){var focused=false;var listeners=[];function resolve(){return typeof target==="string"?document.querySelector(target):target};function setFocused(v){if(v!==focused){focused=v;listeners.forEach(function(fn){fn(focused)})}};var onFocusIn=function(){setFocused(true)};var onBlurOut=function(){setFocused(false)};var el=resolve();if(el){el.addEventListener("focus",onFocusIn);el.addEventListener("blur",onBlurOut);focused=document.activeElement===el}onDestroy(function(){var el=resolve();if(el){el.removeEventListener("focus",onFocusIn);el.removeEventListener("blur",onBlurOut)}listeners=[]});return{get isFocused(){return focused},focus:function(){var el=resolve();if(el&&el.focus)el.focus()},blur:function(){var el=resolve();if(el&&el.blur)el.blur()},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useAsync(fn,options){options=options||{};var asyncState="idle";var data=null;var error=null;var listeners=[];function notify(){var snap={state:asyncState,data,error};listeners.forEach(function(fn){fn(snap)})};function execute(){var args=Array.prototype.slice.call(arguments);asyncState="loading";error=null;notify();return fn.apply(null,args).then(function(result){data=result;asyncState="success";notify();return data}).catch(function(e){error=e instanceof Error?e:new Error(String(e));asyncState="error";notify();return null})}if(options.immediate)execute();return{get state(){return asyncState},get isLoading(){return asyncState==="loading"},get error(){return error},get data(){return data},execute,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useColorMode(options){options=options||{};var storageKey=options.storageKey||"stx-color-mode";var initialMode=options.initialMode||"auto";var darkClass=options.darkClass||"dark";var attribute=options.attribute||null;var disableTransitions=options.disableTransitions!==false;var preference=initialMode;var resolved="light";var listeners=[];var cleanups=[];function getSystem(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};function resolve(pref){return pref==="auto"?getSystem():pref};function applyDOM(mode){var el=document.documentElement;if(disableTransitions)el.style.setProperty("transition","none","important");if(attribute){el.setAttribute(attribute,mode)}else{if(mode==="dark")el.classList.add(darkClass);else el.classList.remove(darkClass)}if(disableTransitions){el.offsetHeight;el.style.removeProperty("transition")}};function persist(pref){try{localStorage.setItem(storageKey,pref)}catch(e){}};function readPersisted(){try{var v=localStorage.getItem(storageKey);if(v==="light"||v==="dark"||v==="auto")return v}catch(e){}return null};function update(pref){preference=pref;resolved=resolve(pref);applyDOM(resolved);persist(pref);listeners.forEach(function(fn){fn(resolved,preference)})};var persisted=readPersisted();update(persisted||initialMode);var mql=window.matchMedia("(prefers-color-scheme: dark)");var onSystemChange=function(){if(preference==="auto"){resolved=getSystem();applyDOM(resolved);listeners.forEach(function(fn){fn(resolved,preference)})}};mql.addEventListener("change",onSystemChange);cleanups.push(function(){mql.removeEventListener("change",onSystemChange)});var onStorage=function(e){if(e.key!==storageKey)return;var v=e.newValue;if(v==="light"||v==="dark"||v==="auto"){preference=v;resolved=resolve(v);applyDOM(resolved);listeners.forEach(function(fn){fn(resolved,preference)})}};window.addEventListener("storage",onStorage);cleanups.push(function(){window.removeEventListener("storage",onStorage)});onDestroy(function(){cleanups.forEach(function(fn){fn()});listeners=[]});return{get mode(){return resolved},get preference(){return preference},get isDark(){return resolved==="dark"},set:function(mode){update(mode)},toggle:function(){update(resolved==="dark"?"light":"dark")},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useDark(options){var cm=useColorMode(options);return{get isDark(){return cm.isDark},toggle:function(){cm.toggle()},set:function(dark){cm.set(dark?"dark":"light")},subscribe:function(fn){return cm.subscribe(function(mode){fn(mode==="dark")})}}};var ref=state;var reactive=state;var computed=derived;var watch=$watch;var watchEffect=function(fn){return effect(fn)};function useLocalStorage(key,defaultValue){var stored=localStorage.getItem(key);var initial=stored!==null?JSON.parse(stored):defaultValue;var s=state(initial);effect(function(){localStorage.setItem(key,JSON.stringify(s()))});var handler=function(e){if(e.key===key)s.set(e.newValue!==null?JSON.parse(e.newValue):defaultValue)};window.addEventListener("storage",handler);onDestroy(function(){window.removeEventListener("storage",handler)});return s};function useSessionStorage(key,defaultValue){var stored=sessionStorage.getItem(key);var initial=stored!==null?JSON.parse(stored):defaultValue;var s=state(initial);effect(function(){sessionStorage.setItem(key,JSON.stringify(s()))});var handler=function(e){if(e.key===key&&e.storageArea===sessionStorage)s.set(e.newValue!==null?JSON.parse(e.newValue):defaultValue)};window.addEventListener("storage",handler);onDestroy(function(){window.removeEventListener("storage",handler)});return s};function useCookie(name,opts){opts=opts||{};var encode=opts.encode||encodeURIComponent;var decode=opts.decode||decodeURIComponent;var escapedName=name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var nameRe=new RegExp("(?:^|; )"+escapedName+"=([^;]*)");function read(){if(typeof document==="undefined")return opts.defaultValue||"";var m=document.cookie.match(nameRe);return m?decode(m[1]):opts.defaultValue||""};var s=state(read());function serialise(value){var parts=[name+"="+(value?encode(value):"")];parts.push("path="+(opts.path||"/"));if(opts.domain)parts.push("domain="+opts.domain);if(value==="")parts.push("max-age=0");else if(typeof opts.maxAge==="number")parts.push("max-age="+opts.maxAge);else if(opts.expires)parts.push("expires="+opts.expires.toUTCString());parts.push("SameSite="+(opts.sameSite||"Lax"));var secure=opts.secure;if(secure===undefined)secure=typeof location!=="undefined"&&location.protocol==="https:";if(secure)parts.push("Secure");return parts.join("; ")}effect(function(){if(typeof document==="undefined")return;document.cookie=serialise(s())});return s};function useReactiveProp(name,defaultValue,opts){opts=opts||{};var parse=opts.parse||function(v){if(v===""||v==="true")return true;if(v==="false")return false;if(v!=null&&v!==""&&!isNaN(Number(v)))return Number(v);return v};var root=window.__STX_CURRENT_ELEMENT__;var initial;if(root&&root.hasAttribute&&root.hasAttribute(name)){initial=parse(root.getAttribute(name))}else{initial=defaultValue};var s=state(initial);if(!root)return s;var observer=new MutationObserver(function(){var hasAttr=root.hasAttribute(name);var next=hasAttr?parse(root.getAttribute(name)):defaultValue;if(next!==s())s.set(next)});observer.observe(root,{attributes:true,attributeFilter:[name]});onDestroy(function(){observer.disconnect()});return s};function useEventListener(event,handler,options){var target=options&&options.target||window;if(typeof target==="string")target=document.querySelector(target);if(!target)return;var opts={capture:options&&options.capture,passive:options&&options.passive,once:options&&options.once};target.addEventListener(event,handler,opts);onDestroy(function(){target.removeEventListener(event,handler,opts)})};function useHead(config){function apply(){if(config.title)document.title=config.title;var metas=config.meta||[];for(var i=0;i<metas.length;i++){var m=metas[i];if(!m.name&&!m.property)continue;var selector=m.name?'meta[name="'+m.name+'"]':'meta[property="'+m.property+'"]';var el=document.querySelector(selector);if(el){el.setAttribute("content",m.content||"")}else{el=document.createElement("meta");if(m.name)el.setAttribute("name",m.name);if(m.property)el.setAttribute("property",m.property);el.setAttribute("content",m.content||"");document.head.appendChild(el)}};var links=config.link||config.links||[];for(var j=0;j<links.length;j++){var l=links[j];if(!l.rel||!l.href)continue;var linkSel='link[rel="'+l.rel+'"][href="'+l.href+'"]';if(!document.querySelector(linkSel)){var le=document.createElement("link");for(var k in l){if(l.hasOwnProperty(k))le.setAttribute(k,l[k])}document.head.appendChild(le)}};var scripts=config.script||config.scripts||[];for(var si=0;si<scripts.length;si++){var s=scripts[si];var se=document.createElement("script");if(s.src)se.src=s.src;if(s.innerHTML)se.innerHTML=s.innerHTML;if(s.async)se.async=true;if(s.defer)se.defer=true;document.head.appendChild(se)}if(config.bodyAttrs&&config.bodyAttrs.class){config.bodyAttrs.class.split(" ").forEach(function(cls){if(cls)document.body.classList.add(cls)})}if(config.htmlAttrs&&config.htmlAttrs.lang){document.documentElement.setAttribute("lang",config.htmlAttrs.lang)}}if(document.readyState!=="loading"){apply()}else{onMount(apply)}};function useSeoMeta(config){var meta=[];if(config.title)meta.push({name:"title",content:config.title});if(config.description)meta.push({name:"description",content:config.description});if(config.ogTitle)meta.push({property:"og:title",content:config.ogTitle});if(config.ogDescription)meta.push({property:"og:description",content:config.ogDescription});if(config.ogImage)meta.push({property:"og:image",content:config.ogImage});if(config.ogType)meta.push({property:"og:type",content:config.ogType});if(config.ogUrl)meta.push({property:"og:url",content:config.ogUrl});if(config.twitterCard)meta.push({name:"twitter:card",content:config.twitterCard});if(config.twitterTitle)meta.push({name:"twitter:title",content:config.twitterTitle});if(config.twitterDescription)meta.push({name:"twitter:description",content:config.twitterDescription});if(config.twitterImage)meta.push({name:"twitter:image",content:config.twitterImage});if(config.robots)meta.push({name:"robots",content:config.robots});if(config.canonical)meta.push({property:"og:url",content:config.canonical});useHead({title:config.title||config.ogTitle,meta})};var _toastId=0;var _toastIcons={success:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#16a34a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9 12l2 2 4-4"/></svg>',error:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#dc2626" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',info:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#2563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',warning:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#d97706" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>'};var _toastColors={success:"#16a34a",error:"#dc2626",info:"#2563eb",warning:"#d97706"};function _getToastContainer(){return document.getElementById("stx-toast-container")};function _getToastAnimClass(container){if(!container)return{inAnim:"stx-toast-in",outAnim:"stx-toast-out"};var pos=container.getAttribute("data-stx-toast-position")||"top-right";if(pos.indexOf("left")!==-1)return{inAnim:"stx-toast-in-left",outAnim:"stx-toast-out-left"};if(pos.indexOf("center")!==-1)return{inAnim:"stx-toast-in-center",outAnim:"stx-toast-out-center"};return{inAnim:"stx-toast-in",outAnim:"stx-toast-out"}};function removeToast(id){var el=document.getElementById("stx-toast-"+id);if(!el)return;var container=_getToastContainer();var anims=_getToastAnimClass(container);el.style.animation=anims.outAnim+" 0.3s ease forwards";setTimeout(function(){if(el.parentNode)el.parentNode.removeChild(el)},300)};function addToast(type,message,options){var container=_getToastContainer();if(!container){console.warn("[stx:toast] No <StxToast /> container found. Add <StxToast /> to your layout.");return-1};var opts=options||{};var duration=opts.duration!==undefined?opts.duration:3000;var id=++_toastId;var maxToasts=parseInt(container.getAttribute("data-stx-toast-max")||"5",10);var existing=container.querySelectorAll("[data-stx-toast]");while(existing.length>=maxToasts&&existing.length>0){var oldId=existing[0].getAttribute("data-stx-toast");removeToast(oldId);existing=container.querySelectorAll("[data-stx-toast]")};var anims=_getToastAnimClass(container);var borderColor=_toastColors[type]||_toastColors.info;var icon=_toastIcons[type]||_toastIcons.info;var isDark=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;var bg=isDark?"#1f2937":"#ffffff";var textColor=isDark?"#f3f4f6":"#1f2937";var shadow=isDark?"0 4px 12px rgba(0,0,0,0.4)":"0 4px 12px rgba(0,0,0,0.15)";var el=document.createElement("div");el.id="stx-toast-"+id;el.setAttribute("data-stx-toast",String(id));el.setAttribute("role","alert");el.setAttribute("aria-live","assertive");el.style.cssText="pointer-events:auto;display:flex;align-items:flex-start;gap:0.75rem;padding:0.875rem 1rem;border-radius:0.5rem;border-left:4px solid "+borderColor+";background:"+bg+";color:"+textColor+";box-shadow:"+shadow+";animation:"+anims.inAnim+" 0.3s ease;font-family:system-ui,-apple-system,sans-serif;font-size:0.875rem;line-height:1.4;max-width:100%";var iconSpan=document.createElement("span");iconSpan.style.cssText="flex-shrink:0;display:flex;align-items:center;margin-top:1px";iconSpan.innerHTML=icon;var msgSpan=document.createElement("span");msgSpan.style.cssText="flex:1;word-wrap:break-word";msgSpan.textContent=message;var closeBtn=document.createElement("button");closeBtn.type="button";closeBtn.setAttribute("aria-label","Dismiss notification");closeBtn.style.cssText="flex-shrink:0;background:none;border:none;cursor:pointer;padding:0;color:"+(isDark?"#9ca3af":"#6b7280")+";font-size:1.125rem;line-height:1;display:flex;align-items:center";closeBtn.innerHTML='<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M4.646 4.646a.5.5 0 01.708 0L8 7.293l2.646-2.647a.5.5 0 01.708.708L8.707 8l2.647 2.646a.5.5 0 01-.708.708L8 8.707l-2.646 2.647a.5.5 0 01-.708-.708L7.293 8 4.646 5.354a.5.5 0 010-.708z"/></svg>';closeBtn.onclick=function(){removeToast(id)};el.appendChild(iconSpan);el.appendChild(msgSpan);el.appendChild(closeBtn);container.appendChild(el);if(duration>0){setTimeout(function(){removeToast(id)},duration)}return id};var toast={success:function(message,options){return addToast("success",message,options)},error:function(message,options){return addToast("error",message,options)},info:function(message,options){return addToast("info",message,options)},warning:function(message,options){return addToast("warning",message,options)},dismiss:function(id){if(id!==undefined){removeToast(id);return};var container=_getToastContainer();if(!container)return;var all=container.querySelectorAll("[data-stx-toast]");for(var i=0;i<all.length;i++){var tid=all[i].getAttribute("data-stx-toast");removeToast(tid)}}};var modal={open:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(!el){console.warn('[stx:modal] Modal "'+id+'" not found');return}el.style.display="flex";el.offsetHeight;el.setAttribute("data-stx-modal-open","");document.body.style.overflow="hidden";if(el.getAttribute("data-close-escape")!=="false"){var escHandler=function(e){if(e.key==="Escape"){modal.close(id);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);el._stxEscHandler=escHandler}if(el.getAttribute("data-close-backdrop")!=="false"){el.onclick=function(e){if(e.target===el)modal.close(id)}}},close:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(!el)return;el.removeAttribute("data-stx-modal-open");if(el._stxEscHandler){document.removeEventListener("keydown",el._stxEscHandler);el._stxEscHandler=null}el.onclick=null;setTimeout(function(){el.style.display="none";if(!document.querySelector("[data-stx-modal-open]"))document.body.style.overflow=""},200)},toggle:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(el&&el.hasAttribute("data-stx-modal-open"))modal.close(id);else modal.open(id)}};var _dialogId=0;var _dialogIcons={info:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#2563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',warning:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#d97706" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',error:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#dc2626" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',success:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#16a34a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9 12l2 2 4-4"/></svg>',question:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#6366f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>'};function _createDialog(message,options,isConfirm){var opts=options||{};var type=opts.type||(isConfirm?"question":"info");var title=opts.title||"";var confirmText=opts.confirmText||"OK";var cancelText=opts.cancelText||"Cancel";var id="stx-dialog-"+ ++_dialogId;var isDark=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;var bg=isDark?"#1f2937":"#ffffff";var textColor=isDark?"#f3f4f6":"#1f2937";var subColor=isDark?"#9ca3af":"#6b7280";var icon=_dialogIcons[type]||_dialogIcons.info;return new Promise(function(resolve){var backdrop=document.createElement("div");backdrop.id=id;backdrop.style.cssText="position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease;font-family:system-ui,-apple-system,sans-serif";backdrop.setAttribute("role","alertdialog");backdrop.setAttribute("aria-modal","true");var panel=document.createElement("div");panel.style.cssText="max-width:24rem;width:calc(100% - 2rem);border-radius:0.75rem;padding:1.5rem;background:"+bg+";color:"+textColor+";box-shadow:0 20px 60px rgba(0,0,0,0.3);transform:scale(0.95);transition:transform 0.2s ease;text-align:center";var iconDiv=document.createElement("div");iconDiv.style.cssText="display:flex;justify-content:center;margin-bottom:1rem";iconDiv.innerHTML=icon;panel.appendChild(iconDiv);if(title){var titleEl=document.createElement("h3");titleEl.style.cssText="margin:0 0 0.5rem;font-size:1.125rem;font-weight:600";titleEl.textContent=title;panel.appendChild(titleEl)};var msgEl=document.createElement("p");msgEl.style.cssText="margin:0 0 1.25rem;font-size:0.875rem;line-height:1.5;color:"+subColor;msgEl.textContent=message;panel.appendChild(msgEl);var btnRow=document.createElement("div");btnRow.style.cssText="display:flex;gap:0.75rem;justify-content:center";function cleanup(result){backdrop.style.opacity="0";panel.style.transform="scale(0.95)";setTimeout(function(){backdrop.remove()},200);resolve(result)}if(isConfirm){var cancelBtn=document.createElement("button");cancelBtn.textContent=cancelText;cancelBtn.style.cssText="padding:0.5rem 1.25rem;border-radius:0.5rem;font-size:0.875rem;font-weight:500;cursor:pointer;border:1px solid "+(isDark?"#374151":"#d1d5db")+";background:transparent;color:"+textColor+";transition:background 0.15s";cancelBtn.onmouseover=function(){this.style.background=isDark?"#374151":"#f3f4f6"};cancelBtn.onmouseout=function(){this.style.background="transparent"};cancelBtn.onclick=function(){cleanup(false)};btnRow.appendChild(cancelBtn)};var okBtn=document.createElement("button");okBtn.textContent=confirmText;var btnColor=type==="error"?"#dc2626":type==="warning"?"#d97706":"#5672cd";okBtn.style.cssText="padding:0.5rem 1.25rem;border-radius:0.5rem;font-size:0.875rem;font-weight:500;cursor:pointer;border:none;background:"+btnColor+";color:#fff;transition:opacity 0.15s";okBtn.onmouseover=function(){this.style.opacity="0.9"};okBtn.onmouseout=function(){this.style.opacity="1"};okBtn.onclick=function(){cleanup(isConfirm?true:undefined)};btnRow.appendChild(okBtn);panel.appendChild(btnRow);backdrop.appendChild(panel);document.body.appendChild(backdrop);backdrop.offsetHeight;backdrop.style.opacity="1";panel.style.transform="scale(1)";var escHandler=function(e){if(e.key==="Escape"){cleanup(isConfirm?false:undefined);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);okBtn.focus()})};function stxAlert(message,options){return _createDialog(message,options,false)};function stxConfirm(message,options){return _createDialog(message,options,true)};var drawer={open:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(!el){console.warn('[stx:drawer] Drawer "'+id+'" not found');return}el.style.display="flex";el.offsetHeight;el.setAttribute("data-stx-drawer-open","");document.body.style.overflow="hidden";if(el.getAttribute("data-close-escape")!=="false"){var escHandler=function(e){if(e.key==="Escape"){drawer.close(id);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);el._stxEscHandler=escHandler}if(el.getAttribute("data-close-backdrop")!=="false"){el.onclick=function(e){if(e.target===el)drawer.close(id)}}},close:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(!el)return;el.removeAttribute("data-stx-drawer-open");if(el._stxEscHandler){document.removeEventListener("keydown",el._stxEscHandler);el._stxEscHandler=null}el.onclick=null;setTimeout(function(){el.style.display="none";if(!document.querySelector("[data-stx-drawer-open]")&&!document.querySelector("[data-stx-modal-open]"))document.body.style.overflow=""},300)},toggle:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(el&&el.hasAttribute("data-stx-drawer-open"))drawer.close(id);else drawer.open(id)}};(function(){var tip=null;function createTip(){tip=document.createElement("div");tip.id="stx-tooltip";tip.style.cssText="position:absolute;z-index:999999;pointer-events:none;background:#1f2937;color:#fff;font-size:12px;line-height:1.4;padding:6px 10px;border-radius:6px;max-width:250px;word-wrap:break-word;opacity:0;transition:opacity 0.15s ease;white-space:pre-wrap;box-shadow:0 2px 8px rgba(0,0,0,0.2)";document.body.appendChild(tip)};function show(el){if(!tip)createTip();var text=el.getAttribute("x-tooltip");if(!text)return;tip.textContent=text;tip.style.display="block";tip.style.opacity="0";var pos=el.getAttribute("x-tooltip-position")||"top";var rect=el.getBoundingClientRect();var tw=tip.offsetWidth;var th=tip.offsetHeight;var sx=window.scrollX;var sy=window.scrollY;var left,top;if(pos==="bottom"){left=rect.left+rect.width/2-tw/2;top=rect.bottom+8}else if(pos==="left"){left=rect.left-tw-8;top=rect.top+rect.height/2-th/2}else if(pos==="right"){left=rect.right+8;top=rect.top+rect.height/2-th/2}else{left=rect.left+rect.width/2-tw/2;top=rect.top-th-8;if(top<0){top=rect.bottom+8}}if(left<4)left=4;if(left+tw>window.innerWidth-4)left=window.innerWidth-tw-4;tip.style.left=left+sx+"px";tip.style.top=top+sy+"px";tip.style.opacity="1"};function hide(){if(tip){tip.style.opacity="0";setTimeout(function(){if(tip)tip.style.display="none"},150)}}document.addEventListener("mouseover",function(e){var el=e.target.closest("[x-tooltip]");if(el)show(el)});document.addEventListener("mouseout",function(e){var el=e.target.closest("[x-tooltip]");if(el)hide()});document.addEventListener("focusin",function(e){var el=e.target.closest("[x-tooltip]");if(el)show(el)});document.addEventListener("focusout",function(e){var el=e.target.closest("[x-tooltip]");if(el)hide()})})();function hydrateSubtree(container){if(!container||!container.querySelectorAll)return;var scoped=container.querySelectorAll("script[data-stx-scoped]");for(var i=0;i<scoped.length;i++){var old=scoped[i];if(old.__stx_ran)continue;var fresh=document.createElement("script");for(var a=0;a<old.attributes.length;a++)fresh.setAttribute(old.attributes[a].name,old.attributes[a].value);fresh.textContent=old.textContent;fresh.__stx_ran=true;if(old.parentNode)old.parentNode.replaceChild(fresh,old)};var scopeEls=[];if(container.matches&&container.matches("[data-stx-scope]"))scopeEls.push(container);container.querySelectorAll("[data-stx-scope]").forEach(function(el){scopeEls.push(el)});scopeEls.forEach(function(el){if(el.__stx_disposers)return;var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(!scopeVars)return;Object.assign(componentScope,scopeVars);el.__stx_disposers=trackEffects(function(){processElement(el,componentScope)});if(scopeVars.__mountCallbacks&&!scopeVars.__mounted){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}})}});processElement(container);if(container.removeAttribute)container.removeAttribute("x-cloak");container.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});if(mountCallbacks.length){var cbs=mountCallbacks.slice();mountCallbacks.length=0;cbs.forEach(function(fn){try{fn()}catch(e){console.error("[stx] mount error:",e)}})}window.dispatchEvent(new CustomEvent("stx:hydrated",{detail:{el:container,trigger:"stream"}}))};var mountQueue=[];window.stx={hydrate:hydrateSubtree,state,derived,effect,batch,isSignal,untrack,peek,onMount,onDestroy,useFetch,useRef,navigate,goBack,goForward,useRoute,setRouteParams,useSearchParams,useQuery,useMutation,useOptimistic,provide,$computed,$watch,ref,reactive,computed,watch,watchEffect,useDebounce,useDebouncedValue,useThrottle,useInterval,useTimeout,useToggle,useCounter,useClickOutside,useFocus,useAsync,useLocalStorage,useSessionStorage,useCookie,useReactiveProp,useEventListener,useWebSocket,useColorMode,useDark,useHead,useSeoMeta,definePageMeta:function(){},toast,modal,drawer,alert:stxAlert,confirm:stxConfirm,helpers:globalHelpers,defineProps:function(definitions){var props=window.__STX_CURRENT_PROPS__||{};if(!definitions)return props;var result=Object.assign({},props);for(var key in definitions){if(!definitions.hasOwnProperty(key))continue;var def=definitions[key];var opts=typeof def==="function"||Array.isArray(def)?{type:def}:def||{};if(result[key]===undefined&&opts["default"]!==undefined){result[key]=typeof opts["default"]==="function"?opts["default"]():opts["default"]}}return result},withDefaults:function(props,defaults){var result=Object.assign({},props);for(var key in defaults){if(!defaults.hasOwnProperty(key))continue;if(result[key]===undefined){result[key]=typeof defaults[key]==="function"?defaults[key]():defaults[key]}}return result},defineEmits:function(){var el=window.__STX_CURRENT_ELEMENT__||null;return function(event,payload){var target=el||document.body;target.dispatchEvent(new CustomEvent(event,{detail:payload,bubbles:true,cancelable:true}))}},defineExpose:function(exposed){var el=window.__STX_CURRENT_ELEMENT__;if(el)el.__stx_exposed=exposed},defineSlots:function(){return window.__STX_CURRENT_SLOTS__||{}},_mountCallbacks:mountCallbacks,_destroyCallbacks:destroyCallbacks,_cleanupContainer:cleanupContainer,_registerSuspense:registerSuspense,_tg:{enter:tgEnter,leave:tgLeave,flip:tgFlip,snapshot:tgSnapshot},_scopes:{},_scopeCounter:0,_latestSetup:null,_stores:new Map,defineStore:function(id,setupOrOptions,storeOptions){if(window.stx._stores.has(id)){return window.stx._stores.get(id)};var setupFn;if(typeof setupOrOptions==="function"){setupFn=setupOrOptions}else{var opts=setupOrOptions;setupFn=function(){var result={};var initialState=typeof opts.state==="function"?opts.state():opts.state||{};var stateSignals={};for(var key in initialState){stateSignals[key]=state(initialState[key]);result[key]=stateSignals[key]}if(opts.getters){for(var gKey in opts.getters){(function(getterKey,getterFn){result[getterKey]=derived(function(){var snapshot={};for(var sk in stateSignals){snapshot[sk]=stateSignals[sk]()}return getterFn(snapshot)})})(gKey,opts.getters[gKey])}}if(opts.actions){for(var aKey in opts.actions){(function(actionKey,actionFn){result[actionKey]=function(){var proxy=new Proxy({},{get:function(_,p){if(result[p]&&result[p]._isSignal)return result[p]();if(result[p])return result[p];return},set:function(_,p,v){if(result[p]&&result[p]._isSignal){result[p].set(v);return true}return false}});return actionFn.apply(proxy,arguments)}})(aKey,opts.actions[aKey])}}return result}};var prevDisposers=activeDisposers;activeDisposers=null;var result;try{result=setupFn()}finally{activeDisposers=prevDisposers};var signalKeys=[];var actionKeys=[];for(var dk in result){if(result[dk]&&result[dk]._isSignal)signalKeys.push(dk);else if(typeof result[dk]==="function")actionKeys.push(dk)};var _initialValues={};for(var k in result){if(result[k]&&result[k]._isSignal){_initialValues[k]=result[k]()}}result.$id=id;result.$reset=function(){batch(function(){for(var rk in _initialValues){if(result[rk]&&result[rk]._isSignal)result[rk].set(_initialValues[rk])}})};result.$patch=function(partial){batch(function(){for(var pk in partial){if(result[pk]&&result[pk]._isSignal)result[pk].set(partial[pk])}})};result.$subscribe=function(cb){var unsubs=[];for(var sk in result){if(result[sk]&&result[sk]._isSignal&&result[sk].subscribe){unsubs.push(result[sk].subscribe(function(){var snapshot={};for(var ssk in result){if(result[ssk]&&result[ssk]._isSignal)snapshot[ssk]=result[ssk]()}cb(snapshot)}))}}return function(){unsubs.forEach(function(u){u()})}};result.$dispose=function(){window.stx._stores.delete(id);if(window.__STX_STORES__)delete window.__STX_STORES__[id]};var hydrationData=window.__STX_STORE_STATE__&&window.__STX_STORE_STATE__[id];if(hydrationData){batch(function(){for(var hk in hydrationData){if(result[hk]&&result[hk]._isSignal)result[hk].set(hydrationData[hk])}})};var persistCfg=storeOptions&&storeOptions.persist;if(persistCfg){var pOpts=persistCfg===true?{}:persistCfg;var storageKey=pOpts.key||"stx-store-"+id;var storageType=pOpts.storage==="sessionStorage"?sessionStorage:localStorage;var pick=pOpts.pick||null;try{var saved=storageType.getItem(storageKey);if(saved){var parsed=JSON.parse(saved);batch(function(){for(var pk in parsed){if(result[pk]&&result[pk]._isSignal&&(!pick||pick.indexOf(pk)!==-1)){result[pk].set(parsed[pk])}}})}}catch(e){console.warn("[stx:store] persistence read error:",id,e)};var writeTimer=null;var prevPersistDisposers=activeDisposers;activeDisposers=null;effect(function(){var snapshot={};for(var wk in result){if(result[wk]&&result[wk]._isSignal&&(!pick||pick.indexOf(wk)!==-1)){snapshot[wk]=result[wk]()}}if(writeTimer)clearTimeout(writeTimer);writeTimer=setTimeout(function(){try{storageType.setItem(storageKey,JSON.stringify(snapshot))}catch(e){console.warn("[stx:store] persist write error:",id,e)}},100)});activeDisposers=prevPersistDisposers}result._isStxStore=true;window.stx._stores.set(id,result);window.__STX_STORES__=window.__STX_STORES__||{};window.__STX_STORES__[id]=result;return result},useStore:function(id){var store=window.stx._stores.get(id);if(!store&&window.__STX_STORES__){store=window.__STX_STORES__[id]}if(!store){console.error("[stx:store] Store not found:",id,"available:",Array.from(window.stx._stores.keys()));throw new Error('[stx] Store "'+id+'" not found. Define it with defineStore() first.')}return store},mountEl:function(selector,setupFn){function doMount(){var root=document.querySelector(selector);if(!root){console.warn("[stx] mountEl: element not found:",selector);return};var prevProps=window.__STX_CURRENT_PROPS__;var prevEl=window.__STX_CURRENT_ELEMENT__;var propsAttr=root.getAttribute&&root.getAttribute("data-stx-props");window.__STX_CURRENT_PROPS__=root.__stx_props||(propsAttr?JSON.parse(propsAttr):{});window.__STX_CURRENT_ELEMENT__=root;var mountStart=mountCallbacks.length;var destroyStart=destroyCallbacks.length;var scope=setupFn();window.__STX_CURRENT_PROPS__=prevProps;window.__STX_CURRENT_ELEMENT__=prevEl;var localMountHooks=mountCallbacks.splice(mountStart);var localDestroyHooks=destroyCallbacks.splice(destroyStart);if(typeof scope==="object"&&scope!==null){scope.$el=root;scope.$refs=scope.$refs||{};root.__stx_scope=scope};var disposeEffects=trackEffects(function(){processElement(root,scope||componentScope)});root.__stx_disposers=disposeEffects;root.removeAttribute("x-cloak");root.querySelectorAll("[x-cloak]").forEach(function(el){el.removeAttribute("x-cloak")});localMountHooks.forEach(function(fn){try{var cleanup=fn();if(typeof cleanup==="function")localDestroyHooks.push(cleanup)}catch(e){console.error("[stx] onMount error:",e)}});root.__stx_destroy=localDestroyHooks}if(document.readyState==="loading"){mountQueue.push(doMount)}else{doMount()}},mount:function(setupFn){var scriptEl=document.currentScript;function doMount(){var root=scriptEl?scriptEl.nextElementSibling:null;if(!root&&scriptEl)root=scriptEl.previousElementSibling||scriptEl.parentElement;var needsFallback=!root||root===document.body||root&&root.tagName==="SCRIPT";if(needsFallback){var routerOpts=window.STX_ROUTER_OPTIONS||window.__stxRouterConfig||{};var container=document.querySelector("[data-stx-content]")||document.querySelector("[data-stx-router-container]")||(routerOpts.container?document.querySelector(routerOpts.container):null)||document.querySelector("main")||document.querySelector("#content");if(container){root=container;var hasMount=false;var children=container.children;for(var ci=0;ci<children.length;ci++){if(children[ci].__stx_scope){hasMount=true;break}}if(hasMount)for(var ci=0;ci<children.length;ci++){if(!children[ci].__stx_scope&&children[ci].tagName!=="SCRIPT"){root=children[ci];break}}}}if(!root){console.warn("[stx] mount: no root element found");return};var prevProps=window.__STX_CURRENT_PROPS__;var prevEl=window.__STX_CURRENT_ELEMENT__;var propsAttr=root.getAttribute&&root.getAttribute("data-stx-props");window.__STX_CURRENT_PROPS__=root.__stx_props||(propsAttr?JSON.parse(propsAttr):{});window.__STX_CURRENT_ELEMENT__=root;var mountStart=mountCallbacks.length;var destroyStart=destroyCallbacks.length;var scope=setupFn();window.__STX_CURRENT_PROPS__=prevProps;window.__STX_CURRENT_ELEMENT__=prevEl;var localMountHooks=mountCallbacks.splice(mountStart);var localDestroyHooks=destroyCallbacks.splice(destroyStart);if(typeof scope==="object"&&scope!==null){scope.$el=root;scope.$refs=scope.$refs||{};root.__stx_scope=scope;Object.assign(componentScope,scope)};var disposeEffects=trackEffects(function(){processElement(root,scope||componentScope)});root.__stx_disposers=disposeEffects;root.removeAttribute("x-cloak");root.querySelectorAll("[x-cloak]").forEach(function(el){el.removeAttribute("x-cloak")});localMountHooks.forEach(function(fn){try{var cleanup=fn();if(typeof cleanup==="function")localDestroyHooks.push(cleanup)}catch(e){console.error("[stx] onMount error:",e)}});root.__stx_destroy=localDestroyHooks}if(document.readyState==="loading"){mountQueue.push(doMount)}else{doMount()}}};window.state=state;window.derived=derived;window.effect=effect;window.batch=batch;window.onMount=onMount;window.onDestroy=onDestroy;window.useFetch=useFetch;window.useRef=useRef;window.navigate=navigate;window.goBack=goBack;window.goForward=goForward;window.useRoute=useRoute;window.useSearchParams=useSearchParams;window.useQuery=useQuery;window.useMutation=useMutation;window.provide=provide;window.$computed=$computed;window.$watch=$watch;window.useDebounce=useDebounce;window.useDebouncedValue=useDebouncedValue;window.useThrottle=useThrottle;window.useInterval=useInterval;window.useTimeout=useTimeout;window.useToggle=useToggle;window.useCounter=useCounter;window.useClickOutside=useClickOutside;window.useFocus=useFocus;window.useAsync=useAsync;window.useLocalStorage=useLocalStorage;window.useEventListener=useEventListener;window.useWebSocket=useWebSocket;window.useColorMode=useColorMode;window.useDark=useDark;window.useHead=useHead;window.useSeoMeta=useSeoMeta;window.toast=toast;window.modal=modal;window.drawer=drawer;window.stxAlert=stxAlert;window.stxConfirm=stxConfirm;window.defineStore=window.stx.defineStore;window.useStore=window.stx.useStore;window.ref=state;window.reactive=state;window.computed=derived;window.watch=$watch;window.watchEffect=function(fn){return effect(fn)};function __stxDevtoolsClassify(sv){var out={signals:{},derived:{},stores:{},values:{},methods:[]};if(!sv||typeof sv!=="object")return out;Object.keys(sv).forEach(function(k){if(k.indexOf("__")===0||k==="$el"||k==="$refs"||k==="$props")return;var v=sv[k];try{if(typeof v==="function"&&v._isSignal)out.signals[k]=peek(function(){return v()});else if(typeof v==="function"&&v._isDerived)out.derived[k]=peek(function(){return v()});else if(v&&v._isStxStore)out.stores[k]="[store]";else if(typeof v==="function")out.methods.push(k);else out.values[k]=v}catch(e){out.values[k]="[unreadable]"}});return out}window.__stxDevtools={version:4,enable:function(){__stxDevtoolsTracking=true},disable:function(){__stxDevtoolsTracking=false},tracking:function(){return __stxDevtoolsTracking},stats:function(){return{signalSets:__stxDevtoolsStats.signalSets,effectRuns:__stxDevtoolsStats.effectRuns,tracking:__stxDevtoolsTracking}},resetStats:function(){__stxDevtoolsStats.signalSets=0;__stxDevtoolsStats.effectRuns=0;__stxDevtoolsIfTrace.length=0;__stxDevtoolsQueries.length=0;__stxDevtoolsMutations.length=0},ifTrace:function(){return __stxDevtoolsIfTrace.slice()},queries:function(){return __stxDevtoolsQueries.slice()},mutations:function(){var nameById={};function index(container,label){if(!container||typeof container!=="object")return;Object.keys(container).forEach(function(k){if(k.indexOf("__")===0)return;var v=container[k];if(typeof v==="function"&&v._stxSignalId)nameById[v._stxSignalId]={name:k,scope:label}})};var scopes=window.stx&&window.stx._scopes||{};Object.keys(scopes).forEach(function(id){index(scopes[id],id)});if(window.stx&&window.stx._stores&&typeof window.stx._stores.forEach==="function")window.stx._stores.forEach(function(s,id){index(s,"store:"+id)});return __stxDevtoolsMutations.map(function(m){var info=nameById[m.sid];return{name:info?info.name:"(anonymous)",scope:info?info.scope:null,prev:m.prev,next:m.next}})},graph:function(){var out=[];var scopes=window.stx&&window.stx._scopes||{};Object.keys(scopes).forEach(function(scopeId){var sv=scopes[scopeId];if(!sv||typeof sv!=="object")return;var nodes=[];Object.keys(sv).forEach(function(k){if(k.indexOf("__")===0||k==="$el"||k==="$refs"||k==="$props")return;var v=sv[k];if(typeof v==="function"&&(v._isSignal||v._isDerived)){nodes.push({name:k,type:v._isDerived?"derived":"signal",value:peek(function(){return v()}),setCount:v._setCount||0,subscribers:v._effects&&typeof v._effects.size==="number"?v._effects.size:0})}});if(nodes.length)out.push({scopeId,nodes})});return out},tree:function(){var byEl=new Map;var roots=[];var nodes=document.querySelectorAll("[data-stx-scope]");Array.prototype.forEach.call(nodes,function(el){byEl.set(el,{scopeId:el.getAttribute("data-stx-scope"),tag:(el.tagName||"").toLowerCase(),children:[],el})});Array.prototype.forEach.call(nodes,function(el){var node=byEl.get(el);var p=el.parentElement;while(p&&!byEl.has(p))p=p.parentElement;if(p)byEl.get(p).children.push(node);else roots.push(node)});function clean(n){return{scopeId:n.scopeId,tag:n.tag,children:n.children.map(clean)}}return roots.map(clean)},scope:function(scopeId){var sv=window.stx&&window.stx._scopes?window.stx._scopes[scopeId]:null;return sv?__stxDevtoolsClassify(sv):null},inspect:function(el){var s=el;while(s&&!(s.getAttribute&&s.getAttribute("data-stx-scope")))s=s.parentElement;return s?this.scope(s.getAttribute("data-stx-scope")):null},stores:function(){var out={};var reg=window.stx&&window.stx._stores;if(reg&&typeof reg.forEach==="function")reg.forEach(function(v,k){out[k]=true});return out},store:function(id){var reg=window.stx&&window.stx._stores;var s=reg&&typeof reg.get==="function"?reg.get(id):null;return s?__stxDevtoolsClassify(s):null}};document.addEventListener("DOMContentLoaded",()=>{mountQueue.forEach(function(fn){fn()});mountQueue=[];const processedScopes=new Set;document.querySelectorAll("[data-stx]").forEach((el)=>{const setupName=el.getAttribute("data-stx");if(setupName&&window[setupName]){const result=window[setupName]();if(typeof result==="object"){Object.assign(componentScope,result)}};var disposeEffects=trackEffects(function(){processElement(el)});el.__stx_disposers=disposeEffects;el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});mountCallbacks.forEach((fn)=>fn())});var stxRoots=document.querySelectorAll("[data-stx]");if(stxRoots.length&&Object.keys(componentScope).length){var rootParent=stxRoots[0].parentNode;if(rootParent&&rootParent.children){Array.prototype.slice.call(rootParent.children).forEach(function(sib){if(sib.nodeType!==1)return;if(sib.hasAttribute("data-stx")||sib.hasAttribute("data-stx-scope"))return;if(sib.tagName==="SCRIPT"||sib.tagName==="STYLE")return;if(sib.__stx_disposers)return;var disposeSib=trackEffects(function(){processElement(sib)});sib.__stx_disposers=disposeSib;sib.removeAttribute("x-cloak");sib.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})})}};var allScopes=document.querySelectorAll("[data-stx-scope]");allScopes.forEach((el)=>{const scopeId=el.getAttribute("data-stx-scope");processedScopes.add(el);const scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];var isDeferredIsland=!scopeVars&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!!document.querySelector('script[data-stx-island="'+scopeId+'"]');if(isDeferredIsland){processElement(el);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});return}if(!scopeVars)return;if(scopeVars){componentScope={...componentScope,...scopeVars}};var disposeEffects=trackEffects(function(){processElement(el)});el.__stx_disposers=disposeEffects;el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});var scopeDeferred=el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydrated;if(scopeVars&&scopeVars.__mountCallbacks&&!scopeVars.__mounted&&!scopeDeferred){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach((fn)=>fn())}});mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}});mountCallbacks.length=0;document.querySelectorAll("[data-stx-auto]").forEach((el)=>{processElementSkipScopes(el,processedScopes);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})});const headElements=document.querySelectorAll("head title, head meta[content]");headElements.forEach((el)=>{if(el.tagName==="TITLE"){const text=el.textContent;if(text&&text.includes("{{")){effect(()=>{try{let result=text;const matches=text.match(/\{\{\s*(.+?)\s*\}\}/g);if(matches){matches.forEach((match)=>{const expr=match.replace(/^\{\{\s*|\s*\}\}$/g,"");const fn=new Function(...Object.keys(componentScope),"return "+expr);const value=fn(...Object.values(componentScope));result=result.replace(match,value!=null?value:"")})}el.textContent=result}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Title expression error:",e)}})}}else if(el.tagName==="META"){const content=el.getAttribute("content");if(content&&content.includes("{{")){const hasOnlyPlaceholders=!content.replace(/\{\{\s*__[A-Z_]+__\s*\}\}/g,"").includes("{{");if(hasOnlyPlaceholders)return;effect(()=>{try{let result=content;const matches=content.match(/\{\{\s*(.+?)\s*\}\}/g);if(matches){matches.forEach((match)=>{const expr=match.replace(/^\{\{\s*|\s*\}\}$/g,"");if(/^__[A-Z_]+__$/.test(expr.trim()))return;const fn=new Function(...Object.keys(componentScope),"return "+expr);const value=fn(...Object.values(componentScope));result=result.replace(match,value!=null?value:"")})}el.setAttribute("content",result)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Meta expression error:",e)}})}}})});function disposeSubtreeScopes(root){if(!root||!window.stx||!window.stx._scopes)return;var nodes=[];if(root.getAttribute&&root.getAttribute("data-stx-scope"))nodes.push(root);if(root.querySelectorAll){var matches=root.querySelectorAll("[data-stx-scope]");for(var i=0;i<matches.length;i++)nodes.push(matches[i])}for(var n=0;n<nodes.length;n++){var el=nodes[n];var scopeId=el.getAttribute("data-stx-scope");if(!scopeId)continue;var scopeVars=window.stx._scopes[scopeId];if(!scopeVars)continue;if(scopeVars.__destroyCallbacks&&Array.isArray(scopeVars.__destroyCallbacks)){for(var j=0;j<scopeVars.__destroyCallbacks.length;j++){try{scopeVars.__destroyCallbacks[j]()}catch(e){console.warn("[stx] scope destroy error:",e)}}}delete window.stx._scopes[scopeId]}};function cleanupContainer(container){if(!container)return;mountCallbacks.length=0;var preservedRefs=componentScope.$refs||{};componentScope={$refs:preservedRefs};var shellElements=document.querySelectorAll("[data-stx-content] ~ *");document.querySelectorAll("body > *").forEach(function(el){if(el===container)return;if(el.tagName==="SCRIPT"||el.tagName==="STYLE")return;if(el.__stx_scope)Object.assign(componentScope,el.__stx_scope)});container.querySelectorAll("*").forEach(function(el){if(typeof el.__stx_hydration_cancel==="function"){try{el.__stx_hydration_cancel()}catch(e){}el.__stx_hydration_cancel=null}if(el.__stx_destroy&&Array.isArray(el.__stx_destroy)){el.__stx_destroy.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy hook error:",e)}});el.__stx_destroy=null}if(el.__stx_disposers&&typeof el.__stx_disposers==="function"){el.__stx_disposers();el.__stx_disposers=null}});if(typeof container.__stx_hydration_cancel==="function"){try{container.__stx_hydration_cancel()}catch(e){}container.__stx_hydration_cancel=null}if(container.__stx_destroy){container.__stx_destroy.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy hook error:",e)}});container.__stx_destroy=null}if(container.__stx_disposers){container.__stx_disposers();container.__stx_disposers=null}container.__stx_scope=null;disposeSubtreeScopes(container)};var _stxLoadTimer=null;window.addEventListener("stx:load",function(){if(_stxLoadTimer){clearTimeout(_stxLoadTimer)}_stxLoadTimer=setTimeout(_handleStxLoad,5)});function _handleStxLoad(){_stxLoadTimer=null;destroyCallbacks.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy callback error:",e)}});destroyCallbacks.length=0;mountQueue.forEach(function(fn){fn()});mountQueue=[];var routerOpts=window.STX_ROUTER_OPTIONS||window.__stxRouterConfig||{};var container=document.querySelector("[data-stx-content]")||(routerOpts.container?document.querySelector(routerOpts.container):null)||document.querySelector("main")||document.querySelector("#main-content")||document.body;var usedLatestSetup=false;if(window.stx._latestSetup&&typeof window.stx._latestSetup==="function"){try{var setupResult=window.stx._latestSetup();usedLatestSetup=true;if(typeof setupResult==="object"&&setupResult!==null){Object.assign(componentScope,setupResult)}}catch(e){console.error("[stx:load] _latestSetup error:",e);usedLatestSetup=true}}if(!usedLatestSetup){document.querySelectorAll("[data-stx]").forEach(function(el){var setupName=el.getAttribute("data-stx");if(setupName&&window[setupName]){var result=window[setupName]();if(typeof result==="object")Object.assign(componentScope,result)}})}if(window.__stx_reactive&&window.__stx_reactive.initScope){container.querySelectorAll("[data-stx-xdata]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");if(scopeId&&window.stx._scopes&&window.stx._scopes[scopeId])return;var xdata=el.getAttribute("data-stx-xdata");if(!xdata)return;if(!scopeId){scopeId="__stx_scope_spa_"+ ++window.stx._scopeCounter;el.setAttribute("data-stx-scope",scopeId)}window.__stx_reactive.initScope(el,xdata,[],{},null)})}document.body.querySelectorAll("[data-stx-scope]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(!scopeVars&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydration_scheduled&&document.querySelector('script[data-stx-island="'+scopeId+'"]')){processElement(el,componentScope);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});return}if(!scopeVars)return;Object.assign(componentScope,scopeVars);if(el.__stx_disposers)return;var disposeEffects=trackEffects(function(){processElement(el,componentScope)});el.__stx_disposers=disposeEffects});if(!container.__stx_scope){if(container.__stx_disposers&&typeof container.__stx_disposers==="function"){container.__stx_disposers()};var disposeEffects=trackEffects(function(){processElement(container,componentScope)});container.__stx_disposers=disposeEffects}container.removeAttribute("x-cloak");container.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});document.body.querySelectorAll("[data-stx-scope]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(scopeVars&&scopeVars.__mountCallbacks&&!scopeVars.__mounted){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach(function(fn){fn()})}});mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] mount callback error:",e)}});mountCallbacks.length=0};function processElementSkipScopes(el,processedScopes){if(processedScopes.has(el))return;if(el.nodeType===Node.TEXT_NODE){processElement(el);return}if(el.nodeType!==Node.ELEMENT_NODE)return;if(el.hasAttribute&&el.hasAttribute("data-stx-scope"))return;if(el.__stx_chain_member&&!el.isConnected)return;const hasFor=el.hasAttribute&&(el.hasAttribute("@for")||el.hasAttribute(":for")||el.hasAttribute("x-for"));const hasIf=el.hasAttribute&&(el.hasAttribute("@if")||el.hasAttribute(":if")||el.hasAttribute("x-if"));if(hasFor){var fa=el.hasAttribute(":for")?":for":el.hasAttribute("x-for")?"x-for":"@for";bindFor(el,componentScope,fa);return}if(hasIf){var ia=el.hasAttribute(":if")?":if":el.hasAttribute("x-if")?"x-if":"@if";var ic=findIfChain(el,ia);if(ic.length>1)bindIfChain(ic,componentScope);else bindIf(el,componentScope,ia);return}if(el.hasAttribute&&(el.hasAttribute("@show")||el.hasAttribute(":show")||el.hasAttribute("x-show"))){var sa=el.hasAttribute(":show")?":show":el.hasAttribute("x-show")?"x-show":"@show";bindShow(el,el.getAttribute(sa),componentScope,sa)}if(el.hasAttribute&&(el.hasAttribute("@model")||el.hasAttribute(":model")||el.hasAttribute("x-model"))){var ma=el.hasAttribute(":model")?":model":el.hasAttribute("x-model")?"x-model":"@model";bindModel(el,el.getAttribute(ma),componentScope,ma)}if(el.tagName!=="SCRIPT"&&el.tagName!=="STYLE"){Array.from(el.childNodes).forEach((child)=>processElementSkipScopes(child,processedScopes))}}})();</script> <script data-stx-scoped>
246
+ if(window.stx)window.stx._latestSetup=__stx_setup_1785199200132_6;
247
+ </script> <style data-stx-cloak>[x-cloak]{display:none !important}</style><style data-crosswind="generated"> /* ! Tailwind CSS Preflight | MIT License | https://tailwindcss.com */ *, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: var(--border-color, currentColor); } ::before, ::after { --hw-content: ''; } html, :host { line-height: 1.5; -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; font-family: ui-sans-serif, system-ui, sans-serif; font-feature-settings: normal; font-variation-settings: normal; -webkit-tap-highlight-color: transparent; } body { margin: 0; line-height: inherit; } hr { height: 0; color: inherit; border-top-width: 1px; } abbr:where([title]) { text-decoration: underline dotted; } h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } a { color: inherit; text-decoration: inherit; } b, strong { font-weight: bolder; } code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } table { text-indent: 0; border-color: var(--border-color, inherit); border-collapse: collapse; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; } button, select { text-transform: none; } button, input:where([type='button']), input:where([type='reset']), input:where([type='submit']) { -webkit-appearance: button; background-color: transparent; background-image: none; } :-moz-focusring { outline: auto; } :-moz-ui-invalid { box-shadow: none; } progress { vertical-align: baseline; } ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } [type='search'] { -webkit-appearance: textfield; outline-offset: -2px; } ::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } summary { display: list-item; } blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } fieldset { margin: 0; padding: 0; } legend { padding: 0; } ol, ul, menu { list-style: none; margin: 0; padding: 0; } dialog { padding: 0; } textarea { resize: vertical; } input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; } button, [role="button"] { cursor: pointer; } :disabled { cursor: default; } img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; } img, video { max-width: 100%; height: auto; } [hidden] { display: none; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } </style></head><body data-stx="__stx_setup_1785199200132_6"><a data-stx-scope="stx_scope_nav_9" class="skip-link" href="#main-content">Skip to content</a><button class="nav-toggle-button" type="button" aria-label="Open navigation" aria-controls="primary-navigation" aria-expanded="false"><span></span><span></span><span></span></button><button class="nav-scrim" type="button" aria-label="Close navigation"></button><aside class="app-sidebar" id="primary-navigation" aria-label="Primary navigation"><a class="brand" href="/?env=production"><span class="dot"></span><span>ts-cloud</span></a><div class="sidebar-context"><span class="context-label">Project</span><strong>Project</strong></div><div class="environment-picker" aria-label="Environment"><span class="context-label">Environment</span><details><summary class="environment-current production"><span>PROD</span><strong>production</strong></summary></details></div><button class="command-trigger" type="button" aria-keyshortcuts="Meta+K Control+K"><span>Search resources</span><kbd>⌘ K</kbd></button><div class="nav-groups"><section class="nav-group"><h2>Overview</h2><a class="" href="/?env=production">Dashboard</a><a href="/server/activity?env=production">Activity</a></section><section class="nav-group"><h2>Applications</h2><a class="" href="/server/sites?env=production">Services</a><a class="" href="/server/deployments?env=production">Deployments</a><a class="" href="/server/logs?env=production">Logs</a><a class="" href="/integrations?env=production">Git integrations</a><a class="" href="/applications/new?env=production">Create application</a><a class="" href="/applications/compose?env=production">Compose applications</a></section><section class="nav-group"><h2>Operations</h2><a class="" href="/operations/queue?env=production">Deployment queue</a><a class="" href="/operations/previews?env=production">Preview environments</a><a class="" href="/operations/releases?env=production">Releases & promotion</a><a class="" href="/operations/regions?env=production">Regions & failover</a><a class="" href="/operations/maintenance?env=production">Maintenance & DR</a><a class="" href="/operations/workloads?env=production">Workloads</a><a class="" href="/operations/observability?env=production">Observability</a><a class="" href="/operations/alerts?env=production">Alerts & health</a><a href="/server/metrics?env=production">Metrics</a><a href="/server/services?env=production">Runtime services</a><a class="" href="/operations/jobs?env=production">Workers & schedules</a><a class="" href="/operations/configuration?env=production">Environment &amp; secrets</a><a class="" href="/data/backups?env=production">Backups &amp; recovery</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/actions?env=production">Run operations</a></section><section class="nav-group"><h2>Infrastructure</h2><a class="active" href="/data/services?env=production">Data services</a><a class="" href="/data/volumes?env=production">Persistent volumes</a><a href="/server/firewall?env=production">Network & firewall</a><a href="/server/ssh-keys?env=production">SSH keys</a><a class="" href="/server/fleet?env=production">Fleet inventory</a><a class="" href="/server/capacity?env=production">Capacity & placement</a><a href="/security?env=production">Security posture</a><a href="/server/terminal?env=production">Terminal</a></section><section class="nav-group"><h2>Organization</h2><a class="" href="/server/team?env=production">People & access</a><a class="" href="/account/automation?env=production">API & automation</a></section><section class="nav-group"><h2>Account</h2><a class="" href="/account/security?env=production">Sign-in & security</a></section></div><form method="post" action="/api/logout" class="signout"><button type="submit">Sign out</button></form></aside><dialog class="command-palette" aria-labelledby="command-title"><div class="command-search"><span aria-hidden="true">⌕</span><input type="search" placeholder="Search services, domains, deployments…" aria-label="Search resources" autocomplete="off"><button type="button" class="command-close" aria-label="Close search">Esc</button></div><h2 id="command-title" class="sr-only">Search resources and navigation</h2><div class="command-status" role="status">Start typing to search this project.</div><section class="saved-views" aria-labelledby="saved-views-title"><div class="saved-views-heading"><h3 id="saved-views-title">Saved views</h3><form class="save-view-form"><label class="sr-only" for="save-view-name">Saved view name</label><input id="save-view-name" maxlength="64" placeholder="Name this view" autocomplete="off"><button type="submit">Save current filters</button></form></div><div class="saved-view-list"></div></section><form class="tag-result-form"><label for="tag-result-name">Tag selected resource</label><input id="tag-result-name" maxlength="32" placeholder="customer-facing" pattern="[A-Za-z0-9][A-Za-z0-9 -]{0,31}" autocomplete="off"><input class="tag-color" type="color" value="#5a8be0" aria-label="Tag color"><button type="submit">Add tag</button></form><div class="command-results" role="listbox" aria-label="Search results"></div><footer><span>↑ ↓ navigate</span><span>Enter open</span><span>Esc close</span></footer></dialog><div class="context-bar" aria-label="Current scope"><div class="context-path"><div class="context-breadcrumb"><span>Project</span><i>/</i><strong>production</strong></div><div class="context-filters" aria-label="Active filters"></div></div><span class="scope-safety production">Production scope</span></div> <script data-stx-scoped>if(!window.__stx_early_mounts)window.__stx_early_mounts=[];if(!window.__stx_early_destroys)window.__stx_early_destroys=[];if(!window.onMount)window.onMount=function(fn){window.__stx_early_mounts.push(fn)};if(!window.onDestroy)window.onDestroy=function(fn){window.__stx_early_destroys.push(fn)};(function(){var cloakStyle=document.createElement("style");cloakStyle.textContent="[x-cloak] { display: none !important; }";document.head.appendChild(cloakStyle);let activeEffect=null;const effectStack=[];const pendingEffects=new Set;let isBatching=false;var __stxDevtoolsTracking=false;var __stxDevtoolsStats={signalSets:0,effectRuns:0};var __stxEffectId=0;var __stxDevtoolsIfTrace=[];var __stxDevtoolsQueries=[];var __stxDevtoolsMutations=[];var __stxSignalId=0;function __stxDevtoolsNow(){return typeof performance!=="undefined"&&performance.now?performance.now():Date.now()};function __stxDevtoolsRecordIf(rec){if(!__stxDevtoolsTracking)return;__stxDevtoolsIfTrace.push(rec);if(__stxDevtoolsIfTrace.length>100)__stxDevtoolsIfTrace.shift()};function __stxDevtoolsRecordQuery(rec){if(!__stxDevtoolsTracking)return;__stxDevtoolsQueries.push(rec);if(__stxDevtoolsQueries.length>100)__stxDevtoolsQueries.shift()};function __stxShort(v){try{if(typeof v==="string")return v.length>40?v.slice(0,40)+"…":v;if(v===null||typeof v!=="object")return v;var s=JSON.stringify(v);return s.length>60?s.slice(0,60)+"…":s}catch(e){return"[unserializable]"}}async function __stxFetch(source,url,opts){var t0=__stxDevtoolsNow();var method=opts&&opts.method||"GET";try{var r=await fetch(url,opts);__stxDevtoolsRecordQuery({source,url:String(url),method,status:r.status,ok:r.ok,ms:__stxDevtoolsNow()-t0});return r}catch(e){__stxDevtoolsRecordQuery({source,url:String(url),method,status:0,ok:false,error:String(e&&e.message||e),ms:__stxDevtoolsNow()-t0});throw e}};let activeDisposers=null;const targetMap=new WeakMap;const globalHelpers={fmt(n){if(n==null)return"0";n=Number(n);if(n>=1e6)return(n/1e6).toFixed(1)+"M";if(n>=1000)return(n/1000).toFixed(1)+"K";return String(n)},formatDate(date,format="YYYY-MM-DD"){if(!date)return"";const d=date instanceof Date?date:new Date(date);if(isNaN(d.getTime()))return"";const year=d.getFullYear();const month=String(d.getMonth()+1).padStart(2,"0");const day=String(d.getDate()).padStart(2,"0");const hours=String(d.getHours()).padStart(2,"0");const minutes=String(d.getMinutes()).padStart(2,"0");const seconds=String(d.getSeconds()).padStart(2,"0");return format.replace("YYYY",year).replace("MM",month).replace("DD",day).replace("HH",hours).replace("mm",minutes).replace("ss",seconds)},timeAgo(date){if(!date)return"";const d=date instanceof Date?date:new Date(date);const now=new Date;const seconds=Math.floor((now-d)/1000);if(seconds<60)return"just now";if(seconds<3600)return Math.floor(seconds/60)+"m ago";if(seconds<86400)return Math.floor(seconds/3600)+"h ago";if(seconds<604800)return Math.floor(seconds/86400)+"d ago";return d.toLocaleDateString()},debounce(fn,delay=300){let timeout;return function(...args){clearTimeout(timeout);timeout=setTimeout(()=>fn.apply(this,args),delay)}},throttle(fn,limit=300){let inThrottle;return function(...args){if(!inThrottle){fn.apply(this,args);inThrottle=true;setTimeout(()=>inThrottle=false,limit)}}},capitalize(str){if(!str)return"";return str.charAt(0).toUpperCase()+str.slice(1)},truncate(str,length=50,suffix="..."){if(!str||str.length<=length)return str||"";return str.slice(0,length)+suffix},json(value,indent=2){try{return JSON.stringify(value,null,indent)}catch(e){return String(value)}},pluralize(count,singular,plural){const p=plural||singular+"s";return count===1?singular:p},clamp(value,min,max){return Math.min(Math.max(value,min),max)},currency(value,symbol="$",decimals=2){if(value==null)return symbol+"0.00";return symbol+Number(value).toFixed(decimals).replace(/\B(?=(\d{3})+(?!\d))/g,",")},percent(value,decimals=0){if(value==null)return"0%";return(Number(value)*100).toFixed(decimals)+"%"}};function track(target,key){if(!activeEffect)return;let depsMap=targetMap.get(target);if(!depsMap)targetMap.set(target,depsMap=new Map);let deps=depsMap.get(key);if(!deps)depsMap.set(key,deps=new Set);deps.add(activeEffect)};function trigger(target,key){const depsMap=targetMap.get(target);if(!depsMap)return;const deps=depsMap.get(key);if(deps){if(isBatching){deps.forEach((effect)=>pendingEffects.add(effect))}else{deps.forEach((effect)=>effect())}}};function createAutoUnwrapProxy(scope){return new Proxy(scope,{get(target,prop){const val=target[prop];if(val&&typeof val==="function"&&(val._isSignal||val._isDerived)){return val()}if(val&&typeof val==="object"&&val._isStxStore){return createAutoUnwrapProxy(val)}return val},set(target,prop,value){const cur=target[prop];if(cur&&typeof cur==="function"&&cur._isSignal&&typeof cur.set==="function"){cur.set(value);return true}target[prop]=value;return true}})};function parsePipeExpression(expr,scope){let pipeIndex=-1;let inString=false;let stringChar="";let depth=0;for(let i=0;i<expr.length;i++){const char=expr[i];const prevChar=i>0?expr[i-1]:"";const nextChar=i<expr.length-1?expr[i+1]:"";if((char==='"'||char==="'"||char==="`")&&prevChar!=="\\"){if(!inString){inString=true;stringChar=char}else if(char===stringChar){inString=false}continue}if(inString)continue;if(char==="("||char==="["||char==="{")depth++;if(char===")"||char==="]"||char==="}")depth--;if(depth!==0)continue;if(char==="|"){if(nextChar==="|"){i++;continue}if(prevChar==="|")continue;if(prevChar==="?")continue;pipeIndex=i;break}}if(pipeIndex===-1)return null;const valueExpr=expr.slice(0,pipeIndex).trim();const pipeChain=expr.slice(pipeIndex+1).trim();const pipes=[];let currentPipe="";inString=false;stringChar="";depth=0;for(let i=0;i<pipeChain.length;i++){const char=pipeChain[i];const prevChar=i>0?pipeChain[i-1]:"";const nextChar=i<pipeChain.length-1?pipeChain[i+1]:"";if((char==='"'||char==="'"||char==="`")&&prevChar!=="\\"){if(!inString){inString=true;stringChar=char}else if(char===stringChar){inString=false}currentPipe+=char;continue}if(inString){currentPipe+=char;continue}if(char==="("||char==="["||char==="{")depth++;if(char===")"||char==="]"||char==="}")depth--;if(depth===0&&char==="|"&&nextChar!=="|"&&prevChar!=="|"&&prevChar!=="?"){if(currentPipe.trim()){const parts=currentPipe.trim().split(":");pipes.push({name:parts[0].trim(),args:parts.slice(1).map((a)=>a.trim())})}currentPipe=""}else{currentPipe+=char}}if(currentPipe.trim()){const parts=currentPipe.trim().split(":");pipes.push({name:parts[0].trim(),args:parts.slice(1).map((a)=>a.trim())})}if(pipes.length===0)return null;return{valueExpr,pipes}};function executePipeExpression(valueExpr,pipes,scope){let value;try{const fn=new Function(...Object.keys(scope),"return "+valueExpr);value=fn(...Object.values(scope))}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Pipe base expression error:",valueExpr,e);return""}for(const pipe of pipes){const filterFn=scope[pipe.name]||globalHelpers[pipe.name];if(typeof filterFn==="function"){try{const parsedArgs=pipe.args.map((arg)=>{if(/^-?\d+(\.\d+)?$/.test(arg))return Number(arg);if(/^['"].*['"]$/.test(arg))return arg.slice(1,-1);try{const fn=new Function(...Object.keys(scope),"return "+arg);return fn(...Object.values(scope))}catch(e){return arg}});value=filterFn(value,...parsedArgs)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Pipe filter error:",pipe.name,e)}}else{console.warn("[STX] Unknown pipe/filter:",pipe.name)}}return value};function state(initialValue){let value=initialValue;const subscribers=new Set;const effects=new Set;const signal=()=>{if(activeEffect){effects.add(activeEffect)}return value};signal.set=(newValue)=>{if(!Object.is(newValue,value)){if(__stxDevtoolsTracking){signal._setCount++;__stxDevtoolsStats.signalSets++;__stxDevtoolsMutations.push({sid:signal._stxSignalId,prev:__stxShort(value),next:__stxShort(newValue)});if(__stxDevtoolsMutations.length>100)__stxDevtoolsMutations.shift()};const prev=value;value=newValue;subscribers.forEach((cb)=>cb(value,prev));if(isBatching){effects.forEach((effect)=>pendingEffects.add(effect))}else{effects.forEach((effect)=>effect())}}};signal.update=(fn)=>signal.set(fn(value));signal.subscribe=(cb)=>{subscribers.add(cb);return()=>subscribers.delete(cb)};signal._isSignal=true;signal._effects=effects;signal._setCount=0;signal._stxSignalId=++__stxSignalId;Object.defineProperty(signal,"value",{get(){return signal()},set(v){signal.set(v)},configurable:true});return signal};function derived(compute){let cached;let isDirty=true;const effects=new Set;const markDirty=()=>{if(!isDirty){isDirty=true;if(isBatching){effects.forEach((e)=>pendingEffects.add(e))}else{effects.forEach((e)=>e())}}};const signal=()=>{if(activeEffect)effects.add(activeEffect);if(isDirty){const prev=activeEffect;activeEffect=markDirty;effectStack.push(markDirty);try{cached=compute()}finally{effectStack.pop();activeEffect=prev}isDirty=false}return cached};signal._isDerived=true;signal._effects=effects;Object.defineProperty(signal,"value",{get(){return signal()},configurable:true});return signal};function effect(fn,options={}){let cleanup;let isDisposed=false;const runEffect=()=>{if(isDisposed)return;if(__stxDevtoolsTracking){runEffect._runCount++;__stxDevtoolsStats.effectRuns++}if(cleanup){cleanup();cleanup=undefined};const prev=activeEffect;activeEffect=runEffect;effectStack.push(runEffect);try{cleanup=fn()}catch(e){isDisposed=true;if(e instanceof ReferenceError){}else{throw e}}finally{effectStack.pop();activeEffect=prev}};runEffect._isStxEffect=true;runEffect._stxId=++__stxEffectId;runEffect._runCount=0;if(options.immediate!==false)runEffect();const dispose=()=>{isDisposed=true;if(cleanup)cleanup()};if(activeDisposers)activeDisposers.push(dispose);return dispose};function trackEffects(fn){var parentDisposers=activeDisposers;var disposers=[];activeDisposers=disposers;try{fn()}finally{activeDisposers=parentDisposers;if(parentDisposers){disposers.forEach(function(d){parentDisposers.push(d)})}}return function disposeAll(){disposers.forEach(function(d){try{d()}catch(e){console.warn("[stx] dispose error:",e)}});disposers.length=0}};function batch(fn){if(isBatching){fn();return}isBatching=true;fn();isBatching=false;pendingEffects.forEach((e)=>e());pendingEffects.clear()};function isSignal(v){return typeof v==="function"&&v._isSignal===true};function untrack(v){return isSignal(v)||typeof v==="function"&&v._isDerived?v():v};function peek(fn){const prev=activeEffect;activeEffect=null;try{return fn()}finally{activeEffect=prev}};const mountCallbacks=[];const destroyCallbacks=[];function onMount(fn){mountCallbacks.push(fn)};function onDestroy(fn){destroyCallbacks.push(fn)}if(window.__stx_early_mounts){window.__stx_early_mounts.forEach(function(fn){mountCallbacks.push(fn)});window.__stx_early_mounts=null}if(window.__stx_early_destroys){window.__stx_early_destroys.forEach(function(fn){destroyCallbacks.push(fn)});window.__stx_early_destroys=null};function useWebSocket(url,options){options=options||{};var ws=state(null);var status=state("CLOSED");var lastMessage=state(null);var error=state(null);var reconnectAttempts=0;var maxReconnects=options.reconnect===false?0:options.maxReconnects||10;var reconnectDelay=options.reconnectDelay||1000;var reconnectTimer=null;var manualClose=false;var listeners={};function connect(){if(ws()&&ws().readyState<=1)return;manualClose=false;status.set("CONNECTING");error.set(null);var socket=new WebSocket(url);socket.onopen=function(){status.set("OPEN");reconnectAttempts=0;if(options.onOpen)options.onOpen(socket)};socket.onmessage=function(event){var data=event.data;try{data=JSON.parse(data)}catch(e){}lastMessage.set(data);if(options.onMessage)options.onMessage(data,event);if(data&&data.channel&&data.event){var key=data.channel+":"+data.event;var fns=listeners[key];if(fns){for(var i=0;i<fns.length;i++){fns[i](data.data)}}}};socket.onerror=function(event){error.set(event);if(options.onError)options.onError(event)};socket.onclose=function(event){status.set("CLOSED");ws.set(null);if(options.onClose)options.onClose(event);if(!manualClose&&reconnectAttempts<maxReconnects){reconnectAttempts++;var delay=reconnectDelay*Math.min(reconnectAttempts,5);reconnectTimer=setTimeout(connect,delay)}};ws.set(socket)};function send(data){var socket=ws();if(socket&&socket.readyState===WebSocket.OPEN){socket.send(typeof data==="string"?data:JSON.stringify(data))}};function close(){manualClose=true;if(reconnectTimer){clearTimeout(reconnectTimer);reconnectTimer=null};var socket=ws();if(socket)socket.close()};function subscribe(channel){send({type:"subscribe",channel});return{listen:function(event,handler){var key=channel+":"+event;if(!listeners[key])listeners[key]=[];listeners[key].push(handler);return this},leave:function(){send({type:"unsubscribe",channel});var prefix=channel+":";for(var key in listeners){if(key.indexOf(prefix)===0){delete listeners[key]}}}}}if(options.immediate!==false){connect()}onDestroy(function(){close();listeners={}});return{ws,status,lastMessage,error,send,close,connect,subscribe}};function useFetch(urlOrFn,options={}){const data=state(options.initialData??null);const loading=state(true);const error=state(null);if(options.suspense)registerSuspense(loading,error);const fetchData=async()=>{loading.set(true);error.set(null);try{const url=typeof urlOrFn==="function"?urlOrFn():urlOrFn;if(!url){loading.set(false);return};const fetchOptions={method:options.method||"GET",headers:{"Content-Type":"application/json",...options.headers||{}}};if(options.body){fetchOptions.body=typeof options.body==="string"?options.body:JSON.stringify(options.body)};const response=await __stxFetch("useFetch",url,fetchOptions);if(!response.ok){throw new Error(`HTTP ${response.status}: ${response.statusText}`)};const result=await response.json();const transformed=options.transform?options.transform(result):result;data.set(transformed)}catch(e){console.error("[STX] useFetch error:",e);error.set(e instanceof Error?e:new Error(String(e)));if(options.onError)options.onError(e)}finally{loading.set(false)}};if(options.immediate!==false){onMount(fetchData)}if(typeof urlOrFn==="function"){effect(()=>{const url=urlOrFn();if(url&&options.immediate!==false){fetchData()}})}return{data,loading,error,refetch:fetchData,get isLoading(){return loading()},get hasError(){return!!error()},get isEmpty(){return!loading()&&!data()}}};function useRef(name){return{get current(){return componentScope.$refs?componentScope.$refs[name]:null},get value(){return this.current}}};function navigate(url,forceReload){if(forceReload){window.location.href=url;return}if(window.stxRouter&&typeof window.stxRouter.navigate==="function"){window.stxRouter.navigate(url)}else{window.location.href=url}};function goBack(){window.history.back()};function goForward(){window.history.forward()};var _routeParams=state({});function setRouteParams(params){_routeParams.set(params||{})}window.addEventListener("stx:navigate",function(e){if(e.detail&&e.detail.params){_routeParams.set(e.detail.params)}});if(window.stx&&window.stx._rp||window.__stx_rp){_routeParams.set(window.stx?._rp||window.__stx_rp)};function useRoute(){return{get path(){return window.location.pathname},get fullPath(){return window.location.pathname+window.location.search+window.location.hash},get hash(){return window.location.hash},get query(){var params={};new URLSearchParams(window.location.search).forEach(function(v,k){params[k]=v});return params},get params(){return _routeParams()}}};function useSearchParams(){var params=state(Object.fromEntries(new URLSearchParams(window.location.search)));var syncFromUrl=function(){params.set(Object.fromEntries(new URLSearchParams(window.location.search)))};window.addEventListener("popstate",syncFromUrl);window.addEventListener("stx:navigate",syncFromUrl);return{data:params,get:function(key){return params()[key]},set:function(key,value){var url=new URL(window.location.href);url.searchParams.set(key,value);window.history.pushState({},"",url);syncFromUrl()},setAll:function(obj){var url=new URL(window.location.href);Object.keys(obj).forEach(function(k){url.searchParams.set(k,obj[k])});window.history.pushState({},"",url);syncFromUrl()}}};var _queryCache={};function suspenseRegistry(){if(typeof window==="undefined")return[];return window.__stx_suspense_registry||(window.__stx_suspense_registry=[])};function registerSuspense(loading,error){var el=typeof window!=="undefined"&&window.__STX_CURRENT_ELEMENT__||null;suspenseRegistry().push({el,loading,error})};function useQuery(url,options){options=options||{};var staleTime=options.staleTime||0;var cacheTime=options.cacheTime||300000;var cacheKey=options.cacheKey||(typeof url==="function"?null:url);var data=state(options.initialData||null);var loading=state(true);var error=state(null);var isStale=state(false);if(options.suspense)registerSuspense(loading,error);var fetchData=async function(){var resolvedUrl=typeof url==="function"?url():url;if(!resolvedUrl){loading.set(false);return};var key=cacheKey||resolvedUrl;var cached=_queryCache[key];if(cached&&Date.now()-cached.timestamp<staleTime){data.set(cached.data);loading.set(false);isStale.set(false);if(options.onSuccess)options.onSuccess(cached.data);return}if(cached){data.set(cached.data);isStale.set(true)}loading.set(true);error.set(null);try{var fetchOpts={method:"GET",headers:{"Content-Type":"application/json",...options.headers||{}}};var response=await __stxFetch("useQuery",resolvedUrl,fetchOpts);if(!response.ok)throw new Error("HTTP "+response.status+": "+response.statusText);var result=await response.json();var transformed=options.transform?options.transform(result):result;data.set(transformed);isStale.set(false);_queryCache[key]={data:transformed,timestamp:Date.now()};if(options.onSuccess)options.onSuccess(transformed);setTimeout(function(){delete _queryCache[key]},cacheTime)}catch(e){error.set(e.message||"Query failed");if(options.onError)options.onError(e)}finally{loading.set(false)}};if(options.immediate!==false){onMount(fetchData)}if(options.refetchOnFocus){document.addEventListener("visibilitychange",function(){if(!document.hidden)fetchData()})}if(options.refetchInterval){var intervalId=setInterval(fetchData,options.refetchInterval);onDestroy(function(){clearInterval(intervalId)})}return{data,loading,error,isStale,refetch:fetchData,invalidate:function(){var key=cacheKey||(typeof url==="function"?url():url);delete _queryCache[key];return fetchData()}}};function useMutation(url,options){options=options||{};var data=state(null);var loading=state(false);var error=state(null);var mutate=async function(body){loading.set(true);error.set(null);var previousData=data();if(options.optimisticData){var optimistic=typeof options.optimisticData==="function"?options.optimisticData(body):options.optimisticData;data.set(optimistic)}try{var resolvedUrl=typeof url==="function"?url():url;var fetchOpts={method:options.method||"POST",headers:{"Content-Type":"application/json",...options.headers||{}},body:typeof body==="string"?body:JSON.stringify(body)};var response=await __stxFetch("useMutation",resolvedUrl,fetchOpts);if(!response.ok)throw new Error("HTTP "+response.status+": "+response.statusText);var result=await response.json();var transformed=options.transform?options.transform(result):result;data.set(transformed);if(options.onSuccess)options.onSuccess(transformed);if(options.invalidateQueries){options.invalidateQueries.forEach(function(key){delete _queryCache[key]})}return transformed}catch(e){error.set(e.message||"Mutation failed");if(options.optimisticData)data.set(previousData);if(options.onError)options.onError(e);throw e}finally{loading.set(false)}};return{data,loading,error,mutate,reset:function(){data.set(null);error.set(null);loading.set(false)}}};function useOptimistic(base,reducer){var readBase=typeof base==="function"?base:function(){return base};var pending=state([]);var optimistic=derived(function(){return pending().reduce(function(acc,entry){return reducer(acc,entry.action)},readBase())});var primed=false;effect(function(){readBase();if(!primed){primed=true;return}if(peek(function(){return pending().length}))pending.set([])});function addOptimistic(action,settleWhen){var entry={action};pending.set(pending().concat([entry]));var settle=function(){var next=pending().filter(function(e){return e!==entry});if(next.length!==pending().length)pending.set(next)};if(settleWhen&&typeof settleWhen.then==="function"){Promise.resolve(settleWhen).then(settle,settle)}return settle}return[optimistic,addOptimistic]};let componentScope={$refs:{}};let currentElement=null;function findElementScope(el){let current=el;while(current&&current!==document){if(current.__stx_scope){return current.__stx_scope}if(current.hasAttribute&&current.hasAttribute("data-stx-scope")){const scopeId=current.getAttribute("data-stx-scope");if(window.stx._scopes&&window.stx._scopes[scopeId]){return window.stx._scopes[scopeId]}}current=current.parentElement||current.parentNode}return null};function toValue(expr,el,enableAutoUnwrap=true){try{if(/^__[A-Z_]+__$/.test(expr.trim())){return expr};const elementScope=findElementScope(el||currentElement);const baseScope={...componentScope,...elementScope||{},...globalHelpers};const pipeResult=parsePipeExpression(expr,baseScope);if(pipeResult){const unwrapScope=enableAutoUnwrap?createAutoUnwrapProxy(baseScope):baseScope;const piped=executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope);return piped&&typeof piped==="function"&&(piped._isSignal||piped._isDerived)?piped():piped};const scope=enableAutoUnwrap?createAutoUnwrapProxy(baseScope):baseScope;const fn=new Function(...Object.keys(baseScope),"return "+expr);const result=fn(...Object.values(scope));return result&&typeof result==="function"&&(result._isSignal||result._isDerived)?result():result}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expr,e);return""}};function parseEventShorthand(expr,scope){const trimmed=expr.trim();if(/^!\w+$/.test(trimmed)){const varName=trimmed.slice(1);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.set(!signal())}return null}if(/^\w+\+\+$/.test(trimmed)){const varName=trimmed.slice(0,-2);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.update((n)=>n+1)}return null}if(/^\w+--$/.test(trimmed)){const varName=trimmed.slice(0,-2);const signal=scope[varName];if(signal&&signal._isSignal){return()=>signal.update((n)=>n-1)}return null};const assignMatch=trimmed.match(/^(\w+)\s*([+\-*\/])=\s*(.+)$/);if(assignMatch){const[,varName,op,valueExpr]=assignMatch;const signal=scope[varName];if(signal&&signal._isSignal){return()=>{const addValue=toValue(valueExpr,null,true);signal.update((n)=>{switch(op){case"+":return n+addValue;case"-":return n-addValue;case"*":return n*addValue;case"/":return n/addValue;default:return n}})}}return null};const simpleAssignMatch=trimmed.match(/^(\w+)\s*=\s*(.+)$/);if(simpleAssignMatch&&!trimmed.includes("==")&&!trimmed.includes("=>")){const[,varName,valueExpr]=simpleAssignMatch;const signal=scope[varName];if(signal&&signal._isSignal){return()=>{const newValue=toValue(valueExpr,null,true);signal.set(newValue)}}return null};const bareIdMatch=trimmed.match(/^([a-zA-Z_$][\w$]*)$/);if(bareIdMatch){const fn=scope[bareIdMatch[1]];if(typeof fn==="function"&&!fn._isSignal){return($event)=>fn($event)}}return null};function executeHandler(expr,event,el){try{if(/^__[A-Z_]+__$/.test(expr.trim())){return};const elementScope=findElementScope(el||currentElement);const scope={...componentScope,...elementScope||{},...globalHelpers};const shorthandFn=parseEventShorthand(expr,scope);if(shorthandFn){shorthandFn(event);return};const fn=new Function(...Object.keys(scope),"$event",expr);fn(...Object.values(scope),event)}catch(e){console.warn("[STX] Handler error:",expr,e)}};function deferHydration(el,trigger,scope){if(el.__stx_hydration_scheduled)return;el.__stx_hydration_scheduled=true;var run=function(){if(el.__stx_hydrated)return;el.__stx_hydrated=true;el.__stx_hydration_cancel=null;el.removeAttribute("stx-hydrate");var sid=el.getAttribute&&el.getAttribute("data-stx-scope");var finishHydrate=function(){var effectiveScope=scope;if(sid){var reg=window.stx._scopes?window.stx._scopes[sid]:null;if(reg)effectiveScope=Object.assign({},scope||{},reg)}Array.from(el.children).forEach(function(child){processElement(child,effectiveScope)});processAttributesOnly(el,effectiveScope);var sv=sid&&window.stx._scopes?window.stx._scopes[sid]:null;if(sv&&sv.__mountCallbacks&&!sv.__mounted){sv.__mounted=true;sv.__mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}})}window.dispatchEvent(new CustomEvent("stx:hydrated",{detail:{el,trigger}}))};var islandScript=sid?document.querySelector('script[data-stx-island="'+sid+'"]'):null;if(islandScript&&!islandScript.__stx_ran){islandScript.__stx_ran=true;var chunkSrc=islandScript.getAttribute&&islandScript.getAttribute("data-stx-src");if(chunkSrc){var s=document.createElement("script");s.src=chunkSrc;var integ=islandScript.getAttribute("data-stx-integrity");if(integ)s.integrity=integ;s.onload=finishHydrate;s.onerror=function(){console.error("[stx] island chunk load failed:",sid,chunkSrc);window.dispatchEvent(new CustomEvent("stx:island-error",{detail:{el,scopeId:sid,src:chunkSrc}}));finishHydrate()};document.head.appendChild(s);return}try{new Function(islandScript.textContent)()}catch(e){console.error("[stx] island setup error:",sid,e)}}finishHydrate()};if(trigger==="idle"){if(typeof requestIdleCallback==="function"){var idleId=requestIdleCallback(run,{timeout:2000});el.__stx_hydration_cancel=function(){if(typeof cancelIdleCallback==="function")cancelIdleCallback(idleId)}}else{var idleTimer=setTimeout(run,200);el.__stx_hydration_cancel=function(){clearTimeout(idleTimer)}}}else if(trigger==="visible"){if(typeof IntersectionObserver==="function"){var io=new IntersectionObserver(function(entries){entries.forEach(function(e){if(e.isIntersecting){io.disconnect();run()}})},{rootMargin:"50px"});io.observe(el);el.__stx_hydration_cancel=function(){io.disconnect()}}else{run()}}else if(trigger==="interaction"){var events=["mouseenter","click","focusin","touchstart"];var handler=function(){events.forEach(function(ev){el.removeEventListener(ev,handler)});run()};events.forEach(function(ev){el.addEventListener(ev,handler,{once:true,passive:true})});el.__stx_hydration_cancel=function(){events.forEach(function(ev){el.removeEventListener(ev,handler)})}}else if(trigger&&trigger.indexOf("media:")===0){var query=trigger.slice(6);var mql=window.matchMedia(query);if(mql.matches)run();else{var mqHandler=function(e){if(e.matches){mql.removeEventListener("change",mqHandler);run()}};mql.addEventListener("change",mqHandler);el.__stx_hydration_cancel=function(){mql.removeEventListener("change",mqHandler)}}}else{run()}};function processAttributesOnly(el,scope){el.__stx_hydrated=true;processElement(el,scope)};function processElement(el,scope=componentScope){if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute){if(el.hasAttribute("x-class")||el.hasAttribute("@click")){}}if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydrated){var trigger=el.getAttribute("stx-hydrate")||"idle";deferHydration(el,trigger,scope);return}if(el.nodeType===Node.ELEMENT_NODE&&el.tagName==="BUTTON"&&el.hasAttribute&&el.hasAttribute("@click")){}if(el.nodeType===Node.ELEMENT_NODE&&el.hasAttribute){if(el.hasAttribute("x-data")||el.hasAttribute("data-stx-xdata")||el.__stx_scope){var xdScope=el.__stx_scope||(findElementScope(el)||{});if(xdScope&&Object.keys(xdScope).length>0){scope={...scope,...xdScope}}}if(el.hasAttribute("data-stx-memo")){var memoExpr=el.getAttribute("data-stx-memo");try{var memoScope={...scope,...findElementScope(el)||{},...globalHelpers};var memoFn=new Function(...Object.keys(memoScope),"return "+memoExpr);var memoVals=JSON.stringify(memoFn(...Object.values(memoScope)));if(el.__stx_memo_prev===memoVals){return}el.__stx_memo_prev=memoVals}catch(e){}}}if(el.nodeType===Node.TEXT_NODE){const text=el.textContent;if(text&&text.includes("{{")){const parts=text.split(/(\{\{[^}]+\}\})/g);if(parts.length>1){const fragment=document.createDocumentFragment();const parentEl=el.parentNode;const capturedScope={...scope,...findElementScope(parentEl)||{},...globalHelpers};parts.forEach((part)=>{const match=part.match(/^\{\{\s*(.+?)\s*\}\}$/);if(match){const expr=match[1];if(/^__[A-Z_]+__$/.test(expr.trim())){fragment.appendChild(document.createTextNode(part));return};const span=document.createElement("span");fragment.appendChild(span);effect(()=>{try{const pipeResult=parsePipeExpression(expr,capturedScope);if(pipeResult){const unwrapScope=createAutoUnwrapProxy(capturedScope);span.textContent=executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope)}else{const unwrapScope=createAutoUnwrapProxy(capturedScope);const fn=new Function(...Object.keys(capturedScope),"return "+expr);span.textContent=fn(...Object.values(unwrapScope))}}catch(e){try{const fn=new Function(...Object.keys(capturedScope),"return "+expr);span.textContent=fn(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expr,e2);span.textContent=""}}})}else if(part){fragment.appendChild(document.createTextNode(part))}});el.replaceWith(fragment)}}return}if(el.nodeType!==Node.ELEMENT_NODE)return;if(el.hasAttribute("data-stx-suspense")&&!el.__stx_suspense_bound){bindSuspense(el,scope);return}if(el.hasAttribute("@for")||el.hasAttribute(":for")||el.hasAttribute("x-for")){var forAttr=el.hasAttribute(":for")?":for":el.hasAttribute("x-for")?"x-for":"@for";bindFor(el,scope,forAttr);return}if(el.__stx_chain_member&&!el.isConnected)return;if(!el.__stx_chain_member){var orphanElse=getElseAttrInfo(el);if(orphanElse){console.warn("[STX] "+orphanElse.name+" has no matching preceding x-if/:if/@if sibling; rendering as a plain element.");el.removeAttribute(orphanElse.name)}}if(el.hasAttribute("@if")||el.hasAttribute(":if")||el.hasAttribute("x-if")){var ifAttr=el.hasAttribute(":if")?":if":el.hasAttribute("x-if")?"x-if":"@if";var ifChain=findIfChain(el,ifAttr);if(ifChain.length>1)bindIfChain(ifChain,scope);else bindIf(el,scope,ifAttr);return}if(el.hasAttribute("@show")||el.hasAttribute(":show")||el.hasAttribute("x-show")){var showAttr=el.hasAttribute(":show")?":show":el.hasAttribute("x-show")?"x-show":"@show";bindShow(el,el.getAttribute(showAttr),scope,showAttr)}if(el.hasAttribute("@model")||el.hasAttribute(":model")||el.hasAttribute("x-model")){var modelAttr=el.hasAttribute(":model")?":model":el.hasAttribute("x-model")?"x-model":"@model";bindModel(el,el.getAttribute(modelAttr),scope,modelAttr)};const attrCapturedScope={...scope,...findElementScope(el)||{},...globalHelpers};const maybeUnwrapSignal=(v)=>{if(v&&typeof v==="function"&&(v._isSignal||v._isDerived))return v();return v};const evalAttrExpr=(rawExpr)=>{var expr=rawExpr.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&#x27;/g,"'");try{if(/^__[A-Z_]+__$/.test(expr.trim()))return expr;const pipeResult=parsePipeExpression(expr,attrCapturedScope);if(pipeResult){const unwrapScope=createAutoUnwrapProxy(attrCapturedScope);return maybeUnwrapSignal(executePipeExpression(pipeResult.valueExpr,pipeResult.pipes,unwrapScope))};const unwrapScope=createAutoUnwrapProxy(attrCapturedScope);const fn=new Function(...Object.keys(attrCapturedScope),"return "+expr);return maybeUnwrapSignal(fn(...Object.values(unwrapScope)))}catch(e){try{const fn=new Function(...Object.keys(attrCapturedScope),"return "+expr);return maybeUnwrapSignal(fn(...Object.values(attrCapturedScope)))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Attribute expression error:",expr,e2);return""}}};var DIRECTIVE_NAMES={class:1,style:1,text:1,html:1,show:1,model:1,if:1,for:1,ref:1};var EVENT_RE=/^(click|dblclick|mousedown|mouseup|mousemove|mouseenter|mouseleave|keydown|keyup|keypress|input|change|submit|focus|blur|scroll|resize|touchstart|touchend|touchmove|contextmenu|wheel|pointerdown|pointerup|pointermove)/;var KEY_MAP={enter:"Enter",tab:"Tab",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",delete:"Delete",backspace:"Backspace"};if(el.hasAttribute&&(el.hasAttribute("x-class")||el.hasAttribute("@click"))){}Array.from(el.attributes).forEach((attr)=>{const name=attr.name;const value=attr.value;if(el.hasAttribute&&(el.hasAttribute("x-class")||el.hasAttribute("@click"))){};var X_HANDLED={"x-text":1,"x-html":1,"x-model":1,"x-show":1,"x-if":1,"x-for":1,"x-cloak":1,"x-ref":1,"x-data":1,"x-bind":1,"x-class":1,"x-style":1,"x-tooltip":1,"x-tooltip-position":1};if(name.startsWith("@bind:")||name.startsWith("x-bind:")||name.startsWith(":")&&!name.startsWith("::")&&!DIRECTIVE_NAMES[name.slice(1).split(".")[0]]&&!EVENT_RE.test(name.slice(1))||name.startsWith("x-")&&!X_HANDLED[name.split(".")[0]]&&!X_HANDLED[name]){const attrName=name.startsWith("@bind:")?name.slice(6):name.startsWith("x-bind:")?name.slice(7):name.startsWith("x-")?name.slice(2):name.slice(1);effect(()=>{const v=evalAttrExpr(value);if(v===false||v===null||v===undefined){el.removeAttribute(attrName)}else if(v===true){el.setAttribute(attrName,"")}else{el.setAttribute(attrName,v)}});el.removeAttribute(name)}else if(name==="@class"||name===":class"||name==="x-class"){bindClass(el,value,scope);el.removeAttribute(name)}else if(name==="@style"||name===":style"||name==="x-style"){bindStyle(el,value,scope);el.removeAttribute(name)}else if(name==="@text"||name===":text"||name==="x-text"){effect(()=>{el.textContent=evalAttrExpr(value)});el.removeAttribute(name)}else if(name==="@html"||name===":html"||name==="x-html"){effect(()=>{el.innerHTML=evalAttrExpr(value)??""});el.removeAttribute(name)}else if(name==="ref"||name===":ref"||name==="x-ref"||name==="data-stx-ref"){if(scope.$refs)scope.$refs[value]=el;if(componentScope.$refs)componentScope.$refs[value]=el}else if(name.startsWith("@")||name.startsWith(":")){const parts=name.slice(1).split(".");const eventName=parts[0];const modifiers=parts.slice(1);if(["if","for","show","model","class","style","text","html","ref"].includes(eventName)){return};var eventKey="__stx_evt_"+eventName+"_"+value.substring(0,20);if(el[eventKey]){el.removeAttribute(name);return}el[eventKey]=true;const eventCapturedScope={...scope,...findElementScope(el)||{},...globalHelpers};el.addEventListener(eventName,(event)=>{if(eventName==="click"){var ancestor=el;while(ancestor){if(ancestor.__stx_shown_at&&performance.now()-ancestor.__stx_shown_at<50)return;ancestor=ancestor.parentElement}}if(modifiers.includes("self")&&event.target!==el)return;if(modifiers.includes("ctrl")&&!event.ctrlKey)return;if(modifiers.includes("alt")&&!event.altKey)return;if(modifiers.includes("shift")&&!event.shiftKey)return;if(modifiers.includes("meta")&&!event.metaKey)return;for(var mi=0;mi<modifiers.length;mi++){if(KEY_MAP[modifiers[mi]]&&event.key!==KEY_MAP[modifiers[mi]])return}if(modifiers.includes("prevent"))event.preventDefault();if(modifiers.includes("stop"))event.stopPropagation();try{if(!value||/^__[A-Z_]+__$/.test(value.trim()))return;var shorthandFn=parseEventShorthand(value,eventCapturedScope);if(shorthandFn){shorthandFn(event);return};var hasSignals=Object.values(eventCapturedScope).some(function(v){return v&&typeof v==="function"&&v._isSignal});var isDirectAssignment=hasSignals&&/^[a-zA-Z_$]\w*\s*=/.test(value.trim())&&!value.trim().startsWith("==");if(isDirectAssignment){var getVars=Object.keys(eventCapturedScope).map(function(k){return"var "+k+' = __s["'+k+'"] && typeof __s["'+k+'"] === "function" && __s["'+k+'"]._isSignal ? __s["'+k+'"]() : __s["'+k+'"]'}).join(";");var setVars=Object.keys(eventCapturedScope).filter(function(k){var v=eventCapturedScope[k];return v&&typeof v==="function"&&v._isSignal}).map(function(k){return"if("+k+' !== __s["'+k+'"]()) __s["'+k+'"].set('+k+")"}).join(";");var body=getVars+";"+value+";"+setVars;var fn2=new Function("__s","$event",body);fn2(eventCapturedScope,event)}else if(hasSignals){var unwrapVars=Object.keys(eventCapturedScope).map(function(k){var v=eventCapturedScope[k];if(v&&typeof v==="function"&&v._isSignal&&value.includes(k+".set(")){return"var "+k+' = __s["'+k+'"]'}return"var "+k+' = __s["'+k+'"] && typeof __s["'+k+'"] === "function" && __s["'+k+'"]._isSignal ? __s["'+k+'"]() : __s["'+k+'"]'}).join(";");var fn3=new Function("__s","$event",unwrapVars+";"+value);fn3(eventCapturedScope,event)}else{var fn=new Function(...Object.keys(eventCapturedScope),"$event",value);fn(...Object.values(eventCapturedScope),event)}}catch(e){console.warn("[STX] Handler error:",value,e)}},{capture:modifiers.includes("capture"),passive:modifiers.includes("passive"),once:modifiers.includes("once")});el.removeAttribute(name)}});if(el.tagName!=="SCRIPT"&&el.tagName!=="STYLE"){var children=Array.from(el.childNodes);children.forEach(function(child){if(child.nodeType!==Node.ELEMENT_NODE){processElement(child,scope);return}if(child.tagName==="SCRIPT")return;if(child.__stx_scope){return}if(child.hasAttribute&&child.hasAttribute("data-stx-scope"))return;processElement(child,scope)})}};function bindSuspense(el,scope){if(el.__stx_suspense_bound)return;el.__stx_suspense_bound=true;var fallbackEl=el.querySelector("[data-stx-suspense-fallback]");var errorEl=el.querySelector("[data-stx-suspense-error]");var contentEl=el.querySelector("[data-stx-suspense-content]")||el;var claimed=suspenseRegistry().filter(function(entry){return entry.el&&el.contains(entry.el)&&entry.el.closest("[data-stx-suspense]")===el});var anyLoading=derived(function(){for(var i=0;i<claimed.length;i++){if(claimed[i].loading&&claimed[i].loading())return true}return false});var firstError=derived(function(){for(var i=0;i<claimed.length;i++){var err=claimed[i].error?claimed[i].error():null;if(err)return err}return null});function setHidden(node,hidden){if(!node||node===el)return;if(hidden)node.setAttribute("hidden","");else node.removeAttribute("hidden")}effect(function(){var err=firstError();var loading=anyLoading();if(err&&errorEl){setHidden(errorEl,false);setHidden(fallbackEl,true);setHidden(contentEl,true)}else if(loading){setHidden(fallbackEl,false);setHidden(contentEl,true);setHidden(errorEl,true)}else{setHidden(contentEl,false);setHidden(fallbackEl,true);setHidden(errorEl,true)}});var contentRoot=contentEl===el?el:contentEl;Array.from(contentRoot.childNodes).forEach(function(child){processElement(child,scope)})};function bindShow(el,expr,passedScope=componentScope,attrName="@show"){if(el.__stx_show_bound)return;el.__stx_show_bound=true;const currentDisplay=el.style.display;const originalDisplay=currentDisplay&&currentDisplay!=="none"?currentDisplay:"";const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const directSignal=capturedScope[expr];if(directSignal&&directSignal._isSignal){effect(()=>{const value=directSignal();el.style.display=value?originalDisplay:"none"})}else{effect(()=>{var value;try{var unwrapScope=createAutoUnwrapProxy(capturedScope);var fn=new Function(...Object.keys(capturedScope),"return "+expr);value=fn(...Object.values(unwrapScope))}catch(e1){try{var fn2=new Function(...Object.keys(capturedScope),"return "+expr);value=fn2(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Show expression error:",expr,e2);el.style.display="none";return}};var wasHidden=el.style.display==="none";el.style.display=value?originalDisplay:"none";if(value&&wasHidden){el.__stx_shown_at=performance.now()}})}el.removeAttribute(attrName)};function bindModel(el,expr,passedScope=componentScope,attrName="@model"){if(el.__stx_model_bound)return;el.__stx_model_bound=true;const tag=el.tagName.toLowerCase();const type=el.type;const getValue=()=>toValue(expr,el);const setValue=(val)=>{try{const elementScope=findElementScope(el);const scope={...passedScope,...elementScope||{}};if(scope[expr]&&scope[expr]._isSignal){scope[expr].set(val)}else{const fn=new Function(...Object.keys(scope),"v",expr+" = v");fn(...Object.values(scope),val)}}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] "+attrName+" set error:",expr,e)}};if(tag==="input"&&(type==="checkbox"||type==="radio")){effect(()=>{el.checked=getValue()});el.addEventListener("change",()=>setValue(el.checked))}else if(tag==="select"){effect(()=>{el.value=getValue()});el.addEventListener("change",()=>setValue(el.value))}else{effect(()=>{el.value=getValue()??""});el.addEventListener("input",()=>setValue(el.value))}el.removeAttribute(attrName)};function bindClass(el,expr,passedScope=componentScope){const originalClasses=el.className;const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const keys=Object.keys(capturedScope);const safeKeys=keys.filter((k)=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k));let fn;try{fn=new Function(...safeKeys,"return "+expr)}catch(e){console.warn("[STX] bindClass compile error:",expr,e);return}effect(()=>{for(let i=0;i<safeKeys.length;i++){const v=capturedScope[safeKeys[i]];if(v&&typeof v==="function"&&(v._isSignal||v._isDerived)){v()}};let value;try{const unwrapScope=createAutoUnwrapProxy(capturedScope);value=fn.apply(null,safeKeys.map((k)=>unwrapScope[k]))}catch(e1){try{value=fn.apply(null,safeKeys.map((k)=>capturedScope[k]))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Class expression error:",expr,e2);value=""}}if(typeof value==="object"&&value!==null&&!Array.isArray(value)){Object.keys(value).forEach((cls)=>{const tokens=cls.split(/\s+/).filter(Boolean);if(value[cls])tokens.forEach((t)=>el.classList.add(t));else tokens.forEach((t)=>el.classList.remove(t))})}else if(Array.isArray(value)){el.className=originalClasses+" "+value.filter(Boolean).join(" ")}else{el.className=originalClasses+(value?" "+value:"")}})};function bindStyle(el,expr,passedScope=componentScope){const capturedScope={...passedScope,...findElementScope(el)||{},...globalHelpers};const evalExpr=()=>{try{const unwrapScope=createAutoUnwrapProxy(capturedScope);const fn=new Function(...Object.keys(capturedScope),"return "+expr);return fn(...Object.values(unwrapScope))}catch(e1){try{const fn2=new Function(...Object.keys(capturedScope),"return "+expr);return fn2(...Object.values(capturedScope))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Style expression error:",expr,e2);return{}}}};effect(()=>{const value=evalExpr();if(typeof value==="object"&&value!==null){Object.assign(el.style,value)}else if(typeof value==="string"){el.style.cssText=value}})};function tgDurationMs(el){try{var cs=typeof getComputedStyle==="function"?getComputedStyle(el):null;if(cs){var raw=(cs.transitionDuration||"").split(",")[0].trim();var ms=raw.indexOf("ms")>=0?parseFloat(raw):parseFloat(raw)*1000;if(ms>0)return ms}}catch(e){}return 300};function tgOnEnd(el,cb){var done=false;function finish(){if(done)return;done=true;try{el.removeEventListener("transitionend",finish)}catch(e){}cb()}try{el.addEventListener("transitionend",finish)}catch(e){}setTimeout(finish,tgDurationMs(el)+60)};function tgRaf2(fn){var raf=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(f){return setTimeout(f,16)};raf(function(){raf(fn)})};function tgEnter(el,name){if(!el||el.nodeType!==1||!el.classList)return;el.classList.add(name+"-enter-from",name+"-enter-active");tgRaf2(function(){el.classList.remove(name+"-enter-from");el.classList.add(name+"-enter-to");tgOnEnd(el,function(){el.classList.remove(name+"-enter-active",name+"-enter-to")})})};function tgLeave(el,name){if(!el||el.nodeType!==1||!el.classList)return false;el.classList.add(name+"-leave-from",name+"-leave-active");tgRaf2(function(){el.classList.remove(name+"-leave-from");el.classList.add(name+"-leave-to");tgOnEnd(el,function(){if(el.parentNode)el.parentNode.removeChild(el)})});return true};function tgSnapshot(els){var m=new Map;for(var i=0;i<els.length;i++){var el=els[i];if(el&&el.nodeType===1&&el.getBoundingClientRect){try{m.set(el,el.getBoundingClientRect())}catch(e){}}}return m};function tgFlip(els,first,name){var moved=[];for(var i=0;i<els.length;i++){var el=els[i];if(!el||el.nodeType!==1||!first.has(el)||!el.getBoundingClientRect)continue;var last,f=first.get(el);try{last=el.getBoundingClientRect()}catch(e){continue};var dx=f.left-last.left,dy=f.top-last.top;if(dx||dy){el.style.transform="translate("+dx+"px,"+dy+"px)";el.style.transitionDuration="0s";moved.push(el)}}if(!moved.length)return;if(els[0]&&typeof els[0].offsetHeight==="number")els[0].offsetHeight;var raf=typeof requestAnimationFrame==="function"?requestAnimationFrame:function(f){return setTimeout(f,16)};raf(function(){moved.forEach(function(el){el.classList.add(name+"-move");el.style.transform="";el.style.transitionDuration="";tgOnEnd(el,function(){el.classList.remove(name+"-move");el.style.transform="";el.style.transitionDuration=""})})})};function bindFor(el,passedScope=componentScope,attrName="@for"){if(el.__stx_for_bound)return;el.__stx_for_bound=true;const expr=el.getAttribute(attrName);const match=expr.match(/^\s*\(?\s*(\w+)(?:\s*,\s*(\w+))?\s*\)?\s+(?:in|of)\s+(.+)\s*$/);if(!match){console.warn("[STX] Invalid "+attrName+":",expr);return}const[,itemName,indexName,listExpr]=match;const parent=el.parentNode;if(!parent){console.warn("[STX] bindFor: element has no parent, skipping");return};const placeholder=document.createComment("stx-for");const isTemplate=el.tagName==="TEMPLATE";const ifExpr=el.getAttribute("@if")||el.getAttribute(":if");const loadingExpr=el.getAttribute("@loading");const emptyExpr=el.getAttribute("@empty");let loadingTemplate=null;let emptyTemplate=null;let sibling=el.nextElementSibling;while(sibling){if(sibling.hasAttribute("@for-loading")){loadingTemplate=sibling.cloneNode(true);loadingTemplate.removeAttribute("@for-loading");sibling.remove();sibling=el.nextElementSibling;continue}if(sibling.hasAttribute("@for-empty")){emptyTemplate=sibling.cloneNode(true);emptyTemplate.removeAttribute("@for-empty");sibling.remove();sibling=el.nextElementSibling;continue}break};const capturedScope=findElementScope(el)||findElementScope(parent);parent.insertBefore(placeholder,el);parent.removeChild(el);const keyExpr=el.getAttribute(":key")||el.getAttribute("x-bind:key");let templateContent;if(isTemplate){templateContent=el.content}else{const wrapper=el.cloneNode(true);wrapper.removeAttribute("@for");wrapper.removeAttribute(":for");wrapper.removeAttribute("x-for");wrapper.removeAttribute("@loading");wrapper.removeAttribute("@empty");wrapper.removeAttribute(":key");wrapper.removeAttribute("x-bind:key");if(ifExpr){wrapper.removeAttribute("@if");wrapper.removeAttribute(":if");wrapper.removeAttribute("x-if")}templateContent=wrapper};let currentElements=[];let currentKeys=[];let loadingElement=null;let emptyElement=null;const evalExpr=(expression,extraScope={})=>{try{if(/^__[A-Z_]+__$/.test(expression.trim())){return expression};const scope={...passedScope,...capturedScope||{},...globalHelpers,...extraScope};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function(...Object.keys(scope),"return "+expression);return fn(...Object.values(unwrapScope))}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expression,e);return""}};const evalLazy=(expression,extraScope={})=>{try{if(/^__[A-Z_]+__$/.test(expression.trim()))return expression;const scope={...passedScope,...capturedScope||{},...globalHelpers,...extraScope};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn(unwrapScope)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Expression error:",expression,e);return""}};const showLoading=()=>{hideLoading();hideEmpty();if(loadingTemplate){loadingElement=loadingTemplate.cloneNode(true);parent.insertBefore(loadingElement,placeholder)}};const hideLoading=()=>{if(loadingElement){loadingElement.remove();loadingElement=null}};const showEmpty=()=>{hideLoading();hideEmpty();if(emptyTemplate){emptyElement=emptyTemplate.cloneNode(true);parent.insertBefore(emptyElement,placeholder);processElement(emptyElement)}};const hideEmpty=()=>{if(emptyElement){emptyElement.remove();emptyElement=null}};const itemSignalMap=new Map;const createItemElements=(item,index,key)=>{const itemSignal=state(item);const indexSignal=state(index);if(key)itemSignalMap.set(key,{item:itemSignal,index:indexSignal});const itemScope={...passedScope,...capturedScope||{},...globalHelpers};itemScope[itemName]=itemSignal;if(indexName)itemScope[indexName]=indexSignal;const elements=[];if(isTemplate){Array.from(templateContent.childNodes).forEach((node)=>{const clone=node.cloneNode(true);if(clone.nodeType===1){processElement(clone,itemScope);clone.removeAttribute("x-cloak");clone.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"))}elements.push(clone)})}else{const clone=templateContent.cloneNode(true);processElement(clone,itemScope);clone.removeAttribute("x-cloak");clone.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"));elements.push(clone)}return elements};const getItemKey=(item,index)=>{if(!keyExpr)return String(index);try{const scope={[itemName]:item};if(indexName)scope[indexName]=index;const fn=new Function(itemName,indexName||"_idx","return "+keyExpr);return String(fn(item,index))}catch(e){return String(index)}};effect(()=>{if(loadingExpr){const isLoading=evalLazy(loadingExpr);if(isLoading){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];showLoading();return}}hideLoading();let list=evalLazy(listExpr);var trailingParens=/\(\s*\)\s*$/;if(!Array.isArray(list)&&trailingParens.test(listExpr)){list=evalLazy(listExpr.replace(trailingParens,""))}if(!Array.isArray(list)&&typeof list==="function"&&(list._isSignal||list._isDerived)){try{list=list()}catch{}}if(ifExpr){const ifValue=evalLazy(ifExpr);if(!ifValue){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];hideEmpty();return}}if(!Array.isArray(list)){var diagScope;try{var diagMerged={...passedScope,...capturedScope||{},...globalHelpers};var firstIdent=listExpr.match(/^[A-Za-z_$][\w$]*/);var rootName=firstIdent?firstIdent[0]:"?";var rootInScope=Object.prototype.hasOwnProperty.call(diagMerged,rootName);var rootVal=rootInScope?diagMerged[rootName]:"<NOT-IN-SCOPE>";var rootKeys=rootVal&&typeof rootVal==="object"?Object.keys(rootVal).slice(0,8).join(","):"-";diagScope="[root="+rootName+" inScope="+rootInScope+" type="+typeof rootVal+" isStxStore="+!!(rootVal&&rootVal._isStxStore)+" keys="+rootKeys+"]"}catch(_e){diagScope="[diag-error]"}console.warn("[STX] :for expected an array; got "+(list===""?"empty/error":typeof list)+' for expression "'+listExpr+'". '+diagScope+" If this is a signal call, try the bare reference (signal instead of signal()).");return}if(list.length===0){currentElements.forEach((e)=>{disposeSubtreeScopes(e);e.remove()});currentElements=[];currentKeys=[];if(emptyExpr){const emptyContent=evalLazy(emptyExpr);if(emptyContent&&typeof emptyContent==="string"){const textNode=document.createTextNode(emptyContent);parent.insertBefore(textNode,placeholder);currentElements.push(textNode)}}else if(emptyTemplate){showEmpty()}return}hideEmpty();var tgIsGroup=!!(parent&&parent.hasAttribute&&parent.hasAttribute("data-stx-transition-group"));var tgName=tgIsGroup?parent.getAttribute("data-stx-transition-group")||"v":null;var tgReady=tgIsGroup&&!!parent.__stx_tg_init;var tgFirst=tgReady?tgSnapshot(currentElements):null;const newKeys=list.map((item,i)=>getItemKey(item,i));const oldKeyMap=new Map;for(let i=0;i<currentKeys.length;i++){const k=currentKeys[i];if(!oldKeyMap.has(k))oldKeyMap.set(k,[]);oldKeyMap.get(k).push(currentElements[i])};const newElements=[];const usedKeys=new Set;for(let i=0;i<list.length;i++){const key=newKeys[i];const existing=oldKeyMap.get(key);if(existing&&existing.length>0&&!usedKeys.has(key)){const el=existing.shift();parent.insertBefore(el,placeholder);newElements.push(el);usedKeys.add(key);const signals=itemSignalMap.get(key);if(signals){signals.item.set(list[i]);signals.index.set(i)}}else{const elements=createItemElements(list[i],i,key);elements.forEach((el)=>{parent.insertBefore(el,placeholder);if(tgReady)tgEnter(el,tgName)});newElements.push(...elements)}}for(const[key,elements]of oldKeyMap){if(!usedKeys.has(key)){elements.forEach((el)=>{disposeSubtreeScopes(el);if(!(tgReady&&tgLeave(el,tgName)))el.remove()});itemSignalMap.delete(key)}}currentElements=newElements;currentKeys=newKeys;if(tgReady&&tgFirst)tgFlip(newElements,tgFirst,tgName);if(tgIsGroup)parent.__stx_tg_init=true})};var __bindIfCounter=0;function getElseAttrInfo(el){if(!el||!el.hasAttribute)return null;if(el.hasAttribute(":else-if"))return{name:":else-if",terminal:false};if(el.hasAttribute("x-else-if"))return{name:"x-else-if",terminal:false};if(el.hasAttribute("@else-if"))return{name:"@else-if",terminal:false};if(el.hasAttribute(":else"))return{name:":else",terminal:true};if(el.hasAttribute("x-else"))return{name:"x-else",terminal:true};if(el.hasAttribute("@else"))return{name:"@else",terminal:true};return null};function findIfChain(el,ifAttr){var chain=[{el,attr:ifAttr,expr:el.getAttribute(ifAttr),terminal:false}];var sib=el.nextElementSibling;while(sib){var info=getElseAttrInfo(sib);if(!info)break;chain.push({el:sib,attr:info.name,expr:info.terminal?null:sib.getAttribute(info.name),terminal:info.terminal});if(info.terminal)break;sib=sib.nextElementSibling}return chain};function bindIfChain(chain,passedScope=componentScope){var head=chain[0].el;if(head.__stx_if_bound){return};var parent=head.parentNode;if(!parent){console.warn("[STX] bindIfChain: head element has no parent, skipping");return};var capturedComponentScope={...passedScope};chain.forEach(function(b){b.el.__stx_if_bound=true;b.el.__stx_chain_member=true;b.capturedElementScope=findElementScope(b.el);b.placeholder=document.createComment("stx-if-chain");parent.insertBefore(b.placeholder,b.el);b.el.removeAttribute(b.attr);b.el.remove();b.childrenProcessed=false});function evalBranch(b){var expression=b.expr;if(/^__[A-Z_]+__$/.test(expression.trim()))return expression;var scope={...capturedComponentScope,...b.capturedElementScope||{},...globalHelpers};try{var unwrapScope=createAutoUnwrapProxy(scope);var fn=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn(unwrapScope)}catch(e1){try{var fn2=new Function("__scope__","with(__scope__) { return "+expression+" }");return fn2(scope)}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expression,e2);return""}}};var currentIdx=-1;effect(function(){var pickedIdx=-1;for(var i=0;i<chain.length;i++){var b=chain[i];var matched=b.terminal?true:!!evalBranch(b);if(matched&&pickedIdx===-1)pickedIdx=i}if(__stxDevtoolsTracking){var __ifScope=null;try{__ifScope=head&&head.closest?head.closest("[data-stx-scope]"):null}catch(e){__ifScope=null}__stxDevtoolsRecordIf({scopeId:__ifScope?__ifScope.getAttribute("data-stx-scope"):null,branches:chain.map(function(c){return c.attr}),picked:pickedIdx,pickedAttr:pickedIdx>=0?chain[pickedIdx].attr:null,prev:currentIdx})}if(pickedIdx===currentIdx)return;if(currentIdx!==-1){chain[currentIdx].el.remove()}if(pickedIdx!==-1){var pick=chain[pickedIdx];pick.placeholder.parentNode.insertBefore(pick.el,pick.placeholder.nextSibling);pick.el.__stx_shown_at=performance.now();if(!pick.childrenProcessed){pick.childrenProcessed=true;(function(branch){setTimeout(function(){var childScope={...capturedComponentScope,...branch.capturedElementScope||{},...globalHelpers};processElement(branch.el,childScope);branch.el.removeAttribute("x-cloak");branch.el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})},0)})(pick)}}currentIdx=pickedIdx})};function bindIf(el,passedScope=componentScope,attrName="@if"){if(el.__stx_if_bound){return}el.__stx_if_bound=true;const expr=el.getAttribute(attrName);const parent=el.parentNode;if(!parent){console.warn("[STX] bindIf: element has no parent, skipping");return};const placeholder=document.createComment("stx-if");let isInserted=true;let currentNodes=[];const isTemplate=el.tagName==="TEMPLATE";const capturedElementScope=findElementScope(el);const capturedComponentScope={...passedScope};parent.insertBefore(placeholder,el);el.removeAttribute(attrName);if(isTemplate){const content=el.content;currentNodes=Array.from(content.childNodes).map((n)=>n.cloneNode(true));currentNodes.forEach((node)=>parent.insertBefore(node,placeholder.nextSibling));el.remove()};const evalExpr=(expression)=>{if(/^__[A-Z_]+__$/.test(expression.trim())){return expression}try{const scope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const unwrapScope=createAutoUnwrapProxy(scope);const fn=new Function(...Object.keys(scope),"return "+expression);return fn(...Object.values(unwrapScope))}catch(e1){try{const scope2={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const fn2=new Function(...Object.keys(scope2),"return "+expression);return fn2(...Object.values(scope2))}catch(e2){if(!(e2 instanceof ReferenceError)&&!(e2 instanceof TypeError))console.warn("[STX] Expression error:",expression,e2);return""}}};let childrenProcessed=false;const processChildrenWithScope=()=>{const childScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};Array.from(el.childNodes).forEach((child)=>processElement(child,childScope));childrenProcessed=true};const fullScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};const directSignal=fullScope[expr];if(directSignal){}effect(()=>{var value;if(directSignal&&(directSignal._isSignal||directSignal._isDerived)){value=directSignal()}else{for(var sk in fullScope){var sv=fullScope[sk];if(sv&&typeof sv==="function"&&(sv._isSignal||sv._isDerived))sv()}value=evalExpr(expr)}if(isTemplate){if(value&&!isInserted){currentNodes=Array.from(el.content.childNodes).map((n)=>n.cloneNode(true));currentNodes.forEach((node)=>parent.insertBefore(node,placeholder.nextSibling));const childScope={...componentScope,...capturedElementScope||{}};currentNodes.forEach((node)=>{if(node.nodeType===1){processElement(node,childScope);node.removeAttribute("x-cloak");node.querySelectorAll("[x-cloak]").forEach((c)=>c.removeAttribute("x-cloak"))}});currentNodes.forEach(function(n){if(n.nodeType===1)n.__stx_shown_at=performance.now()});isInserted=true}else if(!value&&isInserted){currentNodes.forEach((node)=>node.remove());currentNodes=[];isInserted=false}}else{if(value&&!isInserted){parent.insertBefore(el,placeholder.nextSibling);el.__stx_shown_at=performance.now();isInserted=true}else if(!value&&isInserted){el.remove();isInserted=false}if(value&&isInserted&&!childrenProcessed){childrenProcessed=true;setTimeout(function(){var childScope={...capturedComponentScope,...capturedElementScope||{},...globalHelpers};processElement(el,childScope);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})},0)}}})};function $computed(fn){return derived(fn)};function $watch(deps,fn){effect(()=>{const values=Array.isArray(deps)?deps.map((d)=>{if(typeof d==="function"&&(d._isSignal||d._isDerived))return d();return d}):typeof deps==="function"&&(deps._isSignal||deps._isDerived)?[deps()]:[deps];fn(...values)})};function provide(name,value){window[name]=value};function useDebounce(fn,delay){delay=delay||250;var timer=null;var lastArgs=null;var debounced=function(){lastArgs=Array.prototype.slice.call(arguments);if(timer!==null)clearTimeout(timer);var args=lastArgs;timer=setTimeout(function(){timer=null;lastArgs=null;fn.apply(null,args)},delay)};debounced.cancel=function(){if(timer!==null){clearTimeout(timer);timer=null;lastArgs=null}};debounced.flush=function(){if(timer!==null&&lastArgs!==null){clearTimeout(timer);timer=null;var args=lastArgs;lastArgs=null;fn.apply(null,args)}};debounced.pending=function(){return timer!==null};onDestroy(debounced.cancel);return debounced};function useDebouncedValue(getter,delay){delay=delay||250;var current=getter();var listeners=[];var timer=null;function schedule(){if(timer!==null)clearTimeout(timer);timer=setTimeout(function(){timer=null;var next=getter();if(next!==current){current=next;listeners.forEach(function(fn){fn(current)})}},delay)}schedule();onDestroy(function(){if(timer!==null)clearTimeout(timer);listeners=[]});return{get value(){return current},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useThrottle(fn,limit){limit=limit||250;var timer=null;var lastRan=0;var throttled=function(){var args=Array.prototype.slice.call(arguments);var now=Date.now();var remaining=limit-(now-lastRan);if(remaining<=0){if(timer!==null){clearTimeout(timer);timer=null}lastRan=now;fn.apply(null,args)}else if(timer===null){timer=setTimeout(function(){lastRan=Date.now();timer=null;fn.apply(null,args)},remaining)}};throttled.cancel=function(){if(timer!==null){clearTimeout(timer);timer=null}};onDestroy(throttled.cancel);return throttled};function useInterval(interval,options){interval=interval||1000;options=options||{};var count=0;var id=null;var running=false;var listeners=[];function tick(){count++;listeners.forEach(function(fn){fn(count)})};function resume(){if(running)return;running=true;id=setInterval(tick,interval);if(options.immediate)tick()};function pause(){if(!running)return;running=false;if(id!==null){clearInterval(id);id=null}};function reset(){pause();count=0;listeners.forEach(function(fn){fn(count)});resume()}resume();onDestroy(function(){pause();listeners=[]});return{get counter(){return count},pause,resume,reset,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useTimeout(callback,delay){delay=delay||1000;var timer=null;var pending=false;var listeners=[];function setPending(v){if(v!==pending){pending=v;listeners.forEach(function(fn){fn(pending)})}};function start(){stop();setPending(true);timer=setTimeout(function(){timer=null;setPending(false);callback()},delay)};function stop(){if(timer!==null){clearTimeout(timer);timer=null}setPending(false)}start();onDestroy(stop);return{get isPending(){return pending},start,stop,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useToggle(initial){var current=!!initial;var listeners=[];function notify(){listeners.forEach(function(fn){fn(current)})};function toggle(){current=!current;notify()};function set(v){v=!!v;if(v!==current){current=v;notify()}};var ref={get value(){return current},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}};return[ref,toggle,set]};function useCounter(initial,options){initial=initial||0;options=options||{};var min=options.min!=null?options.min:-1/0;var max=options.max!=null?options.max:1/0;function clamp(v){return Math.min(max,Math.max(min,v))};var current=clamp(initial);var listeners=[];function notify(){listeners.forEach(function(fn){fn(current)})}return{get count(){return current},inc:function(step){current=clamp(current+(step||1));notify()},dec:function(step){current=clamp(current-(step||1));notify()},set:function(v){current=clamp(v);notify()},reset:function(){current=clamp(initial);notify()},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useClickOutside(target,handler){function listener(event){var el=typeof target==="string"?document.querySelector(target):target;if(!el)return;if(el===event.target||el.contains(event.target))return;handler(event)}document.addEventListener("pointerdown",listener,true);function remove(){document.removeEventListener("pointerdown",listener,true)}onDestroy(remove);return{remove}};function useFocus(target){var focused=false;var listeners=[];function resolve(){return typeof target==="string"?document.querySelector(target):target};function setFocused(v){if(v!==focused){focused=v;listeners.forEach(function(fn){fn(focused)})}};var onFocusIn=function(){setFocused(true)};var onBlurOut=function(){setFocused(false)};var el=resolve();if(el){el.addEventListener("focus",onFocusIn);el.addEventListener("blur",onBlurOut);focused=document.activeElement===el}onDestroy(function(){var el=resolve();if(el){el.removeEventListener("focus",onFocusIn);el.removeEventListener("blur",onBlurOut)}listeners=[]});return{get isFocused(){return focused},focus:function(){var el=resolve();if(el&&el.focus)el.focus()},blur:function(){var el=resolve();if(el&&el.blur)el.blur()},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useAsync(fn,options){options=options||{};var asyncState="idle";var data=null;var error=null;var listeners=[];function notify(){var snap={state:asyncState,data,error};listeners.forEach(function(fn){fn(snap)})};function execute(){var args=Array.prototype.slice.call(arguments);asyncState="loading";error=null;notify();return fn.apply(null,args).then(function(result){data=result;asyncState="success";notify();return data}).catch(function(e){error=e instanceof Error?e:new Error(String(e));asyncState="error";notify();return null})}if(options.immediate)execute();return{get state(){return asyncState},get isLoading(){return asyncState==="loading"},get error(){return error},get data(){return data},execute,subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useColorMode(options){options=options||{};var storageKey=options.storageKey||"stx-color-mode";var initialMode=options.initialMode||"auto";var darkClass=options.darkClass||"dark";var attribute=options.attribute||null;var disableTransitions=options.disableTransitions!==false;var preference=initialMode;var resolved="light";var listeners=[];var cleanups=[];function getSystem(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};function resolve(pref){return pref==="auto"?getSystem():pref};function applyDOM(mode){var el=document.documentElement;if(disableTransitions)el.style.setProperty("transition","none","important");if(attribute){el.setAttribute(attribute,mode)}else{if(mode==="dark")el.classList.add(darkClass);else el.classList.remove(darkClass)}if(disableTransitions){el.offsetHeight;el.style.removeProperty("transition")}};function persist(pref){try{localStorage.setItem(storageKey,pref)}catch(e){}};function readPersisted(){try{var v=localStorage.getItem(storageKey);if(v==="light"||v==="dark"||v==="auto")return v}catch(e){}return null};function update(pref){preference=pref;resolved=resolve(pref);applyDOM(resolved);persist(pref);listeners.forEach(function(fn){fn(resolved,preference)})};var persisted=readPersisted();update(persisted||initialMode);var mql=window.matchMedia("(prefers-color-scheme: dark)");var onSystemChange=function(){if(preference==="auto"){resolved=getSystem();applyDOM(resolved);listeners.forEach(function(fn){fn(resolved,preference)})}};mql.addEventListener("change",onSystemChange);cleanups.push(function(){mql.removeEventListener("change",onSystemChange)});var onStorage=function(e){if(e.key!==storageKey)return;var v=e.newValue;if(v==="light"||v==="dark"||v==="auto"){preference=v;resolved=resolve(v);applyDOM(resolved);listeners.forEach(function(fn){fn(resolved,preference)})}};window.addEventListener("storage",onStorage);cleanups.push(function(){window.removeEventListener("storage",onStorage)});onDestroy(function(){cleanups.forEach(function(fn){fn()});listeners=[]});return{get mode(){return resolved},get preference(){return preference},get isDark(){return resolved==="dark"},set:function(mode){update(mode)},toggle:function(){update(resolved==="dark"?"light":"dark")},subscribe:function(fn){listeners.push(fn);return function(){listeners=listeners.filter(function(f){return f!==fn})}}}};function useDark(options){var cm=useColorMode(options);return{get isDark(){return cm.isDark},toggle:function(){cm.toggle()},set:function(dark){cm.set(dark?"dark":"light")},subscribe:function(fn){return cm.subscribe(function(mode){fn(mode==="dark")})}}};var ref=state;var reactive=state;var computed=derived;var watch=$watch;var watchEffect=function(fn){return effect(fn)};function useLocalStorage(key,defaultValue){var stored=localStorage.getItem(key);var initial=stored!==null?JSON.parse(stored):defaultValue;var s=state(initial);effect(function(){localStorage.setItem(key,JSON.stringify(s()))});var handler=function(e){if(e.key===key)s.set(e.newValue!==null?JSON.parse(e.newValue):defaultValue)};window.addEventListener("storage",handler);onDestroy(function(){window.removeEventListener("storage",handler)});return s};function useSessionStorage(key,defaultValue){var stored=sessionStorage.getItem(key);var initial=stored!==null?JSON.parse(stored):defaultValue;var s=state(initial);effect(function(){sessionStorage.setItem(key,JSON.stringify(s()))});var handler=function(e){if(e.key===key&&e.storageArea===sessionStorage)s.set(e.newValue!==null?JSON.parse(e.newValue):defaultValue)};window.addEventListener("storage",handler);onDestroy(function(){window.removeEventListener("storage",handler)});return s};function useCookie(name,opts){opts=opts||{};var encode=opts.encode||encodeURIComponent;var decode=opts.decode||decodeURIComponent;var escapedName=name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var nameRe=new RegExp("(?:^|; )"+escapedName+"=([^;]*)");function read(){if(typeof document==="undefined")return opts.defaultValue||"";var m=document.cookie.match(nameRe);return m?decode(m[1]):opts.defaultValue||""};var s=state(read());function serialise(value){var parts=[name+"="+(value?encode(value):"")];parts.push("path="+(opts.path||"/"));if(opts.domain)parts.push("domain="+opts.domain);if(value==="")parts.push("max-age=0");else if(typeof opts.maxAge==="number")parts.push("max-age="+opts.maxAge);else if(opts.expires)parts.push("expires="+opts.expires.toUTCString());parts.push("SameSite="+(opts.sameSite||"Lax"));var secure=opts.secure;if(secure===undefined)secure=typeof location!=="undefined"&&location.protocol==="https:";if(secure)parts.push("Secure");return parts.join("; ")}effect(function(){if(typeof document==="undefined")return;document.cookie=serialise(s())});return s};function useReactiveProp(name,defaultValue,opts){opts=opts||{};var parse=opts.parse||function(v){if(v===""||v==="true")return true;if(v==="false")return false;if(v!=null&&v!==""&&!isNaN(Number(v)))return Number(v);return v};var root=window.__STX_CURRENT_ELEMENT__;var initial;if(root&&root.hasAttribute&&root.hasAttribute(name)){initial=parse(root.getAttribute(name))}else{initial=defaultValue};var s=state(initial);if(!root)return s;var observer=new MutationObserver(function(){var hasAttr=root.hasAttribute(name);var next=hasAttr?parse(root.getAttribute(name)):defaultValue;if(next!==s())s.set(next)});observer.observe(root,{attributes:true,attributeFilter:[name]});onDestroy(function(){observer.disconnect()});return s};function useEventListener(event,handler,options){var target=options&&options.target||window;if(typeof target==="string")target=document.querySelector(target);if(!target)return;var opts={capture:options&&options.capture,passive:options&&options.passive,once:options&&options.once};target.addEventListener(event,handler,opts);onDestroy(function(){target.removeEventListener(event,handler,opts)})};function useHead(config){function apply(){if(config.title)document.title=config.title;var metas=config.meta||[];for(var i=0;i<metas.length;i++){var m=metas[i];if(!m.name&&!m.property)continue;var selector=m.name?'meta[name="'+m.name+'"]':'meta[property="'+m.property+'"]';var el=document.querySelector(selector);if(el){el.setAttribute("content",m.content||"")}else{el=document.createElement("meta");if(m.name)el.setAttribute("name",m.name);if(m.property)el.setAttribute("property",m.property);el.setAttribute("content",m.content||"");document.head.appendChild(el)}};var links=config.link||config.links||[];for(var j=0;j<links.length;j++){var l=links[j];if(!l.rel||!l.href)continue;var linkSel='link[rel="'+l.rel+'"][href="'+l.href+'"]';if(!document.querySelector(linkSel)){var le=document.createElement("link");for(var k in l){if(l.hasOwnProperty(k))le.setAttribute(k,l[k])}document.head.appendChild(le)}};var scripts=config.script||config.scripts||[];for(var si=0;si<scripts.length;si++){var s=scripts[si];var se=document.createElement("script");if(s.src)se.src=s.src;if(s.innerHTML)se.innerHTML=s.innerHTML;if(s.async)se.async=true;if(s.defer)se.defer=true;document.head.appendChild(se)}if(config.bodyAttrs&&config.bodyAttrs.class){config.bodyAttrs.class.split(" ").forEach(function(cls){if(cls)document.body.classList.add(cls)})}if(config.htmlAttrs&&config.htmlAttrs.lang){document.documentElement.setAttribute("lang",config.htmlAttrs.lang)}}if(document.readyState!=="loading"){apply()}else{onMount(apply)}};function useSeoMeta(config){var meta=[];if(config.title)meta.push({name:"title",content:config.title});if(config.description)meta.push({name:"description",content:config.description});if(config.ogTitle)meta.push({property:"og:title",content:config.ogTitle});if(config.ogDescription)meta.push({property:"og:description",content:config.ogDescription});if(config.ogImage)meta.push({property:"og:image",content:config.ogImage});if(config.ogType)meta.push({property:"og:type",content:config.ogType});if(config.ogUrl)meta.push({property:"og:url",content:config.ogUrl});if(config.twitterCard)meta.push({name:"twitter:card",content:config.twitterCard});if(config.twitterTitle)meta.push({name:"twitter:title",content:config.twitterTitle});if(config.twitterDescription)meta.push({name:"twitter:description",content:config.twitterDescription});if(config.twitterImage)meta.push({name:"twitter:image",content:config.twitterImage});if(config.robots)meta.push({name:"robots",content:config.robots});if(config.canonical)meta.push({property:"og:url",content:config.canonical});useHead({title:config.title||config.ogTitle,meta})};var _toastId=0;var _toastIcons={success:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#16a34a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9 12l2 2 4-4"/></svg>',error:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#dc2626" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',info:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#2563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',warning:'<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#d97706" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>'};var _toastColors={success:"#16a34a",error:"#dc2626",info:"#2563eb",warning:"#d97706"};function _getToastContainer(){return document.getElementById("stx-toast-container")};function _getToastAnimClass(container){if(!container)return{inAnim:"stx-toast-in",outAnim:"stx-toast-out"};var pos=container.getAttribute("data-stx-toast-position")||"top-right";if(pos.indexOf("left")!==-1)return{inAnim:"stx-toast-in-left",outAnim:"stx-toast-out-left"};if(pos.indexOf("center")!==-1)return{inAnim:"stx-toast-in-center",outAnim:"stx-toast-out-center"};return{inAnim:"stx-toast-in",outAnim:"stx-toast-out"}};function removeToast(id){var el=document.getElementById("stx-toast-"+id);if(!el)return;var container=_getToastContainer();var anims=_getToastAnimClass(container);el.style.animation=anims.outAnim+" 0.3s ease forwards";setTimeout(function(){if(el.parentNode)el.parentNode.removeChild(el)},300)};function addToast(type,message,options){var container=_getToastContainer();if(!container){console.warn("[stx:toast] No <StxToast /> container found. Add <StxToast /> to your layout.");return-1};var opts=options||{};var duration=opts.duration!==undefined?opts.duration:3000;var id=++_toastId;var maxToasts=parseInt(container.getAttribute("data-stx-toast-max")||"5",10);var existing=container.querySelectorAll("[data-stx-toast]");while(existing.length>=maxToasts&&existing.length>0){var oldId=existing[0].getAttribute("data-stx-toast");removeToast(oldId);existing=container.querySelectorAll("[data-stx-toast]")};var anims=_getToastAnimClass(container);var borderColor=_toastColors[type]||_toastColors.info;var icon=_toastIcons[type]||_toastIcons.info;var isDark=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;var bg=isDark?"#1f2937":"#ffffff";var textColor=isDark?"#f3f4f6":"#1f2937";var shadow=isDark?"0 4px 12px rgba(0,0,0,0.4)":"0 4px 12px rgba(0,0,0,0.15)";var el=document.createElement("div");el.id="stx-toast-"+id;el.setAttribute("data-stx-toast",String(id));el.setAttribute("role","alert");el.setAttribute("aria-live","assertive");el.style.cssText="pointer-events:auto;display:flex;align-items:flex-start;gap:0.75rem;padding:0.875rem 1rem;border-radius:0.5rem;border-left:4px solid "+borderColor+";background:"+bg+";color:"+textColor+";box-shadow:"+shadow+";animation:"+anims.inAnim+" 0.3s ease;font-family:system-ui,-apple-system,sans-serif;font-size:0.875rem;line-height:1.4;max-width:100%";var iconSpan=document.createElement("span");iconSpan.style.cssText="flex-shrink:0;display:flex;align-items:center;margin-top:1px";iconSpan.innerHTML=icon;var msgSpan=document.createElement("span");msgSpan.style.cssText="flex:1;word-wrap:break-word";msgSpan.textContent=message;var closeBtn=document.createElement("button");closeBtn.type="button";closeBtn.setAttribute("aria-label","Dismiss notification");closeBtn.style.cssText="flex-shrink:0;background:none;border:none;cursor:pointer;padding:0;color:"+(isDark?"#9ca3af":"#6b7280")+";font-size:1.125rem;line-height:1;display:flex;align-items:center";closeBtn.innerHTML='<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M4.646 4.646a.5.5 0 01.708 0L8 7.293l2.646-2.647a.5.5 0 01.708.708L8.707 8l2.647 2.646a.5.5 0 01-.708.708L8 8.707l-2.646 2.647a.5.5 0 01-.708-.708L7.293 8 4.646 5.354a.5.5 0 010-.708z"/></svg>';closeBtn.onclick=function(){removeToast(id)};el.appendChild(iconSpan);el.appendChild(msgSpan);el.appendChild(closeBtn);container.appendChild(el);if(duration>0){setTimeout(function(){removeToast(id)},duration)}return id};var toast={success:function(message,options){return addToast("success",message,options)},error:function(message,options){return addToast("error",message,options)},info:function(message,options){return addToast("info",message,options)},warning:function(message,options){return addToast("warning",message,options)},dismiss:function(id){if(id!==undefined){removeToast(id);return};var container=_getToastContainer();if(!container)return;var all=container.querySelectorAll("[data-stx-toast]");for(var i=0;i<all.length;i++){var tid=all[i].getAttribute("data-stx-toast");removeToast(tid)}}};var modal={open:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(!el){console.warn('[stx:modal] Modal "'+id+'" not found');return}el.style.display="flex";el.offsetHeight;el.setAttribute("data-stx-modal-open","");document.body.style.overflow="hidden";if(el.getAttribute("data-close-escape")!=="false"){var escHandler=function(e){if(e.key==="Escape"){modal.close(id);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);el._stxEscHandler=escHandler}if(el.getAttribute("data-close-backdrop")!=="false"){el.onclick=function(e){if(e.target===el)modal.close(id)}}},close:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(!el)return;el.removeAttribute("data-stx-modal-open");if(el._stxEscHandler){document.removeEventListener("keydown",el._stxEscHandler);el._stxEscHandler=null}el.onclick=null;setTimeout(function(){el.style.display="none";if(!document.querySelector("[data-stx-modal-open]"))document.body.style.overflow=""},200)},toggle:function(id){var el=document.querySelector('[data-stx-modal="'+id+'"]');if(el&&el.hasAttribute("data-stx-modal-open"))modal.close(id);else modal.open(id)}};var _dialogId=0;var _dialogIcons={info:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#2563eb" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>',warning:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#d97706" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',error:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#dc2626" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>',success:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#16a34a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9 12l2 2 4-4"/></svg>',question:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#6366f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>'};function _createDialog(message,options,isConfirm){var opts=options||{};var type=opts.type||(isConfirm?"question":"info");var title=opts.title||"";var confirmText=opts.confirmText||"OK";var cancelText=opts.cancelText||"Cancel";var id="stx-dialog-"+ ++_dialogId;var isDark=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;var bg=isDark?"#1f2937":"#ffffff";var textColor=isDark?"#f3f4f6":"#1f2937";var subColor=isDark?"#9ca3af":"#6b7280";var icon=_dialogIcons[type]||_dialogIcons.info;return new Promise(function(resolve){var backdrop=document.createElement("div");backdrop.id=id;backdrop.style.cssText="position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.5);backdrop-filter:blur(2px);opacity:0;transition:opacity 0.2s ease;font-family:system-ui,-apple-system,sans-serif";backdrop.setAttribute("role","alertdialog");backdrop.setAttribute("aria-modal","true");var panel=document.createElement("div");panel.style.cssText="max-width:24rem;width:calc(100% - 2rem);border-radius:0.75rem;padding:1.5rem;background:"+bg+";color:"+textColor+";box-shadow:0 20px 60px rgba(0,0,0,0.3);transform:scale(0.95);transition:transform 0.2s ease;text-align:center";var iconDiv=document.createElement("div");iconDiv.style.cssText="display:flex;justify-content:center;margin-bottom:1rem";iconDiv.innerHTML=icon;panel.appendChild(iconDiv);if(title){var titleEl=document.createElement("h3");titleEl.style.cssText="margin:0 0 0.5rem;font-size:1.125rem;font-weight:600";titleEl.textContent=title;panel.appendChild(titleEl)};var msgEl=document.createElement("p");msgEl.style.cssText="margin:0 0 1.25rem;font-size:0.875rem;line-height:1.5;color:"+subColor;msgEl.textContent=message;panel.appendChild(msgEl);var btnRow=document.createElement("div");btnRow.style.cssText="display:flex;gap:0.75rem;justify-content:center";function cleanup(result){backdrop.style.opacity="0";panel.style.transform="scale(0.95)";setTimeout(function(){backdrop.remove()},200);resolve(result)}if(isConfirm){var cancelBtn=document.createElement("button");cancelBtn.textContent=cancelText;cancelBtn.style.cssText="padding:0.5rem 1.25rem;border-radius:0.5rem;font-size:0.875rem;font-weight:500;cursor:pointer;border:1px solid "+(isDark?"#374151":"#d1d5db")+";background:transparent;color:"+textColor+";transition:background 0.15s";cancelBtn.onmouseover=function(){this.style.background=isDark?"#374151":"#f3f4f6"};cancelBtn.onmouseout=function(){this.style.background="transparent"};cancelBtn.onclick=function(){cleanup(false)};btnRow.appendChild(cancelBtn)};var okBtn=document.createElement("button");okBtn.textContent=confirmText;var btnColor=type==="error"?"#dc2626":type==="warning"?"#d97706":"#5672cd";okBtn.style.cssText="padding:0.5rem 1.25rem;border-radius:0.5rem;font-size:0.875rem;font-weight:500;cursor:pointer;border:none;background:"+btnColor+";color:#fff;transition:opacity 0.15s";okBtn.onmouseover=function(){this.style.opacity="0.9"};okBtn.onmouseout=function(){this.style.opacity="1"};okBtn.onclick=function(){cleanup(isConfirm?true:undefined)};btnRow.appendChild(okBtn);panel.appendChild(btnRow);backdrop.appendChild(panel);document.body.appendChild(backdrop);backdrop.offsetHeight;backdrop.style.opacity="1";panel.style.transform="scale(1)";var escHandler=function(e){if(e.key==="Escape"){cleanup(isConfirm?false:undefined);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);okBtn.focus()})};function stxAlert(message,options){return _createDialog(message,options,false)};function stxConfirm(message,options){return _createDialog(message,options,true)};var drawer={open:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(!el){console.warn('[stx:drawer] Drawer "'+id+'" not found');return}el.style.display="flex";el.offsetHeight;el.setAttribute("data-stx-drawer-open","");document.body.style.overflow="hidden";if(el.getAttribute("data-close-escape")!=="false"){var escHandler=function(e){if(e.key==="Escape"){drawer.close(id);document.removeEventListener("keydown",escHandler)}};document.addEventListener("keydown",escHandler);el._stxEscHandler=escHandler}if(el.getAttribute("data-close-backdrop")!=="false"){el.onclick=function(e){if(e.target===el)drawer.close(id)}}},close:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(!el)return;el.removeAttribute("data-stx-drawer-open");if(el._stxEscHandler){document.removeEventListener("keydown",el._stxEscHandler);el._stxEscHandler=null}el.onclick=null;setTimeout(function(){el.style.display="none";if(!document.querySelector("[data-stx-drawer-open]")&&!document.querySelector("[data-stx-modal-open]"))document.body.style.overflow=""},300)},toggle:function(id){var el=document.querySelector('[data-stx-drawer="'+id+'"]');if(el&&el.hasAttribute("data-stx-drawer-open"))drawer.close(id);else drawer.open(id)}};(function(){var tip=null;function createTip(){tip=document.createElement("div");tip.id="stx-tooltip";tip.style.cssText="position:absolute;z-index:999999;pointer-events:none;background:#1f2937;color:#fff;font-size:12px;line-height:1.4;padding:6px 10px;border-radius:6px;max-width:250px;word-wrap:break-word;opacity:0;transition:opacity 0.15s ease;white-space:pre-wrap;box-shadow:0 2px 8px rgba(0,0,0,0.2)";document.body.appendChild(tip)};function show(el){if(!tip)createTip();var text=el.getAttribute("x-tooltip");if(!text)return;tip.textContent=text;tip.style.display="block";tip.style.opacity="0";var pos=el.getAttribute("x-tooltip-position")||"top";var rect=el.getBoundingClientRect();var tw=tip.offsetWidth;var th=tip.offsetHeight;var sx=window.scrollX;var sy=window.scrollY;var left,top;if(pos==="bottom"){left=rect.left+rect.width/2-tw/2;top=rect.bottom+8}else if(pos==="left"){left=rect.left-tw-8;top=rect.top+rect.height/2-th/2}else if(pos==="right"){left=rect.right+8;top=rect.top+rect.height/2-th/2}else{left=rect.left+rect.width/2-tw/2;top=rect.top-th-8;if(top<0){top=rect.bottom+8}}if(left<4)left=4;if(left+tw>window.innerWidth-4)left=window.innerWidth-tw-4;tip.style.left=left+sx+"px";tip.style.top=top+sy+"px";tip.style.opacity="1"};function hide(){if(tip){tip.style.opacity="0";setTimeout(function(){if(tip)tip.style.display="none"},150)}}document.addEventListener("mouseover",function(e){var el=e.target.closest("[x-tooltip]");if(el)show(el)});document.addEventListener("mouseout",function(e){var el=e.target.closest("[x-tooltip]");if(el)hide()});document.addEventListener("focusin",function(e){var el=e.target.closest("[x-tooltip]");if(el)show(el)});document.addEventListener("focusout",function(e){var el=e.target.closest("[x-tooltip]");if(el)hide()})})();function hydrateSubtree(container){if(!container||!container.querySelectorAll)return;var scoped=container.querySelectorAll("script[data-stx-scoped]");for(var i=0;i<scoped.length;i++){var old=scoped[i];if(old.__stx_ran)continue;var fresh=document.createElement("script");for(var a=0;a<old.attributes.length;a++)fresh.setAttribute(old.attributes[a].name,old.attributes[a].value);fresh.textContent=old.textContent;fresh.__stx_ran=true;if(old.parentNode)old.parentNode.replaceChild(fresh,old)};var scopeEls=[];if(container.matches&&container.matches("[data-stx-scope]"))scopeEls.push(container);container.querySelectorAll("[data-stx-scope]").forEach(function(el){scopeEls.push(el)});scopeEls.forEach(function(el){if(el.__stx_disposers)return;var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(!scopeVars)return;Object.assign(componentScope,scopeVars);el.__stx_disposers=trackEffects(function(){processElement(el,componentScope)});if(scopeVars.__mountCallbacks&&!scopeVars.__mounted){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}})}});processElement(container);if(container.removeAttribute)container.removeAttribute("x-cloak");container.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});if(mountCallbacks.length){var cbs=mountCallbacks.slice();mountCallbacks.length=0;cbs.forEach(function(fn){try{fn()}catch(e){console.error("[stx] mount error:",e)}})}window.dispatchEvent(new CustomEvent("stx:hydrated",{detail:{el:container,trigger:"stream"}}))};var mountQueue=[];window.stx={hydrate:hydrateSubtree,state,derived,effect,batch,isSignal,untrack,peek,onMount,onDestroy,useFetch,useRef,navigate,goBack,goForward,useRoute,setRouteParams,useSearchParams,useQuery,useMutation,useOptimistic,provide,$computed,$watch,ref,reactive,computed,watch,watchEffect,useDebounce,useDebouncedValue,useThrottle,useInterval,useTimeout,useToggle,useCounter,useClickOutside,useFocus,useAsync,useLocalStorage,useSessionStorage,useCookie,useReactiveProp,useEventListener,useWebSocket,useColorMode,useDark,useHead,useSeoMeta,definePageMeta:function(){},toast,modal,drawer,alert:stxAlert,confirm:stxConfirm,helpers:globalHelpers,defineProps:function(definitions){var props=window.__STX_CURRENT_PROPS__||{};if(!definitions)return props;var result=Object.assign({},props);for(var key in definitions){if(!definitions.hasOwnProperty(key))continue;var def=definitions[key];var opts=typeof def==="function"||Array.isArray(def)?{type:def}:def||{};if(result[key]===undefined&&opts["default"]!==undefined){result[key]=typeof opts["default"]==="function"?opts["default"]():opts["default"]}}return result},withDefaults:function(props,defaults){var result=Object.assign({},props);for(var key in defaults){if(!defaults.hasOwnProperty(key))continue;if(result[key]===undefined){result[key]=typeof defaults[key]==="function"?defaults[key]():defaults[key]}}return result},defineEmits:function(){var el=window.__STX_CURRENT_ELEMENT__||null;return function(event,payload){var target=el||document.body;target.dispatchEvent(new CustomEvent(event,{detail:payload,bubbles:true,cancelable:true}))}},defineExpose:function(exposed){var el=window.__STX_CURRENT_ELEMENT__;if(el)el.__stx_exposed=exposed},defineSlots:function(){return window.__STX_CURRENT_SLOTS__||{}},_mountCallbacks:mountCallbacks,_destroyCallbacks:destroyCallbacks,_cleanupContainer:cleanupContainer,_registerSuspense:registerSuspense,_tg:{enter:tgEnter,leave:tgLeave,flip:tgFlip,snapshot:tgSnapshot},_scopes:{},_scopeCounter:0,_latestSetup:null,_stores:new Map,defineStore:function(id,setupOrOptions,storeOptions){if(window.stx._stores.has(id)){return window.stx._stores.get(id)};var setupFn;if(typeof setupOrOptions==="function"){setupFn=setupOrOptions}else{var opts=setupOrOptions;setupFn=function(){var result={};var initialState=typeof opts.state==="function"?opts.state():opts.state||{};var stateSignals={};for(var key in initialState){stateSignals[key]=state(initialState[key]);result[key]=stateSignals[key]}if(opts.getters){for(var gKey in opts.getters){(function(getterKey,getterFn){result[getterKey]=derived(function(){var snapshot={};for(var sk in stateSignals){snapshot[sk]=stateSignals[sk]()}return getterFn(snapshot)})})(gKey,opts.getters[gKey])}}if(opts.actions){for(var aKey in opts.actions){(function(actionKey,actionFn){result[actionKey]=function(){var proxy=new Proxy({},{get:function(_,p){if(result[p]&&result[p]._isSignal)return result[p]();if(result[p])return result[p];return},set:function(_,p,v){if(result[p]&&result[p]._isSignal){result[p].set(v);return true}return false}});return actionFn.apply(proxy,arguments)}})(aKey,opts.actions[aKey])}}return result}};var prevDisposers=activeDisposers;activeDisposers=null;var result;try{result=setupFn()}finally{activeDisposers=prevDisposers};var signalKeys=[];var actionKeys=[];for(var dk in result){if(result[dk]&&result[dk]._isSignal)signalKeys.push(dk);else if(typeof result[dk]==="function")actionKeys.push(dk)};var _initialValues={};for(var k in result){if(result[k]&&result[k]._isSignal){_initialValues[k]=result[k]()}}result.$id=id;result.$reset=function(){batch(function(){for(var rk in _initialValues){if(result[rk]&&result[rk]._isSignal)result[rk].set(_initialValues[rk])}})};result.$patch=function(partial){batch(function(){for(var pk in partial){if(result[pk]&&result[pk]._isSignal)result[pk].set(partial[pk])}})};result.$subscribe=function(cb){var unsubs=[];for(var sk in result){if(result[sk]&&result[sk]._isSignal&&result[sk].subscribe){unsubs.push(result[sk].subscribe(function(){var snapshot={};for(var ssk in result){if(result[ssk]&&result[ssk]._isSignal)snapshot[ssk]=result[ssk]()}cb(snapshot)}))}}return function(){unsubs.forEach(function(u){u()})}};result.$dispose=function(){window.stx._stores.delete(id);if(window.__STX_STORES__)delete window.__STX_STORES__[id]};var hydrationData=window.__STX_STORE_STATE__&&window.__STX_STORE_STATE__[id];if(hydrationData){batch(function(){for(var hk in hydrationData){if(result[hk]&&result[hk]._isSignal)result[hk].set(hydrationData[hk])}})};var persistCfg=storeOptions&&storeOptions.persist;if(persistCfg){var pOpts=persistCfg===true?{}:persistCfg;var storageKey=pOpts.key||"stx-store-"+id;var storageType=pOpts.storage==="sessionStorage"?sessionStorage:localStorage;var pick=pOpts.pick||null;try{var saved=storageType.getItem(storageKey);if(saved){var parsed=JSON.parse(saved);batch(function(){for(var pk in parsed){if(result[pk]&&result[pk]._isSignal&&(!pick||pick.indexOf(pk)!==-1)){result[pk].set(parsed[pk])}}})}}catch(e){console.warn("[stx:store] persistence read error:",id,e)};var writeTimer=null;var prevPersistDisposers=activeDisposers;activeDisposers=null;effect(function(){var snapshot={};for(var wk in result){if(result[wk]&&result[wk]._isSignal&&(!pick||pick.indexOf(wk)!==-1)){snapshot[wk]=result[wk]()}}if(writeTimer)clearTimeout(writeTimer);writeTimer=setTimeout(function(){try{storageType.setItem(storageKey,JSON.stringify(snapshot))}catch(e){console.warn("[stx:store] persist write error:",id,e)}},100)});activeDisposers=prevPersistDisposers}result._isStxStore=true;window.stx._stores.set(id,result);window.__STX_STORES__=window.__STX_STORES__||{};window.__STX_STORES__[id]=result;return result},useStore:function(id){var store=window.stx._stores.get(id);if(!store&&window.__STX_STORES__){store=window.__STX_STORES__[id]}if(!store){console.error("[stx:store] Store not found:",id,"available:",Array.from(window.stx._stores.keys()));throw new Error('[stx] Store "'+id+'" not found. Define it with defineStore() first.')}return store},mountEl:function(selector,setupFn){function doMount(){var root=document.querySelector(selector);if(!root){console.warn("[stx] mountEl: element not found:",selector);return};var prevProps=window.__STX_CURRENT_PROPS__;var prevEl=window.__STX_CURRENT_ELEMENT__;var propsAttr=root.getAttribute&&root.getAttribute("data-stx-props");window.__STX_CURRENT_PROPS__=root.__stx_props||(propsAttr?JSON.parse(propsAttr):{});window.__STX_CURRENT_ELEMENT__=root;var mountStart=mountCallbacks.length;var destroyStart=destroyCallbacks.length;var scope=setupFn();window.__STX_CURRENT_PROPS__=prevProps;window.__STX_CURRENT_ELEMENT__=prevEl;var localMountHooks=mountCallbacks.splice(mountStart);var localDestroyHooks=destroyCallbacks.splice(destroyStart);if(typeof scope==="object"&&scope!==null){scope.$el=root;scope.$refs=scope.$refs||{};root.__stx_scope=scope};var disposeEffects=trackEffects(function(){processElement(root,scope||componentScope)});root.__stx_disposers=disposeEffects;root.removeAttribute("x-cloak");root.querySelectorAll("[x-cloak]").forEach(function(el){el.removeAttribute("x-cloak")});localMountHooks.forEach(function(fn){try{var cleanup=fn();if(typeof cleanup==="function")localDestroyHooks.push(cleanup)}catch(e){console.error("[stx] onMount error:",e)}});root.__stx_destroy=localDestroyHooks}if(document.readyState==="loading"){mountQueue.push(doMount)}else{doMount()}},mount:function(setupFn){var scriptEl=document.currentScript;function doMount(){var root=scriptEl?scriptEl.nextElementSibling:null;if(!root&&scriptEl)root=scriptEl.previousElementSibling||scriptEl.parentElement;var needsFallback=!root||root===document.body||root&&root.tagName==="SCRIPT";if(needsFallback){var routerOpts=window.STX_ROUTER_OPTIONS||window.__stxRouterConfig||{};var container=document.querySelector("[data-stx-content]")||document.querySelector("[data-stx-router-container]")||(routerOpts.container?document.querySelector(routerOpts.container):null)||document.querySelector("main")||document.querySelector("#content");if(container){root=container;var hasMount=false;var children=container.children;for(var ci=0;ci<children.length;ci++){if(children[ci].__stx_scope){hasMount=true;break}}if(hasMount)for(var ci=0;ci<children.length;ci++){if(!children[ci].__stx_scope&&children[ci].tagName!=="SCRIPT"){root=children[ci];break}}}}if(!root){console.warn("[stx] mount: no root element found");return};var prevProps=window.__STX_CURRENT_PROPS__;var prevEl=window.__STX_CURRENT_ELEMENT__;var propsAttr=root.getAttribute&&root.getAttribute("data-stx-props");window.__STX_CURRENT_PROPS__=root.__stx_props||(propsAttr?JSON.parse(propsAttr):{});window.__STX_CURRENT_ELEMENT__=root;var mountStart=mountCallbacks.length;var destroyStart=destroyCallbacks.length;var scope=setupFn();window.__STX_CURRENT_PROPS__=prevProps;window.__STX_CURRENT_ELEMENT__=prevEl;var localMountHooks=mountCallbacks.splice(mountStart);var localDestroyHooks=destroyCallbacks.splice(destroyStart);if(typeof scope==="object"&&scope!==null){scope.$el=root;scope.$refs=scope.$refs||{};root.__stx_scope=scope;Object.assign(componentScope,scope)};var disposeEffects=trackEffects(function(){processElement(root,scope||componentScope)});root.__stx_disposers=disposeEffects;root.removeAttribute("x-cloak");root.querySelectorAll("[x-cloak]").forEach(function(el){el.removeAttribute("x-cloak")});localMountHooks.forEach(function(fn){try{var cleanup=fn();if(typeof cleanup==="function")localDestroyHooks.push(cleanup)}catch(e){console.error("[stx] onMount error:",e)}});root.__stx_destroy=localDestroyHooks}if(document.readyState==="loading"){mountQueue.push(doMount)}else{doMount()}}};window.state=state;window.derived=derived;window.effect=effect;window.batch=batch;window.onMount=onMount;window.onDestroy=onDestroy;window.useFetch=useFetch;window.useRef=useRef;window.navigate=navigate;window.goBack=goBack;window.goForward=goForward;window.useRoute=useRoute;window.useSearchParams=useSearchParams;window.useQuery=useQuery;window.useMutation=useMutation;window.provide=provide;window.$computed=$computed;window.$watch=$watch;window.useDebounce=useDebounce;window.useDebouncedValue=useDebouncedValue;window.useThrottle=useThrottle;window.useInterval=useInterval;window.useTimeout=useTimeout;window.useToggle=useToggle;window.useCounter=useCounter;window.useClickOutside=useClickOutside;window.useFocus=useFocus;window.useAsync=useAsync;window.useLocalStorage=useLocalStorage;window.useEventListener=useEventListener;window.useWebSocket=useWebSocket;window.useColorMode=useColorMode;window.useDark=useDark;window.useHead=useHead;window.useSeoMeta=useSeoMeta;window.toast=toast;window.modal=modal;window.drawer=drawer;window.stxAlert=stxAlert;window.stxConfirm=stxConfirm;window.defineStore=window.stx.defineStore;window.useStore=window.stx.useStore;window.ref=state;window.reactive=state;window.computed=derived;window.watch=$watch;window.watchEffect=function(fn){return effect(fn)};function __stxDevtoolsClassify(sv){var out={signals:{},derived:{},stores:{},values:{},methods:[]};if(!sv||typeof sv!=="object")return out;Object.keys(sv).forEach(function(k){if(k.indexOf("__")===0||k==="$el"||k==="$refs"||k==="$props")return;var v=sv[k];try{if(typeof v==="function"&&v._isSignal)out.signals[k]=peek(function(){return v()});else if(typeof v==="function"&&v._isDerived)out.derived[k]=peek(function(){return v()});else if(v&&v._isStxStore)out.stores[k]="[store]";else if(typeof v==="function")out.methods.push(k);else out.values[k]=v}catch(e){out.values[k]="[unreadable]"}});return out}window.__stxDevtools={version:4,enable:function(){__stxDevtoolsTracking=true},disable:function(){__stxDevtoolsTracking=false},tracking:function(){return __stxDevtoolsTracking},stats:function(){return{signalSets:__stxDevtoolsStats.signalSets,effectRuns:__stxDevtoolsStats.effectRuns,tracking:__stxDevtoolsTracking}},resetStats:function(){__stxDevtoolsStats.signalSets=0;__stxDevtoolsStats.effectRuns=0;__stxDevtoolsIfTrace.length=0;__stxDevtoolsQueries.length=0;__stxDevtoolsMutations.length=0},ifTrace:function(){return __stxDevtoolsIfTrace.slice()},queries:function(){return __stxDevtoolsQueries.slice()},mutations:function(){var nameById={};function index(container,label){if(!container||typeof container!=="object")return;Object.keys(container).forEach(function(k){if(k.indexOf("__")===0)return;var v=container[k];if(typeof v==="function"&&v._stxSignalId)nameById[v._stxSignalId]={name:k,scope:label}})};var scopes=window.stx&&window.stx._scopes||{};Object.keys(scopes).forEach(function(id){index(scopes[id],id)});if(window.stx&&window.stx._stores&&typeof window.stx._stores.forEach==="function")window.stx._stores.forEach(function(s,id){index(s,"store:"+id)});return __stxDevtoolsMutations.map(function(m){var info=nameById[m.sid];return{name:info?info.name:"(anonymous)",scope:info?info.scope:null,prev:m.prev,next:m.next}})},graph:function(){var out=[];var scopes=window.stx&&window.stx._scopes||{};Object.keys(scopes).forEach(function(scopeId){var sv=scopes[scopeId];if(!sv||typeof sv!=="object")return;var nodes=[];Object.keys(sv).forEach(function(k){if(k.indexOf("__")===0||k==="$el"||k==="$refs"||k==="$props")return;var v=sv[k];if(typeof v==="function"&&(v._isSignal||v._isDerived)){nodes.push({name:k,type:v._isDerived?"derived":"signal",value:peek(function(){return v()}),setCount:v._setCount||0,subscribers:v._effects&&typeof v._effects.size==="number"?v._effects.size:0})}});if(nodes.length)out.push({scopeId,nodes})});return out},tree:function(){var byEl=new Map;var roots=[];var nodes=document.querySelectorAll("[data-stx-scope]");Array.prototype.forEach.call(nodes,function(el){byEl.set(el,{scopeId:el.getAttribute("data-stx-scope"),tag:(el.tagName||"").toLowerCase(),children:[],el})});Array.prototype.forEach.call(nodes,function(el){var node=byEl.get(el);var p=el.parentElement;while(p&&!byEl.has(p))p=p.parentElement;if(p)byEl.get(p).children.push(node);else roots.push(node)});function clean(n){return{scopeId:n.scopeId,tag:n.tag,children:n.children.map(clean)}}return roots.map(clean)},scope:function(scopeId){var sv=window.stx&&window.stx._scopes?window.stx._scopes[scopeId]:null;return sv?__stxDevtoolsClassify(sv):null},inspect:function(el){var s=el;while(s&&!(s.getAttribute&&s.getAttribute("data-stx-scope")))s=s.parentElement;return s?this.scope(s.getAttribute("data-stx-scope")):null},stores:function(){var out={};var reg=window.stx&&window.stx._stores;if(reg&&typeof reg.forEach==="function")reg.forEach(function(v,k){out[k]=true});return out},store:function(id){var reg=window.stx&&window.stx._stores;var s=reg&&typeof reg.get==="function"?reg.get(id):null;return s?__stxDevtoolsClassify(s):null}};document.addEventListener("DOMContentLoaded",()=>{mountQueue.forEach(function(fn){fn()});mountQueue=[];const processedScopes=new Set;document.querySelectorAll("[data-stx]").forEach((el)=>{const setupName=el.getAttribute("data-stx");if(setupName&&window[setupName]){const result=window[setupName]();if(typeof result==="object"){Object.assign(componentScope,result)}};var disposeEffects=trackEffects(function(){processElement(el)});el.__stx_disposers=disposeEffects;el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});mountCallbacks.forEach((fn)=>fn())});var stxRoots=document.querySelectorAll("[data-stx]");if(stxRoots.length&&Object.keys(componentScope).length){var rootParent=stxRoots[0].parentNode;if(rootParent&&rootParent.children){Array.prototype.slice.call(rootParent.children).forEach(function(sib){if(sib.nodeType!==1)return;if(sib.hasAttribute("data-stx")||sib.hasAttribute("data-stx-scope"))return;if(sib.tagName==="SCRIPT"||sib.tagName==="STYLE")return;if(sib.__stx_disposers)return;var disposeSib=trackEffects(function(){processElement(sib)});sib.__stx_disposers=disposeSib;sib.removeAttribute("x-cloak");sib.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})})}};var allScopes=document.querySelectorAll("[data-stx-scope]");allScopes.forEach((el)=>{const scopeId=el.getAttribute("data-stx-scope");processedScopes.add(el);const scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];var isDeferredIsland=!scopeVars&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!!document.querySelector('script[data-stx-island="'+scopeId+'"]');if(isDeferredIsland){processElement(el);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});return}if(!scopeVars)return;if(scopeVars){componentScope={...componentScope,...scopeVars}};var disposeEffects=trackEffects(function(){processElement(el)});el.__stx_disposers=disposeEffects;el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});var scopeDeferred=el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydrated;if(scopeVars&&scopeVars.__mountCallbacks&&!scopeVars.__mounted&&!scopeDeferred){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach((fn)=>fn())}});mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.error("[stx] onMount error:",e)}});mountCallbacks.length=0;document.querySelectorAll("[data-stx-auto]").forEach((el)=>{processElementSkipScopes(el,processedScopes);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")})});const headElements=document.querySelectorAll("head title, head meta[content]");headElements.forEach((el)=>{if(el.tagName==="TITLE"){const text=el.textContent;if(text&&text.includes("{{")){effect(()=>{try{let result=text;const matches=text.match(/\{\{\s*(.+?)\s*\}\}/g);if(matches){matches.forEach((match)=>{const expr=match.replace(/^\{\{\s*|\s*\}\}$/g,"");const fn=new Function(...Object.keys(componentScope),"return "+expr);const value=fn(...Object.values(componentScope));result=result.replace(match,value!=null?value:"")})}el.textContent=result}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Title expression error:",e)}})}}else if(el.tagName==="META"){const content=el.getAttribute("content");if(content&&content.includes("{{")){const hasOnlyPlaceholders=!content.replace(/\{\{\s*__[A-Z_]+__\s*\}\}/g,"").includes("{{");if(hasOnlyPlaceholders)return;effect(()=>{try{let result=content;const matches=content.match(/\{\{\s*(.+?)\s*\}\}/g);if(matches){matches.forEach((match)=>{const expr=match.replace(/^\{\{\s*|\s*\}\}$/g,"");if(/^__[A-Z_]+__$/.test(expr.trim()))return;const fn=new Function(...Object.keys(componentScope),"return "+expr);const value=fn(...Object.values(componentScope));result=result.replace(match,value!=null?value:"")})}el.setAttribute("content",result)}catch(e){if(!(e instanceof ReferenceError)&&!(e instanceof TypeError))console.warn("[STX] Meta expression error:",e)}})}}})});function disposeSubtreeScopes(root){if(!root||!window.stx||!window.stx._scopes)return;var nodes=[];if(root.getAttribute&&root.getAttribute("data-stx-scope"))nodes.push(root);if(root.querySelectorAll){var matches=root.querySelectorAll("[data-stx-scope]");for(var i=0;i<matches.length;i++)nodes.push(matches[i])}for(var n=0;n<nodes.length;n++){var el=nodes[n];var scopeId=el.getAttribute("data-stx-scope");if(!scopeId)continue;var scopeVars=window.stx._scopes[scopeId];if(!scopeVars)continue;if(scopeVars.__destroyCallbacks&&Array.isArray(scopeVars.__destroyCallbacks)){for(var j=0;j<scopeVars.__destroyCallbacks.length;j++){try{scopeVars.__destroyCallbacks[j]()}catch(e){console.warn("[stx] scope destroy error:",e)}}}delete window.stx._scopes[scopeId]}};function cleanupContainer(container){if(!container)return;mountCallbacks.length=0;var preservedRefs=componentScope.$refs||{};componentScope={$refs:preservedRefs};var shellElements=document.querySelectorAll("[data-stx-content] ~ *");document.querySelectorAll("body > *").forEach(function(el){if(el===container)return;if(el.tagName==="SCRIPT"||el.tagName==="STYLE")return;if(el.__stx_scope)Object.assign(componentScope,el.__stx_scope)});container.querySelectorAll("*").forEach(function(el){if(typeof el.__stx_hydration_cancel==="function"){try{el.__stx_hydration_cancel()}catch(e){}el.__stx_hydration_cancel=null}if(el.__stx_destroy&&Array.isArray(el.__stx_destroy)){el.__stx_destroy.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy hook error:",e)}});el.__stx_destroy=null}if(el.__stx_disposers&&typeof el.__stx_disposers==="function"){el.__stx_disposers();el.__stx_disposers=null}});if(typeof container.__stx_hydration_cancel==="function"){try{container.__stx_hydration_cancel()}catch(e){}container.__stx_hydration_cancel=null}if(container.__stx_destroy){container.__stx_destroy.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy hook error:",e)}});container.__stx_destroy=null}if(container.__stx_disposers){container.__stx_disposers();container.__stx_disposers=null}container.__stx_scope=null;disposeSubtreeScopes(container)};var _stxLoadTimer=null;window.addEventListener("stx:load",function(){if(_stxLoadTimer){clearTimeout(_stxLoadTimer)}_stxLoadTimer=setTimeout(_handleStxLoad,5)});function _handleStxLoad(){_stxLoadTimer=null;destroyCallbacks.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] destroy callback error:",e)}});destroyCallbacks.length=0;mountQueue.forEach(function(fn){fn()});mountQueue=[];var routerOpts=window.STX_ROUTER_OPTIONS||window.__stxRouterConfig||{};var container=document.querySelector("[data-stx-content]")||(routerOpts.container?document.querySelector(routerOpts.container):null)||document.querySelector("main")||document.querySelector("#main-content")||document.body;var usedLatestSetup=false;if(window.stx._latestSetup&&typeof window.stx._latestSetup==="function"){try{var setupResult=window.stx._latestSetup();usedLatestSetup=true;if(typeof setupResult==="object"&&setupResult!==null){Object.assign(componentScope,setupResult)}}catch(e){console.error("[stx:load] _latestSetup error:",e);usedLatestSetup=true}}if(!usedLatestSetup){document.querySelectorAll("[data-stx]").forEach(function(el){var setupName=el.getAttribute("data-stx");if(setupName&&window[setupName]){var result=window[setupName]();if(typeof result==="object")Object.assign(componentScope,result)}})}if(window.__stx_reactive&&window.__stx_reactive.initScope){container.querySelectorAll("[data-stx-xdata]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");if(scopeId&&window.stx._scopes&&window.stx._scopes[scopeId])return;var xdata=el.getAttribute("data-stx-xdata");if(!xdata)return;if(!scopeId){scopeId="__stx_scope_spa_"+ ++window.stx._scopeCounter;el.setAttribute("data-stx-scope",scopeId)}window.__stx_reactive.initScope(el,xdata,[],{},null)})}document.body.querySelectorAll("[data-stx-scope]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(!scopeVars&&el.hasAttribute&&el.hasAttribute("stx-hydrate")&&!el.__stx_hydration_scheduled&&document.querySelector('script[data-stx-island="'+scopeId+'"]')){processElement(el,componentScope);el.removeAttribute("x-cloak");el.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});return}if(!scopeVars)return;Object.assign(componentScope,scopeVars);if(el.__stx_disposers)return;var disposeEffects=trackEffects(function(){processElement(el,componentScope)});el.__stx_disposers=disposeEffects});if(!container.__stx_scope){if(container.__stx_disposers&&typeof container.__stx_disposers==="function"){container.__stx_disposers()};var disposeEffects=trackEffects(function(){processElement(container,componentScope)});container.__stx_disposers=disposeEffects}container.removeAttribute("x-cloak");container.querySelectorAll("[x-cloak]").forEach(function(c){c.removeAttribute("x-cloak")});document.body.querySelectorAll("[data-stx-scope]").forEach(function(el){var scopeId=el.getAttribute("data-stx-scope");var scopeVars=window.stx._scopes&&window.stx._scopes[scopeId];if(scopeVars&&scopeVars.__mountCallbacks&&!scopeVars.__mounted){scopeVars.__mounted=true;scopeVars.__mountCallbacks.forEach(function(fn){fn()})}});mountCallbacks.forEach(function(fn){try{fn()}catch(e){console.warn("[stx] mount callback error:",e)}});mountCallbacks.length=0};function processElementSkipScopes(el,processedScopes){if(processedScopes.has(el))return;if(el.nodeType===Node.TEXT_NODE){processElement(el);return}if(el.nodeType!==Node.ELEMENT_NODE)return;if(el.hasAttribute&&el.hasAttribute("data-stx-scope"))return;if(el.__stx_chain_member&&!el.isConnected)return;const hasFor=el.hasAttribute&&(el.hasAttribute("@for")||el.hasAttribute(":for")||el.hasAttribute("x-for"));const hasIf=el.hasAttribute&&(el.hasAttribute("@if")||el.hasAttribute(":if")||el.hasAttribute("x-if"));if(hasFor){var fa=el.hasAttribute(":for")?":for":el.hasAttribute("x-for")?"x-for":"@for";bindFor(el,componentScope,fa);return}if(hasIf){var ia=el.hasAttribute(":if")?":if":el.hasAttribute("x-if")?"x-if":"@if";var ic=findIfChain(el,ia);if(ic.length>1)bindIfChain(ic,componentScope);else bindIf(el,componentScope,ia);return}if(el.hasAttribute&&(el.hasAttribute("@show")||el.hasAttribute(":show")||el.hasAttribute("x-show"))){var sa=el.hasAttribute(":show")?":show":el.hasAttribute("x-show")?"x-show":"@show";bindShow(el,el.getAttribute(sa),componentScope,sa)}if(el.hasAttribute&&(el.hasAttribute("@model")||el.hasAttribute(":model")||el.hasAttribute("x-model"))){var ma=el.hasAttribute(":model")?":model":el.hasAttribute("x-model")?"x-model":"@model";bindModel(el,el.getAttribute(ma),componentScope,ma)}if(el.tagName!=="SCRIPT"&&el.tagName!=="STYLE"){Array.from(el.childNodes).forEach((child)=>processElementSkipScopes(child,processedScopes))}}})();</script> <script data-stx-scoped>
248
248
  (function() {
249
249
  var { state, derived, effect, batch, onMount, onDestroy, defineStore, useStore, useFetch, useRef, useQuery, useMutation, useOptimistic, useDebounce, useDebouncedValue, useThrottle, useInterval, useTimeout, useToggle, useCounter, useClickOutside, useFocus, useAsync, useLocalStorage, useSessionStorage, useCookie, useReactiveProp, useEventListener, useWebSocket, useColorMode, useDark, useHead, useSeoMeta, definePageMeta, useRoute, useSearchParams, navigate, goBack, goForward, provide, ref, reactive, computed, watch, watchEffect, defineProps, withDefaults, defineEmits, defineExpose, defineSlots } = window.stx;
250
250
  var __destroyHooks = [];
@@ -587,7 +587,7 @@ if(window.stx)window.stx._latestSetup=__stx_setup_1785198917973_3;
587
587
 
588
588
 
589
589
  if (!window.stx._scopes) window.stx._scopes = {};
590
- window.stx._scopes['stx_scope_nav_6'] = { __destroyCallbacks: __destroyHooks };
590
+ window.stx._scopes['stx_scope_nav_9'] = { __destroyCallbacks: __destroyHooks };
591
591
  })();
592
592
  </script> <main class="data-wrap wrap" id="main-content"><div class="crumbs">Infrastructure <span class="sep">/</span> Data services</div><header class="page"><div><h1>Data services</h1><p>Provision, adopt, connect, observe, back up, rotate, upgrade, resize, and retire databases and caches from one lifecycle.</p></div><div class="header-actions" x-cloak><span class="pill" :class="pollingState()==='live'?'ok':'warn'" x-cloak>{{ pollingState() }}</span><small x-cloak>{{ lastUpdatedAt()?.toLocaleTimeString() || 'connecting' }}</small><button class="btn ghost sm" @click="refresh()">Refresh</button><button class="btn sm" @click="createOpen.set(!createOpen())" x-cloak>{{ createOpen()?'Close':'New service' }}</button></div></header><p class="notice" role="status" @show="!!notice()" x-cloak>{{ notice() }}</p><p class="bad notice" role="alert" @show="!!actionError() || !!pollingError()" x-cloak>{{ actionError() || pollingError() }}</p><section class="summary"><article class="panel"><b>Services</b><strong x-cloak>{{ services().length }}</strong><small>current environment</small></article><article class="panel"><b>Available</b><strong x-cloak>{{ services().filter(item=>item.status==='available').length }}</strong><small>healthy and connectable</small></article><article class="panel"><b>Needs attention</b><strong x-cloak>{{ services().filter(item=>['failed','degraded'].includes(item.status)).length }}</strong><small>failed or degraded</small></article><article class="panel"><b>Dependency redeploys</b><strong x-cloak>{{ services().reduce((sum,item)=>sum+(item.dependencies||[]).filter(dep=>dep.requiresRedeploy).length,0) }}</strong><small>after credential rotation</small></article></section><form class="create-grid panel" @show="createOpen()" @submit="createService($event)" x-cloak><div class="wide"><h2>Create or adopt a service</h2><p class="note">Private networking, encryption, deletion protection, and seven-day backup retention are the managed defaults. Previewing never mutates production.</p></div><label>Name<input name="name" required pattern="[a-z0-9][a-z0-9-]{1,62}" placeholder="orders-db"></label><label>Engine<select name="engine" required><option value="postgres">PostgreSQL</option><option value="mysql">MySQL</option><option value="mariadb">MariaDB</option><option value="redis">Redis</option><option value="mongodb">MongoDB</option><option value="libsql">libSQL</option></select></label><label>Provider<select name="provider" required><option value="aws_rds">AWS RDS</option><option value="aws_aurora">AWS Aurora</option><option value="aws_elasticache">AWS ElastiCache</option><option value="server">Server</option><option value="container">Container</option><option value="external">External / adopted</option></select></label><label>Provider ID or placement<input name="placement" placeholder="orders-production"></label><label>Plan<input name="plan" value="db.t4g.micro" placeholder="db.t4g.micro"></label><label>Engine version<input name="engineVersion" placeholder="16.3"></label><label>Storage GB<input name="storageGb" type="number" min="1" value="20"></label><label>Username<input name="username" value="app" autocomplete="off"></label><label>Database<input name="database" placeholder="app"></label><label>Subnet group<input name="subnetGroup" placeholder="private-data"></label><label class="wide">Security group IDs<input name="securityGroupIds" placeholder="sg-database"></label><label class="wide">Allowed public CIDRs<input name="allowedCidrs" placeholder="203.0.113.8/32"><span>Required only for public access. Broad 0.0.0.0/0 is always refused.</span></label><label class="check"><input name="highAvailability" type="checkbox"> High availability</label><label class="check"><input name="publicExposure" type="checkbox"> Public endpoint</label><label class="check wide"><input name="adopt" type="checkbox"> Adopt existing provider ID read-only (no credential or mutation)</label><button class="btn wide" type="submit" :disabled="busy()" x-cloak>{{ busy()?'Creating…':'Review and create' }}</button></form><section class="filters panel"><input type="search" aria-label="Search data services" placeholder="Search name, engine, provider, placement" @input="search.set($event.currentTarget.value)"><select aria-label="Filter engine" @change="engineFilter.set($event.currentTarget.value)"><option value="all">All engines</option><option value="postgres">PostgreSQL</option><option value="mysql">MySQL</option><option value="mariadb">MariaDB</option><option value="redis">Redis</option><option value="mongodb">MongoDB</option><option value="libsql">libSQL</option></select><select aria-label="Filter provider" @change="providerFilter.set($event.currentTarget.value)"><option value="all">All providers</option><option value="aws_rds">RDS</option><option value="aws_aurora">Aurora</option><option value="aws_elasticache">ElastiCache</option><option value="server">Server</option><option value="container">Container</option><option value="external">External</option></select><select aria-label="Filter status" @change="statusFilter.set($event.currentTarget.value)"><option value="all">All states</option><option value="available">Available</option><option value="planning">Planning</option><option value="failed">Failed</option><option value="adopted">Adopted</option><option value="retained">Retained</option></select></section><div class="workspace" :class="{hasDetail:!!selected()}" x-cloak><section class="data-cards" x-cloak><template :for="item in filtered()"><article class="panel service-card" :class="{selected:selected()?.id===item.id}" x-cloak><div class="service-head" x-cloak><div x-cloak><span class="pill" :class="tone(item.status)" x-cloak>{{ item.status }}</span><span class="pill" x-cloak>{{ item.engine }}</span><span class="pill" x-cloak>{{ item.provider }}</span><h2 x-cloak>{{ item.name }}</h2></div><button class="btn ghost sm" @click="inspect(item)">Details</button></div><div class="service-grid"><div><small>Placement</small><b class="mono" x-cloak>{{ item.placement }}</b><span x-cloak>{{ item.plan }} · {{ item.engineVersion || 'provider default' }}</span></div><div><small>Endpoint</small><b class="mono" x-cloak>{{ item.observedState?.endpoint || 'pending' }}</b><span x-cloak>{{ item.publicExposure?'public allowlist':'private network' }}</span></div><div><small>Credential</small><b x-cloak>{{ item.credential?.configured ? item.credential.username : 'not managed' }}</b><span x-cloak>{{ item.credential?.rotatedAt ? 'rotated '+when(item.credential.rotatedAt) : item.credential?.configured ? 'version '+item.credential.version : 'reference only' }}</span></div><div><small>Protection</small><b x-cloak>{{ item.highAvailability?'high availability':'single placement' }}</b><span x-cloak>{{ item.origin }} · {{ item.managementEnabled?'managed':'read-only' }}</span></div></div><div class="actions"><button class="btn ghost sm" @click="runAction(item,'observe')">Refresh status</button><button class="btn ghost sm" @click="runAction(item,'backup')" :disabled="!item.capabilities.actions.backup.supported">Back up</button><button class="btn ghost sm" @click="runAction(item,'restart')">Restart</button><button class="btn ghost sm" @click="runAction(item,'rotate')" :disabled="!item.capabilities.actions.rotate.supported">Rotate credential</button><button class="btn danger sm" @click="runAction(item,'delete')">Retire</button></div><p class="bad note" @show="!!item.observedState?.error" x-cloak>{{ item.observedState.error }}</p></article></template><div class="empty panel" @show="!filtered().length" x-cloak><strong>No matching data services</strong><span>Create a managed service or adopt an existing provider resource read-only.</span></div></section><aside class="detail panel" @show="!!selected()" x-cloak><div class="detail-head"><div><small>Selected service</small><h2 x-cloak>{{ selected()?.name }}</h2></div><button class="btn ghost sm" aria-label="Close details" @click="selected.set(null)">Close</button></div><div class="capability"><h3>Lifecycle operations</h3><p class="note">Every operation is capability-checked and previewed before a durable production job is created.</p><div class="operation-picker" x-cloak><template :for="entry in Object.entries(selected()?.capabilities?.actions || {}).filter(([action])=>action!=='create'&&action!=='connect')"><button class="btn ghost sm" :class="{active:operationAction()===entry[0]}" :disabled="!entry[1].supported" :title="entry[1].explanation" @click="chooseAction(entry[0])" x-cloak>{{ actionLabels[entry[0]] || entry[0] }}</button></template></div><form class="operation-form" @submit="runConfiguredAction($event)"><label @show="operationAction()==='restore'" x-cloak>Backup ID<input name="backupId" placeholder="orders-snapshot"></label><label @show="operationAction()==='restore'" x-cloak>New target ID<input name="targetId" placeholder="orders-restored"></label><label @show="operationAction()==='resize'" x-cloak>Provider plan<input name="plan" :placeholder="selected()?.plan"></label><label @show="operationAction()==='resize'" x-cloak>Storage GB<input name="storageGb" type="number" min="1"></label><label @show="operationAction()==='resize'" x-cloak>Runtime memory MB<input name="memoryMb" type="number" min="16"></label><label @show="operationAction()==='resize'" x-cloak>Runtime CPUs<input name="cpus" type="number" min="0.1" step="0.1"></label><label @show="operationAction()==='version'" x-cloak>Target engine version<input name="engineVersion" placeholder="17.0"></label><label class="check" @show="operationAction()==='version'" x-cloak><input name="compatibilityReviewed" type="checkbox"> Compatibility reviewed</label><label @show="operationAction()==='version'" x-cloak>Pre-upgrade backup ID<input name="versionBackupId" placeholder="pre-upgrade-snapshot"></label><label @show="['logs','slow_queries'].includes(operationAction())" x-cloak>Maximum lines<input name="lines" type="number" min="1" max="2000" value="500"></label><label @show="['users','databases'].includes(operationAction())" x-cloak>Operation<select name="operation"><option value="list">List</option><option value="create" @show="operationAction()==='databases'" x-cloak>Create</option><option value="delete" @show="operationAction()==='databases'" x-cloak>Delete</option></select></label><label @show="operationAction()==='databases'" x-cloak>Database<input name="database" placeholder="analytics"></label><label @show="operationAction()==='delete'" x-cloak>Retention<select name="retention"><option value="final_backup">Final backup, then delete</option><option value="retain">Retain resource unmanaged</option></select></label><label class="check" @show="operationAction()==='expose'" x-cloak><input name="publicExposure" type="checkbox"> Public endpoint</label><label @show="operationAction()==='expose'" x-cloak>Allowed CIDRs<input name="allowedCidrs" placeholder="203.0.113.8/32"></label><button class="btn sm" type="submit" :disabled="busy() || !selected()?.capabilities?.actions?.[operationAction()]?.supported" x-cloak>{{ busy()?'Queueing…':actionLabels[operationAction()] }}</button></form><div class="action-preview"><p class="note" @show="!plan()" x-cloak>Choose an action to inspect support, downtime, confirmation, backup, and compatibility gates.</p><div @show="!!plan()" x-cloak><span class="pill" :class="plan()?.capability?.supported?'ok':'bad'" x-cloak>{{ plan()?.capability?.supported?'supported':'unsupported' }}</span><span class="pill" x-cloak>downtime {{ plan()?.capability?.downtime }}</span><p x-cloak>{{ plan()?.capability?.explanation }}</p><ul><li @show="plan()?.preflight?.backupRequired" x-cloak>Backup required</li><li @show="plan()?.preflight?.compatibilityRequired" x-cloak>Compatibility review required</li><li @show="plan()?.preflight?.retentionChoiceRequired" x-cloak>Retention choice required</li><template :for="warning in plan()?.warnings || []"><li x-cloak>{{ warning }}</li></template></ul></div></div></div><div><h3>Health, metrics, and provider state</h3><div class="observation-grid" x-cloak><template :for="entry in observationEntries(selected())"><div x-cloak><small x-cloak>{{ entry[0] }}</small><code x-cloak>{{ typeof entry[1] === 'object' ? JSON.stringify(entry[1], null, 2) : entry[1] }}</code></div></template></div><p class="note" @show="!observationEntries(selected()).length" x-cloak>Observed state is pending. Run Refresh status after provisioning.</p></div><div><h3>Connections</h3><template :for="item in guidance()"><div class="connection" x-cloak><span class="pill" x-cloak>{{ item.type }}</span><code x-cloak>{{ item.command }}</code><small x-cloak>{{ item.secretRef || 'no managed credential' }}</small><button class="btn ghost sm" @click="copy(item.command,'Connection command')">Copy command</button></div></template><p class="note" @show="!guidance().length" x-cloak>Endpoint discovery is pending. Refresh status after provisioning.</p></div><div><h3>Credentials</h3><p class="note">Secret values are encrypted and omitted from lists, plans, logs, and operation payloads.</p><button class="btn ghost sm" @show="selected()?.credential?.configured" @click="reveal(selected())" x-cloak>Reveal with recent authentication</button></div><div><h3>Recent operations</h3><template :for="operation in serviceOperations(selected())"><div class="operation" x-cloak><span class="pill" :class="tone(operation.state)" x-cloak>{{ operation.state }}</span><b x-cloak>{{ operation.input?.action }}</b><small x-cloak>{{ when(operation.createdAt) }} · attempt {{ operation.attempt }}</small></div></template><p class="note" @show="!serviceOperations(selected()).length" x-cloak>No durable operations yet.</p></div><div><h3>Dependency impact</h3><template :for="dependency in selected()?.dependencies || []"><div class="operation" x-cloak><b class="mono" x-cloak>{{ dependency.resourceId }}</b><span class="pill" :class="dependency.requiresRedeploy?'warn':'ok'" x-cloak>{{ dependency.requiresRedeploy?'redeploy after rotation':'dynamic reference' }}</span></div></template><p class="note" @show="!(selected()?.dependencies || []).length" x-cloak>No application dependencies registered.</p></div></aside></div><section class="credential panel" @show="!!oneTime()" role="alert" x-cloak><div><h2>Credential — copy now</h2><p>This value is deliberately absent from resource lists, logs, and operation history.</p></div><div class="secret" x-cloak><span x-cloak>{{ oneTime()?.username }}</span><code x-cloak>{{ oneTime()?.password }}</code></div><button class="btn ghost sm" @click="navigator.clipboard.writeText(oneTime()?.password || '')">Copy password</button><button class="btn ghost sm" @click="oneTime.set(null)">Hide</button></section></main><style> .data-wrap{max-width:1500px}.header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}.summary article{display:grid;gap:5px}.summary strong{font-size:28px}.summary small,.service-grid small,.detail small{color:var(--txt3)}.create-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}.create-grid label{display:grid;gap:5px;color:var(--txt3);font-size:11px}.create-grid input,.create-grid select,.filters input,.filters select,.operation-form input,.operation-form select{width:100%;background:var(--bg2);border:1px solid var(--line);border-radius:8px;color:var(--txt);padding:9px}.create-grid label span{font-size:10px}.create-grid .check,.operation-form .check{display:flex;align-items:center;gap:7px}.create-grid .check input,.operation-form .check input{width:auto}.wide{grid-column:1/-1}.filters{display:grid;grid-template-columns:minmax(260px,1fr) repeat(3,170px);gap:8px;margin-bottom:12px}.workspace{display:grid;grid-template-columns:1fr;gap:12px;align-items:start}.workspace.hasDetail{grid-template-columns:minmax(0,1.6fr) minmax(360px,.8fr)}.data-cards{display:grid;gap:10px}.data-cards>.empty{max-width:none;width:100%}.service-card.selected{border-color:var(--accent)}.service-head,.detail-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.service-head>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.service-head h2{font-size:17px;margin:0 0 0 3px}.service-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.service-grid>div{display:grid;gap:4px;min-width:0}.service-grid b,.service-grid span{overflow-wrap:anywhere}.service-grid span{color:var(--txt3);font-size:11px}.actions,.operation-picker{display:flex;gap:6px;flex-wrap:wrap}.operation-picker{margin:10px 0}.operation-picker .active{border-color:var(--accent);color:var(--accent)}.operation-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}.operation-form label{display:grid;gap:4px;color:var(--txt3);font-size:11px}.operation-form button{grid-column:1/-1}.action-preview{background:var(--bg2);border-radius:8px;padding:10px}.observation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:9px}.observation-grid>div{display:grid;gap:4px;background:var(--bg2);border-radius:7px;padding:8px;min-width:0}.observation-grid code{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px}.detail{position:sticky;top:10px;display:grid;gap:18px}.detail h2,.detail h3{margin:0}.capability,.detail>div+div{border-top:1px solid var(--line);padding-top:14px}.capability ul{padding-left:18px;color:var(--txt2)}.connection{display:grid;gap:6px;padding:9px 0;border-bottom:1px solid var(--line)}.connection code{white-space:normal;overflow-wrap:anywhere;font-size:10px}.connection button{justify-self:start}.operation{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:7px 0}.operation small{margin-left:auto}.credential{position:fixed;z-index:30;right:18px;bottom:18px;width:min(620px,calc(100vw - 36px));display:grid;grid-template-columns:1fr auto;gap:10px;box-shadow:0 16px 60px #0009;border-color:var(--accent)}.credential h2,.credential p{margin:0}.secret{grid-column:1/-1;display:grid;gap:5px;background:var(--bg2);padding:10px;border-radius:8px}.secret code{overflow-wrap:anywhere}.mono,code{font-family:var(--mono)}@media(max-width:1100px){.workspace.hasDetail{grid-template-columns:1fr}.detail{position:static}.create-grid{grid-template-columns:repeat(2,1fr)}.service-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.summary{grid-template-columns:repeat(2,1fr)}.filters{grid-template-columns:1fr}.service-grid,.create-grid,.operation-form,.observation-grid{grid-template-columns:1fr}.create-grid>*{grid-column:1!important}}@media(max-width:460px){.summary{grid-template-columns:1fr}.credential{grid-template-columns:1fr}} </style> <script data-stx-scoped>
593
593
  (function() {