diff --git a/internal/webapp/frontend/e2e/home.spec.ts b/internal/webapp/frontend/e2e/home.spec.ts index 6996c9d..5ccc5e3 100644 --- a/internal/webapp/frontend/e2e/home.spec.ts +++ b/internal/webapp/frontend/e2e/home.spec.ts @@ -350,6 +350,13 @@ test("project settings: a member sees no danger zone and cannot edit", async ({ await expect(page.locator("#ps-desc")).toBeDisabled(); await expect(page.locator("#ps-icon-btn")).toBeDisabled(); await expect(page.locator("#ps-save")).toHaveCount(0); + // The way out is a trust answer, so it is not owner-only: a member reading + // About sees the export fact and the docs link. + await expect(page.locator(".ps-export")).toContainText("bdrive export"); + await expect(page.locator(".ps-export a")).toHaveAttribute( + "href", + "https://docs.beardrive.ai/reference/migration/", + ); }); test("project settings: icon + description save, and show in nav and dashboard", async ({ diff --git a/internal/webapp/frontend/src/components/ProjectSettings.tsx b/internal/webapp/frontend/src/components/ProjectSettings.tsx index d15cec3..9f1042e 100644 --- a/internal/webapp/frontend/src/components/ProjectSettings.tsx +++ b/internal/webapp/frontend/src/components/ProjectSettings.tsx @@ -248,6 +248,23 @@ export function ProjectSettings({ )} + {/* The anti-lock-in answer, at the moment someone asks it. Copy only: + exporting is a CLI job (`bdrive export [folder]` — run in the synced + folder, no project id), so there is no route and no button here. */} +

+ Take your files elsewhere. Run bdrive export in the synced + folder to write the whole project — every device's journal and every content blob, so + full history and authorship — into a single archive. bdrive import restores + it into any other BearDrive hub, self-hosted or cloud. Export warns first if this device + still has changes it hasn't pushed.{" "} + + How migration works → + +

diff --git a/internal/webapp/frontend/src/style.css b/internal/webapp/frontend/src/style.css index dd61bd0..88ac481 100644 --- a/internal/webapp/frontend/src/style.css +++ b/internal/webapp/frontend/src/style.css @@ -530,6 +530,9 @@ button, input, a.btn { font-family: inherit; } .ps-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0; font-size: 13px; } .ps-facts dt { color: var(--text-faint); } .ps-facts dd { margin: 0; color: var(--text-dim); } +.ps-export { margin: 16px 0 0; max-width: 62ch; } +.ps-export code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); color: var(--text); } +.ps-export a { color: var(--accent-bright); text-decoration: none; } /* ---- admin panels ---- */ /* width comes from .page (app) — see #content */ diff --git a/internal/webapp/static/assets/index-Bvo9-TXr.css b/internal/webapp/static/assets/index-Bg9aVdbo.css similarity index 61% rename from internal/webapp/static/assets/index-Bvo9-TXr.css rename to internal/webapp/static/assets/index-Bg9aVdbo.css index f54f602..07e4475 100644 --- a/internal/webapp/static/assets/index-Bvo9-TXr.css +++ b/internal/webapp/static/assets/index-Bg9aVdbo.css @@ -1 +1 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--tracking-widest:.1em;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-background:#0a0b0d;--color-foreground:#eef0f3;--color-card:#15171b;--color-card-foreground:#eef0f3;--color-popover:#15171b;--color-popover-foreground:#eef0f3;--color-primary:#f5a623;--color-primary-foreground:#1a1204;--color-secondary:#ffffff08;--color-secondary-foreground:#eef0f3;--color-muted:#ffffff0f;--color-muted-foreground:#9aa0a9;--color-accent:#ffffff0f;--color-accent-foreground:#eef0f3;--color-destructive:#f26d6d;--color-border:#ffffff12;--color-input:#ffffff1c;--color-ring:#f5a623;--radius-ctl:7px}}@layer base,components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.top-4{top:calc(var(--spacing) * 4)}.top-20{top:calc(var(--spacing) * 20)}.top-\[50\%\]{top:50%}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.left-2{left:calc(var(--spacing) * 2)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-\[300px\]{max-height:300px}.min-h-16{min-height:calc(var(--spacing) * 16)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.resize{resize:both}.scroll-my-1{scroll-margin-block:var(--spacing)}.scroll-py-1{scroll-padding-block:var(--spacing)}.auto-rows-min{grid-auto-rows:min-content}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-input{border-color:var(--color-input)}.bg-background{background-color:var(--color-background)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.bg-black\/5{background-color:color-mix(in oklab,var(--color-black) 5%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-foreground{background-color:var(--color-foreground)}.bg-muted\/50{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.fill-foreground{fill:var(--color-foreground)}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-background{color:var(--color-background)}.text-card-foreground{color:var(--color-card-foreground)}.text-destructive{color:var(--color-destructive)}.text-foreground{color:var(--color-foreground)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,border-color\,color\]{transition-property:background-color,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--color-primary)}.selection\:bg-primary::selection{background-color:var(--color-primary)}.selection\:text-primary-foreground ::selection{color:var(--color-primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--color-primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--color-foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}@media(hover:hover){.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-destructive\/90:hover{background-color:#f26d6de6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\:bg-muted\/50:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.hover\:bg-primary\/90:hover{background-color:#f5a623e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:#ffffff06}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--color-accent)}.focus\:text-accent-foreground:focus{color:var(--color-accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--color-ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-ring:focus-visible{border-color:var(--color-ring)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:#f5a62380}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 50%, transparent)}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--color-destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--color-destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--color-muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--color-accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--color-accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--color-accent)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--color-accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--color-muted-foreground)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--color-muted)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--color-destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:#f26d6d1a}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--color-destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--color-destructive)}@media(min-width:40rem){.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media(min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(prefers-color-scheme:dark){.dark\:border-input{border-color:var(--color-input)}.dark\:bg-destructive\/60{background-color:#f26d6d99}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60{background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}.dark\:bg-input\/30{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30{background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}.dark\:bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}@media(hover:hover){.dark\:hover\:bg-accent\/50:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.dark\:hover\:bg-input\/50:hover{background-color:#ffffff0e}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:hover{background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:focus-visible{--tw-ring-color:#f26d6d66}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40[aria-invalid=true]{--tw-ring-color:#f26d6d66}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20[data-variant=destructive]:focus{background-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--color-destructive) 20%,transparent)}}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--color-muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--color-muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--color-destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}:root{color-scheme:dark;--bg: #0a0b0d;--bg-side: #0c0e10;--bg-raise: #15171b;--surface: rgba(255,255,255,.03);--hover: rgba(255,255,255,.06);--border: rgba(255,255,255,.07);--border-2: rgba(255,255,255,.11);--code-bg: #0d0f12;--text: #eef0f3;--text-dim: #9aa0a9;--text-faint: #868b93;--text-ghost: #666b74;--accent: #f5a623;--accent-bright: #ffcf85;--accent-dim: #d3861a;--accent-press: #e0951a;--glow: rgba(245,166,35,.13);--add: #4cc38a;--del: #f26d6d;--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;--ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;--r-ctl: 7px;--r-card: 10px;--r-over: 14px;--page-read: 768px;--page-app: 768px;--page-wide: 1200px;--hero-top: clamp(32px, 8vh, 88px)}@font-face{font-family:"Jersey 10";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/jersey-10-COnnvJff.woff2) format("woff2")}@font-face{font-family:Logo Fallback;src:local("Helvetica Neue"),local("Arial"),local("Segoe UI"),local("Roboto");size-adjust:73%}*{box-sizing:border-box}[hidden]{display:none!important}html,body{height:100%;margin:0}#root{display:contents}body{display:flex;background:var(--bg);color:var(--text);font:13px/1.5 var(--ui);letter-spacing:-.006em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}::selection{background:var(--glow);color:var(--accent-bright)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-radius:5px}:focus-visible{outline-color:var(--accent)}.admin input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}input[type=checkbox]{accent-color:var(--accent);width:20px;height:20px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.sprite{position:absolute}.ico{width:16px;height:16px;flex:none;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}button,input,a.btn{font-family:inherit}#sidebar{width:264px;min-width:210px;background:var(--bg-side);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}#vault{display:flex;align-items:center;gap:9px;height:52px;padding:0 12px 0 14px;border-bottom:1px solid var(--border);position:relative;z-index:45}#vault-badge{flex:none;display:grid;place-items:center;color:var(--accent)}#vault-name{font-family:"Jersey 10","Logo Fallback",var(--ui);font-size:18px;font-weight:400;font-synthesis:none;letter-spacing:.01em;line-height:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#vault-beta{flex:none;font-size:10px;font-weight:600;line-height:1;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-bright);background:color-mix(in srgb,var(--accent) 13%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-radius:999px;padding:3px 6px}.vault-actions{display:flex;align-items:center;gap:4px}#vault #signout,.icon-btn2{width:28px;height:28px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;color:var(--text-ghost);background:transparent;border:none;cursor:pointer;text-decoration:none}#vault #signout:hover,.icon-btn2:hover{color:var(--text);background:var(--hover)}#vault #signout .ico,.icon-btn2 .ico{width:16px;height:16px}#projects{flex:none;max-height:32%;overflow-y:auto;padding:10px 8px 8px;border-bottom:1px solid var(--border)}.nav-head{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint)}.nav-add{display:grid;place-items:center;width:18px;height:18px;border:none;background:transparent;color:var(--text-ghost);cursor:pointer;border-radius:5px}.nav-add .ico{width:14px;height:14px}.nav-add:hover{color:var(--text);background:var(--hover)}#projects ul{list-style:none;margin:0;padding:0}#projects .row{display:flex;align-items:center;gap:9px;height:31px;padding:0 8px;border-radius:7px;color:var(--text-dim);cursor:pointer;position:relative;white-space:nowrap;overflow:hidden}.proj-mark{width:17px;height:17px;border-radius:5px;flex:none;display:grid;place-items:center;font-size:10px;font-weight:700;color:#0a0b0d;letter-spacing:-.02em;text-transform:uppercase}.proj-mark svg{width:11px;height:11px}.proj-menu [data-slot=select-item]{display:flex;align-items:center;gap:8px}#projects .row .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#projects .row:hover{background:var(--hover);color:var(--text)}#projects .row.active{background:var(--glow);color:var(--accent-bright)}#projects .row.active:before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:2px;border-radius:2px;background:var(--accent)}#tree{flex:1;overflow-y:auto;padding:8px 8px 24px}.tguide{position:absolute;top:0;bottom:0;width:1px;background:var(--border);pointer-events:none}#tree .row{display:flex;align-items:center;gap:6px;height:28px;padding:0 8px;border-radius:7px;color:var(--text-dim);cursor:pointer;position:relative;white-space:nowrap;overflow:hidden}#tree .row:hover{background:var(--hover);color:var(--text)}#tree .row.active{background:var(--glow);color:var(--accent-bright)}#tree .row.active:before{content:"";position:absolute;left:0;top:5px;bottom:5px;width:2px;border-radius:2px;background:var(--accent)}#tree .chev{width:14px;height:14px;flex:none;color:var(--text-ghost);transition:transform .12s;display:flex;align-items:center;justify-content:center}#tree .chev .ico{width:13px;height:13px}#tree .ticon{flex:none;display:flex;color:var(--text-ghost)}#tree .ticon .ico{width:15px;height:15px}#tree .row:hover .ticon,#tree .row:hover .chev{color:var(--text-faint)}#tree .row.active .ticon,#tree .row.active .chev{color:var(--accent)}#tree .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#tree .file .label{font-size:12.5px}#tree .file .chev{visibility:hidden}#tree .row.collapsed .chev{transform:rotate(-90deg)}.field-err{color:var(--del);font-size:12px;margin:6px 2px 0}.modal,#palette{translate:none}.admin-card-table{padding:0}.admin-table{width:100%;border-collapse:collapse;table-layout:fixed}.admin-table td .ai-main,.admin-table td a.ai-main,.admin-table td .ai-copy,.admin-table td .ai-tag{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-table th:last-child,.admin-table td:last-child{width:186px;text-align:right}.admin-table tr:last-child td{border-bottom:none}.admin-table th{text-align:left;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--text-faint);padding:0;border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none}.admin-table td{padding:0;border-bottom:1px solid var(--border);overflow:hidden;text-overflow:ellipsis}.admin-table tr.admin-item{display:table-row}.admin-table tr.admin-item td{padding:8px 10px}.admin-card-table{overflow-x:auto}.shares-table .admin-table th:last-child,.shares-table .admin-table td:last-child{width:150px}.share-acts{display:inline-flex;align-items:center;gap:6px}.share-acts .ai-btn{display:inline-flex;align-items:center;justify-content:center;padding:0 8px}.share-acts .ai-btn .ico{width:15px;height:15px}.shares-table .admin-table td .ai-tag{white-space:normal;overflow:visible;text-overflow:clip}.share-banner{margin:0 0 18px;padding:12px 14px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--r-ctl);background:var(--surface)}.share-banner .sb-head{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}.share-banner .sb-head .ico,.share-banner .sb-head svg{width:15px;height:15px;flex:none;color:var(--accent)}.share-banner .sb-count{color:var(--text-faint);font-size:12px}.share-banner .sb-note{margin:6px 0 10px;font-size:12.5px;line-height:1.55;color:var(--text-faint);max-width:64ch}.share-banner .sb-link{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:8px;border-top:1px solid var(--border)}.share-banner .sb-link+.sb-link{margin-top:8px}.share-banner .sb-url{flex:1 1 260px;min-width:0;font-size:12px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.share-banner .sb-meta{font-size:11.5px;color:var(--text-faint)}.share-banner .sb-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.nav-menu{list-style:none;margin:6px 0 0;padding:0}.nav-menu .row .ico{width:15px;height:15px;flex:none;color:var(--text-ghost)}.nav-menu .row.active .ico{color:var(--accent-bright)}.proj-row{display:flex;align-items:center;gap:4px;padding:0 10px 4px 12px}#project-select{flex:1;min-width:0;height:30px;padding:0 9px;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:var(--r-ctl);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap;outline:none}#project-select>span:last-of-type{overflow:hidden;text-overflow:ellipsis}#project-select:hover{background:var(--hover);border-color:var(--border-2)}#project-select svg{color:var(--text-ghost)}.proj-menu{z-index:80;min-width:var(--radix-select-trigger-width, 200px);border:1px solid var(--border-2);border-radius:9px;padding:4px;background:var(--bg-raise);box-shadow:0 10px 32px #00000059}.proj-menu [role=option]{font-size:12.5px;color:var(--text-dim);border-radius:6px;outline:none}.proj-menu [role=option][data-highlighted]{background:var(--hover);color:var(--text)}#accountbar{position:relative;border-top:1px solid var(--border);padding:7px 10px}.gh-star{display:flex;align-items:center;gap:8px;padding:4px 8px;margin-bottom:2px;border-radius:7px;color:var(--text-faint);font-size:11px;text-decoration:none}.gh-star:hover{background:var(--hover);color:var(--text)}.gh-star .gh-mark{width:12px;height:12px;flex:none}.gh-star .ext{margin-left:auto;font-size:9px}#account-btn{width:100%;display:flex;align-items:center;gap:9px;text-align:left;padding:6px 8px;border:none;border-radius:7px;background:transparent;color:var(--text-dim);cursor:pointer;font:inherit}#account-btn:hover{background:var(--hover);color:var(--text)}#account-btn .avatar{width:26px;height:26px;flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700}#account-btn .acct{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}#account-btn .acct b{font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#account-btn .acct small{font-size:11px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#account-btn>.ico{width:14px;height:14px;color:var(--text-ghost)}#account-menu{min-width:var(--radix-dropdown-menu-trigger-width, 220px);padding:5px;border:1px solid var(--border-2);border-radius:9px;background:var(--bg-raise);box-shadow:0 10px 32px #00000059;display:flex;flex-direction:column;z-index:80;outline:none}#account-menu [role=menuitem]{outline:none}#account-menu [role=menuitem][data-highlighted]{background:var(--hover);color:var(--text)}#account-menu .menu-sec{padding:7px 9px 3px;font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint)}#account-menu [role=menuitem]{display:flex;align-items:center;gap:8px;padding:7px 9px;border:none;border-radius:6px;background:transparent;text-align:left;color:var(--text-dim);font:inherit;font-size:12.5px;cursor:pointer;text-decoration:none}#account-menu [role=menuitem]:hover{background:var(--hover);color:var(--text)}#account-menu [role=menuitem] b{font-weight:600}#account-menu [role=menuitem] .ico{width:15px;height:15px}#account-menu .plan-chip{margin-left:auto;color:var(--accent);border-color:var(--border-2)}#account-menu #signout{color:var(--del)}#account-menu #signout:hover{color:var(--del);background:var(--hover)}#billing-view .plan-chip{color:var(--accent)}.plan-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:700px){.plan-grid{grid-template-columns:1fr}}.usage-bar{background:var(--surface);border:1px solid var(--border);border-radius:4px;height:6px;overflow:hidden}.usage-bar>div{background:var(--accent);height:100%}.plan-price{font-size:20px;font-weight:700;margin:0 0 10px}.plan-price small{font-size:12px;color:var(--text-dim);font-weight:500}.muted-note{color:var(--text-dim);font-size:13px}#main{flex:1;display:flex;flex-direction:column;min-width:0}#topbar{position:relative;display:flex;align-items:center;gap:9px;height:52px;padding:0 16px;border-bottom:1px solid var(--border)}.icon-btn{display:none;width:34px;height:34px;border:none;background:transparent;color:var(--text-dim);cursor:pointer;border-radius:7px;align-items:center;justify-content:center}.icon-btn:hover{color:var(--text);background:var(--hover)}#crumb{font-size:12.5px;color:var(--text);font-weight:500;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#crumb .crumb-seg{color:var(--text-dim);cursor:pointer}#crumb .crumb-seg:hover{color:var(--accent-bright)}#crumb .crumb-sep{color:var(--text-ghost);margin:0 5px}#meta{flex:1;min-width:0;font-size:12px;color:var(--text-faint);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta-stale{color:#e07070}.btn{display:inline-flex;align-items:center;gap:6px;flex:none;height:30px;padding:0 11px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text-dim);font-size:12.5px;font-weight:500;cursor:pointer;text-decoration:none}.btn:hover{background:var(--hover);color:var(--text);border-color:var(--border-2)}.btn .ico{width:15px;height:15px}.btn.ghost{color:var(--text-dim)}.tipcard{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:6px 9px;border-radius:8px;border:1px solid var(--border-2);background:var(--surface-solid, var(--bg-raise));color:var(--text);font-size:12.5px;font-weight:500;box-shadow:0 8px 24px #00000059;z-index:80}.tipcard kbd{font:11px var(--ui);color:var(--text-faint);background:var(--hover);border:1px solid var(--border-2);border-radius:5px;padding:1px 5px}#more-menu{position:absolute;right:12px;top:calc(100% - 4px);z-index:80;background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-card);box-shadow:0 18px 44px -14px #000000bf;padding:6px;min-width:168px}.more-item{display:block;width:100%;text-align:left;min-height:40px;padding:0 12px;background:transparent;border:none;cursor:pointer;color:var(--text);font:inherit;font-size:13.5px;border-radius:var(--r-ctl)}.more-item:hover{background:var(--hover)}#content{flex:1;overflow-y:auto;padding:44px 40px 110px;scroll-behavior:smooth;scrollbar-gutter:stable}@media(pointer:fine){#content::-webkit-scrollbar{width:10px}#content::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:5px}#content::-webkit-scrollbar-track{background:transparent}@supports not selector(::-webkit-scrollbar){#content{scrollbar-width:thin;scrollbar-color:var(--border-2) transparent}}}.page{width:100%;max-width:var(--page-app);margin-inline:auto;min-width:0}.page.read{max-width:var(--page-read)}.page.wide{max-width:var(--page-wide)}.empty{color:var(--text-faint);text-align:center;margin-top:var(--hero-top)}.empty-hint{display:block;margin-top:6px;font-size:12px;color:var(--text-faint)}.onboard{max-width:560px;margin:var(--hero-top) auto 0}.onboard h1{font-size:25px;font-weight:640;letter-spacing:-.02em;margin:0 0 8px;color:#f4f6f9}.onboard>p{color:var(--text-dim);margin:0 0 28px;font-size:14px}.ob-card{background:var(--bg-side);border:1px solid var(--border);border-radius:var(--r-card);padding:20px 22px;margin-bottom:14px}.ob-card h3{margin:0 0 6px;font-size:14.5px;font-weight:600}.ob-card p{margin:0 0 14px;font-size:13px;color:var(--text-dim)}.ob-card.ob-start{border-color:var(--border-2);box-shadow:inset 2px 0 0 var(--accent)}.ob-card.ob-start .pbtn{margin-top:2px}.ob-alt{margin:12px 0 0}.ob-alt a{color:var(--text-faint);font-size:12.5px;font-weight:600;text-decoration:none}.ob-alt a:hover{color:var(--text)}.pbtn{display:inline-flex;align-items:center;gap:6px;flex:none;height:32px;padding:0 14px;border-radius:var(--r-ctl);border:none;background:var(--accent);color:#241704;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:none}.pbtn:hover{background:var(--accent-bright)}.pbtn .ico{width:15px;height:15px}.danger-btn{display:inline-flex;align-items:center;height:32px;padding:0 14px;border-radius:var(--r-ctl);border:none;background:#b3382e;color:#fff;font-size:13px;font-weight:600;cursor:pointer}.danger-btn:hover{background:#c94336}[data-slot=input],[data-slot=textarea]{font:inherit;color:var(--text)}[data-slot=input][aria-invalid=true]:focus-visible,[data-slot=textarea][aria-invalid=true]:focus-visible{border-color:var(--del)}[data-slot=card],[data-slot=dropdown-menu-content]{border-color:var(--border)}.project-settings{display:flex;flex-direction:column;gap:14px}.project-settings>h2{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.ps-form{display:flex;flex-direction:column;gap:18px}.ps-field{display:flex;flex-direction:column;gap:7px}.ps-field label{font-size:12.5px;color:var(--text-dim)}.ps-opt{color:var(--text-ghost);font-weight:400}.ps-icon-row{display:flex;align-items:center;gap:10px}.ps-icon-row .proj-mark{width:26px;height:26px;border-radius:7px}.ps-icon-row .proj-mark svg{width:15px;height:15px}.ps-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.ps-meta .field-err{flex:0 1 auto;margin:0}.ps-count{font-size:11.5px;color:var(--text-faint);font-variant-numeric:tabular-nums}.ps-actions{display:flex;justify-content:flex-end}.ps-icon-grid{display:grid;grid-template-columns:repeat(6,30px);gap:4px;padding:8px}.ps-icon-cell{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;border:1px solid transparent;background:none;color:var(--text-dim);cursor:pointer}.ps-icon-cell svg{width:16px;height:16px}.ps-icon-cell:hover{background:var(--hover);color:var(--text)}.ps-icon-cell.active{border-color:var(--accent);color:var(--accent-bright)}.ps-danger [data-slot=card-title]{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:#d2695e;font-weight:600}.ps-chip{margin-left:10px;padding:2px 8px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text-faint);font-size:11px;font-weight:600;letter-spacing:.02em;vertical-align:middle}.ps-people h4{font-size:12.5px;font-weight:600;color:var(--text-dim);margin:0}.ps-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;color:var(--text-dim);margin:0 0 10px}.ps-people select{height:28px;padding:0 8px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px}.ps-people select:disabled{opacity:.6;cursor:default}.ps-note{color:var(--text-faint);font-size:12.5px;margin:0 0 12px;max-width:56ch;line-height:1.55}.ps-people-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 8px}.ps-danger p{color:var(--text-dim);font-size:13px;margin:0 0 14px;max-width:52ch;line-height:1.55}.ps-facts{display:grid;grid-template-columns:auto 1fr;gap:8px 20px;margin:0;font-size:13px}.ps-facts dt{color:var(--text-faint)}.ps-facts dd{margin:0;color:var(--text-dim)}.admin h1{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 6px;color:#f4f6f9}.admin h3{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint);font-weight:600;margin:30px 0 10px}.admin-lbl{flex:1 1 100%;margin:0 0 6px;font-size:12.5px;font-weight:600;color:var(--text-dim)}.admin-sub{color:var(--text-dim);font-size:13.5px;margin:-2px 0 16px;line-height:1.55}.admin-h{display:flex;align-items:center;justify-content:space-between;margin:30px 0 10px}.admin-h h3{margin:0}.admin-row{display:flex;gap:9px;margin-bottom:8px}.admin-row input{flex:1;height:34px;padding:0 12px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:13px;outline:none}.admin-row input:focus{border-color:var(--accent);background:var(--hover)}.admin-list{border:1px solid var(--border);border-radius:var(--r-card);overflow:hidden;background:var(--bg-side)}.admin-list.admin-card-table{overflow-x:auto;overflow-y:hidden}.admin-item{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid var(--border);font-size:13.5px}.modal-actions .ai-btn{height:32px}.empty a{color:var(--accent);text-decoration:none;display:inline-block;padding:6px 10px}.empty a:hover{text-decoration:underline}.empty h3{margin:0 0 8px;font-size:16px;color:var(--text)}.ai-copy{text-align:left;background:none;border:0;padding:6px 0;cursor:pointer}.ai-copy:hover{color:var(--text)}a.ai-main{color:var(--text-dim);text-decoration:none;padding:6px 0}a.ai-main:hover{color:var(--accent)}.th-sort{display:block;width:100%;text-align:left;background:none;border:0;padding:6px 10px;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer}.th-sort:hover{color:var(--text-dim)}.proj-trigger>[data-slot=select-value]{display:block;flex:1 1 auto;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-cell{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;justify-items:start}.admin-table td .role-static{text-align:left}.role-chip-row{margin:-6px 0 12px}.role-chip{margin-left:0;padding:2px 8px;border:1px solid var(--border-2);border-radius:99px;vertical-align:middle}.ext{margin-left:4px;color:var(--text-faint);font-size:11px}.admin-item:last-child{border-bottom:none}.admin-item:hover{background:var(--hover)}.field-err{flex:1 1 100%;margin:6px 0 0}.admin-row{flex-wrap:wrap}.admin-row input[aria-invalid=true]{border-color:var(--del)}.ai-main{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.admin-item>.ai-main{flex:1 1 55%;min-width:22ch}.admin-item>.ai-tag{flex:0 0 auto;min-width:0;max-width:45%}@media(max-width:1000px){.admin-item{flex-wrap:wrap}.admin-item>.ai-tag{flex:1 1 100%;max-width:100%}}.admin-table td .ai-main{min-width:0}.ai-main.mono{font:12px var(--mono);color:var(--text-dim);cursor:pointer}.ai-tag{font-size:11.5px;color:var(--text-faint);flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-item select{height:28px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:0 8px;font:inherit;font-size:12.5px;cursor:pointer}.admin-item select:hover{border-color:var(--border-2)}.ai-btn,.ai-del{flex:none;height:27px;padding:0 11px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text-dim);font:inherit;font-size:12px;font-weight:500;cursor:pointer}.ai-del{color:var(--del);border-color:#f26d6d47}.ai-del:hover{background:#f26d6d1f;border-color:var(--del);color:#ff8b8b}.ai-btn:hover{background:var(--hover);color:var(--text);border-color:var(--border-2)}.admin-empty{padding:14px;color:var(--text-faint);font-size:13px}.admin-item.toggle{cursor:pointer;align-items:flex-start}.admin-item.toggle .ai-main{white-space:normal}.tg-label{font-size:13.5px;font-weight:550;color:var(--text)}.tg-desc{font-size:12px;color:var(--text-faint);margin-top:3px;line-height:1.5}.admin-item.toggle input{margin-top:2px;flex:none}.dl-title{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.dl-title-icon{display:flex;color:var(--accent)}.dl-title-icon .ico{width:20px;height:20px}.dl-sub{color:var(--text-faint);font-size:12.5px;margin:0 0 18px}.dl-heatnote{color:var(--text-faint);font-size:12px;opacity:.8;margin:-14px 0 18px}.dl-items{border:1px solid var(--border);border-radius:var(--r-card);overflow:hidden;background:var(--bg-side)}.dl-row{display:flex;align-items:center;gap:11px;padding:10px 14px;border-bottom:1px solid var(--border);cursor:pointer}.dl-row:last-child{border-bottom:none}.dl-row:hover{background:var(--hover)}.dl-row .ticon{flex:none;display:flex;color:var(--text-ghost)}.dl-row .ticon .ico{width:16px;height:16px}.dl-row:hover .ticon{color:var(--text-faint)}.dl-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;color:var(--text)}.dl-name,#crumb,.hpath,.hnote,.hrun-note,.hdev,.ai-main{unicode-bidi:isolate-override;direction:ltr}.dl-meta{flex:none;font-size:12px;color:var(--text-faint);font-variant-numeric:tabular-nums}.dl-conflict{flex:none;font-size:10.5px;line-height:1;letter-spacing:.02em;text-transform:uppercase;padding:3px 6px;border-radius:999px;border:1px solid var(--accent-dim);background:var(--glow);color:var(--accent-bright);white-space:nowrap}.heatdot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--accent)}.heatdot.lvl1{opacity:.3}.heatdot.lvl2{opacity:.55}.heatdot.lvl3{opacity:.8}.heatdot.lvl4{opacity:1;box-shadow:0 0 6px #f5a6238c}.stalemark{flex:none;font-size:11px;line-height:1;color:#e07070}.dl-empty{padding:24px 14px;color:var(--text-faint);font-size:13px;border:1px dashed var(--border);border-radius:var(--r-card);text-align:center}.dl-h3{margin:28px 0 8px;font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint);font-weight:600}.dl-hlist{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);overflow:hidden;max-width:none}.dl-hlist .hentry:last-child{border-bottom:none}.hentry.clickable{cursor:pointer}.hentry.clickable:hover{background:var(--hover)}.dl-more{margin-top:10px}#vault-name.vault-link{cursor:pointer}#vault-name.vault-link:hover{color:var(--accent-bright)}#account-btn.active{background:var(--glow)}#account-btn.active .acct b{color:var(--accent-bright)}.gd-body{margin-top:18px}.gd-desc{margin:2px 0 8px;color:var(--text-faint);font-size:13px;line-height:1.5}.gd-list{margin:4px 0 8px;padding-left:18px;display:grid;gap:6px}.gd-code{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;margin:6px 0 10px;padding:10px 12px;background:var(--bg-raise);border:1px solid var(--border);border-radius:var(--r-card);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.6;color:var(--text)}.gd-code>code{display:block;min-width:0;overflow-x:auto;white-space:pre}.gd-copy{align-self:start;font:inherit;font-family:inherit;font-size:11px;font-weight:600;padding:3px 9px;border-radius:6px;border:1px solid var(--border-2);background:var(--bg-raise);color:var(--text-faint);cursor:pointer}.gd-copy:hover{color:var(--accent-bright);border-color:var(--accent-dim)}.gd-manual{margin:10px 0 0}.gd-manual>summary{display:inline-block;font-size:12.5px;font-weight:600;color:var(--text-faint);cursor:pointer;padding:4px 0}.gd-manual>summary:before{content:"▸ ";color:var(--text-ghost)}.gd-manual[open]>summary:before{content:"▾ "}.gd-manual>summary:hover{color:var(--text)}.home-insights{margin-top:30px;padding-top:22px;border-top:1px solid var(--border)}.in-title{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.in-title .in-scope{color:var(--text-ghost);font-weight:500;font-size:15px}.gd-head{display:flex;align-items:center;gap:9px}.gd-head .proj-mark{width:22px;height:22px;border-radius:6px}.gd-head .proj-mark svg{width:13px;height:13px}.in-desc{color:var(--text-dim);font-size:13.5px;line-height:1.55;margin:0 0 10px;max-width:62ch}.in-blank{display:grid;justify-items:center;gap:10px;padding:40px 18px;margin-top:14px;max-width:760px}.in-blank p{margin:0;max-width:52ch;line-height:1.55}.in-blank p:first-child{color:var(--text);font-size:14.5px;font-weight:600}.in-blank .pbtn{margin-top:6px}.in-lens{display:flex;gap:6px;margin:0 0 14px}.in-lens-btn{font:inherit;font-size:12px;padding:5px 12px;border-radius:999px;border:1px solid var(--border);background:none;color:var(--text-faint);cursor:pointer}.in-lens-btn:hover{color:var(--text)}.in-lens-btn.active{color:var(--accent);border-color:var(--accent)}.in-chart{width:100%;max-width:760px;height:auto;border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);margin-bottom:6px}.in-axis{stroke:var(--border);stroke-width:1}.in-threshold{stroke:var(--border);stroke-width:1;stroke-dasharray:4 4}.in-danger-zone{fill:#f26d6d0d}.in-label{fill:var(--text-ghost);font-size:11px}.in-quad{fill:var(--text-ghost);font-size:10.5px;text-transform:uppercase;letter-spacing:.06em}.in-quad-danger{fill:#e07070}.in-pt{fill:var(--accent);opacity:.5;cursor:pointer}.in-pt:hover{opacity:1}.in-pt.cold{fill:var(--text-ghost);opacity:.25}.in-pt.danger{fill:#e05d5d;opacity:.6}.in-pt-label{fill:var(--text-faint);font-size:11px;pointer-events:none}.in-h3-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;max-width:760px}.in-cap{font-size:11.5px;color:var(--text-faint);font-weight:400;text-transform:none;letter-spacing:0}.in-treemap{background:#0c0d10}.in-tm-group{fill:none;stroke:var(--border);stroke-width:1;cursor:pointer;pointer-events:all}.in-tm-glabel{fill:var(--text-faint);font-size:10px;text-transform:uppercase;letter-spacing:.05em;cursor:pointer}.in-tm-cell{cursor:pointer}.in-tm-cell:hover{stroke:#fff;stroke-width:1}.in-tm-label{fill:#0c0d10;font-size:10.5px;font-weight:620;cursor:pointer;pointer-events:none}.in-hotpath{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);overflow:hidden}.in-hp-row{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--border);cursor:pointer}.in-hp-row:last-child{border-bottom:none}.in-hp-row:hover{background:var(--hover)}.in-hp-name{flex:0 0 300px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:var(--text)}.in-hp-name.danger{color:var(--accent)}.in-hp-bar{flex:1;display:flex;height:10px;border-radius:3px;overflow:hidden}.in-hp-agent{background:var(--accent)}.in-hp-human{background:#5b8def}.in-hp-share{background:#b478e8}.in-hp-gone{flex:none;font-size:11.5px;color:var(--text-ghost);white-space:nowrap}.in-hp-count{flex:none;width:40px;text-align:right;font-size:11.5px;color:var(--text-faint);font-variant-numeric:tabular-nums}.in-legend{margin:8px 2px 0;font-size:11.5px;color:var(--text-faint)}.in-sw{display:inline-block;width:10px;height:10px;border-radius:2px;vertical-align:-1px}.in-sw.agent{background:var(--accent)}.in-sw.human{background:#5b8def}.in-sw.share{background:#b478e8}.in-sw-age{width:84px;margin:0 5px}.in-sw-flat{filter:grayscale(1);opacity:.45}.in-tm-range{margin-left:14px;color:var(--text-ghost)}.in-matrix rect{transition:opacity .1s}.in-matrix rect:hover{opacity:.85}.hfilters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 0 12px;border-bottom:1px solid var(--border);margin-bottom:4px}.hf-search{position:relative;display:flex;align-items:center;flex:1 1 200px;min-width:160px}.hf-search .ico{position:absolute;left:9px;width:14px;height:14px;color:var(--text-ghost);pointer-events:none}.hf-search input{height:30px;padding-left:29px;font-size:12.5px;border-radius:var(--r-ctl);background:var(--surface)}.hf-search input::-webkit-search-cancel-button{filter:invert(.6)}.hf-user{height:30px;max-width:190px;padding:0 8px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;cursor:pointer}.hf-dates{display:flex;align-items:center;gap:6px}.hf-lbl{font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-ghost)}.hf-date{width:140px;height:30px;font-size:12.5px;border-radius:var(--r-ctl);background:var(--surface)}.hf-date::-webkit-calendar-picker-indicator{filter:invert(.6);cursor:pointer}.hf-dash{color:var(--text-ghost)}.hf-clear{height:30px;padding:0 10px;border:none;border-radius:var(--r-ctl);background:none;color:var(--text-dim);font:inherit;font-size:12.5px;cursor:pointer}.hf-clear:hover{color:var(--text);background:var(--hover)}.hf-clear-empty{margin-top:12px}.hentry{padding:11px 12px;border-bottom:1px solid var(--border);--hindent: 72px}.hentry:hover{background:#ffffff04}.hline{display:flex;gap:10px;align-items:center}.hkind{flex:none;width:62px;white-space:nowrap;text-align:center;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600;padding:2px 6px;border-radius:4px;color:var(--add);background:#4cc38a1f}.hentry.edit .hkind{color:var(--accent-bright);background:var(--glow)}.hentry.delete .hkind{color:#ff8b8b;background:#f26d6d1f}.hpath{font-weight:500;cursor:pointer;color:var(--text);font-size:13px}.hpath:hover{color:var(--accent-bright)}.htime{margin-left:auto;color:var(--text-faint);font-size:12px;font-variant-numeric:tabular-nums}.hmore{display:flex;margin:14px auto}.hmore:disabled{opacity:.6;cursor:default}.hmeta{display:flex;align-items:center;gap:14px;margin-top:4px;padding-left:var(--hindent);font-size:12px;color:var(--text-dim)}.hdev,.hsize{color:var(--text-faint)}.hsize{font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.hnote{margin-top:4px;padding-left:var(--hindent);font-size:12px;color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.hnote:hover{color:var(--text)}.hnote.open{white-space:normal;overflow-wrap:anywhere}.hnote:before{content:"›";display:inline-block;margin-right:5px;color:var(--text-ghost);transition:transform .12s}.hnote.open:before{transform:rotate(90deg)}.hnote a{color:var(--accent-bright);text-decoration:none}.hnote a:hover{text-decoration:underline}.hrun{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);margin:10px 0;overflow:hidden}.hrun-head{display:flex;align-items:center;gap:9px;width:100%;padding:9px 12px;color:var(--text);font-size:12.5px}.hrun-toggle{display:flex;flex:none;padding:2px;border:none;border-radius:4px;background:none;color:var(--text-faint);cursor:pointer}.hrun-toggle:hover{color:var(--text);background:var(--hover)}.hrun-toggle .ico{width:13px;height:13px}.hrun-note{flex-shrink:0;font-weight:560;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46%}.hrun-note a{color:var(--accent-bright);text-decoration:none}.hrun-note a:hover{text-decoration:underline}.hrun-meta{min-width:0;color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hrun-time{margin-left:auto;flex:none;color:var(--text-faint);font-variant-numeric:tabular-nums}.hrun-undo{display:inline-flex;align-items:center;gap:4px;flex:none;padding:2px 8px 2px 5px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer}.hrun-undo:hover{color:var(--del);border-color:#f26d6d61;background:var(--hover)}.hrun-undo:disabled{opacity:.5;cursor:default}.hrun-undo .ico{width:12px;height:12px}.undo-list{margin:10px 0;max-height:40vh;overflow-y:auto;border:1px solid var(--border);border-radius:6px}.undo-row{display:flex;align-items:baseline;gap:10px;padding:5px 9px;font-size:12.5px}.undo-row+.undo-row{border-top:1px solid var(--border)}.undo-row .undo-path{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.undo-row .undo-what{margin-left:auto;flex:none;color:var(--text-faint);font-size:11.5px}.undo-row .undo-after{flex:none;color:var(--del);font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600}.undo-warn{color:var(--del)}.hrun-body{border-top:1px solid var(--border)}.hrun-body .hentry:last-child{border-bottom:none}.hread{flex:none;padding:2px 6px;border-radius:4px;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600;color:var(--text-dim);background:var(--hover)}.hrun-reads{border-top:1px solid var(--border);padding:4px 0 6px}.hrun-reads-head{padding:6px 14px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint)}.hrun-read{display:flex;gap:10px;align-items:center;width:100%;padding:5px 14px;border:none;background:none;font:inherit;text-align:left;cursor:pointer}.hrun-read:hover{background:#ffffff04}.hrun-read .hkind{color:var(--text-dim);background:var(--hover)}.hrun-foot{padding:8px 14px 10px;border-top:1px solid var(--border);font-size:11.5px;color:var(--text-faint)}.hrestore-btn,.hremove-btn{display:inline-flex;align-items:center;gap:4px;margin-left:auto;padding:2px 8px 2px 5px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer}.hrestore-btn:hover{color:var(--accent-bright);border-color:var(--border-2);background:var(--hover)}.hremove-btn:hover{color:var(--del);border-color:#f26d6d61;background:var(--hover)}.hrestore-btn:disabled,.hremove-btn:disabled{opacity:.5;cursor:default}.hrestore-btn .ico,.hremove-btn .ico{width:12px;height:12px}.hactions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 0 23px}.hdiff-btn,.hver-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 7px 2px 4px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer;text-decoration:none}.hdiff-btn:hover,.hver-btn:hover{color:var(--text);border-color:var(--border-2);background:var(--hover)}.hdiff-btn .ico,.hver-btn .ico{width:12px;height:12px}.hdiff-none{flex-basis:100%;font-size:12px;color:var(--text-ghost)}.dv{margin:8px 0 2px 23px;border:1px solid var(--border);border-radius:6px;overflow:hidden}.dv-msg{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:9px 11px;font-size:12px;color:var(--text-faint)}.dv-dl{display:flex;gap:12px}.dv-msg a{color:var(--accent-bright);text-decoration:none}.dv-msg a:hover{text-decoration:underline}.dv-head{display:flex;align-items:center;gap:10px;padding:5px 11px;border-bottom:1px solid var(--border);font-size:11px;font-variant-numeric:tabular-nums}.dv-add{color:var(--add);font-weight:600}.dv-del{color:var(--del);font-weight:600}.dv-same{color:var(--text-ghost)}.dv-body{overflow-x:auto;padding:4px 0}.dv-line{display:flex;font-family:var(--mono);font-size:12px;line-height:1.55;white-space:pre}.dv-n{flex:none;width:34px;padding-right:8px;text-align:right;color:var(--text-ghost);-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums}.dv-mark{flex:none;width:16px;text-align:center;-webkit-user-select:none;user-select:none}.dv-text{padding-right:12px}.dv-ins{background:#4cc38a1a;color:var(--add)}.dv-rm{background:#f26d6d1a;color:#ff8b8b}.dv-ctx{color:var(--text-dim)}#palette{position:fixed;top:12vh;left:50%;transform:translate(-50%);z-index:151;display:block;width:min(560px,92vw);background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-over);box-shadow:0 24px 70px -18px #000c;overflow:hidden;outline:none;padding:0}#palette-inputwrap{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid var(--border)}#palette-inputwrap [data-slot=command-input-wrapper]{flex:1;display:flex;border-bottom:0;padding:0;height:auto}#palette-inputwrap [data-slot=command-input-wrapper]>svg:not(.ico){display:none}#palette input,#palette input:focus{flex:1;width:100%;border:none;background:transparent;box-shadow:none;color:var(--text);font:inherit;font-size:15px;letter-spacing:-.01em;outline:none;padding:0}#palette input::placeholder{color:var(--text-ghost)}#palette-inputwrap .ico{width:17px;height:17px;color:var(--text-faint)}#palette [cmdk-list]{list-style:none;margin:0;padding:8px;max-height:46vh;overflow-y:auto}#palette [cmdk-item]{display:flex;align-items:center;gap:11px;height:38px;padding:0 10px;border-radius:9px;cursor:pointer;color:var(--text-dim);font-size:13.5px}#palette [cmdk-item][data-selected=true]{background:var(--glow)}#palette [cmdk-item][data-selected=true] .picon{color:var(--accent)}#palette [cmdk-item][data-selected=true] .plabel,#palette [cmdk-item][data-selected=true] .plabel b{color:var(--accent-bright)}#palette [cmdk-item] .picon{width:18px;flex:none;display:flex;justify-content:center;color:var(--text-faint)}#palette [cmdk-item] .picon .ico{width:15px;height:15px}#palette [cmdk-item] .plabel{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}#palette [cmdk-item] .plabel b{color:var(--accent-bright);font-weight:600}#palette [cmdk-item] .pkind{flex:none;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-ghost)}#palette [cmdk-list] .pempty{color:var(--text-faint);cursor:default;justify-content:center;height:auto;padding:14px}#palette-hint{padding:9px 16px;border-top:1px solid var(--border);font-size:11px;color:var(--text-ghost)}[data-slot=dialog-overlay]{position:fixed;inset:0;background:#06070999;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:150}.modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:151;display:block;background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-over);padding:22px 24px;width:min(460px,calc(100vw - 40px));box-shadow:0 24px 70px -18px #000c;outline:none}.modal h3{margin:0 0 10px;font-size:16px;font-weight:620;letter-spacing:-.01em}.modal p{margin:0 0 16px;font-size:13.5px;color:var(--text-dim);line-height:1.55}.modal p b{color:var(--text)}.modal-url{font:12px var(--mono);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-ctl);padding:9px 11px;color:var(--text-dim);word-break:break-all;margin-bottom:16px}.modal-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.modal-expiry{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:12.5px;color:var(--text-dim)}.modal-expiry select{height:28px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:0 8px;font:inherit;font-size:12.5px;cursor:pointer}.modal-expiry select:disabled{opacity:.6;cursor:default}.modal-expiry-note{margin-left:auto;color:var(--text-dim)}.modal-label{display:block;font-size:12.5px;color:var(--text-dim);margin:0 0 6px}.modal-msg{margin:0 0 16px;font-size:13.5px;color:var(--text-dim);line-height:1.55}.modal-input{width:100%;height:36px;padding:0 12px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:14px;margin-bottom:16px;outline:none}.modal-input:focus{border-color:var(--accent);background:var(--hover)}.start-points{border:0;margin:0 0 18px;padding:0}.start-points legend{padding:0}.start-point{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border:1px solid var(--border);border-radius:var(--r-ctl);background:var(--surface);cursor:pointer;margin-bottom:6px}.start-point:hover{background:var(--hover)}.start-point.on{border-color:var(--accent);background:var(--hover)}.start-point input{accent-color:var(--accent);margin:2px 0 0;flex:none}.sp-text{display:flex;flex-direction:column;gap:2px;min-width:0}.sp-title{font-size:13.5px;color:var(--text);display:flex;align-items:center;gap:8px}.sp-rec{font-size:10.5px;letter-spacing:.02em;text-transform:uppercase;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:0 6px;line-height:15px}.sp-blurb{font-size:12px;color:var(--text-dim);overflow-wrap:anywhere}.start-point.sp-rule{margin-top:16px}.modal{max-height:calc(100vh - 32px);overflow-y:auto}.gd-note{margin:-4px 0 16px;font-size:13px;color:var(--text-dim);border-left:2px solid var(--accent);padding-left:11px;line-height:1.55}[data-sonner-toast]{background:var(--bg-raise)!important;color:var(--text)!important;border:1px solid var(--border-2)!important;border-radius:10px!important;font-size:13.5px!important;box-shadow:0 18px 44px -12px #000000b3!important}[data-sonner-toast][data-type=error]{border-color:#f26d6d80!important;color:#ffb0aa!important}#sb-backdrop{display:none}@media(max-width:900px){#sidebar{position:fixed;z-index:60;top:0;left:0;height:100%;transform:translate(-100%);transition:transform .2s ease;box-shadow:0 0 40px #0009}body.sb-open #sidebar{transform:translate(0)}body.sb-open #sb-backdrop{display:block;position:fixed;inset:0;background:#0000008c;z-index:50}.icon-btn,#search-btn{display:inline-flex;width:44px;height:44px}#content{padding:24px 18px 70px}#topbar{padding:0 8px;gap:4px}.btn .lbl{display:none}#topbar .btn{min-width:44px;min-height:44px;padding:0;justify-content:center;gap:0}#topbar .btn .ico{width:18px;height:18px}#more-btn:not([hidden]){display:inline-flex}#history-btn,#upload-btn,#download{display:none!important}#topbar{flex-wrap:wrap;height:auto;min-height:52px}#meta{order:1;flex:1 1 100%;text-align:left;white-space:normal;overflow:visible;padding:0 0 8px}#meta:empty{display:none}#crumb{flex:1}#vault{padding:0 8px 0 12px}.icon-btn2,#signout,#tree .row,#projects .row{height:44px}#account-btn,#project-select{min-height:44px}.nav-add{min-width:44px;min-height:44px}.markdown table,pre.plain{display:block;overflow-x:auto;max-width:100%}.admin-item{flex-wrap:wrap;row-gap:8px;padding:12px 14px}.admin-item select,.hf-search input,.hf-user,.hf-date,.hf-clear{height:44px}.hf-dates{flex:1 1 100%}.hf-date{flex:1;width:auto;min-width:0}.hrun-head{flex-wrap:wrap;row-gap:4px}.hrun-note{flex-shrink:1;max-width:none;white-space:normal;overflow:visible}.hrun-meta{order:1;flex:1 1 100%;white-space:normal;overflow:visible}.hrun-undo{order:2;margin-left:auto;min-height:32px}.ai-btn,.ai-del{height:auto;min-height:44px;padding:0 12px}.admin-table thead{display:none}.admin-table,.admin-table tbody,.admin-table td{display:block;width:auto}.admin-table tr.admin-item{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.admin-table tr.admin-item td{padding:0;border-bottom:none}.admin-table tr.admin-item td:first-child{flex:1 1 100%;width:auto}.admin-table tr.admin-item td:last-child{width:auto;text-align:left}[data-slot=dropdown-menu-item]{min-height:44px}#projects{flex:0 1 auto;max-height:none}.admin-row{flex-wrap:wrap}.admin-row input{flex:1 1 100%;min-height:44px}.admin-row button{flex:0 0 auto;align-self:flex-start;min-height:44px}.admin-item .ai-main{flex:1 1 100%;white-space:normal;overflow-wrap:anywhere}.admin-table td{white-space:normal}.admin-table td .ai-main,.admin-table td a.ai-main,.admin-table td .ai-copy,.admin-table td .ai-tag{white-space:normal;overflow-wrap:anywhere}.admin-item .ai-tag{flex:1 1 100%;max-width:100%;white-space:normal;overflow-wrap:anywhere}.ai-copy{min-height:44px;display:block;padding:12px 0;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}a.ai-main{min-height:44px;display:flex;align-items:center}.gd-code{min-height:62px;padding-top:12px;padding-bottom:12px}.gd-copy{min-height:44px;padding:0 14px}.gd-tab{min-height:44px}.in-lens-btn{min-height:44px;padding:0 14px}.modal-input{height:44px}.modal-actions button{height:auto;min-height:44px}.modal-expiry select{height:44px}.pbtn,#palette [cmdk-item]{height:auto;min-height:44px}.more-item{min-height:44px}}.modal-actions .ai-del{margin-right:auto}@media(max-width:430px){.dl-row{flex-wrap:wrap;row-gap:2px}.dl-meta{flex:1 1 100%;padding-left:27px}.ai-tag{font-size:11px}.htime{white-space:nowrap;font-size:12px}.hline{flex-wrap:wrap}.hentry{--hindent: 0px}.modal-actions .ai-del{flex:0 0 100%;justify-content:center;text-align:center}}.markdown h1,.markdown h2,.markdown h3,.markdown h4{color:#f4f6f9;line-height:1.25;letter-spacing:-.018em;margin:1.5em 0 .5em;text-wrap:balance}.markdown h1:first-child{margin-top:0}.markdown h1{font-size:1.85em;font-weight:660;letter-spacing:-.024em}.markdown h2{font-size:1.32em;font-weight:620;margin-top:1.7em}.markdown h3{font-size:1.08em;font-weight:620}.markdown p,.markdown li{color:#c6cbd3;font-size:14.5px;line-height:1.72}.markdown p{margin:0 0 1em}.markdown strong{color:var(--text);font-weight:620}.markdown a{color:var(--accent-bright);text-decoration:none;border-bottom:1px solid rgba(245,166,35,.28)}.markdown a:hover{border-bottom-color:var(--accent)}.markdown a.wiki-missing{color:var(--text-faint);border-bottom:none;text-decoration:underline dotted;cursor:help}.markdown ul,.markdown ol{margin:0 0 1em;padding-left:1.4em}.markdown li{margin-bottom:.4em}.markdown li::marker{color:var(--text-ghost)}.markdown code{background:var(--hover);border:1px solid var(--border);padding:.1em .4em;border-radius:5px;font:12.5px/1.5 var(--mono);color:#e4d9c4}.markdown pre{background:var(--code-bg);border:1px solid var(--border);border-radius:var(--r-card);padding:14px 16px;overflow-x:auto;margin:1.3em 0}.markdown pre code{background:none;border:none;padding:0;color:#c6cbd3}.markdown blockquote{margin:1.3em 0;padding:.3em 1em;border-left:2px solid var(--accent);background:linear-gradient(90deg,var(--glow),transparent);border-radius:0 8px 8px 0;color:#d8cdb6}.markdown blockquote p{margin:.3em 0;color:#d8cdb6}.markdown table{border-collapse:collapse;margin:1.3em 0;font-size:13.5px}.markdown th,.markdown td{border-bottom:1px solid var(--border);padding:9px 13px;text-align:left}.markdown th{color:var(--text-faint);font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:600;border-bottom-color:var(--border-2)}.markdown tr:hover td{background:#ffffff05}.markdown img{max-width:100%;border-radius:8px;border:1px solid var(--border)}.markdown hr{border:none;border-top:1px solid var(--border);margin:2.2em 0}.markdown .mermaid-diagram{margin:1.3em 0;overflow-x:auto}.markdown .mermaid-diagram svg{max-width:100%;height:auto}.markdown .mermaid-err{margin:-.9em 0 .4em;font-size:12px;color:var(--text-faint)}.markdown .mermaid-err-detail{margin:0 0 1.3em;font:11.5px/1.5 var(--mono);color:var(--text-faint);white-space:pre;overflow:auto;max-height:12em}.markdown table.frontmatter{margin:0 0 1.8em;font-size:12px;background:var(--surface);border:1px solid var(--border);border-radius:8px;border-collapse:separate;border-spacing:0}.markdown table.frontmatter th{text-transform:none;letter-spacing:0;font-size:11.5px;color:var(--text-faint);font-weight:600;text-align:left;white-space:nowrap;vertical-align:top;padding:6px 14px 6px 12px;border-bottom:1px solid var(--border)}.markdown table.frontmatter td{color:var(--text-dim);padding:6px 12px 6px 0;border-bottom:1px solid var(--border)}.markdown table.frontmatter tr:last-child th,.markdown table.frontmatter tr:last-child td{border-bottom:none}.markdown table.frontmatter code{white-space:pre-wrap;font-size:11px}.markdown .admin input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.admin input[aria-invalid=true]:focus-visible{outline-color:var(--del)}[role=dialog] input[aria-invalid=true]{border-color:var(--del)}[role=dialog] input[aria-invalid=true]:focus-visible{outline-color:var(--del)}button:disabled,.btn:disabled{cursor:default}input[type=checkbox]{accent-color:var(--accent)}.htmlview,.pdfview{display:block;width:100%;height:calc(100vh - 150px);border:1px solid var(--border);border-radius:var(--r-card);background:#fff}.notfound{margin-top:var(--hero-top);text-align:center;color:var(--text-dim)}.notfound h1{color:var(--text);font-size:1.4em;margin-bottom:.5em}.notfound code{background:var(--hover);border:1px solid var(--border);padding:.15em .5em;border-radius:6px}.notfound .nf-sub{max-width:440px;margin:12px auto 20px;font-size:13px;color:var(--text-faint);line-height:1.6}.vbanner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 22px;padding:11px 14px;border:1px solid var(--accent-dim);border-radius:var(--r-card);background:var(--glow)}.vbanner .vb-icon{flex:none;display:flex;color:var(--accent-bright)}.vbanner .vb-text{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:1px;font-size:12.5px;line-height:1.45}.vbanner .vb-text b{color:var(--accent-bright);font-weight:600}.vbanner .vb-text span{color:var(--text-dim)}.vbanner .vb-actions{flex:none;display:flex;gap:8px}.vbanner .vb-actions .ai-btn{display:inline-flex;align-items:center;text-decoration:none}pre.plain{background:var(--code-bg);border:1px solid var(--border);border-radius:var(--r-card);padding:14px 16px;overflow-x:auto;font:12.5px/1.6 var(--mono);color:#c6cbd3;white-space:pre-wrap;overflow-wrap:anywhere}.csvbox{overflow-x:auto;width:fit-content;max-width:100%;border:1px solid var(--border);border-radius:var(--r-card);background:var(--code-bg)}.csvbox .csvview{display:table;max-width:none;overflow:visible;margin:0;border-collapse:collapse;font:12.5px/1.5 var(--mono);font-variant-numeric:tabular-nums}.csvbox .csvview th,.csvbox .csvview td{border-bottom:1px solid var(--border);padding:8px 14px;text-align:left;white-space:pre;vertical-align:top;color:#c6cbd3;font-size:12.5px}.csvbox .csvview th{background:var(--surface);color:var(--text-faint);font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:600;border-bottom-color:var(--border-2)}.csvbox .csvview tr:last-child td{border-bottom:none}.csvbox .csvview tbody tr:hover td{background:#ffffff05}.csvnote{color:var(--text-faint);font-size:12px;margin:10px 2px 0}.filecard{margin-top:var(--hero-top);text-align:center;color:var(--text-dim)}.filecard .name{font-size:1.2em;color:var(--text);margin-bottom:.3em}.filecard .btn{margin-top:14px} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--tracking-widest:.1em;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-background:#0a0b0d;--color-foreground:#eef0f3;--color-card:#15171b;--color-card-foreground:#eef0f3;--color-popover:#15171b;--color-popover-foreground:#eef0f3;--color-primary:#f5a623;--color-primary-foreground:#1a1204;--color-secondary:#ffffff08;--color-secondary-foreground:#eef0f3;--color-muted:#ffffff0f;--color-muted-foreground:#9aa0a9;--color-accent:#ffffff0f;--color-accent-foreground:#eef0f3;--color-destructive:#f26d6d;--color-border:#ffffff12;--color-input:#ffffff1c;--color-ring:#f5a623;--radius-ctl:7px}}@layer base,components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.top-4{top:calc(var(--spacing) * 4)}.top-20{top:calc(var(--spacing) * 20)}.top-\[50\%\]{top:50%}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.left-2{left:calc(var(--spacing) * 2)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-50{z-index:50}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-\[300px\]{max-height:300px}.min-h-16{min-height:calc(var(--spacing) * 16)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.resize{resize:both}.scroll-my-1{scroll-margin-block:var(--spacing)}.scroll-py-1{scroll-padding-block:var(--spacing)}.auto-rows-min{grid-auto-rows:min-content}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-input{border-color:var(--color-input)}.bg-background{background-color:var(--color-background)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.bg-black\/5{background-color:color-mix(in oklab,var(--color-black) 5%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-foreground{background-color:var(--color-foreground)}.bg-muted\/50{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.bg-transparent{background-color:#0000}.fill-current{fill:currentColor}.fill-foreground{fill:var(--color-foreground)}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.whitespace-nowrap{white-space:nowrap}.text-background{color:var(--color-background)}.text-card-foreground{color:var(--color-card-foreground)}.text-destructive{color:var(--color-destructive)}.text-foreground{color:var(--color-foreground)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--color-background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,border-color\,color\]{transition-property:background-color,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-primary ::selection{background-color:var(--color-primary)}.selection\:bg-primary::selection{background-color:var(--color-primary)}.selection\:text-primary-foreground ::selection{color:var(--color-primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--color-primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--color-foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}@media(hover:hover){.hover\:bg-accent:hover{background-color:var(--color-accent)}.hover\:bg-destructive\/90:hover{background-color:#f26d6de6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--color-destructive) 90%,transparent)}}.hover\:bg-muted\/50:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.hover\:bg-primary\/90:hover{background-color:#f5a623e6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--color-primary) 90%,transparent)}}.hover\:bg-secondary\/80:hover{background-color:#ffffff06}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--color-secondary) 80%,transparent)}}.hover\:text-accent-foreground:hover{color:var(--color-accent-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--color-accent)}.focus\:text-accent-foreground:focus{color:var(--color-accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--color-ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-ring:focus-visible{border-color:var(--color-ring)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:#f5a62380}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 50%, transparent)}}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--color-destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--color-destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--color-muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--color-accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--color-accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--color-accent)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--color-accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--color-muted-foreground)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--color-muted)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--color-destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:#f26d6d1a}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--color-destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--color-destructive)}@media(min-width:40rem){.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media(min-width:48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media(prefers-color-scheme:dark){.dark\:border-input{border-color:var(--color-input)}.dark\:bg-destructive\/60{background-color:#f26d6d99}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60{background-color:color-mix(in oklab,var(--color-destructive) 60%,transparent)}}.dark\:bg-input\/30{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30{background-color:color-mix(in oklab,var(--color-input) 30%,transparent)}}.dark\:bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}@media(hover:hover){.dark\:hover\:bg-accent\/50:hover{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:hover{background-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.dark\:hover\:bg-input\/50:hover{background-color:#ffffff0e}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:hover{background-color:color-mix(in oklab,var(--color-input) 50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:focus-visible{--tw-ring-color:#f26d6d66}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40[aria-invalid=true]{--tw-ring-color:#f26d6d66}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--color-destructive) 40%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20[data-variant=destructive]:focus{background-color:#f26d6d33}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--color-destructive) 20%,transparent)}}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--color-muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--color-muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--color-destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}:root{color-scheme:dark;--bg: #0a0b0d;--bg-side: #0c0e10;--bg-raise: #15171b;--surface: rgba(255,255,255,.03);--hover: rgba(255,255,255,.06);--border: rgba(255,255,255,.07);--border-2: rgba(255,255,255,.11);--code-bg: #0d0f12;--text: #eef0f3;--text-dim: #9aa0a9;--text-faint: #868b93;--text-ghost: #666b74;--accent: #f5a623;--accent-bright: #ffcf85;--accent-dim: #d3861a;--accent-press: #e0951a;--glow: rgba(245,166,35,.13);--add: #4cc38a;--del: #f26d6d;--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;--ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;--r-ctl: 7px;--r-card: 10px;--r-over: 14px;--page-read: 768px;--page-app: 768px;--page-wide: 1200px;--hero-top: clamp(32px, 8vh, 88px)}@font-face{font-family:"Jersey 10";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/jersey-10-COnnvJff.woff2) format("woff2")}@font-face{font-family:Logo Fallback;src:local("Helvetica Neue"),local("Arial"),local("Segoe UI"),local("Roboto");size-adjust:73%}*{box-sizing:border-box}[hidden]{display:none!important}html,body{height:100%;margin:0}#root{display:contents}body{display:flex;background:var(--bg);color:var(--text);font:13px/1.5 var(--ui);letter-spacing:-.006em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}::selection{background:var(--glow);color:var(--accent-bright)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px;border-radius:5px}:focus-visible{outline-color:var(--accent)}.admin input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}input[type=checkbox]{accent-color:var(--accent);width:20px;height:20px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.sprite{position:absolute}.ico{width:16px;height:16px;flex:none;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}button,input,a.btn{font-family:inherit}#sidebar{width:264px;min-width:210px;background:var(--bg-side);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}#vault{display:flex;align-items:center;gap:9px;height:52px;padding:0 12px 0 14px;border-bottom:1px solid var(--border);position:relative;z-index:45}#vault-badge{flex:none;display:grid;place-items:center;color:var(--accent)}#vault-name{font-family:"Jersey 10","Logo Fallback",var(--ui);font-size:18px;font-weight:400;font-synthesis:none;letter-spacing:.01em;line-height:1;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#vault-beta{flex:none;font-size:10px;font-weight:600;line-height:1;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-bright);background:color-mix(in srgb,var(--accent) 13%,transparent);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);border-radius:999px;padding:3px 6px}.vault-actions{display:flex;align-items:center;gap:4px}#vault #signout,.icon-btn2{width:28px;height:28px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center;color:var(--text-ghost);background:transparent;border:none;cursor:pointer;text-decoration:none}#vault #signout:hover,.icon-btn2:hover{color:var(--text);background:var(--hover)}#vault #signout .ico,.icon-btn2 .ico{width:16px;height:16px}#projects{flex:none;max-height:32%;overflow-y:auto;padding:10px 8px 8px;border-bottom:1px solid var(--border)}.nav-head{display:flex;align-items:center;justify-content:space-between;padding:6px 8px;font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint)}.nav-add{display:grid;place-items:center;width:18px;height:18px;border:none;background:transparent;color:var(--text-ghost);cursor:pointer;border-radius:5px}.nav-add .ico{width:14px;height:14px}.nav-add:hover{color:var(--text);background:var(--hover)}#projects ul{list-style:none;margin:0;padding:0}#projects .row{display:flex;align-items:center;gap:9px;height:31px;padding:0 8px;border-radius:7px;color:var(--text-dim);cursor:pointer;position:relative;white-space:nowrap;overflow:hidden}.proj-mark{width:17px;height:17px;border-radius:5px;flex:none;display:grid;place-items:center;font-size:10px;font-weight:700;color:#0a0b0d;letter-spacing:-.02em;text-transform:uppercase}.proj-mark svg{width:11px;height:11px}.proj-menu [data-slot=select-item]{display:flex;align-items:center;gap:8px}#projects .row .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#projects .row:hover{background:var(--hover);color:var(--text)}#projects .row.active{background:var(--glow);color:var(--accent-bright)}#projects .row.active:before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:2px;border-radius:2px;background:var(--accent)}#tree{flex:1;overflow-y:auto;padding:8px 8px 24px}.tguide{position:absolute;top:0;bottom:0;width:1px;background:var(--border);pointer-events:none}#tree .row{display:flex;align-items:center;gap:6px;height:28px;padding:0 8px;border-radius:7px;color:var(--text-dim);cursor:pointer;position:relative;white-space:nowrap;overflow:hidden}#tree .row:hover{background:var(--hover);color:var(--text)}#tree .row.active{background:var(--glow);color:var(--accent-bright)}#tree .row.active:before{content:"";position:absolute;left:0;top:5px;bottom:5px;width:2px;border-radius:2px;background:var(--accent)}#tree .chev{width:14px;height:14px;flex:none;color:var(--text-ghost);transition:transform .12s;display:flex;align-items:center;justify-content:center}#tree .chev .ico{width:13px;height:13px}#tree .ticon{flex:none;display:flex;color:var(--text-ghost)}#tree .ticon .ico{width:15px;height:15px}#tree .row:hover .ticon,#tree .row:hover .chev{color:var(--text-faint)}#tree .row.active .ticon,#tree .row.active .chev{color:var(--accent)}#tree .label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}#tree .file .label{font-size:12.5px}#tree .file .chev{visibility:hidden}#tree .row.collapsed .chev{transform:rotate(-90deg)}.field-err{color:var(--del);font-size:12px;margin:6px 2px 0}.modal,#palette{translate:none}.admin-card-table{padding:0}.admin-table{width:100%;border-collapse:collapse;table-layout:fixed}.admin-table td .ai-main,.admin-table td a.ai-main,.admin-table td .ai-copy,.admin-table td .ai-tag{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-table th:last-child,.admin-table td:last-child{width:186px;text-align:right}.admin-table tr:last-child td{border-bottom:none}.admin-table th{text-align:left;font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--text-faint);padding:0;border-bottom:1px solid var(--border);-webkit-user-select:none;user-select:none}.admin-table td{padding:0;border-bottom:1px solid var(--border);overflow:hidden;text-overflow:ellipsis}.admin-table tr.admin-item{display:table-row}.admin-table tr.admin-item td{padding:8px 10px}.admin-card-table{overflow-x:auto}.shares-table .admin-table th:last-child,.shares-table .admin-table td:last-child{width:150px}.share-acts{display:inline-flex;align-items:center;gap:6px}.share-acts .ai-btn{display:inline-flex;align-items:center;justify-content:center;padding:0 8px}.share-acts .ai-btn .ico{width:15px;height:15px}.shares-table .admin-table td .ai-tag{white-space:normal;overflow:visible;text-overflow:clip}.share-banner{margin:0 0 18px;padding:12px 14px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--r-ctl);background:var(--surface)}.share-banner .sb-head{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}.share-banner .sb-head .ico,.share-banner .sb-head svg{width:15px;height:15px;flex:none;color:var(--accent)}.share-banner .sb-count{color:var(--text-faint);font-size:12px}.share-banner .sb-note{margin:6px 0 10px;font-size:12.5px;line-height:1.55;color:var(--text-faint);max-width:64ch}.share-banner .sb-link{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:8px;border-top:1px solid var(--border)}.share-banner .sb-link+.sb-link{margin-top:8px}.share-banner .sb-url{flex:1 1 260px;min-width:0;font-size:12px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.share-banner .sb-meta{font-size:11.5px;color:var(--text-faint)}.share-banner .sb-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.nav-menu{list-style:none;margin:6px 0 0;padding:0}.nav-menu .row .ico{width:15px;height:15px;flex:none;color:var(--text-ghost)}.nav-menu .row.active .ico{color:var(--accent-bright)}.proj-row{display:flex;align-items:center;gap:4px;padding:0 10px 4px 12px}#project-select{flex:1;min-width:0;height:30px;padding:0 9px;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:var(--r-ctl);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;font-weight:500;cursor:pointer;white-space:nowrap;outline:none}#project-select>span:last-of-type{overflow:hidden;text-overflow:ellipsis}#project-select:hover{background:var(--hover);border-color:var(--border-2)}#project-select svg{color:var(--text-ghost)}.proj-menu{z-index:80;min-width:var(--radix-select-trigger-width, 200px);border:1px solid var(--border-2);border-radius:9px;padding:4px;background:var(--bg-raise);box-shadow:0 10px 32px #00000059}.proj-menu [role=option]{font-size:12.5px;color:var(--text-dim);border-radius:6px;outline:none}.proj-menu [role=option][data-highlighted]{background:var(--hover);color:var(--text)}#accountbar{position:relative;border-top:1px solid var(--border);padding:7px 10px}.gh-star{display:flex;align-items:center;gap:8px;padding:4px 8px;margin-bottom:2px;border-radius:7px;color:var(--text-faint);font-size:11px;text-decoration:none}.gh-star:hover{background:var(--hover);color:var(--text)}.gh-star .gh-mark{width:12px;height:12px;flex:none}.gh-star .ext{margin-left:auto;font-size:9px}#account-btn{width:100%;display:flex;align-items:center;gap:9px;text-align:left;padding:6px 8px;border:none;border-radius:7px;background:transparent;color:var(--text-dim);cursor:pointer;font:inherit}#account-btn:hover{background:var(--hover);color:var(--text)}#account-btn .avatar{width:26px;height:26px;flex:none;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700}#account-btn .acct{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}#account-btn .acct b{font-size:12.5px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#account-btn .acct small{font-size:11px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#account-btn>.ico{width:14px;height:14px;color:var(--text-ghost)}#account-menu{min-width:var(--radix-dropdown-menu-trigger-width, 220px);padding:5px;border:1px solid var(--border-2);border-radius:9px;background:var(--bg-raise);box-shadow:0 10px 32px #00000059;display:flex;flex-direction:column;z-index:80;outline:none}#account-menu [role=menuitem]{outline:none}#account-menu [role=menuitem][data-highlighted]{background:var(--hover);color:var(--text)}#account-menu .menu-sec{padding:7px 9px 3px;font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-faint)}#account-menu [role=menuitem]{display:flex;align-items:center;gap:8px;padding:7px 9px;border:none;border-radius:6px;background:transparent;text-align:left;color:var(--text-dim);font:inherit;font-size:12.5px;cursor:pointer;text-decoration:none}#account-menu [role=menuitem]:hover{background:var(--hover);color:var(--text)}#account-menu [role=menuitem] b{font-weight:600}#account-menu [role=menuitem] .ico{width:15px;height:15px}#account-menu .plan-chip{margin-left:auto;color:var(--accent);border-color:var(--border-2)}#account-menu #signout{color:var(--del)}#account-menu #signout:hover{color:var(--del);background:var(--hover)}#billing-view .plan-chip{color:var(--accent)}.plan-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:700px){.plan-grid{grid-template-columns:1fr}}.usage-bar{background:var(--surface);border:1px solid var(--border);border-radius:4px;height:6px;overflow:hidden}.usage-bar>div{background:var(--accent);height:100%}.plan-price{font-size:20px;font-weight:700;margin:0 0 10px}.plan-price small{font-size:12px;color:var(--text-dim);font-weight:500}.muted-note{color:var(--text-dim);font-size:13px}#main{flex:1;display:flex;flex-direction:column;min-width:0}#topbar{position:relative;display:flex;align-items:center;gap:9px;height:52px;padding:0 16px;border-bottom:1px solid var(--border)}.icon-btn{display:none;width:34px;height:34px;border:none;background:transparent;color:var(--text-dim);cursor:pointer;border-radius:7px;align-items:center;justify-content:center}.icon-btn:hover{color:var(--text);background:var(--hover)}#crumb{font-size:12.5px;color:var(--text);font-weight:500;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#crumb .crumb-seg{color:var(--text-dim);cursor:pointer}#crumb .crumb-seg:hover{color:var(--accent-bright)}#crumb .crumb-sep{color:var(--text-ghost);margin:0 5px}#meta{flex:1;min-width:0;font-size:12px;color:var(--text-faint);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta-stale{color:#e07070}.btn{display:inline-flex;align-items:center;gap:6px;flex:none;height:30px;padding:0 11px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text-dim);font-size:12.5px;font-weight:500;cursor:pointer;text-decoration:none}.btn:hover{background:var(--hover);color:var(--text);border-color:var(--border-2)}.btn .ico{width:15px;height:15px}.btn.ghost{color:var(--text-dim)}.tipcard{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:6px 9px;border-radius:8px;border:1px solid var(--border-2);background:var(--surface-solid, var(--bg-raise));color:var(--text);font-size:12.5px;font-weight:500;box-shadow:0 8px 24px #00000059;z-index:80}.tipcard kbd{font:11px var(--ui);color:var(--text-faint);background:var(--hover);border:1px solid var(--border-2);border-radius:5px;padding:1px 5px}#more-menu{position:absolute;right:12px;top:calc(100% - 4px);z-index:80;background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-card);box-shadow:0 18px 44px -14px #000000bf;padding:6px;min-width:168px}.more-item{display:block;width:100%;text-align:left;min-height:40px;padding:0 12px;background:transparent;border:none;cursor:pointer;color:var(--text);font:inherit;font-size:13.5px;border-radius:var(--r-ctl)}.more-item:hover{background:var(--hover)}#content{flex:1;overflow-y:auto;padding:44px 40px 110px;scroll-behavior:smooth;scrollbar-gutter:stable}@media(pointer:fine){#content::-webkit-scrollbar{width:10px}#content::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:5px}#content::-webkit-scrollbar-track{background:transparent}@supports not selector(::-webkit-scrollbar){#content{scrollbar-width:thin;scrollbar-color:var(--border-2) transparent}}}.page{width:100%;max-width:var(--page-app);margin-inline:auto;min-width:0}.page.read{max-width:var(--page-read)}.page.wide{max-width:var(--page-wide)}.empty{color:var(--text-faint);text-align:center;margin-top:var(--hero-top)}.empty-hint{display:block;margin-top:6px;font-size:12px;color:var(--text-faint)}.onboard{max-width:560px;margin:var(--hero-top) auto 0}.onboard h1{font-size:25px;font-weight:640;letter-spacing:-.02em;margin:0 0 8px;color:#f4f6f9}.onboard>p{color:var(--text-dim);margin:0 0 28px;font-size:14px}.ob-card{background:var(--bg-side);border:1px solid var(--border);border-radius:var(--r-card);padding:20px 22px;margin-bottom:14px}.ob-card h3{margin:0 0 6px;font-size:14.5px;font-weight:600}.ob-card p{margin:0 0 14px;font-size:13px;color:var(--text-dim)}.ob-card.ob-start{border-color:var(--border-2);box-shadow:inset 2px 0 0 var(--accent)}.ob-card.ob-start .pbtn{margin-top:2px}.ob-alt{margin:12px 0 0}.ob-alt a{color:var(--text-faint);font-size:12.5px;font-weight:600;text-decoration:none}.ob-alt a:hover{color:var(--text)}.pbtn{display:inline-flex;align-items:center;gap:6px;flex:none;height:32px;padding:0 14px;border-radius:var(--r-ctl);border:none;background:var(--accent);color:#241704;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;text-decoration:none}.pbtn:hover{background:var(--accent-bright)}.pbtn .ico{width:15px;height:15px}.danger-btn{display:inline-flex;align-items:center;height:32px;padding:0 14px;border-radius:var(--r-ctl);border:none;background:#b3382e;color:#fff;font-size:13px;font-weight:600;cursor:pointer}.danger-btn:hover{background:#c94336}[data-slot=input],[data-slot=textarea]{font:inherit;color:var(--text)}[data-slot=input][aria-invalid=true]:focus-visible,[data-slot=textarea][aria-invalid=true]:focus-visible{border-color:var(--del)}[data-slot=card],[data-slot=dropdown-menu-content]{border-color:var(--border)}.project-settings{display:flex;flex-direction:column;gap:14px}.project-settings>h2{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.ps-form{display:flex;flex-direction:column;gap:18px}.ps-field{display:flex;flex-direction:column;gap:7px}.ps-field label{font-size:12.5px;color:var(--text-dim)}.ps-opt{color:var(--text-ghost);font-weight:400}.ps-icon-row{display:flex;align-items:center;gap:10px}.ps-icon-row .proj-mark{width:26px;height:26px;border-radius:7px}.ps-icon-row .proj-mark svg{width:15px;height:15px}.ps-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.ps-meta .field-err{flex:0 1 auto;margin:0}.ps-count{font-size:11.5px;color:var(--text-faint);font-variant-numeric:tabular-nums}.ps-actions{display:flex;justify-content:flex-end}.ps-icon-grid{display:grid;grid-template-columns:repeat(6,30px);gap:4px;padding:8px}.ps-icon-cell{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;border:1px solid transparent;background:none;color:var(--text-dim);cursor:pointer}.ps-icon-cell svg{width:16px;height:16px}.ps-icon-cell:hover{background:var(--hover);color:var(--text)}.ps-icon-cell.active{border-color:var(--accent);color:var(--accent-bright)}.ps-danger [data-slot=card-title]{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:#d2695e;font-weight:600}.ps-chip{margin-left:10px;padding:2px 8px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text-faint);font-size:11px;font-weight:600;letter-spacing:.02em;vertical-align:middle}.ps-people h4{font-size:12.5px;font-weight:600;color:var(--text-dim);margin:0}.ps-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;color:var(--text-dim);margin:0 0 10px}.ps-people select{height:28px;padding:0 8px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px}.ps-people select:disabled{opacity:.6;cursor:default}.ps-note{color:var(--text-faint);font-size:12.5px;margin:0 0 12px;max-width:56ch;line-height:1.55}.ps-people-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 8px}.ps-danger p{color:var(--text-dim);font-size:13px;margin:0 0 14px;max-width:52ch;line-height:1.55}.ps-facts{display:grid;grid-template-columns:auto 1fr;gap:8px 20px;margin:0;font-size:13px}.ps-facts dt{color:var(--text-faint)}.ps-facts dd{margin:0;color:var(--text-dim)}.ps-export{margin:16px 0 0;max-width:62ch}.ps-export code{font-size:12px;padding:1px 5px;border-radius:4px;background:var(--surface);border:1px solid var(--border);color:var(--text)}.ps-export a{color:var(--accent-bright);text-decoration:none}.admin h1{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 6px;color:#f4f6f9}.admin h3{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint);font-weight:600;margin:30px 0 10px}.admin-lbl{flex:1 1 100%;margin:0 0 6px;font-size:12.5px;font-weight:600;color:var(--text-dim)}.admin-sub{color:var(--text-dim);font-size:13.5px;margin:-2px 0 16px;line-height:1.55}.admin-h{display:flex;align-items:center;justify-content:space-between;margin:30px 0 10px}.admin-h h3{margin:0}.admin-row{display:flex;gap:9px;margin-bottom:8px}.admin-row input{flex:1;height:34px;padding:0 12px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:13px;outline:none}.admin-row input:focus{border-color:var(--accent);background:var(--hover)}.admin-list{border:1px solid var(--border);border-radius:var(--r-card);overflow:hidden;background:var(--bg-side)}.admin-list.admin-card-table{overflow-x:auto;overflow-y:hidden}.admin-item{display:flex;align-items:center;gap:11px;padding:11px 14px;border-bottom:1px solid var(--border);font-size:13.5px}.modal-actions .ai-btn{height:32px}.empty a{color:var(--accent);text-decoration:none;display:inline-block;padding:6px 10px}.empty a:hover{text-decoration:underline}.empty h3{margin:0 0 8px;font-size:16px;color:var(--text)}.ai-copy{text-align:left;background:none;border:0;padding:6px 0;cursor:pointer}.ai-copy:hover{color:var(--text)}a.ai-main{color:var(--text-dim);text-decoration:none;padding:6px 0}a.ai-main:hover{color:var(--accent)}.th-sort{display:block;width:100%;text-align:left;background:none;border:0;padding:6px 10px;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer}.th-sort:hover{color:var(--text-dim)}.proj-trigger>[data-slot=select-value]{display:block;flex:1 1 auto;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.role-cell{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;justify-items:start}.admin-table td .role-static{text-align:left}.role-chip-row{margin:-6px 0 12px}.role-chip{margin-left:0;padding:2px 8px;border:1px solid var(--border-2);border-radius:99px;vertical-align:middle}.ext{margin-left:4px;color:var(--text-faint);font-size:11px}.admin-item:last-child{border-bottom:none}.admin-item:hover{background:var(--hover)}.field-err{flex:1 1 100%;margin:6px 0 0}.admin-row{flex-wrap:wrap}.admin-row input[aria-invalid=true]{border-color:var(--del)}.ai-main{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.admin-item>.ai-main{flex:1 1 55%;min-width:22ch}.admin-item>.ai-tag{flex:0 0 auto;min-width:0;max-width:45%}@media(max-width:1000px){.admin-item{flex-wrap:wrap}.admin-item>.ai-tag{flex:1 1 100%;max-width:100%}}.admin-table td .ai-main{min-width:0}.ai-main.mono{font:12px var(--mono);color:var(--text-dim);cursor:pointer}.ai-tag{font-size:11.5px;color:var(--text-faint);flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-item select{height:28px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:0 8px;font:inherit;font-size:12.5px;cursor:pointer}.admin-item select:hover{border-color:var(--border-2)}.ai-btn,.ai-del{flex:none;height:27px;padding:0 11px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text-dim);font:inherit;font-size:12px;font-weight:500;cursor:pointer}.ai-del{color:var(--del);border-color:#f26d6d47}.ai-del:hover{background:#f26d6d1f;border-color:var(--del);color:#ff8b8b}.ai-btn:hover{background:var(--hover);color:var(--text);border-color:var(--border-2)}.admin-empty{padding:14px;color:var(--text-faint);font-size:13px}.admin-item.toggle{cursor:pointer;align-items:flex-start}.admin-item.toggle .ai-main{white-space:normal}.tg-label{font-size:13.5px;font-weight:550;color:var(--text)}.tg-desc{font-size:12px;color:var(--text-faint);margin-top:3px;line-height:1.5}.admin-item.toggle input{margin-top:2px;flex:none}.dl-title{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.dl-title-icon{display:flex;color:var(--accent)}.dl-title-icon .ico{width:20px;height:20px}.dl-sub{color:var(--text-faint);font-size:12.5px;margin:0 0 18px}.dl-heatnote{color:var(--text-faint);font-size:12px;opacity:.8;margin:-14px 0 18px}.dl-items{border:1px solid var(--border);border-radius:var(--r-card);overflow:hidden;background:var(--bg-side)}.dl-row{display:flex;align-items:center;gap:11px;padding:10px 14px;border-bottom:1px solid var(--border);cursor:pointer}.dl-row:last-child{border-bottom:none}.dl-row:hover{background:var(--hover)}.dl-row .ticon{flex:none;display:flex;color:var(--text-ghost)}.dl-row .ticon .ico{width:16px;height:16px}.dl-row:hover .ticon{color:var(--text-faint)}.dl-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;color:var(--text)}.dl-name,#crumb,.hpath,.hnote,.hrun-note,.hdev,.ai-main{unicode-bidi:isolate-override;direction:ltr}.dl-meta{flex:none;font-size:12px;color:var(--text-faint);font-variant-numeric:tabular-nums}.dl-conflict{flex:none;font-size:10.5px;line-height:1;letter-spacing:.02em;text-transform:uppercase;padding:3px 6px;border-radius:999px;border:1px solid var(--accent-dim);background:var(--glow);color:var(--accent-bright);white-space:nowrap}.heatdot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--accent)}.heatdot.lvl1{opacity:.3}.heatdot.lvl2{opacity:.55}.heatdot.lvl3{opacity:.8}.heatdot.lvl4{opacity:1;box-shadow:0 0 6px #f5a6238c}.stalemark{flex:none;font-size:11px;line-height:1;color:#e07070}.dl-empty{padding:24px 14px;color:var(--text-faint);font-size:13px;border:1px dashed var(--border);border-radius:var(--r-card);text-align:center}.dl-h3{margin:28px 0 8px;font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-faint);font-weight:600}.dl-hlist{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);overflow:hidden;max-width:none}.dl-hlist .hentry:last-child{border-bottom:none}.hentry.clickable{cursor:pointer}.hentry.clickable:hover{background:var(--hover)}.dl-more{margin-top:10px}#vault-name.vault-link{cursor:pointer}#vault-name.vault-link:hover{color:var(--accent-bright)}#account-btn.active{background:var(--glow)}#account-btn.active .acct b{color:var(--accent-bright)}.gd-body{margin-top:18px}.gd-desc{margin:2px 0 8px;color:var(--text-faint);font-size:13px;line-height:1.5}.gd-list{margin:4px 0 8px;padding-left:18px;display:grid;gap:6px}.gd-code{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;margin:6px 0 10px;padding:10px 12px;background:var(--bg-raise);border:1px solid var(--border);border-radius:var(--r-card);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.6;color:var(--text)}.gd-code>code{display:block;min-width:0;overflow-x:auto;white-space:pre}.gd-copy{align-self:start;font:inherit;font-family:inherit;font-size:11px;font-weight:600;padding:3px 9px;border-radius:6px;border:1px solid var(--border-2);background:var(--bg-raise);color:var(--text-faint);cursor:pointer}.gd-copy:hover{color:var(--accent-bright);border-color:var(--accent-dim)}.gd-manual{margin:10px 0 0}.gd-manual>summary{display:inline-block;font-size:12.5px;font-weight:600;color:var(--text-faint);cursor:pointer;padding:4px 0}.gd-manual>summary:before{content:"▸ ";color:var(--text-ghost)}.gd-manual[open]>summary:before{content:"▾ "}.gd-manual>summary:hover{color:var(--text)}.home-insights{margin-top:30px;padding-top:22px;border-top:1px solid var(--border)}.in-title{font-size:21px;font-weight:640;letter-spacing:-.02em;margin:0 0 4px;color:#f4f6f9}.in-title .in-scope{color:var(--text-ghost);font-weight:500;font-size:15px}.gd-head{display:flex;align-items:center;gap:9px}.gd-head .proj-mark{width:22px;height:22px;border-radius:6px}.gd-head .proj-mark svg{width:13px;height:13px}.in-desc{color:var(--text-dim);font-size:13.5px;line-height:1.55;margin:0 0 10px;max-width:62ch}.in-blank{display:grid;justify-items:center;gap:10px;padding:40px 18px;margin-top:14px;max-width:760px}.in-blank p{margin:0;max-width:52ch;line-height:1.55}.in-blank p:first-child{color:var(--text);font-size:14.5px;font-weight:600}.in-blank .pbtn{margin-top:6px}.in-lens{display:flex;gap:6px;margin:0 0 14px}.in-lens-btn{font:inherit;font-size:12px;padding:5px 12px;border-radius:999px;border:1px solid var(--border);background:none;color:var(--text-faint);cursor:pointer}.in-lens-btn:hover{color:var(--text)}.in-lens-btn.active{color:var(--accent);border-color:var(--accent)}.in-chart{width:100%;max-width:760px;height:auto;border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);margin-bottom:6px}.in-axis{stroke:var(--border);stroke-width:1}.in-threshold{stroke:var(--border);stroke-width:1;stroke-dasharray:4 4}.in-danger-zone{fill:#f26d6d0d}.in-label{fill:var(--text-ghost);font-size:11px}.in-quad{fill:var(--text-ghost);font-size:10.5px;text-transform:uppercase;letter-spacing:.06em}.in-quad-danger{fill:#e07070}.in-pt{fill:var(--accent);opacity:.5;cursor:pointer}.in-pt:hover{opacity:1}.in-pt.cold{fill:var(--text-ghost);opacity:.25}.in-pt.danger{fill:#e05d5d;opacity:.6}.in-pt-label{fill:var(--text-faint);font-size:11px;pointer-events:none}.in-h3-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;max-width:760px}.in-cap{font-size:11.5px;color:var(--text-faint);font-weight:400;text-transform:none;letter-spacing:0}.in-treemap{background:#0c0d10}.in-tm-group{fill:none;stroke:var(--border);stroke-width:1;cursor:pointer;pointer-events:all}.in-tm-glabel{fill:var(--text-faint);font-size:10px;text-transform:uppercase;letter-spacing:.05em;cursor:pointer}.in-tm-cell{cursor:pointer}.in-tm-cell:hover{stroke:#fff;stroke-width:1}.in-tm-label{fill:#0c0d10;font-size:10.5px;font-weight:620;cursor:pointer;pointer-events:none}.in-hotpath{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);overflow:hidden}.in-hp-row{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:1px solid var(--border);cursor:pointer}.in-hp-row:last-child{border-bottom:none}.in-hp-row:hover{background:var(--hover)}.in-hp-name{flex:0 0 300px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px;color:var(--text)}.in-hp-name.danger{color:var(--accent)}.in-hp-bar{flex:1;display:flex;height:10px;border-radius:3px;overflow:hidden}.in-hp-agent{background:var(--accent)}.in-hp-human{background:#5b8def}.in-hp-share{background:#b478e8}.in-hp-gone{flex:none;font-size:11.5px;color:var(--text-ghost);white-space:nowrap}.in-hp-count{flex:none;width:40px;text-align:right;font-size:11.5px;color:var(--text-faint);font-variant-numeric:tabular-nums}.in-legend{margin:8px 2px 0;font-size:11.5px;color:var(--text-faint)}.in-sw{display:inline-block;width:10px;height:10px;border-radius:2px;vertical-align:-1px}.in-sw.agent{background:var(--accent)}.in-sw.human{background:#5b8def}.in-sw.share{background:#b478e8}.in-sw-age{width:84px;margin:0 5px}.in-sw-flat{filter:grayscale(1);opacity:.45}.in-tm-range{margin-left:14px;color:var(--text-ghost)}.in-matrix rect{transition:opacity .1s}.in-matrix rect:hover{opacity:.85}.hfilters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 0 12px;border-bottom:1px solid var(--border);margin-bottom:4px}.hf-search{position:relative;display:flex;align-items:center;flex:1 1 200px;min-width:160px}.hf-search .ico{position:absolute;left:9px;width:14px;height:14px;color:var(--text-ghost);pointer-events:none}.hf-search input{height:30px;padding-left:29px;font-size:12.5px;border-radius:var(--r-ctl);background:var(--surface)}.hf-search input::-webkit-search-cancel-button{filter:invert(.6)}.hf-user{height:30px;max-width:190px;padding:0 8px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:12.5px;cursor:pointer}.hf-dates{display:flex;align-items:center;gap:6px}.hf-lbl{font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-ghost)}.hf-date{width:140px;height:30px;font-size:12.5px;border-radius:var(--r-ctl);background:var(--surface)}.hf-date::-webkit-calendar-picker-indicator{filter:invert(.6);cursor:pointer}.hf-dash{color:var(--text-ghost)}.hf-clear{height:30px;padding:0 10px;border:none;border-radius:var(--r-ctl);background:none;color:var(--text-dim);font:inherit;font-size:12.5px;cursor:pointer}.hf-clear:hover{color:var(--text);background:var(--hover)}.hf-clear-empty{margin-top:12px}.hentry{padding:11px 12px;border-bottom:1px solid var(--border);--hindent: 72px}.hentry:hover{background:#ffffff04}.hline{display:flex;gap:10px;align-items:center}.hkind{flex:none;width:62px;white-space:nowrap;text-align:center;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600;padding:2px 6px;border-radius:4px;color:var(--add);background:#4cc38a1f}.hentry.edit .hkind{color:var(--accent-bright);background:var(--glow)}.hentry.delete .hkind{color:#ff8b8b;background:#f26d6d1f}.hpath{font-weight:500;cursor:pointer;color:var(--text);font-size:13px}.hpath:hover{color:var(--accent-bright)}.htime{margin-left:auto;color:var(--text-faint);font-size:12px;font-variant-numeric:tabular-nums}.hmore{display:flex;margin:14px auto}.hmore:disabled{opacity:.6;cursor:default}.hmeta{display:flex;align-items:center;gap:14px;margin-top:4px;padding-left:var(--hindent);font-size:12px;color:var(--text-dim)}.hdev,.hsize{color:var(--text-faint)}.hsize{font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.hnote{margin-top:4px;padding-left:var(--hindent);font-size:12px;color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.hnote:hover{color:var(--text)}.hnote.open{white-space:normal;overflow-wrap:anywhere}.hnote:before{content:"›";display:inline-block;margin-right:5px;color:var(--text-ghost);transition:transform .12s}.hnote.open:before{transform:rotate(90deg)}.hnote a{color:var(--accent-bright);text-decoration:none}.hnote a:hover{text-decoration:underline}.hrun{border:1px solid var(--border);border-radius:var(--r-card);background:var(--bg-side);margin:10px 0;overflow:hidden}.hrun-head{display:flex;align-items:center;gap:9px;width:100%;padding:9px 12px;color:var(--text);font-size:12.5px}.hrun-toggle{display:flex;flex:none;padding:2px;border:none;border-radius:4px;background:none;color:var(--text-faint);cursor:pointer}.hrun-toggle:hover{color:var(--text);background:var(--hover)}.hrun-toggle .ico{width:13px;height:13px}.hrun-note{flex-shrink:0;font-weight:560;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:46%}.hrun-note a{color:var(--accent-bright);text-decoration:none}.hrun-note a:hover{text-decoration:underline}.hrun-meta{min-width:0;color:var(--text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hrun-time{margin-left:auto;flex:none;color:var(--text-faint);font-variant-numeric:tabular-nums}.hrun-undo{display:inline-flex;align-items:center;gap:4px;flex:none;padding:2px 8px 2px 5px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer}.hrun-undo:hover{color:var(--del);border-color:#f26d6d61;background:var(--hover)}.hrun-undo:disabled{opacity:.5;cursor:default}.hrun-undo .ico{width:12px;height:12px}.undo-list{margin:10px 0;max-height:40vh;overflow-y:auto;border:1px solid var(--border);border-radius:6px}.undo-row{display:flex;align-items:baseline;gap:10px;padding:5px 9px;font-size:12.5px}.undo-row+.undo-row{border-top:1px solid var(--border)}.undo-row .undo-path{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.undo-row .undo-what{margin-left:auto;flex:none;color:var(--text-faint);font-size:11.5px}.undo-row .undo-after{flex:none;color:var(--del);font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600}.undo-warn{color:var(--del)}.hrun-body{border-top:1px solid var(--border)}.hrun-body .hentry:last-child{border-bottom:none}.hread{flex:none;padding:2px 6px;border-radius:4px;font-size:10px;text-transform:uppercase;letter-spacing:.06em;font-weight:600;color:var(--text-dim);background:var(--hover)}.hrun-reads{border-top:1px solid var(--border);padding:4px 0 6px}.hrun-reads-head{padding:6px 14px 4px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-faint)}.hrun-read{display:flex;gap:10px;align-items:center;width:100%;padding:5px 14px;border:none;background:none;font:inherit;text-align:left;cursor:pointer}.hrun-read:hover{background:#ffffff04}.hrun-read .hkind{color:var(--text-dim);background:var(--hover)}.hrun-foot{padding:8px 14px 10px;border-top:1px solid var(--border);font-size:11.5px;color:var(--text-faint)}.hrestore-btn,.hremove-btn{display:inline-flex;align-items:center;gap:4px;margin-left:auto;padding:2px 8px 2px 5px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer}.hrestore-btn:hover{color:var(--accent-bright);border-color:var(--border-2);background:var(--hover)}.hremove-btn:hover{color:var(--del);border-color:#f26d6d61;background:var(--hover)}.hrestore-btn:disabled,.hremove-btn:disabled{opacity:.5;cursor:default}.hrestore-btn .ico,.hremove-btn .ico{width:12px;height:12px}.hactions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 0 23px}.hdiff-btn,.hver-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 7px 2px 4px;border:1px solid var(--border);border-radius:5px;background:none;color:var(--text-faint);font:inherit;font-size:12px;cursor:pointer;text-decoration:none}.hdiff-btn:hover,.hver-btn:hover{color:var(--text);border-color:var(--border-2);background:var(--hover)}.hdiff-btn .ico,.hver-btn .ico{width:12px;height:12px}.hdiff-none{flex-basis:100%;font-size:12px;color:var(--text-ghost)}.dv{margin:8px 0 2px 23px;border:1px solid var(--border);border-radius:6px;overflow:hidden}.dv-msg{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:9px 11px;font-size:12px;color:var(--text-faint)}.dv-dl{display:flex;gap:12px}.dv-msg a{color:var(--accent-bright);text-decoration:none}.dv-msg a:hover{text-decoration:underline}.dv-head{display:flex;align-items:center;gap:10px;padding:5px 11px;border-bottom:1px solid var(--border);font-size:11px;font-variant-numeric:tabular-nums}.dv-add{color:var(--add);font-weight:600}.dv-del{color:var(--del);font-weight:600}.dv-same{color:var(--text-ghost)}.dv-body{overflow-x:auto;padding:4px 0}.dv-line{display:flex;font-family:var(--mono);font-size:12px;line-height:1.55;white-space:pre}.dv-n{flex:none;width:34px;padding-right:8px;text-align:right;color:var(--text-ghost);-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums}.dv-mark{flex:none;width:16px;text-align:center;-webkit-user-select:none;user-select:none}.dv-text{padding-right:12px}.dv-ins{background:#4cc38a1a;color:var(--add)}.dv-rm{background:#f26d6d1a;color:#ff8b8b}.dv-ctx{color:var(--text-dim)}#palette{position:fixed;top:12vh;left:50%;transform:translate(-50%);z-index:151;display:block;width:min(560px,92vw);background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-over);box-shadow:0 24px 70px -18px #000c;overflow:hidden;outline:none;padding:0}#palette-inputwrap{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid var(--border)}#palette-inputwrap [data-slot=command-input-wrapper]{flex:1;display:flex;border-bottom:0;padding:0;height:auto}#palette-inputwrap [data-slot=command-input-wrapper]>svg:not(.ico){display:none}#palette input,#palette input:focus{flex:1;width:100%;border:none;background:transparent;box-shadow:none;color:var(--text);font:inherit;font-size:15px;letter-spacing:-.01em;outline:none;padding:0}#palette input::placeholder{color:var(--text-ghost)}#palette-inputwrap .ico{width:17px;height:17px;color:var(--text-faint)}#palette [cmdk-list]{list-style:none;margin:0;padding:8px;max-height:46vh;overflow-y:auto}#palette [cmdk-item]{display:flex;align-items:center;gap:11px;height:38px;padding:0 10px;border-radius:9px;cursor:pointer;color:var(--text-dim);font-size:13.5px}#palette [cmdk-item][data-selected=true]{background:var(--glow)}#palette [cmdk-item][data-selected=true] .picon{color:var(--accent)}#palette [cmdk-item][data-selected=true] .plabel,#palette [cmdk-item][data-selected=true] .plabel b{color:var(--accent-bright)}#palette [cmdk-item] .picon{width:18px;flex:none;display:flex;justify-content:center;color:var(--text-faint)}#palette [cmdk-item] .picon .ico{width:15px;height:15px}#palette [cmdk-item] .plabel{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text)}#palette [cmdk-item] .plabel b{color:var(--accent-bright);font-weight:600}#palette [cmdk-item] .pkind{flex:none;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-ghost)}#palette [cmdk-list] .pempty{color:var(--text-faint);cursor:default;justify-content:center;height:auto;padding:14px}#palette-hint{padding:9px 16px;border-top:1px solid var(--border);font-size:11px;color:var(--text-ghost)}[data-slot=dialog-overlay]{position:fixed;inset:0;background:#06070999;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:150}.modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:151;display:block;background:var(--bg-raise);border:1px solid var(--border-2);border-radius:var(--r-over);padding:22px 24px;width:min(460px,calc(100vw - 40px));box-shadow:0 24px 70px -18px #000c;outline:none}.modal h3{margin:0 0 10px;font-size:16px;font-weight:620;letter-spacing:-.01em}.modal p{margin:0 0 16px;font-size:13.5px;color:var(--text-dim);line-height:1.55}.modal p b{color:var(--text)}.modal-url{font:12px var(--mono);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-ctl);padding:9px 11px;color:var(--text-dim);word-break:break-all;margin-bottom:16px}.modal-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.modal-expiry{display:flex;align-items:center;gap:8px;margin-bottom:16px;font-size:12.5px;color:var(--text-dim)}.modal-expiry select{height:28px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:0 8px;font:inherit;font-size:12.5px;cursor:pointer}.modal-expiry select:disabled{opacity:.6;cursor:default}.modal-expiry-note{margin-left:auto;color:var(--text-dim)}.modal-label{display:block;font-size:12.5px;color:var(--text-dim);margin:0 0 6px}.modal-msg{margin:0 0 16px;font-size:13.5px;color:var(--text-dim);line-height:1.55}.modal-input{width:100%;height:36px;padding:0 12px;border-radius:var(--r-ctl);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:14px;margin-bottom:16px;outline:none}.modal-input:focus{border-color:var(--accent);background:var(--hover)}.start-points{border:0;margin:0 0 18px;padding:0}.start-points legend{padding:0}.start-point{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border:1px solid var(--border);border-radius:var(--r-ctl);background:var(--surface);cursor:pointer;margin-bottom:6px}.start-point:hover{background:var(--hover)}.start-point.on{border-color:var(--accent);background:var(--hover)}.start-point input{accent-color:var(--accent);margin:2px 0 0;flex:none}.sp-text{display:flex;flex-direction:column;gap:2px;min-width:0}.sp-title{font-size:13.5px;color:var(--text);display:flex;align-items:center;gap:8px}.sp-rec{font-size:10.5px;letter-spacing:.02em;text-transform:uppercase;color:var(--accent);border:1px solid var(--accent);border-radius:999px;padding:0 6px;line-height:15px}.sp-blurb{font-size:12px;color:var(--text-dim);overflow-wrap:anywhere}.start-point.sp-rule{margin-top:16px}.modal{max-height:calc(100vh - 32px);overflow-y:auto}.gd-note{margin:-4px 0 16px;font-size:13px;color:var(--text-dim);border-left:2px solid var(--accent);padding-left:11px;line-height:1.55}[data-sonner-toast]{background:var(--bg-raise)!important;color:var(--text)!important;border:1px solid var(--border-2)!important;border-radius:10px!important;font-size:13.5px!important;box-shadow:0 18px 44px -12px #000000b3!important}[data-sonner-toast][data-type=error]{border-color:#f26d6d80!important;color:#ffb0aa!important}#sb-backdrop{display:none}@media(max-width:900px){#sidebar{position:fixed;z-index:60;top:0;left:0;height:100%;transform:translate(-100%);transition:transform .2s ease;box-shadow:0 0 40px #0009}body.sb-open #sidebar{transform:translate(0)}body.sb-open #sb-backdrop{display:block;position:fixed;inset:0;background:#0000008c;z-index:50}.icon-btn,#search-btn{display:inline-flex;width:44px;height:44px}#content{padding:24px 18px 70px}#topbar{padding:0 8px;gap:4px}.btn .lbl{display:none}#topbar .btn{min-width:44px;min-height:44px;padding:0;justify-content:center;gap:0}#topbar .btn .ico{width:18px;height:18px}#more-btn:not([hidden]){display:inline-flex}#history-btn,#upload-btn,#download{display:none!important}#topbar{flex-wrap:wrap;height:auto;min-height:52px}#meta{order:1;flex:1 1 100%;text-align:left;white-space:normal;overflow:visible;padding:0 0 8px}#meta:empty{display:none}#crumb{flex:1}#vault{padding:0 8px 0 12px}.icon-btn2,#signout,#tree .row,#projects .row{height:44px}#account-btn,#project-select{min-height:44px}.nav-add{min-width:44px;min-height:44px}.markdown table,pre.plain{display:block;overflow-x:auto;max-width:100%}.admin-item{flex-wrap:wrap;row-gap:8px;padding:12px 14px}.admin-item select,.hf-search input,.hf-user,.hf-date,.hf-clear{height:44px}.hf-dates{flex:1 1 100%}.hf-date{flex:1;width:auto;min-width:0}.hrun-head{flex-wrap:wrap;row-gap:4px}.hrun-note{flex-shrink:1;max-width:none;white-space:normal;overflow:visible}.hrun-meta{order:1;flex:1 1 100%;white-space:normal;overflow:visible}.hrun-undo{order:2;margin-left:auto;min-height:32px}.ai-btn,.ai-del{height:auto;min-height:44px;padding:0 12px}.admin-table thead{display:none}.admin-table,.admin-table tbody,.admin-table td{display:block;width:auto}.admin-table tr.admin-item{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.admin-table tr.admin-item td{padding:0;border-bottom:none}.admin-table tr.admin-item td:first-child{flex:1 1 100%;width:auto}.admin-table tr.admin-item td:last-child{width:auto;text-align:left}[data-slot=dropdown-menu-item]{min-height:44px}#projects{flex:0 1 auto;max-height:none}.admin-row{flex-wrap:wrap}.admin-row input{flex:1 1 100%;min-height:44px}.admin-row button{flex:0 0 auto;align-self:flex-start;min-height:44px}.admin-item .ai-main{flex:1 1 100%;white-space:normal;overflow-wrap:anywhere}.admin-table td{white-space:normal}.admin-table td .ai-main,.admin-table td a.ai-main,.admin-table td .ai-copy,.admin-table td .ai-tag{white-space:normal;overflow-wrap:anywhere}.admin-item .ai-tag{flex:1 1 100%;max-width:100%;white-space:normal;overflow-wrap:anywhere}.ai-copy{min-height:44px;display:block;padding:12px 0;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}a.ai-main{min-height:44px;display:flex;align-items:center}.gd-code{min-height:62px;padding-top:12px;padding-bottom:12px}.gd-copy{min-height:44px;padding:0 14px}.gd-tab{min-height:44px}.in-lens-btn{min-height:44px;padding:0 14px}.modal-input{height:44px}.modal-actions button{height:auto;min-height:44px}.modal-expiry select{height:44px}.pbtn,#palette [cmdk-item]{height:auto;min-height:44px}.more-item{min-height:44px}}.modal-actions .ai-del{margin-right:auto}@media(max-width:430px){.dl-row{flex-wrap:wrap;row-gap:2px}.dl-meta{flex:1 1 100%;padding-left:27px}.ai-tag{font-size:11px}.htime{white-space:nowrap;font-size:12px}.hline{flex-wrap:wrap}.hentry{--hindent: 0px}.modal-actions .ai-del{flex:0 0 100%;justify-content:center;text-align:center}}.markdown h1,.markdown h2,.markdown h3,.markdown h4{color:#f4f6f9;line-height:1.25;letter-spacing:-.018em;margin:1.5em 0 .5em;text-wrap:balance}.markdown h1:first-child{margin-top:0}.markdown h1{font-size:1.85em;font-weight:660;letter-spacing:-.024em}.markdown h2{font-size:1.32em;font-weight:620;margin-top:1.7em}.markdown h3{font-size:1.08em;font-weight:620}.markdown p,.markdown li{color:#c6cbd3;font-size:14.5px;line-height:1.72}.markdown p{margin:0 0 1em}.markdown strong{color:var(--text);font-weight:620}.markdown a{color:var(--accent-bright);text-decoration:none;border-bottom:1px solid rgba(245,166,35,.28)}.markdown a:hover{border-bottom-color:var(--accent)}.markdown a.wiki-missing{color:var(--text-faint);border-bottom:none;text-decoration:underline dotted;cursor:help}.markdown ul,.markdown ol{margin:0 0 1em;padding-left:1.4em}.markdown li{margin-bottom:.4em}.markdown li::marker{color:var(--text-ghost)}.markdown code{background:var(--hover);border:1px solid var(--border);padding:.1em .4em;border-radius:5px;font:12.5px/1.5 var(--mono);color:#e4d9c4}.markdown pre{background:var(--code-bg);border:1px solid var(--border);border-radius:var(--r-card);padding:14px 16px;overflow-x:auto;margin:1.3em 0}.markdown pre code{background:none;border:none;padding:0;color:#c6cbd3}.markdown blockquote{margin:1.3em 0;padding:.3em 1em;border-left:2px solid var(--accent);background:linear-gradient(90deg,var(--glow),transparent);border-radius:0 8px 8px 0;color:#d8cdb6}.markdown blockquote p{margin:.3em 0;color:#d8cdb6}.markdown table{border-collapse:collapse;margin:1.3em 0;font-size:13.5px}.markdown th,.markdown td{border-bottom:1px solid var(--border);padding:9px 13px;text-align:left}.markdown th{color:var(--text-faint);font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:600;border-bottom-color:var(--border-2)}.markdown tr:hover td{background:#ffffff05}.markdown img{max-width:100%;border-radius:8px;border:1px solid var(--border)}.markdown hr{border:none;border-top:1px solid var(--border);margin:2.2em 0}.markdown .mermaid-diagram{margin:1.3em 0;overflow-x:auto}.markdown .mermaid-diagram svg{max-width:100%;height:auto}.markdown .mermaid-err{margin:-.9em 0 .4em;font-size:12px;color:var(--text-faint)}.markdown .mermaid-err-detail{margin:0 0 1.3em;font:11.5px/1.5 var(--mono);color:var(--text-faint);white-space:pre;overflow:auto;max-height:12em}.markdown table.frontmatter{margin:0 0 1.8em;font-size:12px;background:var(--surface);border:1px solid var(--border);border-radius:8px;border-collapse:separate;border-spacing:0}.markdown table.frontmatter th{text-transform:none;letter-spacing:0;font-size:11.5px;color:var(--text-faint);font-weight:600;text-align:left;white-space:nowrap;vertical-align:top;padding:6px 14px 6px 12px;border-bottom:1px solid var(--border)}.markdown table.frontmatter td{color:var(--text-dim);padding:6px 12px 6px 0;border-bottom:1px solid var(--border)}.markdown table.frontmatter tr:last-child th,.markdown table.frontmatter tr:last-child td{border-bottom:none}.markdown table.frontmatter code{white-space:pre-wrap;font-size:11px}.markdown .admin input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.admin input[aria-invalid=true]:focus-visible{outline-color:var(--del)}[role=dialog] input[aria-invalid=true]{border-color:var(--del)}[role=dialog] input[aria-invalid=true]:focus-visible{outline-color:var(--del)}button:disabled,.btn:disabled{cursor:default}input[type=checkbox]{accent-color:var(--accent)}.htmlview,.pdfview{display:block;width:100%;height:calc(100vh - 150px);border:1px solid var(--border);border-radius:var(--r-card);background:#fff}.notfound{margin-top:var(--hero-top);text-align:center;color:var(--text-dim)}.notfound h1{color:var(--text);font-size:1.4em;margin-bottom:.5em}.notfound code{background:var(--hover);border:1px solid var(--border);padding:.15em .5em;border-radius:6px}.notfound .nf-sub{max-width:440px;margin:12px auto 20px;font-size:13px;color:var(--text-faint);line-height:1.6}.vbanner{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 22px;padding:11px 14px;border:1px solid var(--accent-dim);border-radius:var(--r-card);background:var(--glow)}.vbanner .vb-icon{flex:none;display:flex;color:var(--accent-bright)}.vbanner .vb-text{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:1px;font-size:12.5px;line-height:1.45}.vbanner .vb-text b{color:var(--accent-bright);font-weight:600}.vbanner .vb-text span{color:var(--text-dim)}.vbanner .vb-actions{flex:none;display:flex;gap:8px}.vbanner .vb-actions .ai-btn{display:inline-flex;align-items:center;text-decoration:none}pre.plain{background:var(--code-bg);border:1px solid var(--border);border-radius:var(--r-card);padding:14px 16px;overflow-x:auto;font:12.5px/1.6 var(--mono);color:#c6cbd3;white-space:pre-wrap;overflow-wrap:anywhere}.csvbox{overflow-x:auto;width:fit-content;max-width:100%;border:1px solid var(--border);border-radius:var(--r-card);background:var(--code-bg)}.csvbox .csvview{display:table;max-width:none;overflow:visible;margin:0;border-collapse:collapse;font:12.5px/1.5 var(--mono);font-variant-numeric:tabular-nums}.csvbox .csvview th,.csvbox .csvview td{border-bottom:1px solid var(--border);padding:8px 14px;text-align:left;white-space:pre;vertical-align:top;color:#c6cbd3;font-size:12.5px}.csvbox .csvview th{background:var(--surface);color:var(--text-faint);font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:600;border-bottom-color:var(--border-2)}.csvbox .csvview tr:last-child td{border-bottom:none}.csvbox .csvview tbody tr:hover td{background:#ffffff05}.csvnote{color:var(--text-faint);font-size:12px;margin:10px 2px 0}.filecard{margin-top:var(--hero-top);text-align:center;color:var(--text-dim)}.filecard .name{font-size:1.2em;color:var(--text);margin-bottom:.3em}.filecard .btn{margin-top:14px} diff --git a/internal/webapp/static/assets/index-seXZWqX2.js b/internal/webapp/static/assets/index-Cr0JEM1I.js similarity index 99% rename from internal/webapp/static/assets/index-seXZWqX2.js rename to internal/webapp/static/assets/index-Cr0JEM1I.js index c1bc968..d234355 100644 --- a/internal/webapp/static/assets/index-seXZWqX2.js +++ b/internal/webapp/static/assets/index-Cr0JEM1I.js @@ -112,7 +112,7 @@ Error generating stack: `+c.message+` `)}x.write("payload.value = newResult;"),x.write("return payload;");const T=x.compile();return(O,N)=>T(b,O,N)};let l;const u=Ru,d=!cg.jitless,p=d&&W4.value,y=t.catchall;let v;e._zod.parse=(b,x)=>{v??(v=i.value);const w=b.value;return u(w)?d&&p&&x?.async===!1&&x.jitless!==!0?(l||(l=o(t.shape)),b=l(b,x),y?bC([],w,b,x,v,e):b):r(b,x):(b.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),b)}});function Vx(e,t,r,i){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const o=e.filter(l=>!$s(l));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(l=>l.issues.map(u=>Mi(u,i,Ai())))}),t)}const I6=me("$ZodUnion",(e,t)=>{Vt.init(e,t),pt(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),pt(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),pt(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),pt(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>fg(o.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,o)=>{if(r)return r(i,o);let l=!1;const u=[];for(const d of t.options){const m=d._zod.run({value:i.value,issues:[]},o);if(m instanceof Promise)u.push(m),l=!0;else{if(m.issues.length===0)return m;u.push(m)}}return l?Promise.all(u).then(d=>Vx(d,i,e,o)):Vx(u,i,e,o)}}),P6=me("$ZodIntersection",(e,t)=>{Vt.init(e,t),e._zod.parse=(r,i)=>{const o=r.value,l=t.left._zod.run({value:o,issues:[]},i),u=t.right._zod.run({value:o,issues:[]},i);return l instanceof Promise||u instanceof Promise?Promise.all([l,u]).then(([m,p])=>Ux(r,m,p)):Ux(r,l,u)}});function Qm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pl(e)&&pl(t)){const r=Object.keys(t),i=Object.keys(e).filter(l=>r.indexOf(l)!==-1),o={...e,...t};for(const l of i){const u=Qm(e[l],t[l]);if(!u.valid)return{valid:!1,mergeErrorPath:[l,...u.mergeErrorPath]};o[l]=u.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let i=0;id.l&&d.r).map(([d])=>d);if(l.length&&o&&e.issues.push({...o,keys:l}),$s(e))return e;const u=Qm(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const F6=me("$ZodEnum",(e,t)=>{Vt.init(e,t);const r=cC(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(o=>e5.has(typeof o)).map(o=>typeof o=="string"?id(o):o.toString()).join("|")})$`),e._zod.parse=(o,l)=>{const u=o.value;return i.has(u)||o.issues.push({code:"invalid_value",values:r,input:u,inst:e}),o}}),V6=me("$ZodTransform",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new lC(e.constructor.name);const o=t.transform(r.value,r);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then(u=>(r.value=u,r.fallback=!0,r));if(o instanceof Promise)throw new Bs;return r.value=o,r.fallback=!0,r}});function Hx(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const xC=me("$ZodOptional",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",pt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),pt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${fg(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){const o=r.value,l=t.innerType._zod.run(r,i);return l instanceof Promise?l.then(u=>Hx(u,o)):Hx(l,o)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),U6=me("$ZodExactOptional",(e,t)=>{xC.init(e,t),pt(e._zod,"values",()=>t.innerType._zod.values),pt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),H6=me("$ZodNullable",(e,t)=>{Vt.init(e,t),pt(e._zod,"optin",()=>t.innerType._zod.optin),pt(e._zod,"optout",()=>t.innerType._zod.optout),pt(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${fg(r.source)}|null)$`):void 0}),pt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),B6=me("$ZodDefault",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",pt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(l=>Bx(l,t)):Bx(o,t)}});function Bx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const q6=me("$ZodPrefault",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",pt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),G6=me("$ZodNonOptional",(e,t)=>{Vt.init(e,t),pt(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(l=>qx(l,e)):qx(o,e)}});function qx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Z6=me("$ZodCatch",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",pt(e._zod,"optout",()=>t.innerType._zod.optout),pt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(l=>(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(u=>Mi(u,i,Ai()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(l=>Mi(l,i,Ai()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),K6=me("$ZodPipe",(e,t)=>{Vt.init(e,t),pt(e._zod,"values",()=>t.in._zod.values),pt(e._zod,"optin",()=>t.in._zod.optin),pt(e._zod,"optout",()=>t.out._zod.optout),pt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){const l=t.out._zod.run(r,i);return l instanceof Promise?l.then(u=>au(u,t.in,i)):au(l,t.in,i)}const o=t.in._zod.run(r,i);return o instanceof Promise?o.then(l=>au(l,t.out,i)):au(o,t.out,i)}});function au(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const Y6=me("$ZodReadonly",(e,t)=>{Vt.init(e,t),pt(e._zod,"propValues",()=>t.innerType._zod.propValues),pt(e._zod,"values",()=>t.innerType._zod.values),pt(e._zod,"optin",()=>t.innerType?._zod?.optin),pt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);const o=t.innerType._zod.run(r,i);return o instanceof Promise?o.then(Gx):Gx(o)}});function Gx(e){return e.value=Object.freeze(e.value),e}const Q6=me("$ZodCustom",(e,t)=>{Nr.init(e,t),Vt.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{const i=r.value,o=t.fn(i);if(o instanceof Promise)return o.then(l=>Zx(l,r,i,e));Zx(o,r,i,e)}});function Zx(e,t,r,i){if(!e){const o={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(gl(o))}}var Kx;class X6{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const i={...this.get(r)??{}};delete i.id;const o={...i,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function J6(){return new X6}(Kx=globalThis).__zod_globalRegistry??(Kx.__zod_globalRegistry=J6());const tl=globalThis.__zod_globalRegistry;function W6(e,t){return new e({type:"string",...Ie(t)})}function eL(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ie(t)})}function Yx(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ie(t)})}function tL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ie(t)})}function nL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ie(t)})}function rL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ie(t)})}function aL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ie(t)})}function iL(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ie(t)})}function sL(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ie(t)})}function oL(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ie(t)})}function lL(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ie(t)})}function cL(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ie(t)})}function uL(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ie(t)})}function dL(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ie(t)})}function fL(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ie(t)})}function hL(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ie(t)})}function mL(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ie(t)})}function pL(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ie(t)})}function gL(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ie(t)})}function vL(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ie(t)})}function yL(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ie(t)})}function bL(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ie(t)})}function xL(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ie(t)})}function wL(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ie(t)})}function SL(e,t){return new e({type:"string",format:"date",check:"string_format",...Ie(t)})}function _L(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ie(t)})}function CL(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ie(t)})}function EL(e,t){return new e({type:"boolean",...Ie(t)})}function RL(e){return new e({type:"unknown"})}function jL(e,t){return new e({type:"never",...Ie(t)})}function wC(e,t){return new Y5({check:"max_length",...Ie(t),maximum:e})}function Tu(e,t){return new Q5({check:"min_length",...Ie(t),minimum:e})}function SC(e,t){return new X5({check:"length_equals",...Ie(t),length:e})}function TL(e,t){return new J5({check:"string_format",format:"regex",...Ie(t),pattern:e})}function OL(e){return new W5({check:"string_format",format:"lowercase",...Ie(e)})}function AL(e){return new e6({check:"string_format",format:"uppercase",...Ie(e)})}function ML(e,t){return new t6({check:"string_format",format:"includes",...Ie(t),includes:e})}function NL(e,t){return new n6({check:"string_format",format:"starts_with",...Ie(t),prefix:e})}function DL(e,t){return new r6({check:"string_format",format:"ends_with",...Ie(t),suffix:e})}function eo(e){return new a6({check:"overwrite",tx:e})}function kL(e){return eo(t=>t.normalize(e))}function zL(){return eo(e=>e.trim())}function LL(){return eo(e=>e.toLowerCase())}function $L(){return eo(e=>e.toUpperCase())}function IL(){return eo(e=>J4(e))}function PL(e,t,r){return new e({type:"array",element:t,...Ie(r)})}function FL(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ie(r)})}function VL(e,t){const r=UL(i=>(i.addIssue=o=>{if(typeof o=="string")i.issues.push(gl(o,i.value,r._zod.def));else{const l=o;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=i.value),l.inst??(l.inst=r),l.continue??(l.continue=!r._zod.def.abort),i.issues.push(gl(l))}},e(i.value,i)),t);return r}function UL(e,t){const r=new Nr({check:"custom",...Ie(t)});return r._zod.check=e,r}function _C(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??tl,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function cn(e,t,r={path:[],schemaPath:[]}){var i;const o=e._zod.def,l=t.seen.get(e);if(l)return l.count++,r.schemaPath.includes(e)&&(l.cycle=r.path),l.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const d=e._zod.toJSONSchema?.();if(d)u.schema=d;else{const y={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,y);else{const b=u.schema,x=t.processors[o.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);x(e,t,b,y)}const v=e._zod.parent;v&&(u.ref||(u.ref=v),cn(v,t,y),t.seen.get(v).isParent=!0)}const m=t.metadataRegistry.get(e);return m&&Object.assign(u.schema,m),t.io==="input"&&gn(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&"_prefault"in u.schema&&((i=u.schema).default??(i.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function CC(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const u of e.seen.entries()){const d=e.metadataRegistry.get(u[0])?.id;if(d){const m=i.get(d);if(m&&m!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(d,u[0])}}const o=u=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(u[0])?.id,b=e.external.uri??(w=>w);if(v)return{ref:b(v)};const x=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=x,{defId:x,ref:`${b("__shared")}#/${d}/${x}`}}if(u[1]===r)return{ref:"#"};const p=`#/${d}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:p+y}},l=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:m,defId:p}=o(u);d.def={...d.schema},p&&(d.defId=p);const y=d.schema;for(const v in y)delete y[v];y.$ref=m};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){l(u);continue}if(e.external){const p=e.external.registry.get(u[0])?.id;if(t!==u[0]&&p){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(d.cycle){l(u);continue}if(d.count>1&&e.reused==="ref"){l(u);continue}}}function EC(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=d=>{const m=e.seen.get(d);if(m.ref===null)return;const p=m.def??m.schema,y={...p},v=m.ref;if(m.ref=null,v){i(v);const x=e.seen.get(v),w=x.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(w)):Object.assign(p,w),Object.assign(p,y),d._zod.parent===v)for(const E in p)E==="$ref"||E==="allOf"||E in y||delete p[E];if(w.$ref&&x.def)for(const E in p)E==="$ref"||E==="allOf"||E in x.def&&JSON.stringify(p[E])===JSON.stringify(x.def[E])&&delete p[E]}const b=d._zod.parent;if(b&&b!==v){i(b);const x=e.seen.get(b);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const w in p)w==="$ref"||w==="allOf"||w in x.def&&JSON.stringify(p[w])===JSON.stringify(x.def[w])&&delete p[w]}e.override({zodSchema:d,jsonSchema:p,path:m.path??[]})};for(const d of[...e.seen.entries()].reverse())i(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,r.def??r.schema);const l=e.metadataRegistry.get(t)?.id;l!==void 0&&o.id===l&&delete o.id;const u=e.external?.defs??{};for(const d of e.seen.entries()){const m=d[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,u[m.defId]=m.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ou(t,"input",e.processors),output:Ou(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function gn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return gn(i.element,r);if(i.type==="set")return gn(i.valueType,r);if(i.type==="lazy")return gn(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return gn(i.innerType,r);if(i.type==="intersection")return gn(i.left,r)||gn(i.right,r);if(i.type==="record"||i.type==="map")return gn(i.keyType,r)||gn(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:gn(i.in,r)||gn(i.out,r);if(i.type==="object"){for(const o in i.shape)if(gn(i.shape[o],r))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(gn(o,r))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(gn(o,r))return!0;return!!(i.rest&&gn(i.rest,r))}return!1}const HL=(e,t={})=>r=>{const i=_C({...r,processors:t});return cn(e,i),CC(i,e),EC(i,e)},Ou=(e,t,r={})=>i=>{const{libraryOptions:o,target:l}=i??{},u=_C({...o??{},target:l,io:t,processors:r});return cn(e,u),CC(u,e),EC(u,e)},BL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qL=(e,t,r,i)=>{const o=r;o.type="string";const{minimum:l,maximum:u,format:d,patterns:m,contentEncoding:p}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof u=="number"&&(o.maxLength=u),d&&(o.format=BL[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const y=[...m];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(v=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},GL=(e,t,r,i)=>{r.type="boolean"},ZL=(e,t,r,i)=>{r.not={}},KL=(e,t,r,i)=>{},YL=(e,t,r,i)=>{const o=e._zod.def,l=cC(o.entries);l.every(u=>typeof u=="number")&&(r.type="number"),l.every(u=>typeof u=="string")&&(r.type="string"),r.enum=l},QL=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},XL=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JL=(e,t,r,i)=>{const o=r,l=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(o.minItems=u),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=cn(l.element,t,{...i,path:[...i.path,"items"]})},WL=(e,t,r,i)=>{const o=r,l=e._zod.def;o.type="object",o.properties={};const u=l.shape;for(const p in u)o.properties[p]=cn(u[p],t,{...i,path:[...i.path,"properties",p]});const d=new Set(Object.keys(u)),m=new Set([...d].filter(p=>{const y=l.shape[p]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));m.size>0&&(o.required=Array.from(m)),l.catchall?._zod.def.type==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=cn(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},e8=(e,t,r,i)=>{const o=e._zod.def,l=o.inclusive===!1,u=o.options.map((d,m)=>cn(d,t,{...i,path:[...i.path,l?"oneOf":"anyOf",m]}));l?r.oneOf=u:r.anyOf=u},t8=(e,t,r,i)=>{const o=e._zod.def,l=cn(o.left,t,{...i,path:[...i.path,"allOf",0]}),u=cn(o.right,t,{...i,path:[...i.path,"allOf",1]}),d=p=>"allOf"in p&&Object.keys(p).length===1,m=[...d(l)?l.allOf:[l],...d(u)?u.allOf:[u]];r.allOf=m},n8=(e,t,r,i)=>{const o=e._zod.def,l=cn(o.innerType,t,i),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=o.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},r8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType},a8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},i8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},s8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType;let u;try{u=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},o8=(e,t,r,i)=>{const o=e._zod.def,l=o.in._zod.traits.has("$ZodTransform"),u=t.io==="input"?l?o.out:o.in:o.out;cn(u,t,i);const d=t.seen.get(e);d.ref=u},l8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,r.readOnly=!0},RC=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType};function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){var m=o.errors[0][0];r[d]={message:m.message,type:m.code}}else r[d]={message:u,type:l};if(o.code==="invalid_union"&&o.errors.forEach(function(v){return v.forEach(function(b){return e.push(Xm({},b,{path:[].concat(o.path,b.path)}))})}),t){var p=r[d].types,y=p&&p[o.code];r[d]=og(d,t,r,l,y?[].concat(y,o.message):o.message)}e.shift()};e.length;)i();return r}function gg(e,t,r){if(r===void 0&&(r={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(e))return function(i,o,l){try{return Promise.resolve(Qx(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(u){return l.shouldUseNativeValidation&&Km({},l),{errors:{},values:r.raw?Object.assign({},i):u}})},function(u){if((function(d){return Array.isArray(d?.issues)})(u))return{values:{},errors:kx(c8(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,o,l){try{return Promise.resolve(Qx(function(){return Promise.resolve((r.mode==="sync"?f5:h5)(e,i,t)).then(function(u){return l.shouldUseNativeValidation&&Km({},l),{errors:{},values:r.raw?Object.assign({},i):u}})},function(u){if((function(d){return d instanceof mg})(u))return{values:{},errors:kx(u8(u.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}const d8=me("ZodISODateTime",(e,t)=>{y6.init(e,t),Et.init(e,t)});function f8(e){return wL(d8,e)}const h8=me("ZodISODate",(e,t)=>{b6.init(e,t),Et.init(e,t)});function m8(e){return SL(h8,e)}const p8=me("ZodISOTime",(e,t)=>{x6.init(e,t),Et.init(e,t)});function g8(e){return _L(p8,e)}const v8=me("ZodISODuration",(e,t)=>{w6.init(e,t),Et.init(e,t)});function y8(e){return CL(v8,e)}const b8=(e,t)=>{mg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>d5(e,r)},flatten:{value:r=>u5(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ym,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ym,2)}},isEmpty:{get(){return e.issues.length===0}}})},nr=me("ZodError",b8,{Parent:Error}),x8=od(nr),w8=ld(nr),S8=cd(nr),_8=ud(nr),C8=g5(nr),E8=v5(nr),R8=y5(nr),j8=b5(nr),T8=x5(nr),O8=w5(nr),A8=S5(nr),M8=_5(nr),Xx=new WeakMap;function fd(e,t,r){const i=Object.getPrototypeOf(e);let o=Xx.get(i);if(o||(o=new Set,Xx.set(i,o)),!o.has(t)){o.add(t);for(const l in r){const u=r[l];Object.defineProperty(i,l,{configurable:!0,enumerable:!1,get(){const d=u.bind(this);return Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d}),d},set(d){Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d})}})}}}const Ut=me("ZodType",(e,t)=>(Vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ou(e,"input"),output:Ou(e,"output")}}),e.toJSONSchema=HL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>x8(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>S8(e,r,i),e.parseAsync=async(r,i)=>w8(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>_8(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>C8(e,r,i),e.decode=(r,i)=>E8(e,r,i),e.encodeAsync=async(r,i)=>R8(e,r,i),e.decodeAsync=async(r,i)=>j8(e,r,i),e.safeEncode=(r,i)=>T8(e,r,i),e.safeDecode=(r,i)=>O8(e,r,i),e.safeEncodeAsync=async(r,i)=>A8(e,r,i),e.safeDecodeAsync=async(r,i)=>M8(e,r,i),fd(e,"ZodType",{check(...r){const i=this.def;return this.clone(Wa(i,{checks:[...i.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return ei(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(C$(r,i))},superRefine(r,i){return this.check(E$(r,i))},overwrite(r){return this.check(eo(r))},optional(){return tw(this)},exactOptional(){return d$(this)},nullable(){return nw(this)},nullish(){return tw(nw(this))},nonoptional(r){return v$(this,r)},array(){return t$(this)},or(r){return a$([this,r])},and(r){return s$(this,r)},transform(r){return rw(this,c$(r))},default(r){return m$(this,r)},prefault(r){return g$(this,r)},catch(r){return b$(this,r)},pipe(r){return rw(this,r)},readonly(){return S$(this)},describe(r){const i=this.clone();return tl.add(i,{description:r}),i},meta(...r){if(r.length===0)return tl.get(this);const i=this.clone();return tl.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return tl.get(e)?.description},configurable:!0}),e)),jC=me("_ZodString",(e,t)=>{pg.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,l)=>qL(e,i,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,fd(e,"_ZodString",{regex(...i){return this.check(TL(...i))},includes(...i){return this.check(ML(...i))},startsWith(...i){return this.check(NL(...i))},endsWith(...i){return this.check(DL(...i))},min(...i){return this.check(Tu(...i))},max(...i){return this.check(wC(...i))},length(...i){return this.check(SC(...i))},nonempty(...i){return this.check(Tu(1,...i))},lowercase(i){return this.check(OL(i))},uppercase(i){return this.check(AL(i))},trim(){return this.check(zL())},normalize(...i){return this.check(kL(...i))},toLowerCase(){return this.check(LL())},toUpperCase(){return this.check($L())},slugify(){return this.check(IL())}})}),N8=me("ZodString",(e,t)=>{pg.init(e,t),jC.init(e,t),e.email=r=>e.check(eL(D8,r)),e.url=r=>e.check(iL(k8,r)),e.jwt=r=>e.check(xL(Y8,r)),e.emoji=r=>e.check(sL(z8,r)),e.guid=r=>e.check(Yx(Jx,r)),e.uuid=r=>e.check(tL(iu,r)),e.uuidv4=r=>e.check(nL(iu,r)),e.uuidv6=r=>e.check(rL(iu,r)),e.uuidv7=r=>e.check(aL(iu,r)),e.nanoid=r=>e.check(oL(L8,r)),e.guid=r=>e.check(Yx(Jx,r)),e.cuid=r=>e.check(lL($8,r)),e.cuid2=r=>e.check(cL(I8,r)),e.ulid=r=>e.check(uL(P8,r)),e.base64=r=>e.check(vL(G8,r)),e.base64url=r=>e.check(yL(Z8,r)),e.xid=r=>e.check(dL(F8,r)),e.ksuid=r=>e.check(fL(V8,r)),e.ipv4=r=>e.check(hL(U8,r)),e.ipv6=r=>e.check(mL(H8,r)),e.cidrv4=r=>e.check(pL(B8,r)),e.cidrv6=r=>e.check(gL(q8,r)),e.e164=r=>e.check(bL(K8,r)),e.datetime=r=>e.check(f8(r)),e.date=r=>e.check(m8(r)),e.time=r=>e.check(g8(r)),e.duration=r=>e.check(y8(r))});function fu(e){return W6(N8,e)}const Et=me("ZodStringFormat",(e,t)=>{St.init(e,t),jC.init(e,t)}),D8=me("ZodEmail",(e,t)=>{c6.init(e,t),Et.init(e,t)}),Jx=me("ZodGUID",(e,t)=>{o6.init(e,t),Et.init(e,t)}),iu=me("ZodUUID",(e,t)=>{l6.init(e,t),Et.init(e,t)}),k8=me("ZodURL",(e,t)=>{u6.init(e,t),Et.init(e,t)}),z8=me("ZodEmoji",(e,t)=>{d6.init(e,t),Et.init(e,t)}),L8=me("ZodNanoID",(e,t)=>{f6.init(e,t),Et.init(e,t)}),$8=me("ZodCUID",(e,t)=>{h6.init(e,t),Et.init(e,t)}),I8=me("ZodCUID2",(e,t)=>{m6.init(e,t),Et.init(e,t)}),P8=me("ZodULID",(e,t)=>{p6.init(e,t),Et.init(e,t)}),F8=me("ZodXID",(e,t)=>{g6.init(e,t),Et.init(e,t)}),V8=me("ZodKSUID",(e,t)=>{v6.init(e,t),Et.init(e,t)}),U8=me("ZodIPv4",(e,t)=>{S6.init(e,t),Et.init(e,t)}),H8=me("ZodIPv6",(e,t)=>{_6.init(e,t),Et.init(e,t)}),B8=me("ZodCIDRv4",(e,t)=>{C6.init(e,t),Et.init(e,t)}),q8=me("ZodCIDRv6",(e,t)=>{E6.init(e,t),Et.init(e,t)}),G8=me("ZodBase64",(e,t)=>{R6.init(e,t),Et.init(e,t)}),Z8=me("ZodBase64URL",(e,t)=>{T6.init(e,t),Et.init(e,t)}),K8=me("ZodE164",(e,t)=>{O6.init(e,t),Et.init(e,t)}),Y8=me("ZodJWT",(e,t)=>{M6.init(e,t),Et.init(e,t)}),Q8=me("ZodBoolean",(e,t)=>{N6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>GL(e,r,i)});function Wx(e){return EL(Q8,e)}const X8=me("ZodUnknown",(e,t)=>{D6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>KL()});function ew(){return RL(X8)}const J8=me("ZodNever",(e,t)=>{k6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>ZL(e,r,i)});function W8(e){return jL(J8,e)}const e$=me("ZodArray",(e,t)=>{z6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>JL(e,r,i,o),e.element=t.element,fd(e,"ZodArray",{min(r,i){return this.check(Tu(r,i))},nonempty(r){return this.check(Tu(1,r))},max(r,i){return this.check(wC(r,i))},length(r,i){return this.check(SC(r,i))},unwrap(){return this.element}})});function t$(e,t){return PL(e$,e,t)}const n$=me("ZodObject",(e,t)=>{$6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>WL(e,r,i,o),pt(e,"shape",()=>t.shape),fd(e,"ZodObject",{keyof(){return o$(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ew()})},loose(){return this.clone({...this._zod.def,catchall:ew()})},strict(){return this.clone({...this._zod.def,catchall:W8()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return a5(this,r)},safeExtend(r){return i5(this,r)},merge(r){return s5(this,r)},pick(r){return n5(this,r)},omit(r){return r5(this,r)},partial(...r){return o5(TC,this,r[0])},required(...r){return l5(OC,this,r[0])}})});function vg(e,t){const r={type:"object",shape:e??{},...Ie(t)};return new n$(r)}const r$=me("ZodUnion",(e,t)=>{I6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>e8(e,r,i,o),e.options=t.options});function a$(e,t){return new r$({type:"union",options:e,...Ie(t)})}const i$=me("ZodIntersection",(e,t)=>{P6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>t8(e,r,i,o)});function s$(e,t){return new i$({type:"intersection",left:e,right:t})}const Jm=me("ZodEnum",(e,t)=>{F6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,l)=>YL(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const l={};for(const u of i)if(r.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Jm({...t,checks:[],...Ie(o),entries:l})},e.exclude=(i,o)=>{const l={...t.entries};for(const u of i)if(r.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new Jm({...t,checks:[],...Ie(o),entries:l})}});function o$(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Jm({type:"enum",entries:r,...Ie(t)})}const l$=me("ZodTransform",(e,t)=>{V6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>XL(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new lC(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(gl(l,r.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(gl(u))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(l=>(r.value=l,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}});function c$(e){return new l$({type:"transform",transform:e})}const TC=me("ZodOptional",(e,t)=>{xC.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>RC(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function tw(e){return new TC({type:"optional",innerType:e})}const u$=me("ZodExactOptional",(e,t)=>{U6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>RC(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function d$(e){return new u$({type:"optional",innerType:e})}const f$=me("ZodNullable",(e,t)=>{H6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>n8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function nw(e){return new f$({type:"nullable",innerType:e})}const h$=me("ZodDefault",(e,t)=>{B6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>a8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function m$(e,t){return new h$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():dC(t)}})}const p$=me("ZodPrefault",(e,t)=>{q6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>i8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function g$(e,t){return new p$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():dC(t)}})}const OC=me("ZodNonOptional",(e,t)=>{G6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>r8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function v$(e,t){return new OC({type:"nonoptional",innerType:e,...Ie(t)})}const y$=me("ZodCatch",(e,t)=>{Z6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>s8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function b$(e,t){return new y$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x$=me("ZodPipe",(e,t)=>{K6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>o8(e,r,i,o),e.in=t.in,e.out=t.out});function rw(e,t){return new x$({type:"pipe",in:e,out:t})}const w$=me("ZodReadonly",(e,t)=>{Y6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>l8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function S$(e){return new w$({type:"readonly",innerType:e})}const _$=me("ZodCustom",(e,t)=>{Q6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>QL(e,r)});function C$(e,t={}){return FL(_$,e,t)}function E$(e,t){return VL(e,t)}const R$=/\.(md|markdown)$/i,j$=/\.(png|jpe?g|gif|svg|webp|ico|bmp|avif)$/i,AC=/\.html?$/i,MC=/\.pdf$/i,T$=/\.(csv|tsv)$/i,O$=/\.(txt|log|json|ya?ml|toml|csv|go|py|js|ts|jsx|tsx|sh|bash|zsh|rb|rs|c|h|cpp|java|kt|swift|sql|css|xml|ini|conf|env|mod|sum|jsonl)$/i;function yg(e){if(e<1024)return e+" B";const t=["KB","MB","GB","TB"];let r=-1;do e/=1024,r++;while(e>=1024&&ri.path.toLowerCase()===r||i.path.toLowerCase()===r+".md")||t.find(i=>{const o=i.name.toLowerCase();return o===r||o===r+".md"})}async function Ni(e){try{if(navigator.clipboard)return await navigator.clipboard.writeText(e),!0}catch{}return!1}const DC="bdrive.lastProject";function M$(){try{return localStorage.getItem(DC)||""}catch{return""}}function N$(e){try{localStorage.setItem(DC,e)}catch{}}function hd(e){return e.user_name?`${e.user_name} <${e.user}>`:e.user||e.author||"unknown"}function D$({className:e,...t}){return f.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:f.jsx("table",{"data-slot":"table",className:We("w-full caption-bottom text-sm",e),...t})})}function k$({className:e,...t}){return f.jsx("thead",{"data-slot":"table-header",className:We("[&_tr]:border-b",e),...t})}function z$({className:e,...t}){return f.jsx("tbody",{"data-slot":"table-body",className:We("[&_tr:last-child]:border-0",e),...t})}function aw({className:e,...t}){return f.jsx("tr",{"data-slot":"table-row",className:We("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function iw({className:e,...t}){return f.jsx("th",{"data-slot":"table-head",className:We("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function L$({className:e,...t}){return f.jsx("td",{"data-slot":"table-cell",className:We("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function $$({header:e}){const t=e.column.getIsSorted();return e.column.getCanSort()?f.jsx(iw,{"data-sort":t||void 0,"aria-sort":t==="asc"?"ascending":t==="desc"?"descending":"none",children:f.jsxs("button",{type:"button",className:"th-sort",onClick:e.column.getToggleSortingHandler(),children:[Bm(e.column.columnDef.header,e.getContext()),t==="asc"?" ↑":t==="desc"?" ↓":""]})}):f.jsx(iw,{children:Bm(e.column.columnDef.header,e.getContext())})}function kC({table:e,className:t}){return f.jsx("div",{className:"admin-list admin-card-table"+(t?" "+t:""),children:f.jsxs(D$,{className:"admin-table",children:[f.jsx(k$,{children:e.getHeaderGroups().map(r=>f.jsx(aw,{children:r.headers.map(i=>f.jsx($$,{header:i},i.id))},r.id))}),f.jsx(z$,{children:e.getRowModel().rows.map(r=>f.jsx(aw,{className:"admin-item",children:r.getVisibleCells().map(i=>f.jsx(L$,{children:Bm(i.column.columnDef.cell,i.getContext())},i.id))},r.id))})]})})}function zC(e){return e?"expires "+new Date(e).toLocaleDateString():"no expiry"}function I$(e){if(e.opens===void 0)return null;if(e.opens===0)return"not opened yet";const t=`${e.opens} open${e.opens===1?"":"s"}`;return e.last_opened?`${t} · last opened ${new Date(e.last_opened).toLocaleDateString()}`:t}function LC(e,t){const r=[];t&&e.project_name&&r.push(e.project_name),e.creator&&r.push("by "+e.creator),e.created&&r.push(new Date(e.created).toLocaleDateString()),r.push(zC(e.expires));const i=I$(e);return i&&r.push(i),r.join(" · ")}const $C="Opens count how many times a file has been read through a public link. Repeat opens by the same reader within 10 minutes count once.";function IC({shares:e,onChanged:t,showProject:r=!1,canRevoke:i=!0,empty:o="No public shares.",loading:l=!1}){const[u,d]=S.useState([]),m=S.useMemo(()=>L_(),[]),p=S.useMemo(()=>[m.accessor("path",{header:"Path",cell:v=>f.jsx("a",{className:"ai-main mono",title:v.getValue(),...Qs(Oi(v.getValue(),v.row.original.project)),children:v.getValue()})}),m.accessor(v=>LC(v,r),{id:"detail",header:r?"Project":"Shared",cell:v=>f.jsx("span",{className:"ai-tag",children:v.getValue()})}),m.display({id:"actions",header:"",cell:v=>f.jsxs("span",{className:"share-acts",children:[f.jsx("button",{className:"ai-btn","aria-label":`Copy the public link to ${v.row.original.path}`,title:"Copy link",onClick:()=>Ni(v.row.original.url).then(b=>qe(b?"Copied.":"Select and copy the link.")),children:f.jsx(rt,{name:"copy"})}),i&&f.jsx("button",{className:"ai-del","aria-label":`Revoke the share of ${v.row.original.path}`,onClick:()=>PC(v.row.original,t),children:"Revoke"})]})})],[m,t,r,i]),y=K_({data:e,columns:p,state:{sorting:u},onSortingChange:d,getCoreRowModel:G_(),getSortedRowModel:Z_()});return l?f.jsx("div",{className:"admin-list",children:f.jsx("div",{className:"admin-empty",children:"Loading…"})}):e.length===0?f.jsx("div",{className:"admin-list",children:f.jsx("div",{className:"admin-empty",children:o})}):f.jsx(kC,{table:y,className:"shares-table"})}async function PC(e,t){if(await za("Revoke share link",`Revoke the public link to “${e.path}”? Anyone with the URL will lose access.`,"Revoke",!0))try{await Wn("DELETE","/api/shares/"+e.token),qe("Share revoked."),t()}catch(r){qe(r.message,!0)}}const P$=vg({name:fu().trim().min(1,"Give the organization a name.").max(60,"Keep it under 60 characters.")});function F$({org:e,projects:t,myEmail:r}){const i=ki(),o=e.role==="owner",l=()=>i.invalidateQueries({queryKey:["orgs"]}),u=()=>i.invalidateQueries({queryKey:["invites",e.id]}),d=()=>i.invalidateQueries({queryKey:["orgShares",e.id]}),m=lg({resolver:gg(P$),values:{name:e.name}}),{data:p}=Ft({queryKey:["invites",e.id],queryFn:()=>qt(`/api/orgs/${e.id}/invites`),enabled:o,select:x=>x.invites||[]}),{data:y,isLoading:v}=Ft({queryKey:["orgShares",e.id],queryFn:()=>qt(`/api/orgs/${e.id}/shares`),enabled:o,select:x=>x.shares||[]}),b=t.filter(x=>x.org===e.id);return f.jsxs("div",{className:"admin",children:[f.jsx("h1",{id:"org-title",children:e.name}),!o&&f.jsx("p",{className:"role-chip-row",children:f.jsx("span",{className:"ai-tag role-chip",children:"Member"})}),!o&&f.jsx("p",{className:"admin-sub",children:"Only owners can rename this organization, manage members, or issue invite links."}),o&&f.jsxs("form",{className:"admin-row",onSubmit:m.handleSubmit(async({name:x})=>{try{await Wn("PATCH","/api/orgs/"+e.id,{name:x}),qe("Renamed."),l()}catch(w){qe(w.message,!0)}}),children:[f.jsx("label",{className:"admin-lbl",htmlFor:"org-rename",children:"Organization name"}),f.jsx("input",{id:"org-rename",type:"text","aria-invalid":!!m.formState.errors.name,"aria-describedby":m.formState.errors.name?"org-rename-err":void 0,...m.register("name")}),f.jsx(xt,{variant:"subtle",id:"org-rename-btn",type:"submit",disabled:!m.formState.isDirty,children:"Rename org"}),m.formState.errors.name&&f.jsx("span",{id:"org-rename-err",role:"alert",className:"field-err",children:m.formState.errors.name.message})]}),f.jsx("h3",{children:"Members"}),f.jsx(V$,{org:e,owner:o,myEmail:r,onChanged:l}),f.jsx("h3",{children:"Projects"}),f.jsxs("div",{className:"admin-list",children:[b.length===0&&f.jsx("div",{className:"admin-empty",children:"No projects yet."}),b.map(x=>f.jsx("div",{className:"admin-item",children:f.jsx("span",{className:"ai-main",title:x.name,children:x.name})},x.id))]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"admin-h",children:[f.jsx("h3",{children:"Invite links"}),f.jsx(xt,{variant:"primary",onClick:async()=>{try{const x=await ea(`/api/orgs/${e.id}/invites`),w=await Ni(x.url);qe(w?"Invite link copied to clipboard.":"Invite created — copy it from the list below."),u()}catch(x){qe(x.message,!0)}},children:"New invite"})]}),f.jsxs("div",{className:"admin-list",children:[p&&p.length===0&&f.jsx("div",{className:"admin-empty",children:"No active invite links."}),(p||[]).map(x=>f.jsxs("div",{className:"admin-item",children:[f.jsx("button",{type:"button",className:"ai-main mono ai-copy","aria-label":`Copy invite link ${x.url}`,title:x.url,onClick:()=>Ni(x.url).then(w=>qe(w?"Copied.":"Select and copy the link.")),children:x.url}),f.jsx("span",{className:"ai-tag",children:(x.creator?"by "+x.creator+" · ":"")+(x.uses?x.uses+" joined · ":"unused · ")+"expires "+new Date(x.expires).toLocaleDateString()}),f.jsx("button",{className:"ai-del","aria-label":`Revoke invite ${x.token.slice(0,8)}`,onClick:async()=>{if(await za("Revoke invite",`Revoke the link starting ${x.token.slice(0,8)}…? Anyone still holding it won't be able to join.`,"Revoke",!0))try{await Wn("DELETE",`/api/orgs/${e.id}/invites/${x.token}`),qe("Revoked."),u()}catch(w){qe(w.message,!0)}},children:"Revoke"})]},x.token))]}),f.jsx("h3",{children:"Public share links"}),f.jsx("p",{className:"admin-sub",children:"Every live link across this organization's projects. A project's own links are on its Settings page, and on the file itself."}),f.jsx(IC,{shares:y||[],loading:v,onChanged:d,showProject:!0})]})]})}function V$({org:e,owner:t,myEmail:r,onChanged:i}){const[o,l]=S.useState([{id:"email",desc:!1}]),u=S.useMemo(()=>L_(),[]),d=S.useMemo(()=>[u.accessor("email",{id:"email",header:"Member",cell:p=>{const y=!!r&&p.getValue().toLowerCase()===r.toLowerCase();return f.jsx("span",{className:"ai-main",title:p.getValue(),children:p.getValue()+(y?" (you)":"")})}}),u.accessor("role",{id:"role",header:"Role",cell:p=>{const y=p.row.original,v=!!r&&y.email.toLowerCase()===r.toLowerCase();return!t||v?f.jsx("span",{className:"ai-tag role-static",children:y.role}):f.jsxs("span",{className:"role-cell",children:[f.jsxs("select",{"aria-label":`Role for ${y.email}`,value:y.role,onChange:async b=>{try{await Wn("PATCH",`/api/orgs/${e.id}/members/${encodeURIComponent(y.email)}`,{role:b.target.value}),qe("Role updated.")}catch(x){qe(x.message,!0)}i()},children:[f.jsx("option",{value:"owner",children:"owner"}),f.jsx("option",{value:"member",children:"member"})]}),f.jsx("button",{className:"ai-del","aria-label":`Remove ${y.email}`,onClick:async()=>{if(await za("Remove member",`Remove ${y.email} from ${e.name}?`,"Remove",!0))try{await Wn("DELETE",`/api/orgs/${e.id}/members/${encodeURIComponent(y.email)}`),qe("Removed."),i()}catch(b){qe(b.message,!0)}},children:"Remove"})]})}})],[u,e.id,e.name,t,r]),m=K_({data:e.members,columns:d,state:{sorting:o},onSortingChange:l,getCoreRowModel:G_(),getSortedRowModel:Z_()});return f.jsx(kC,{table:m})}const U$=vg({require_verification:Wx(),require_approval:Wx()});function H$(){const e=ki(),{data:t,error:r}=Ft({queryKey:["admin","policy"],queryFn:()=>qt("/api/admin/policy")}),{data:i}=A_(!0),o=lg({resolver:gg(U$),values:t?{require_verification:t.require_verification&&t.mailer,require_approval:t.require_approval}:{require_verification:!1,require_approval:!1}});if(S.useEffect(()=>{r&&qe(r.message,!0)},[r]),!t)return null;const l=async(u,d,m)=>{try{await ea(`/api/admin/pending/${u}/${d}`),qe((d==="approve"?"Approved ":"Denied ")+m),e.invalidateQueries({queryKey:["admin","pending"]})}catch(p){qe(p.message,!0)}};return f.jsxs("div",{className:"admin",children:[f.jsx("h1",{children:"Signup & access"}),f.jsx("p",{className:"admin-sub",children:"Who can create an account on this hub, and how new accounts are vetted."}),f.jsx("h3",{children:"New-account vetting"}),f.jsxs("form",{onSubmit:o.handleSubmit(async u=>{try{await ea("/api/admin/policy",u),qe("Signup policy saved."),e.invalidateQueries({queryKey:["admin","policy"]})}catch(d){qe(d.message,!0)}}),children:[f.jsxs("div",{className:"admin-list",children:[f.jsx(sw,{label:"Require email verification",desc:t.mailer?"New accounts must click an emailed link before they can sign in — proves they control the address.":"Configure SMTP on the server (auth.smtp) to enable email verification.",disabled:!t.mailer,inputProps:o.register("require_verification")}),f.jsx(sw,{label:"Require admin approval",desc:"New accounts wait for a hub admin to approve them before they gain access.",inputProps:o.register("require_approval")})]}),f.jsx(xt,{variant:"primary",type:"submit",style:{marginTop:14},disabled:!o.formState.isDirty,children:"Save policy"})]}),f.jsx("h3",{children:"Who can sign up"}),f.jsxs("div",{className:"admin-list",children:[f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Allowed email domains"}),f.jsx("span",{className:"ai-tag",children:t.allowed_domains&&t.allowed_domains.length?t.allowed_domains.map(u=>"@"+u).join(", "):"any"})]}),f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Self-signup"}),f.jsx("span",{className:"ai-tag",children:t.allow_signup?"open":"invite-only"})]}),f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Hub admins"}),f.jsx("span",{className:"ai-tag",children:t.admins&&t.admins.length?t.admins.join(", "):"none"})]})]}),f.jsx("p",{className:"admin-sub",children:"Domains and admins are set in the server config file (they can't be widened from the browser)."}),f.jsx("h3",{children:"Pending signups"}),f.jsxs("div",{className:"admin-list",children:[(!i||i.length===0)&&f.jsx("div",{className:"admin-empty",children:"No one is waiting for approval."}),(i||[]).map(u=>f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:(u.name?u.name+" · ":"")+u.email}),f.jsx(xt,{variant:"primary",onClick:()=>l(u.id,"approve",u.email),children:"Approve"}),f.jsx("button",{className:"ai-del",onClick:()=>l(u.id,"deny",u.email),children:"Deny"})]},u.id))]})]})}function sw({label:e,desc:t,disabled:r,inputProps:i}){return f.jsxs("label",{className:"admin-item toggle",style:r?{opacity:.55}:void 0,children:[f.jsxs("span",{className:"ai-main",children:[f.jsx("div",{className:"tg-label",children:e}),f.jsx("div",{className:"tg-desc",children:t})]}),f.jsx("input",{type:"checkbox",disabled:r,...i})]})}function B$({...e}){return f.jsx(m1,{"data-slot":"select",...e})}function q$({...e}){return f.jsx(y1,{"data-slot":"select-value",...e})}function G$({className:e,size:t="default",children:r,...i}){return f.jsxs(g1,{"data-slot":"select-trigger","data-size":t,className:We("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...i,children:[r,f.jsx(b1,{asChild:!0,children:f.jsx(Kp,{className:"size-4 opacity-50"})})]})}function Z$({className:e,children:t,position:r="item-aligned",align:i="center",...o}){return f.jsx(w1,{children:f.jsxs(S1,{"data-slot":"select-content",className:We("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:i,...o,children:[f.jsx(Y$,{}),f.jsx(j1,{className:We("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),f.jsx(Q$,{})]})})}function K$({className:e,children:t,...r}){return f.jsxs(M1,{"data-slot":"select-item",className:We("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[f.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:f.jsx(k1,{children:f.jsx(g_,{className:"size-4"})})}),f.jsx(N1,{children:t})]})}function Y$({className:e,...t}){return f.jsx(z1,{"data-slot":"select-scroll-up-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(gk,{className:"size-4"})})}function Q$({className:e,...t}){return f.jsx(L1,{"data-slot":"select-scroll-down-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Kp,{className:"size-4"})})}const ow=["#5b8def","#f5a623","#4cc38a","#e0679b","#8b7bf0","#3ec8c8","#e6934a"];function vl(e){let t=0;for(const r of e)t=t*31+r.charCodeAt(0)>>>0;return ow[t%ow.length]}function rm({projects:e,currentId:t,menu:r,onNew:i}){const o=e.find(l=>l.id===t);return f.jsxs("nav",{id:"projects","aria-label":"Projects",children:[f.jsxs("div",{className:"nav-head",children:[f.jsx("span",{children:"Projects"}),f.jsx("button",{className:"nav-add",title:"New project","aria-label":"New project",onClick:i,children:"+"})]}),f.jsx("div",{className:"proj-row",children:f.jsxs(B$,{value:t||"",onValueChange:l=>{l&&l!==t&&(Yt("/"+l),hr())},children:[f.jsxs(G$,{id:"project-select","aria-label":`Switch project — current: ${o?.name??"none"}`,title:o?.name,className:"proj-trigger",children:[o&&f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(o.name)},children:f.jsx(Vs,{name:o.icon})}),o?f.jsx("span",{"data-slot":"select-value",children:o.name}):f.jsx(q$,{placeholder:"Select a project"})]}),f.jsx(Z$,{className:"proj-menu",position:"popper",sideOffset:4,children:e.map(l=>f.jsxs(K$,{value:l.id,children:[f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(l.name)},children:f.jsx(Vs,{name:l.icon})}),l.name]},l.id))})]})}),r&&f.jsx("ul",{className:"nav-menu","aria-label":"Project pages",children:[["dashboard","Dashboard","dashboard",r.onDashboard],["install","Installation","terminal",r.onInstall],["history","History","hist",r.onHistory],["settings","Settings","gear",r.onSettings]].map(([l,u,d,m])=>f.jsx("li",{children:f.jsxs("div",{id:"nav-"+l,className:"row"+(r.active===l?" active":""),role:"button",tabIndex:0,onClick:m,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),m())},children:[f.jsx(rt,{name:d}),f.jsx("span",{className:"label",children:u})]})},l))})]})}function FC({...e}){return f.jsx(KM,{"data-slot":"dropdown-menu",...e})}function VC({...e}){return f.jsx(YM,{"data-slot":"dropdown-menu-trigger",...e})}function UC({className:e,sideOffset:t=4,...r}){return f.jsx(QM,{children:f.jsx(XM,{"data-slot":"dropdown-menu-content",sideOffset:t,className:We("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...r})})}function Is({className:e,inset:t,variant:r="default",...i}){return f.jsx(WM,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:We("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...i})}function am({className:e,inset:t,...r}){return f.jsx(JM,{"data-slot":"dropdown-menu-label","data-inset":t,className:We("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}const X$="https://github.com/runbear-io/beardrive";function J$(){return f.jsx("svg",{viewBox:"0 0 16 16",className:"gh-mark",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function W$({me:e,org:t,admin:r,orgActive:i,billing:o}){const l=e.name||e.email,[u,d]=S.useState(!1),m=t?Qs(t.manage_url):null,p=o?Qs(o.url):null;return f.jsxs("footer",{id:"accountbar",children:[f.jsxs("a",{className:"gh-star",href:X$,target:"_blank",rel:"noreferrer",children:[f.jsx(J$,{}),f.jsx("span",{children:"Star on GitHub"}),f.jsx("span",{className:"ext","aria-hidden":"true",children:"↗"}),f.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]}),f.jsxs(FC,{modal:!1,open:u,onOpenChange:d,children:[f.jsx(VC,{asChild:!0,children:f.jsxs("button",{id:"account-btn",className:i?"active":void 0,"aria-label":"Account menu",children:[f.jsx("span",{className:"avatar",style:{background:vl(e.email)},"aria-hidden":"true",children:(l.trim()[0]||"?").toUpperCase()}),f.jsxs("span",{className:"acct",children:[f.jsx("b",{children:l}),e.name&&f.jsx("small",{children:e.email})]}),f.jsx(rt,{name:"chev"})]})}),f.jsxs(UC,{id:"account-menu",side:"top",align:"start",sideOffset:6,className:"acct-menu",children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(am,{className:"menu-sec",children:"Organization"}),f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"menu-org-settings","aria-current":i?"page":void 0,...m,onClick:y=>{m?.onClick?.(y),d(!1)},children:[f.jsx(rt,{name:"gear"}),f.jsxs("span",{children:[f.jsx("b",{children:t.name})," Settings"]}),!t.manage_url.startsWith("/")&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"ext","aria-hidden":"true",children:"↗"}),f.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})]})}),o&&f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"menu-billing",...p,onClick:y=>{p?.onClick?.(y),d(!1)},children:[f.jsx(rt,{name:"card"}),f.jsx("span",{children:"Billing"}),f.jsx("span",{className:"ps-chip plan-chip",children:o.plan})]})})]}),r&&f.jsxs(f.Fragment,{children:[f.jsx(am,{className:"menu-sec",children:"Hub"}),f.jsxs(Is,{id:"menu-hub-admin",onSelect:r.onClick,children:[f.jsx(rt,{name:"shield"}),f.jsxs("span",{children:["Signup & access",r.pending?` · ${r.pending}`:""]})]})]}),f.jsx(am,{className:"menu-sec",children:"Account"}),f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"signout",href:"/auth/logout",children:[f.jsx(rt,{name:"power"}),f.jsx("span",{children:"Log out"})]})})]})]})]})}function Pa({className:e,...t}){return f.jsx("div",{"data-slot":"card",className:We("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Fa({className:e,...t}){return f.jsx("div",{"data-slot":"card-header",className:We("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Va({className:e,...t}){return f.jsx("div",{"data-slot":"card-title",className:We("leading-none font-semibold",e),...t})}function qs({className:e,...t}){return f.jsx("div",{"data-slot":"card-description",className:We("text-muted-foreground text-sm",e),...t})}function Ua({className:e,...t}){return f.jsx("div",{"data-slot":"card-content",className:We("px-6",e),...t})}function ta({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return f.jsx(AN,{"data-slot":"separator",decorative:r,orientation:t,className:We("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function eI({url:e}){const t=Ft({queryKey:["billing"],queryFn:()=>qt(e)});if(t.isLoading)return f.jsx("div",{className:"empty",children:"Loading…"});if(t.error||!t.data)return f.jsxs("div",{className:"empty",children:[f.jsx("h3",{children:"Billing is unavailable"}),f.jsx("p",{children:t.error?.message||"Try again shortly."})]});const r=t.data;return f.jsxs("div",{className:"project-settings",id:"billing-view",children:[f.jsxs("h2",{children:["Billing",f.jsx("span",{className:"ps-chip plan-chip",children:r.plan.name})]}),f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsxs(Va,{children:[r.plan.name," plan",r.plan.status?` (${r.plan.status})`:""]}),f.jsxs(qs,{children:["Organization ",r.org," · ",r.usage.used," of ",r.usage.cap," used · ",r.seats.used," of ",r.seats.cap," ",r.seats.cap===1?"seat":"seats"]})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx("div",{className:"usage-bar",children:f.jsx("div",{style:{width:`${r.usage.pct}%`}})})})]}),r.owner?f.jsx("div",{className:"plan-grid",children:r.plans.map(i=>f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:i.name}),f.jsx(qs,{children:i.blurb})]}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsxs("p",{className:"plan-price",children:[i.price,f.jsx("small",{children:" / user / month"})]}),f.jsxs("form",{method:"post",action:r.checkout_url,children:[f.jsx("input",{type:"hidden",name:"plan",value:i.id}),f.jsx(xt,{type:"submit",disabled:i.current,variant:i.current?"subtle":"default",children:i.current?"Current plan":`Upgrade to ${i.name}`})]})]})]},i.id))}):f.jsx("p",{className:"muted-note",children:"Only an organization owner can change the plan."}),r.owner&&r.has_customer&&f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"Manage subscription"}),f.jsx(qs,{children:"Change seats, update the card, download invoices, or cancel."})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx("form",{method:"post",action:r.portal_url,children:f.jsx(xt,{type:"submit",variant:"subtle",children:"Open the billing portal"})})})]})]})}function hu({className:e,type:t,...r}){return f.jsx("input",{type:t,"data-slot":"input",className:We("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...r})}function im({className:e,...t}){return f.jsx(tN,{"data-slot":"label",className:We("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function tI({className:e,...t}){return f.jsx("textarea",{"data-slot":"textarea",className:We("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const lw={read:1,write:2,admin:3};function _i(e,t){return(lw[e||""]||0)>=(lw[t]||0)}const Wm=280,nI=vg({name:fu().trim().min(1,"Give the project a name.").max(120,"Keep the name under 120 characters."),description:fu().max(Wm,`Keep the description under ${Wm} characters.`),icon:fu()});function rI({project:e,org:t,onDeleted:r}){const i=M_(),o=_i(e.perm,"admin"),l=lg({resolver:gg(nI),defaultValues:{name:e.name,description:e.description??"",icon:e.icon??""}});S.useEffect(()=>{l.reset({name:e.name,description:e.description??"",icon:e.icon??""})},[e.id,e.name,e.description,e.icon]);const u=l.watch("icon"),d=l.watch("description"),m=l.handleSubmit(async p=>{const y=l.formState.dirtyFields,v={};if(y.name&&(v.name=p.name.trim()),y.description&&(v.description=p.description),y.icon&&(v.icon=p.icon),Object.keys(v).length!==0)try{await Wn("PATCH","/api/projects/"+e.id,v),qe("Saved."),l.reset({...p,name:p.name.trim()}),await i()}catch(b){qe(b.message,!0)}});return f.jsxs("div",{className:"project-settings",children:[f.jsxs("h2",{children:[e.name,!_i(e.perm,"write")&&f.jsx("span",{className:"ps-chip",children:"Read-only"})]}),f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"General"}),f.jsx(qs,{children:"Name, description and icon for this project."})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsxs("form",{className:"ps-form",onSubmit:m,children:[f.jsxs("div",{className:"ps-field",children:[f.jsx(im,{htmlFor:"ps-icon-btn",children:"Icon"}),f.jsxs("div",{className:"ps-icon-row",children:[f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(e.name)},children:f.jsx(Vs,{name:u})}),f.jsxs(FC,{children:[f.jsx(VC,{asChild:!0,children:f.jsx(xt,{id:"ps-icon-btn",type:"button",variant:"subtle",disabled:!o,children:"Change"})}),f.jsxs(UC,{align:"start",className:"ps-icon-grid",children:[f.jsx(Is,{className:"ps-icon-cell"+(u===""?" active":""),title:"Default","aria-label":"Default icon",onSelect:()=>l.setValue("icon","",{shouldDirty:!0}),children:f.jsx(Vs,{})}),Object.keys(Lm).map(p=>f.jsx(Is,{className:"ps-icon-cell"+(u===p?" active":""),title:p,"aria-label":p,onSelect:()=>l.setValue("icon",p,{shouldDirty:!0}),children:f.jsx(Vs,{name:p})},p))]})]})]})]}),f.jsxs("div",{className:"ps-field",children:[f.jsx(im,{htmlFor:"ps-name",children:"Name"}),f.jsx(hu,{id:"ps-name",disabled:!o,"aria-invalid":!!l.formState.errors.name,"aria-describedby":l.formState.errors.name?"ps-name-err":void 0,...l.register("name")}),l.formState.errors.name&&f.jsx("span",{id:"ps-name-err",role:"alert",className:"field-err",children:l.formState.errors.name.message})]}),f.jsxs("div",{className:"ps-field",children:[f.jsxs(im,{htmlFor:"ps-desc",children:["Description ",f.jsx("span",{className:"ps-opt",children:"(optional)"})]}),f.jsx(tI,{id:"ps-desc",rows:2,disabled:!o,placeholder:"What this project is for.","aria-invalid":!!l.formState.errors.description,"aria-describedby":l.formState.errors.description?"ps-desc-err":void 0,...l.register("description")}),f.jsxs("div",{className:"ps-meta",children:[l.formState.errors.description?f.jsx("span",{id:"ps-desc-err",role:"alert",className:"field-err",children:l.formState.errors.description.message}):f.jsx("span",{}),f.jsxs("span",{className:"ps-count",children:[d.length," / ",Wm]})]})]}),o&&f.jsxs(f.Fragment,{children:[f.jsx(ta,{}),f.jsx("div",{className:"ps-actions",children:f.jsx(xt,{id:"ps-save",type:"submit",variant:"primary",disabled:!l.formState.isDirty||l.formState.isSubmitting,children:"Save changes"})})]})]})})]}),f.jsx(aI,{project:e}),f.jsx(sI,{project:e,org:t}),f.jsxs(Pa,{children:[f.jsx(Fa,{children:f.jsx(Va,{children:"About"})}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsxs("dl",{className:"ps-facts",children:[f.jsx("dt",{children:"Project id"}),f.jsx("dd",{children:f.jsx("code",{children:e.id})}),t&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{children:"Workspace"}),f.jsx("dd",{children:t.name})]}),e.created&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{children:"Created"}),f.jsx("dd",{children:new Date(e.created).toLocaleDateString()})]})]})})]}),o&&f.jsxs(Pa,{className:"ps-danger",children:[f.jsx(Fa,{children:f.jsx(Va,{children:"Danger zone"})}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsx("p",{children:"Deleting removes the project from this hub. Its files stay in storage. This can't be undone."}),f.jsx(xt,{variant:"danger",onClick:async()=>{if(await T_(`Delete “${e.name}”?`,"This can't be undone. Type the project name to confirm:","","Delete project",{match:e.name,danger:!0})!==null)try{await Wn("DELETE","/api/projects/"+e.id),qe(`Deleted “${e.name}”.`),await r()}catch(y){qe(y.message,!0)}},children:"Delete project"})]})]})]})}function aI({project:e}){const t=ki(),{data:r,error:i,isLoading:o}=O_(e.id);return i?null:f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"Public links"}),f.jsxs(qs,{children:["Files in this project that anyone with the URL can read — no account needed.",(r||[]).some(l=>l.opens!==void 0)&&f.jsxs(f.Fragment,{children:[" ",$C]})]})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx(IC,{shares:r||[],loading:o,canRevoke:_i(e.perm,"write"),onChanged:()=>t.invalidateQueries({queryKey:["shares",e.id]}),empty:"No public links."})})]})}const ep=[{value:"admin",label:"Admin"},{value:"write",label:"Write"},{value:"read",label:"Read"},{value:"none",label:"No access"}],iI=Object.fromEntries(ep.map(e=>[e.value,e.label]));function sI({project:e,org:t}){const r=ki(),{data:i,error:o}=D3(e.id),l=_i(e.perm,"admin"),u=()=>{r.invalidateQueries({queryKey:["permissions",e.id]}),r.invalidateQueries({queryKey:["projects"]})},d=async(x,w)=>{try{await x(),qe(w)}catch(_){qe(_.message,!0)}u()};if(o||!i)return null;const m=i,p=`/api/p/${e.id}/permissions`,y=new Set((t?.members||[]).filter(x=>x.role==="owner").map(x=>x.email.toLowerCase())),v=[...m.grants.filter(x=>!y.has(x.email.toLowerCase())),...[...y].sort().map(x=>({email:x,level:"admin",owner:!0}))],b=async()=>{const x=await T_("Add an exception","Email of a workspace member. They get Read access; change it in the table.","","Add");x===null||!x.trim()||await d(()=>Wn("PUT",`${p}/${encodeURIComponent(x.trim())}`,{level:"read"}),"Added.")};return f.jsxs(Pa,{className:"ps-people",children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"People"}),f.jsx(qs,{children:"Who can see and change this project."})]}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsxs("p",{className:"ps-row",children:[f.jsxs("span",{children:["Everyone in ",t?.name||"this workspace"," can"]}),f.jsx("select",{"aria-label":"Default access for workspace members",disabled:!l,value:m.default,onChange:async x=>{const w=x.target.value;if(w==="none"&&!await za("Make this project invite-only?","Only people listed below (and workspace owners) will see this project.","Make invite-only")){u();return}await d(()=>Wn("PUT",p,{default:w}),"Default access updated.")},children:ep.filter(x=>x.value!=="admin").map(x=>f.jsx("option",{value:x.value,children:x.label},x.value))})]}),m.default==="none"&&f.jsx("p",{className:"ps-note",children:"This project is invite-only: only the people below and workspace owners can see it."}),f.jsxs("div",{className:"ps-people-head",children:[f.jsx("h4",{children:"Exceptions"}),l&&f.jsx(xt,{type:"button",variant:"subtle",onClick:b,children:"+ Add"})]}),v.length===0?f.jsx("p",{className:"ps-note",children:"No exceptions — everyone gets the access above."}):f.jsx("div",{className:"admin-list",children:v.map(x=>{const w="owner"in x;return f.jsxs("div",{className:"admin-item",children:[f.jsxs("span",{className:"ai-main",title:x.email,children:[x.email,m.creator&&x.email.toLowerCase()===m.creator.toLowerCase()&&f.jsx("span",{className:"ai-tag",children:" (creator)"})]}),w?f.jsx("span",{className:"ai-tag",children:"Workspace owner — always admin"}):f.jsxs("span",{className:"role-cell",children:[f.jsx("select",{"aria-label":`Access for ${x.email}`,disabled:!l,value:x.level,onChange:_=>d(()=>Wn("PUT",`${p}/${encodeURIComponent(x.email)}`,{level:_.target.value}),`${x.email} is now ${iI[_.target.value]||_.target.value}.`),children:ep.map(_=>f.jsx("option",{value:_.value,children:_.label},_.value))}),l&&f.jsx("button",{className:"ai-del","aria-label":`Remove exception for ${x.email}`,onClick:()=>d(()=>Wn("DELETE",`${p}/${encodeURIComponent(x.email)}`),"Reverted to the default access."),children:"Remove"})]})]},x.email)})})]})]})}const HC="https://raw.githubusercontent.com/runbear-io/beardrive/main/INSTALL_FOR_AGENTS.md";function BC({project:e,existing:t}){const r=window.location.origin,i=t?'. I already have a folder of notes — ask me which one to sync (the project is named "':'. Ask me which folder to sync (the project is named "',o="Follow "+HC+` +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){l(u);continue}if(e.external){const p=e.external.registry.get(u[0])?.id;if(t!==u[0]&&p){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(d.cycle){l(u);continue}if(d.count>1&&e.reused==="ref"){l(u);continue}}}function EC(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=d=>{const m=e.seen.get(d);if(m.ref===null)return;const p=m.def??m.schema,y={...p},v=m.ref;if(m.ref=null,v){i(v);const x=e.seen.get(v),w=x.schema;if(w.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(w)):Object.assign(p,w),Object.assign(p,y),d._zod.parent===v)for(const E in p)E==="$ref"||E==="allOf"||E in y||delete p[E];if(w.$ref&&x.def)for(const E in p)E==="$ref"||E==="allOf"||E in x.def&&JSON.stringify(p[E])===JSON.stringify(x.def[E])&&delete p[E]}const b=d._zod.parent;if(b&&b!==v){i(b);const x=e.seen.get(b);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const w in p)w==="$ref"||w==="allOf"||w in x.def&&JSON.stringify(p[w])===JSON.stringify(x.def[w])&&delete p[w]}e.override({zodSchema:d,jsonSchema:p,path:m.path??[]})};for(const d of[...e.seen.entries()].reverse())i(d[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(d)}Object.assign(o,r.def??r.schema);const l=e.metadataRegistry.get(t)?.id;l!==void 0&&o.id===l&&delete o.id;const u=e.external?.defs??{};for(const d of e.seen.entries()){const m=d[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,u[m.defId]=m.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ou(t,"input",e.processors),output:Ou(t,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function gn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return gn(i.element,r);if(i.type==="set")return gn(i.valueType,r);if(i.type==="lazy")return gn(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return gn(i.innerType,r);if(i.type==="intersection")return gn(i.left,r)||gn(i.right,r);if(i.type==="record"||i.type==="map")return gn(i.keyType,r)||gn(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:gn(i.in,r)||gn(i.out,r);if(i.type==="object"){for(const o in i.shape)if(gn(i.shape[o],r))return!0;return!1}if(i.type==="union"){for(const o of i.options)if(gn(o,r))return!0;return!1}if(i.type==="tuple"){for(const o of i.items)if(gn(o,r))return!0;return!!(i.rest&&gn(i.rest,r))}return!1}const HL=(e,t={})=>r=>{const i=_C({...r,processors:t});return cn(e,i),CC(i,e),EC(i,e)},Ou=(e,t,r={})=>i=>{const{libraryOptions:o,target:l}=i??{},u=_C({...o??{},target:l,io:t,processors:r});return cn(e,u),CC(u,e),EC(u,e)},BL={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qL=(e,t,r,i)=>{const o=r;o.type="string";const{minimum:l,maximum:u,format:d,patterns:m,contentEncoding:p}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof u=="number"&&(o.maxLength=u),d&&(o.format=BL[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const y=[...m];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(v=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},GL=(e,t,r,i)=>{r.type="boolean"},ZL=(e,t,r,i)=>{r.not={}},KL=(e,t,r,i)=>{},YL=(e,t,r,i)=>{const o=e._zod.def,l=cC(o.entries);l.every(u=>typeof u=="number")&&(r.type="number"),l.every(u=>typeof u=="string")&&(r.type="string"),r.enum=l},QL=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},XL=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},JL=(e,t,r,i)=>{const o=r,l=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(o.minItems=u),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=cn(l.element,t,{...i,path:[...i.path,"items"]})},WL=(e,t,r,i)=>{const o=r,l=e._zod.def;o.type="object",o.properties={};const u=l.shape;for(const p in u)o.properties[p]=cn(u[p],t,{...i,path:[...i.path,"properties",p]});const d=new Set(Object.keys(u)),m=new Set([...d].filter(p=>{const y=l.shape[p]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));m.size>0&&(o.required=Array.from(m)),l.catchall?._zod.def.type==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=cn(l.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},e8=(e,t,r,i)=>{const o=e._zod.def,l=o.inclusive===!1,u=o.options.map((d,m)=>cn(d,t,{...i,path:[...i.path,l?"oneOf":"anyOf",m]}));l?r.oneOf=u:r.anyOf=u},t8=(e,t,r,i)=>{const o=e._zod.def,l=cn(o.left,t,{...i,path:[...i.path,"allOf",0]}),u=cn(o.right,t,{...i,path:[...i.path,"allOf",1]}),d=p=>"allOf"in p&&Object.keys(p).length===1,m=[...d(l)?l.allOf:[l],...d(u)?u.allOf:[u]];r.allOf=m},n8=(e,t,r,i)=>{const o=e._zod.def,l=cn(o.innerType,t,i),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=o.innerType,r.nullable=!0):r.anyOf=[l,{type:"null"}]},r8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType},a8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},i8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},s8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType;let u;try{u=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},o8=(e,t,r,i)=>{const o=e._zod.def,l=o.in._zod.traits.has("$ZodTransform"),u=t.io==="input"?l?o.out:o.in:o.out;cn(u,t,i);const d=t.seen.get(e);d.ref=u},l8=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType,r.readOnly=!0},RC=(e,t,r,i)=>{const o=e._zod.def;cn(o.innerType,t,i);const l=t.seen.get(e);l.ref=o.innerType};function Xm(){return Xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t0){var m=o.errors[0][0];r[d]={message:m.message,type:m.code}}else r[d]={message:u,type:l};if(o.code==="invalid_union"&&o.errors.forEach(function(v){return v.forEach(function(b){return e.push(Xm({},b,{path:[].concat(o.path,b.path)}))})}),t){var p=r[d].types,y=p&&p[o.code];r[d]=og(d,t,r,l,y?[].concat(y,o.message):o.message)}e.shift()};e.length;)i();return r}function gg(e,t,r){if(r===void 0&&(r={}),(function(i){return"_def"in i&&typeof i._def=="object"&&"typeName"in i._def})(e))return function(i,o,l){try{return Promise.resolve(Qx(function(){return Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](i,t)).then(function(u){return l.shouldUseNativeValidation&&Km({},l),{errors:{},values:r.raw?Object.assign({},i):u}})},function(u){if((function(d){return Array.isArray(d?.issues)})(u))return{values:{},errors:kx(c8(u.errors,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};if((function(i){return"_zod"in i&&typeof i._zod=="object"})(e))return function(i,o,l){try{return Promise.resolve(Qx(function(){return Promise.resolve((r.mode==="sync"?f5:h5)(e,i,t)).then(function(u){return l.shouldUseNativeValidation&&Km({},l),{errors:{},values:r.raw?Object.assign({},i):u}})},function(u){if((function(d){return d instanceof mg})(u))return{values:{},errors:kx(u8(u.issues,!l.shouldUseNativeValidation&&l.criteriaMode==="all"),l)};throw u}))}catch(u){return Promise.reject(u)}};throw new Error("Invalid input: not a Zod schema")}const d8=me("ZodISODateTime",(e,t)=>{y6.init(e,t),Et.init(e,t)});function f8(e){return wL(d8,e)}const h8=me("ZodISODate",(e,t)=>{b6.init(e,t),Et.init(e,t)});function m8(e){return SL(h8,e)}const p8=me("ZodISOTime",(e,t)=>{x6.init(e,t),Et.init(e,t)});function g8(e){return _L(p8,e)}const v8=me("ZodISODuration",(e,t)=>{w6.init(e,t),Et.init(e,t)});function y8(e){return CL(v8,e)}const b8=(e,t)=>{mg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>d5(e,r)},flatten:{value:r=>u5(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ym,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ym,2)}},isEmpty:{get(){return e.issues.length===0}}})},nr=me("ZodError",b8,{Parent:Error}),x8=od(nr),w8=ld(nr),S8=cd(nr),_8=ud(nr),C8=g5(nr),E8=v5(nr),R8=y5(nr),j8=b5(nr),T8=x5(nr),O8=w5(nr),A8=S5(nr),M8=_5(nr),Xx=new WeakMap;function fd(e,t,r){const i=Object.getPrototypeOf(e);let o=Xx.get(i);if(o||(o=new Set,Xx.set(i,o)),!o.has(t)){o.add(t);for(const l in r){const u=r[l];Object.defineProperty(i,l,{configurable:!0,enumerable:!1,get(){const d=u.bind(this);return Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d}),d},set(d){Object.defineProperty(this,l,{configurable:!0,writable:!0,enumerable:!0,value:d})}})}}}const Ut=me("ZodType",(e,t)=>(Vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ou(e,"input"),output:Ou(e,"output")}}),e.toJSONSchema=HL(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,i)=>x8(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>S8(e,r,i),e.parseAsync=async(r,i)=>w8(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>_8(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>C8(e,r,i),e.decode=(r,i)=>E8(e,r,i),e.encodeAsync=async(r,i)=>R8(e,r,i),e.decodeAsync=async(r,i)=>j8(e,r,i),e.safeEncode=(r,i)=>T8(e,r,i),e.safeDecode=(r,i)=>O8(e,r,i),e.safeEncodeAsync=async(r,i)=>A8(e,r,i),e.safeDecodeAsync=async(r,i)=>M8(e,r,i),fd(e,"ZodType",{check(...r){const i=this.def;return this.clone(Wa(i,{checks:[...i.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,i){return ei(this,r,i)},brand(){return this},register(r,i){return r.add(this,i),this},refine(r,i){return this.check(C$(r,i))},superRefine(r,i){return this.check(E$(r,i))},overwrite(r){return this.check(eo(r))},optional(){return tw(this)},exactOptional(){return d$(this)},nullable(){return nw(this)},nullish(){return tw(nw(this))},nonoptional(r){return v$(this,r)},array(){return t$(this)},or(r){return a$([this,r])},and(r){return s$(this,r)},transform(r){return rw(this,c$(r))},default(r){return m$(this,r)},prefault(r){return g$(this,r)},catch(r){return b$(this,r)},pipe(r){return rw(this,r)},readonly(){return S$(this)},describe(r){const i=this.clone();return tl.add(i,{description:r}),i},meta(...r){if(r.length===0)return tl.get(this);const i=this.clone();return tl.add(i,r[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return tl.get(e)?.description},configurable:!0}),e)),jC=me("_ZodString",(e,t)=>{pg.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,l)=>qL(e,i,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,fd(e,"_ZodString",{regex(...i){return this.check(TL(...i))},includes(...i){return this.check(ML(...i))},startsWith(...i){return this.check(NL(...i))},endsWith(...i){return this.check(DL(...i))},min(...i){return this.check(Tu(...i))},max(...i){return this.check(wC(...i))},length(...i){return this.check(SC(...i))},nonempty(...i){return this.check(Tu(1,...i))},lowercase(i){return this.check(OL(i))},uppercase(i){return this.check(AL(i))},trim(){return this.check(zL())},normalize(...i){return this.check(kL(...i))},toLowerCase(){return this.check(LL())},toUpperCase(){return this.check($L())},slugify(){return this.check(IL())}})}),N8=me("ZodString",(e,t)=>{pg.init(e,t),jC.init(e,t),e.email=r=>e.check(eL(D8,r)),e.url=r=>e.check(iL(k8,r)),e.jwt=r=>e.check(xL(Y8,r)),e.emoji=r=>e.check(sL(z8,r)),e.guid=r=>e.check(Yx(Jx,r)),e.uuid=r=>e.check(tL(iu,r)),e.uuidv4=r=>e.check(nL(iu,r)),e.uuidv6=r=>e.check(rL(iu,r)),e.uuidv7=r=>e.check(aL(iu,r)),e.nanoid=r=>e.check(oL(L8,r)),e.guid=r=>e.check(Yx(Jx,r)),e.cuid=r=>e.check(lL($8,r)),e.cuid2=r=>e.check(cL(I8,r)),e.ulid=r=>e.check(uL(P8,r)),e.base64=r=>e.check(vL(G8,r)),e.base64url=r=>e.check(yL(Z8,r)),e.xid=r=>e.check(dL(F8,r)),e.ksuid=r=>e.check(fL(V8,r)),e.ipv4=r=>e.check(hL(U8,r)),e.ipv6=r=>e.check(mL(H8,r)),e.cidrv4=r=>e.check(pL(B8,r)),e.cidrv6=r=>e.check(gL(q8,r)),e.e164=r=>e.check(bL(K8,r)),e.datetime=r=>e.check(f8(r)),e.date=r=>e.check(m8(r)),e.time=r=>e.check(g8(r)),e.duration=r=>e.check(y8(r))});function fu(e){return W6(N8,e)}const Et=me("ZodStringFormat",(e,t)=>{St.init(e,t),jC.init(e,t)}),D8=me("ZodEmail",(e,t)=>{c6.init(e,t),Et.init(e,t)}),Jx=me("ZodGUID",(e,t)=>{o6.init(e,t),Et.init(e,t)}),iu=me("ZodUUID",(e,t)=>{l6.init(e,t),Et.init(e,t)}),k8=me("ZodURL",(e,t)=>{u6.init(e,t),Et.init(e,t)}),z8=me("ZodEmoji",(e,t)=>{d6.init(e,t),Et.init(e,t)}),L8=me("ZodNanoID",(e,t)=>{f6.init(e,t),Et.init(e,t)}),$8=me("ZodCUID",(e,t)=>{h6.init(e,t),Et.init(e,t)}),I8=me("ZodCUID2",(e,t)=>{m6.init(e,t),Et.init(e,t)}),P8=me("ZodULID",(e,t)=>{p6.init(e,t),Et.init(e,t)}),F8=me("ZodXID",(e,t)=>{g6.init(e,t),Et.init(e,t)}),V8=me("ZodKSUID",(e,t)=>{v6.init(e,t),Et.init(e,t)}),U8=me("ZodIPv4",(e,t)=>{S6.init(e,t),Et.init(e,t)}),H8=me("ZodIPv6",(e,t)=>{_6.init(e,t),Et.init(e,t)}),B8=me("ZodCIDRv4",(e,t)=>{C6.init(e,t),Et.init(e,t)}),q8=me("ZodCIDRv6",(e,t)=>{E6.init(e,t),Et.init(e,t)}),G8=me("ZodBase64",(e,t)=>{R6.init(e,t),Et.init(e,t)}),Z8=me("ZodBase64URL",(e,t)=>{T6.init(e,t),Et.init(e,t)}),K8=me("ZodE164",(e,t)=>{O6.init(e,t),Et.init(e,t)}),Y8=me("ZodJWT",(e,t)=>{M6.init(e,t),Et.init(e,t)}),Q8=me("ZodBoolean",(e,t)=>{N6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>GL(e,r,i)});function Wx(e){return EL(Q8,e)}const X8=me("ZodUnknown",(e,t)=>{D6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>KL()});function ew(){return RL(X8)}const J8=me("ZodNever",(e,t)=>{k6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>ZL(e,r,i)});function W8(e){return jL(J8,e)}const e$=me("ZodArray",(e,t)=>{z6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>JL(e,r,i,o),e.element=t.element,fd(e,"ZodArray",{min(r,i){return this.check(Tu(r,i))},nonempty(r){return this.check(Tu(1,r))},max(r,i){return this.check(wC(r,i))},length(r,i){return this.check(SC(r,i))},unwrap(){return this.element}})});function t$(e,t){return PL(e$,e,t)}const n$=me("ZodObject",(e,t)=>{$6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>WL(e,r,i,o),pt(e,"shape",()=>t.shape),fd(e,"ZodObject",{keyof(){return o$(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ew()})},loose(){return this.clone({...this._zod.def,catchall:ew()})},strict(){return this.clone({...this._zod.def,catchall:W8()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return a5(this,r)},safeExtend(r){return i5(this,r)},merge(r){return s5(this,r)},pick(r){return n5(this,r)},omit(r){return r5(this,r)},partial(...r){return o5(TC,this,r[0])},required(...r){return l5(OC,this,r[0])}})});function vg(e,t){const r={type:"object",shape:e??{},...Ie(t)};return new n$(r)}const r$=me("ZodUnion",(e,t)=>{I6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>e8(e,r,i,o),e.options=t.options});function a$(e,t){return new r$({type:"union",options:e,...Ie(t)})}const i$=me("ZodIntersection",(e,t)=>{P6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>t8(e,r,i,o)});function s$(e,t){return new i$({type:"intersection",left:e,right:t})}const Jm=me("ZodEnum",(e,t)=>{F6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(i,o,l)=>YL(e,i,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(i,o)=>{const l={};for(const u of i)if(r.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Jm({...t,checks:[],...Ie(o),entries:l})},e.exclude=(i,o)=>{const l={...t.entries};for(const u of i)if(r.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new Jm({...t,checks:[],...Ie(o),entries:l})}});function o$(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Jm({type:"enum",entries:r,...Ie(t)})}const l$=me("ZodTransform",(e,t)=>{V6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>XL(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new lC(e.constructor.name);r.addIssue=l=>{if(typeof l=="string")r.issues.push(gl(l,r.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(gl(u))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(l=>(r.value=l,r.fallback=!0,r)):(r.value=o,r.fallback=!0,r)}});function c$(e){return new l$({type:"transform",transform:e})}const TC=me("ZodOptional",(e,t)=>{xC.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>RC(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function tw(e){return new TC({type:"optional",innerType:e})}const u$=me("ZodExactOptional",(e,t)=>{U6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>RC(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function d$(e){return new u$({type:"optional",innerType:e})}const f$=me("ZodNullable",(e,t)=>{H6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>n8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function nw(e){return new f$({type:"nullable",innerType:e})}const h$=me("ZodDefault",(e,t)=>{B6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>a8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function m$(e,t){return new h$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():dC(t)}})}const p$=me("ZodPrefault",(e,t)=>{q6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>i8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function g$(e,t){return new p$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():dC(t)}})}const OC=me("ZodNonOptional",(e,t)=>{G6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>r8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function v$(e,t){return new OC({type:"nonoptional",innerType:e,...Ie(t)})}const y$=me("ZodCatch",(e,t)=>{Z6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>s8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function b$(e,t){return new y$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const x$=me("ZodPipe",(e,t)=>{K6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>o8(e,r,i,o),e.in=t.in,e.out=t.out});function rw(e,t){return new x$({type:"pipe",in:e,out:t})}const w$=me("ZodReadonly",(e,t)=>{Y6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>l8(e,r,i,o),e.unwrap=()=>e._zod.def.innerType});function S$(e){return new w$({type:"readonly",innerType:e})}const _$=me("ZodCustom",(e,t)=>{Q6.init(e,t),Ut.init(e,t),e._zod.processJSONSchema=(r,i,o)=>QL(e,r)});function C$(e,t={}){return FL(_$,e,t)}function E$(e,t){return VL(e,t)}const R$=/\.(md|markdown)$/i,j$=/\.(png|jpe?g|gif|svg|webp|ico|bmp|avif)$/i,AC=/\.html?$/i,MC=/\.pdf$/i,T$=/\.(csv|tsv)$/i,O$=/\.(txt|log|json|ya?ml|toml|csv|go|py|js|ts|jsx|tsx|sh|bash|zsh|rb|rs|c|h|cpp|java|kt|swift|sql|css|xml|ini|conf|env|mod|sum|jsonl)$/i;function yg(e){if(e<1024)return e+" B";const t=["KB","MB","GB","TB"];let r=-1;do e/=1024,r++;while(e>=1024&&ri.path.toLowerCase()===r||i.path.toLowerCase()===r+".md")||t.find(i=>{const o=i.name.toLowerCase();return o===r||o===r+".md"})}async function Ni(e){try{if(navigator.clipboard)return await navigator.clipboard.writeText(e),!0}catch{}return!1}const DC="bdrive.lastProject";function M$(){try{return localStorage.getItem(DC)||""}catch{return""}}function N$(e){try{localStorage.setItem(DC,e)}catch{}}function hd(e){return e.user_name?`${e.user_name} <${e.user}>`:e.user||e.author||"unknown"}function D$({className:e,...t}){return f.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:f.jsx("table",{"data-slot":"table",className:We("w-full caption-bottom text-sm",e),...t})})}function k$({className:e,...t}){return f.jsx("thead",{"data-slot":"table-header",className:We("[&_tr]:border-b",e),...t})}function z$({className:e,...t}){return f.jsx("tbody",{"data-slot":"table-body",className:We("[&_tr:last-child]:border-0",e),...t})}function aw({className:e,...t}){return f.jsx("tr",{"data-slot":"table-row",className:We("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function iw({className:e,...t}){return f.jsx("th",{"data-slot":"table-head",className:We("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function L$({className:e,...t}){return f.jsx("td",{"data-slot":"table-cell",className:We("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function $$({header:e}){const t=e.column.getIsSorted();return e.column.getCanSort()?f.jsx(iw,{"data-sort":t||void 0,"aria-sort":t==="asc"?"ascending":t==="desc"?"descending":"none",children:f.jsxs("button",{type:"button",className:"th-sort",onClick:e.column.getToggleSortingHandler(),children:[Bm(e.column.columnDef.header,e.getContext()),t==="asc"?" ↑":t==="desc"?" ↓":""]})}):f.jsx(iw,{children:Bm(e.column.columnDef.header,e.getContext())})}function kC({table:e,className:t}){return f.jsx("div",{className:"admin-list admin-card-table"+(t?" "+t:""),children:f.jsxs(D$,{className:"admin-table",children:[f.jsx(k$,{children:e.getHeaderGroups().map(r=>f.jsx(aw,{children:r.headers.map(i=>f.jsx($$,{header:i},i.id))},r.id))}),f.jsx(z$,{children:e.getRowModel().rows.map(r=>f.jsx(aw,{className:"admin-item",children:r.getVisibleCells().map(i=>f.jsx(L$,{children:Bm(i.column.columnDef.cell,i.getContext())},i.id))},r.id))})]})})}function zC(e){return e?"expires "+new Date(e).toLocaleDateString():"no expiry"}function I$(e){if(e.opens===void 0)return null;if(e.opens===0)return"not opened yet";const t=`${e.opens} open${e.opens===1?"":"s"}`;return e.last_opened?`${t} · last opened ${new Date(e.last_opened).toLocaleDateString()}`:t}function LC(e,t){const r=[];t&&e.project_name&&r.push(e.project_name),e.creator&&r.push("by "+e.creator),e.created&&r.push(new Date(e.created).toLocaleDateString()),r.push(zC(e.expires));const i=I$(e);return i&&r.push(i),r.join(" · ")}const $C="Opens count how many times a file has been read through a public link. Repeat opens by the same reader within 10 minutes count once.";function IC({shares:e,onChanged:t,showProject:r=!1,canRevoke:i=!0,empty:o="No public shares.",loading:l=!1}){const[u,d]=S.useState([]),m=S.useMemo(()=>L_(),[]),p=S.useMemo(()=>[m.accessor("path",{header:"Path",cell:v=>f.jsx("a",{className:"ai-main mono",title:v.getValue(),...Qs(Oi(v.getValue(),v.row.original.project)),children:v.getValue()})}),m.accessor(v=>LC(v,r),{id:"detail",header:r?"Project":"Shared",cell:v=>f.jsx("span",{className:"ai-tag",children:v.getValue()})}),m.display({id:"actions",header:"",cell:v=>f.jsxs("span",{className:"share-acts",children:[f.jsx("button",{className:"ai-btn","aria-label":`Copy the public link to ${v.row.original.path}`,title:"Copy link",onClick:()=>Ni(v.row.original.url).then(b=>qe(b?"Copied.":"Select and copy the link.")),children:f.jsx(rt,{name:"copy"})}),i&&f.jsx("button",{className:"ai-del","aria-label":`Revoke the share of ${v.row.original.path}`,onClick:()=>PC(v.row.original,t),children:"Revoke"})]})})],[m,t,r,i]),y=K_({data:e,columns:p,state:{sorting:u},onSortingChange:d,getCoreRowModel:G_(),getSortedRowModel:Z_()});return l?f.jsx("div",{className:"admin-list",children:f.jsx("div",{className:"admin-empty",children:"Loading…"})}):e.length===0?f.jsx("div",{className:"admin-list",children:f.jsx("div",{className:"admin-empty",children:o})}):f.jsx(kC,{table:y,className:"shares-table"})}async function PC(e,t){if(await za("Revoke share link",`Revoke the public link to “${e.path}”? Anyone with the URL will lose access.`,"Revoke",!0))try{await Wn("DELETE","/api/shares/"+e.token),qe("Share revoked."),t()}catch(r){qe(r.message,!0)}}const P$=vg({name:fu().trim().min(1,"Give the organization a name.").max(60,"Keep it under 60 characters.")});function F$({org:e,projects:t,myEmail:r}){const i=ki(),o=e.role==="owner",l=()=>i.invalidateQueries({queryKey:["orgs"]}),u=()=>i.invalidateQueries({queryKey:["invites",e.id]}),d=()=>i.invalidateQueries({queryKey:["orgShares",e.id]}),m=lg({resolver:gg(P$),values:{name:e.name}}),{data:p}=Ft({queryKey:["invites",e.id],queryFn:()=>qt(`/api/orgs/${e.id}/invites`),enabled:o,select:x=>x.invites||[]}),{data:y,isLoading:v}=Ft({queryKey:["orgShares",e.id],queryFn:()=>qt(`/api/orgs/${e.id}/shares`),enabled:o,select:x=>x.shares||[]}),b=t.filter(x=>x.org===e.id);return f.jsxs("div",{className:"admin",children:[f.jsx("h1",{id:"org-title",children:e.name}),!o&&f.jsx("p",{className:"role-chip-row",children:f.jsx("span",{className:"ai-tag role-chip",children:"Member"})}),!o&&f.jsx("p",{className:"admin-sub",children:"Only owners can rename this organization, manage members, or issue invite links."}),o&&f.jsxs("form",{className:"admin-row",onSubmit:m.handleSubmit(async({name:x})=>{try{await Wn("PATCH","/api/orgs/"+e.id,{name:x}),qe("Renamed."),l()}catch(w){qe(w.message,!0)}}),children:[f.jsx("label",{className:"admin-lbl",htmlFor:"org-rename",children:"Organization name"}),f.jsx("input",{id:"org-rename",type:"text","aria-invalid":!!m.formState.errors.name,"aria-describedby":m.formState.errors.name?"org-rename-err":void 0,...m.register("name")}),f.jsx(xt,{variant:"subtle",id:"org-rename-btn",type:"submit",disabled:!m.formState.isDirty,children:"Rename org"}),m.formState.errors.name&&f.jsx("span",{id:"org-rename-err",role:"alert",className:"field-err",children:m.formState.errors.name.message})]}),f.jsx("h3",{children:"Members"}),f.jsx(V$,{org:e,owner:o,myEmail:r,onChanged:l}),f.jsx("h3",{children:"Projects"}),f.jsxs("div",{className:"admin-list",children:[b.length===0&&f.jsx("div",{className:"admin-empty",children:"No projects yet."}),b.map(x=>f.jsx("div",{className:"admin-item",children:f.jsx("span",{className:"ai-main",title:x.name,children:x.name})},x.id))]}),o&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"admin-h",children:[f.jsx("h3",{children:"Invite links"}),f.jsx(xt,{variant:"primary",onClick:async()=>{try{const x=await ea(`/api/orgs/${e.id}/invites`),w=await Ni(x.url);qe(w?"Invite link copied to clipboard.":"Invite created — copy it from the list below."),u()}catch(x){qe(x.message,!0)}},children:"New invite"})]}),f.jsxs("div",{className:"admin-list",children:[p&&p.length===0&&f.jsx("div",{className:"admin-empty",children:"No active invite links."}),(p||[]).map(x=>f.jsxs("div",{className:"admin-item",children:[f.jsx("button",{type:"button",className:"ai-main mono ai-copy","aria-label":`Copy invite link ${x.url}`,title:x.url,onClick:()=>Ni(x.url).then(w=>qe(w?"Copied.":"Select and copy the link.")),children:x.url}),f.jsx("span",{className:"ai-tag",children:(x.creator?"by "+x.creator+" · ":"")+(x.uses?x.uses+" joined · ":"unused · ")+"expires "+new Date(x.expires).toLocaleDateString()}),f.jsx("button",{className:"ai-del","aria-label":`Revoke invite ${x.token.slice(0,8)}`,onClick:async()=>{if(await za("Revoke invite",`Revoke the link starting ${x.token.slice(0,8)}…? Anyone still holding it won't be able to join.`,"Revoke",!0))try{await Wn("DELETE",`/api/orgs/${e.id}/invites/${x.token}`),qe("Revoked."),u()}catch(w){qe(w.message,!0)}},children:"Revoke"})]},x.token))]}),f.jsx("h3",{children:"Public share links"}),f.jsx("p",{className:"admin-sub",children:"Every live link across this organization's projects. A project's own links are on its Settings page, and on the file itself."}),f.jsx(IC,{shares:y||[],loading:v,onChanged:d,showProject:!0})]})]})}function V$({org:e,owner:t,myEmail:r,onChanged:i}){const[o,l]=S.useState([{id:"email",desc:!1}]),u=S.useMemo(()=>L_(),[]),d=S.useMemo(()=>[u.accessor("email",{id:"email",header:"Member",cell:p=>{const y=!!r&&p.getValue().toLowerCase()===r.toLowerCase();return f.jsx("span",{className:"ai-main",title:p.getValue(),children:p.getValue()+(y?" (you)":"")})}}),u.accessor("role",{id:"role",header:"Role",cell:p=>{const y=p.row.original,v=!!r&&y.email.toLowerCase()===r.toLowerCase();return!t||v?f.jsx("span",{className:"ai-tag role-static",children:y.role}):f.jsxs("span",{className:"role-cell",children:[f.jsxs("select",{"aria-label":`Role for ${y.email}`,value:y.role,onChange:async b=>{try{await Wn("PATCH",`/api/orgs/${e.id}/members/${encodeURIComponent(y.email)}`,{role:b.target.value}),qe("Role updated.")}catch(x){qe(x.message,!0)}i()},children:[f.jsx("option",{value:"owner",children:"owner"}),f.jsx("option",{value:"member",children:"member"})]}),f.jsx("button",{className:"ai-del","aria-label":`Remove ${y.email}`,onClick:async()=>{if(await za("Remove member",`Remove ${y.email} from ${e.name}?`,"Remove",!0))try{await Wn("DELETE",`/api/orgs/${e.id}/members/${encodeURIComponent(y.email)}`),qe("Removed."),i()}catch(b){qe(b.message,!0)}},children:"Remove"})]})}})],[u,e.id,e.name,t,r]),m=K_({data:e.members,columns:d,state:{sorting:o},onSortingChange:l,getCoreRowModel:G_(),getSortedRowModel:Z_()});return f.jsx(kC,{table:m})}const U$=vg({require_verification:Wx(),require_approval:Wx()});function H$(){const e=ki(),{data:t,error:r}=Ft({queryKey:["admin","policy"],queryFn:()=>qt("/api/admin/policy")}),{data:i}=A_(!0),o=lg({resolver:gg(U$),values:t?{require_verification:t.require_verification&&t.mailer,require_approval:t.require_approval}:{require_verification:!1,require_approval:!1}});if(S.useEffect(()=>{r&&qe(r.message,!0)},[r]),!t)return null;const l=async(u,d,m)=>{try{await ea(`/api/admin/pending/${u}/${d}`),qe((d==="approve"?"Approved ":"Denied ")+m),e.invalidateQueries({queryKey:["admin","pending"]})}catch(p){qe(p.message,!0)}};return f.jsxs("div",{className:"admin",children:[f.jsx("h1",{children:"Signup & access"}),f.jsx("p",{className:"admin-sub",children:"Who can create an account on this hub, and how new accounts are vetted."}),f.jsx("h3",{children:"New-account vetting"}),f.jsxs("form",{onSubmit:o.handleSubmit(async u=>{try{await ea("/api/admin/policy",u),qe("Signup policy saved."),e.invalidateQueries({queryKey:["admin","policy"]})}catch(d){qe(d.message,!0)}}),children:[f.jsxs("div",{className:"admin-list",children:[f.jsx(sw,{label:"Require email verification",desc:t.mailer?"New accounts must click an emailed link before they can sign in — proves they control the address.":"Configure SMTP on the server (auth.smtp) to enable email verification.",disabled:!t.mailer,inputProps:o.register("require_verification")}),f.jsx(sw,{label:"Require admin approval",desc:"New accounts wait for a hub admin to approve them before they gain access.",inputProps:o.register("require_approval")})]}),f.jsx(xt,{variant:"primary",type:"submit",style:{marginTop:14},disabled:!o.formState.isDirty,children:"Save policy"})]}),f.jsx("h3",{children:"Who can sign up"}),f.jsxs("div",{className:"admin-list",children:[f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Allowed email domains"}),f.jsx("span",{className:"ai-tag",children:t.allowed_domains&&t.allowed_domains.length?t.allowed_domains.map(u=>"@"+u).join(", "):"any"})]}),f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Self-signup"}),f.jsx("span",{className:"ai-tag",children:t.allow_signup?"open":"invite-only"})]}),f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:"Hub admins"}),f.jsx("span",{className:"ai-tag",children:t.admins&&t.admins.length?t.admins.join(", "):"none"})]})]}),f.jsx("p",{className:"admin-sub",children:"Domains and admins are set in the server config file (they can't be widened from the browser)."}),f.jsx("h3",{children:"Pending signups"}),f.jsxs("div",{className:"admin-list",children:[(!i||i.length===0)&&f.jsx("div",{className:"admin-empty",children:"No one is waiting for approval."}),(i||[]).map(u=>f.jsxs("div",{className:"admin-item",children:[f.jsx("span",{className:"ai-main",children:(u.name?u.name+" · ":"")+u.email}),f.jsx(xt,{variant:"primary",onClick:()=>l(u.id,"approve",u.email),children:"Approve"}),f.jsx("button",{className:"ai-del",onClick:()=>l(u.id,"deny",u.email),children:"Deny"})]},u.id))]})]})}function sw({label:e,desc:t,disabled:r,inputProps:i}){return f.jsxs("label",{className:"admin-item toggle",style:r?{opacity:.55}:void 0,children:[f.jsxs("span",{className:"ai-main",children:[f.jsx("div",{className:"tg-label",children:e}),f.jsx("div",{className:"tg-desc",children:t})]}),f.jsx("input",{type:"checkbox",disabled:r,...i})]})}function B$({...e}){return f.jsx(m1,{"data-slot":"select",...e})}function q$({...e}){return f.jsx(y1,{"data-slot":"select-value",...e})}function G$({className:e,size:t="default",children:r,...i}){return f.jsxs(g1,{"data-slot":"select-trigger","data-size":t,className:We("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...i,children:[r,f.jsx(b1,{asChild:!0,children:f.jsx(Kp,{className:"size-4 opacity-50"})})]})}function Z$({className:e,children:t,position:r="item-aligned",align:i="center",...o}){return f.jsx(w1,{children:f.jsxs(S1,{"data-slot":"select-content",className:We("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:i,...o,children:[f.jsx(Y$,{}),f.jsx(j1,{className:We("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),f.jsx(Q$,{})]})})}function K$({className:e,children:t,...r}){return f.jsxs(M1,{"data-slot":"select-item",className:We("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[f.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:f.jsx(k1,{children:f.jsx(g_,{className:"size-4"})})}),f.jsx(N1,{children:t})]})}function Y$({className:e,...t}){return f.jsx(z1,{"data-slot":"select-scroll-up-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(gk,{className:"size-4"})})}function Q$({className:e,...t}){return f.jsx(L1,{"data-slot":"select-scroll-down-button",className:We("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(Kp,{className:"size-4"})})}const ow=["#5b8def","#f5a623","#4cc38a","#e0679b","#8b7bf0","#3ec8c8","#e6934a"];function vl(e){let t=0;for(const r of e)t=t*31+r.charCodeAt(0)>>>0;return ow[t%ow.length]}function rm({projects:e,currentId:t,menu:r,onNew:i}){const o=e.find(l=>l.id===t);return f.jsxs("nav",{id:"projects","aria-label":"Projects",children:[f.jsxs("div",{className:"nav-head",children:[f.jsx("span",{children:"Projects"}),f.jsx("button",{className:"nav-add",title:"New project","aria-label":"New project",onClick:i,children:"+"})]}),f.jsx("div",{className:"proj-row",children:f.jsxs(B$,{value:t||"",onValueChange:l=>{l&&l!==t&&(Yt("/"+l),hr())},children:[f.jsxs(G$,{id:"project-select","aria-label":`Switch project — current: ${o?.name??"none"}`,title:o?.name,className:"proj-trigger",children:[o&&f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(o.name)},children:f.jsx(Vs,{name:o.icon})}),o?f.jsx("span",{"data-slot":"select-value",children:o.name}):f.jsx(q$,{placeholder:"Select a project"})]}),f.jsx(Z$,{className:"proj-menu",position:"popper",sideOffset:4,children:e.map(l=>f.jsxs(K$,{value:l.id,children:[f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(l.name)},children:f.jsx(Vs,{name:l.icon})}),l.name]},l.id))})]})}),r&&f.jsx("ul",{className:"nav-menu","aria-label":"Project pages",children:[["dashboard","Dashboard","dashboard",r.onDashboard],["install","Installation","terminal",r.onInstall],["history","History","hist",r.onHistory],["settings","Settings","gear",r.onSettings]].map(([l,u,d,m])=>f.jsx("li",{children:f.jsxs("div",{id:"nav-"+l,className:"row"+(r.active===l?" active":""),role:"button",tabIndex:0,onClick:m,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),m())},children:[f.jsx(rt,{name:d}),f.jsx("span",{className:"label",children:u})]})},l))})]})}function FC({...e}){return f.jsx(KM,{"data-slot":"dropdown-menu",...e})}function VC({...e}){return f.jsx(YM,{"data-slot":"dropdown-menu-trigger",...e})}function UC({className:e,sideOffset:t=4,...r}){return f.jsx(QM,{children:f.jsx(XM,{"data-slot":"dropdown-menu-content",sideOffset:t,className:We("z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...r})})}function Is({className:e,inset:t,variant:r="default",...i}){return f.jsx(WM,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:We("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...i})}function am({className:e,inset:t,...r}){return f.jsx(JM,{"data-slot":"dropdown-menu-label","data-inset":t,className:We("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}const X$="https://github.com/runbear-io/beardrive";function J$(){return f.jsx("svg",{viewBox:"0 0 16 16",className:"gh-mark",fill:"currentColor","aria-hidden":"true",children:f.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})}function W$({me:e,org:t,admin:r,orgActive:i,billing:o}){const l=e.name||e.email,[u,d]=S.useState(!1),m=t?Qs(t.manage_url):null,p=o?Qs(o.url):null;return f.jsxs("footer",{id:"accountbar",children:[f.jsxs("a",{className:"gh-star",href:X$,target:"_blank",rel:"noreferrer",children:[f.jsx(J$,{}),f.jsx("span",{children:"Star on GitHub"}),f.jsx("span",{className:"ext","aria-hidden":"true",children:"↗"}),f.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]}),f.jsxs(FC,{modal:!1,open:u,onOpenChange:d,children:[f.jsx(VC,{asChild:!0,children:f.jsxs("button",{id:"account-btn",className:i?"active":void 0,"aria-label":"Account menu",children:[f.jsx("span",{className:"avatar",style:{background:vl(e.email)},"aria-hidden":"true",children:(l.trim()[0]||"?").toUpperCase()}),f.jsxs("span",{className:"acct",children:[f.jsx("b",{children:l}),e.name&&f.jsx("small",{children:e.email})]}),f.jsx(rt,{name:"chev"})]})}),f.jsxs(UC,{id:"account-menu",side:"top",align:"start",sideOffset:6,className:"acct-menu",children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(am,{className:"menu-sec",children:"Organization"}),f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"menu-org-settings","aria-current":i?"page":void 0,...m,onClick:y=>{m?.onClick?.(y),d(!1)},children:[f.jsx(rt,{name:"gear"}),f.jsxs("span",{children:[f.jsx("b",{children:t.name})," Settings"]}),!t.manage_url.startsWith("/")&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"ext","aria-hidden":"true",children:"↗"}),f.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})]})}),o&&f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"menu-billing",...p,onClick:y=>{p?.onClick?.(y),d(!1)},children:[f.jsx(rt,{name:"card"}),f.jsx("span",{children:"Billing"}),f.jsx("span",{className:"ps-chip plan-chip",children:o.plan})]})})]}),r&&f.jsxs(f.Fragment,{children:[f.jsx(am,{className:"menu-sec",children:"Hub"}),f.jsxs(Is,{id:"menu-hub-admin",onSelect:r.onClick,children:[f.jsx(rt,{name:"shield"}),f.jsxs("span",{children:["Signup & access",r.pending?` · ${r.pending}`:""]})]})]}),f.jsx(am,{className:"menu-sec",children:"Account"}),f.jsx(Is,{asChild:!0,children:f.jsxs("a",{id:"signout",href:"/auth/logout",children:[f.jsx(rt,{name:"power"}),f.jsx("span",{children:"Log out"})]})})]})]})]})}function Pa({className:e,...t}){return f.jsx("div",{"data-slot":"card",className:We("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Fa({className:e,...t}){return f.jsx("div",{"data-slot":"card-header",className:We("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Va({className:e,...t}){return f.jsx("div",{"data-slot":"card-title",className:We("leading-none font-semibold",e),...t})}function qs({className:e,...t}){return f.jsx("div",{"data-slot":"card-description",className:We("text-muted-foreground text-sm",e),...t})}function Ua({className:e,...t}){return f.jsx("div",{"data-slot":"card-content",className:We("px-6",e),...t})}function ta({className:e,orientation:t="horizontal",decorative:r=!0,...i}){return f.jsx(AN,{"data-slot":"separator",decorative:r,orientation:t,className:We("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...i})}function eI({url:e}){const t=Ft({queryKey:["billing"],queryFn:()=>qt(e)});if(t.isLoading)return f.jsx("div",{className:"empty",children:"Loading…"});if(t.error||!t.data)return f.jsxs("div",{className:"empty",children:[f.jsx("h3",{children:"Billing is unavailable"}),f.jsx("p",{children:t.error?.message||"Try again shortly."})]});const r=t.data;return f.jsxs("div",{className:"project-settings",id:"billing-view",children:[f.jsxs("h2",{children:["Billing",f.jsx("span",{className:"ps-chip plan-chip",children:r.plan.name})]}),f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsxs(Va,{children:[r.plan.name," plan",r.plan.status?` (${r.plan.status})`:""]}),f.jsxs(qs,{children:["Organization ",r.org," · ",r.usage.used," of ",r.usage.cap," used · ",r.seats.used," of ",r.seats.cap," ",r.seats.cap===1?"seat":"seats"]})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx("div",{className:"usage-bar",children:f.jsx("div",{style:{width:`${r.usage.pct}%`}})})})]}),r.owner?f.jsx("div",{className:"plan-grid",children:r.plans.map(i=>f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:i.name}),f.jsx(qs,{children:i.blurb})]}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsxs("p",{className:"plan-price",children:[i.price,f.jsx("small",{children:" / user / month"})]}),f.jsxs("form",{method:"post",action:r.checkout_url,children:[f.jsx("input",{type:"hidden",name:"plan",value:i.id}),f.jsx(xt,{type:"submit",disabled:i.current,variant:i.current?"subtle":"default",children:i.current?"Current plan":`Upgrade to ${i.name}`})]})]})]},i.id))}):f.jsx("p",{className:"muted-note",children:"Only an organization owner can change the plan."}),r.owner&&r.has_customer&&f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"Manage subscription"}),f.jsx(qs,{children:"Change seats, update the card, download invoices, or cancel."})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx("form",{method:"post",action:r.portal_url,children:f.jsx(xt,{type:"submit",variant:"subtle",children:"Open the billing portal"})})})]})]})}function hu({className:e,type:t,...r}){return f.jsx("input",{type:t,"data-slot":"input",className:We("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...r})}function im({className:e,...t}){return f.jsx(tN,{"data-slot":"label",className:We("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function tI({className:e,...t}){return f.jsx("textarea",{"data-slot":"textarea",className:We("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const lw={read:1,write:2,admin:3};function _i(e,t){return(lw[e||""]||0)>=(lw[t]||0)}const Wm=280,nI=vg({name:fu().trim().min(1,"Give the project a name.").max(120,"Keep the name under 120 characters."),description:fu().max(Wm,`Keep the description under ${Wm} characters.`),icon:fu()});function rI({project:e,org:t,onDeleted:r}){const i=M_(),o=_i(e.perm,"admin"),l=lg({resolver:gg(nI),defaultValues:{name:e.name,description:e.description??"",icon:e.icon??""}});S.useEffect(()=>{l.reset({name:e.name,description:e.description??"",icon:e.icon??""})},[e.id,e.name,e.description,e.icon]);const u=l.watch("icon"),d=l.watch("description"),m=l.handleSubmit(async p=>{const y=l.formState.dirtyFields,v={};if(y.name&&(v.name=p.name.trim()),y.description&&(v.description=p.description),y.icon&&(v.icon=p.icon),Object.keys(v).length!==0)try{await Wn("PATCH","/api/projects/"+e.id,v),qe("Saved."),l.reset({...p,name:p.name.trim()}),await i()}catch(b){qe(b.message,!0)}});return f.jsxs("div",{className:"project-settings",children:[f.jsxs("h2",{children:[e.name,!_i(e.perm,"write")&&f.jsx("span",{className:"ps-chip",children:"Read-only"})]}),f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"General"}),f.jsx(qs,{children:"Name, description and icon for this project."})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsxs("form",{className:"ps-form",onSubmit:m,children:[f.jsxs("div",{className:"ps-field",children:[f.jsx(im,{htmlFor:"ps-icon-btn",children:"Icon"}),f.jsxs("div",{className:"ps-icon-row",children:[f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(e.name)},children:f.jsx(Vs,{name:u})}),f.jsxs(FC,{children:[f.jsx(VC,{asChild:!0,children:f.jsx(xt,{id:"ps-icon-btn",type:"button",variant:"subtle",disabled:!o,children:"Change"})}),f.jsxs(UC,{align:"start",className:"ps-icon-grid",children:[f.jsx(Is,{className:"ps-icon-cell"+(u===""?" active":""),title:"Default","aria-label":"Default icon",onSelect:()=>l.setValue("icon","",{shouldDirty:!0}),children:f.jsx(Vs,{})}),Object.keys(Lm).map(p=>f.jsx(Is,{className:"ps-icon-cell"+(u===p?" active":""),title:p,"aria-label":p,onSelect:()=>l.setValue("icon",p,{shouldDirty:!0}),children:f.jsx(Vs,{name:p})},p))]})]})]})]}),f.jsxs("div",{className:"ps-field",children:[f.jsx(im,{htmlFor:"ps-name",children:"Name"}),f.jsx(hu,{id:"ps-name",disabled:!o,"aria-invalid":!!l.formState.errors.name,"aria-describedby":l.formState.errors.name?"ps-name-err":void 0,...l.register("name")}),l.formState.errors.name&&f.jsx("span",{id:"ps-name-err",role:"alert",className:"field-err",children:l.formState.errors.name.message})]}),f.jsxs("div",{className:"ps-field",children:[f.jsxs(im,{htmlFor:"ps-desc",children:["Description ",f.jsx("span",{className:"ps-opt",children:"(optional)"})]}),f.jsx(tI,{id:"ps-desc",rows:2,disabled:!o,placeholder:"What this project is for.","aria-invalid":!!l.formState.errors.description,"aria-describedby":l.formState.errors.description?"ps-desc-err":void 0,...l.register("description")}),f.jsxs("div",{className:"ps-meta",children:[l.formState.errors.description?f.jsx("span",{id:"ps-desc-err",role:"alert",className:"field-err",children:l.formState.errors.description.message}):f.jsx("span",{}),f.jsxs("span",{className:"ps-count",children:[d.length," / ",Wm]})]})]}),o&&f.jsxs(f.Fragment,{children:[f.jsx(ta,{}),f.jsx("div",{className:"ps-actions",children:f.jsx(xt,{id:"ps-save",type:"submit",variant:"primary",disabled:!l.formState.isDirty||l.formState.isSubmitting,children:"Save changes"})})]})]})})]}),f.jsx(aI,{project:e}),f.jsx(sI,{project:e,org:t}),f.jsxs(Pa,{children:[f.jsx(Fa,{children:f.jsx(Va,{children:"About"})}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsxs("dl",{className:"ps-facts",children:[f.jsx("dt",{children:"Project id"}),f.jsx("dd",{children:f.jsx("code",{children:e.id})}),t&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{children:"Workspace"}),f.jsx("dd",{children:t.name})]}),e.created&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{children:"Created"}),f.jsx("dd",{children:new Date(e.created).toLocaleDateString()})]})]}),f.jsxs("p",{className:"ps-note ps-export",children:[f.jsx("strong",{children:"Take your files elsewhere."})," Run ",f.jsx("code",{children:"bdrive export"})," in the synced folder to write the whole project — every device's journal and every content blob, so full history and authorship — into a single archive. ",f.jsx("code",{children:"bdrive import"})," restores it into any other BearDrive hub, self-hosted or cloud. Export warns first if this device still has changes it hasn't pushed."," ",f.jsx("a",{href:"https://docs.beardrive.ai/reference/migration/",target:"_blank",rel:"noreferrer",children:"How migration works →"})]})]})]}),o&&f.jsxs(Pa,{className:"ps-danger",children:[f.jsx(Fa,{children:f.jsx(Va,{children:"Danger zone"})}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsx("p",{children:"Deleting removes the project from this hub. Its files stay in storage. This can't be undone."}),f.jsx(xt,{variant:"danger",onClick:async()=>{if(await T_(`Delete “${e.name}”?`,"This can't be undone. Type the project name to confirm:","","Delete project",{match:e.name,danger:!0})!==null)try{await Wn("DELETE","/api/projects/"+e.id),qe(`Deleted “${e.name}”.`),await r()}catch(y){qe(y.message,!0)}},children:"Delete project"})]})]})]})}function aI({project:e}){const t=ki(),{data:r,error:i,isLoading:o}=O_(e.id);return i?null:f.jsxs(Pa,{children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"Public links"}),f.jsxs(qs,{children:["Files in this project that anyone with the URL can read — no account needed.",(r||[]).some(l=>l.opens!==void 0)&&f.jsxs(f.Fragment,{children:[" ",$C]})]})]}),f.jsx(ta,{}),f.jsx(Ua,{children:f.jsx(IC,{shares:r||[],loading:o,canRevoke:_i(e.perm,"write"),onChanged:()=>t.invalidateQueries({queryKey:["shares",e.id]}),empty:"No public links."})})]})}const ep=[{value:"admin",label:"Admin"},{value:"write",label:"Write"},{value:"read",label:"Read"},{value:"none",label:"No access"}],iI=Object.fromEntries(ep.map(e=>[e.value,e.label]));function sI({project:e,org:t}){const r=ki(),{data:i,error:o}=D3(e.id),l=_i(e.perm,"admin"),u=()=>{r.invalidateQueries({queryKey:["permissions",e.id]}),r.invalidateQueries({queryKey:["projects"]})},d=async(x,w)=>{try{await x(),qe(w)}catch(_){qe(_.message,!0)}u()};if(o||!i)return null;const m=i,p=`/api/p/${e.id}/permissions`,y=new Set((t?.members||[]).filter(x=>x.role==="owner").map(x=>x.email.toLowerCase())),v=[...m.grants.filter(x=>!y.has(x.email.toLowerCase())),...[...y].sort().map(x=>({email:x,level:"admin",owner:!0}))],b=async()=>{const x=await T_("Add an exception","Email of a workspace member. They get Read access; change it in the table.","","Add");x===null||!x.trim()||await d(()=>Wn("PUT",`${p}/${encodeURIComponent(x.trim())}`,{level:"read"}),"Added.")};return f.jsxs(Pa,{className:"ps-people",children:[f.jsxs(Fa,{children:[f.jsx(Va,{children:"People"}),f.jsx(qs,{children:"Who can see and change this project."})]}),f.jsx(ta,{}),f.jsxs(Ua,{children:[f.jsxs("p",{className:"ps-row",children:[f.jsxs("span",{children:["Everyone in ",t?.name||"this workspace"," can"]}),f.jsx("select",{"aria-label":"Default access for workspace members",disabled:!l,value:m.default,onChange:async x=>{const w=x.target.value;if(w==="none"&&!await za("Make this project invite-only?","Only people listed below (and workspace owners) will see this project.","Make invite-only")){u();return}await d(()=>Wn("PUT",p,{default:w}),"Default access updated.")},children:ep.filter(x=>x.value!=="admin").map(x=>f.jsx("option",{value:x.value,children:x.label},x.value))})]}),m.default==="none"&&f.jsx("p",{className:"ps-note",children:"This project is invite-only: only the people below and workspace owners can see it."}),f.jsxs("div",{className:"ps-people-head",children:[f.jsx("h4",{children:"Exceptions"}),l&&f.jsx(xt,{type:"button",variant:"subtle",onClick:b,children:"+ Add"})]}),v.length===0?f.jsx("p",{className:"ps-note",children:"No exceptions — everyone gets the access above."}):f.jsx("div",{className:"admin-list",children:v.map(x=>{const w="owner"in x;return f.jsxs("div",{className:"admin-item",children:[f.jsxs("span",{className:"ai-main",title:x.email,children:[x.email,m.creator&&x.email.toLowerCase()===m.creator.toLowerCase()&&f.jsx("span",{className:"ai-tag",children:" (creator)"})]}),w?f.jsx("span",{className:"ai-tag",children:"Workspace owner — always admin"}):f.jsxs("span",{className:"role-cell",children:[f.jsx("select",{"aria-label":`Access for ${x.email}`,disabled:!l,value:x.level,onChange:_=>d(()=>Wn("PUT",`${p}/${encodeURIComponent(x.email)}`,{level:_.target.value}),`${x.email} is now ${iI[_.target.value]||_.target.value}.`),children:ep.map(_=>f.jsx("option",{value:_.value,children:_.label},_.value))}),l&&f.jsx("button",{className:"ai-del","aria-label":`Remove exception for ${x.email}`,onClick:()=>d(()=>Wn("DELETE",`${p}/${encodeURIComponent(x.email)}`),"Reverted to the default access."),children:"Remove"})]})]},x.email)})})]})]})}const HC="https://raw.githubusercontent.com/runbear-io/beardrive/main/INSTALL_FOR_AGENTS.md";function BC({project:e,existing:t}){const r=window.location.origin,i=t?'. I already have a folder of notes — ask me which one to sync (the project is named "':'. Ask me which folder to sync (the project is named "',o="Follow "+HC+` to set up BearDrive project `+e.id+" on "+r+i+e.name+'").',l=`brew install runbear-io/tap/beardrive bdrive login `+r+` bdrive init --project `+e.id;return f.jsxs("div",{className:"guide",children:[f.jsxs("h1",{className:"in-title gd-head",children:[f.jsx("span",{className:"proj-mark","aria-hidden":"true",style:{background:vl(e.name)},children:f.jsx(Vs,{name:e.icon})}),e.name]}),e.description&&f.jsx("p",{className:"in-desc",children:e.description}),f.jsxs("div",{className:"gd-body",children:[f.jsx("p",{className:"gd-desc",children:t?"Paste into your coding agent — Claude Code, Cowork, Codex, Gemini CLI, Hermes — in the folder you already have:":"Paste into your coding agent — Claude Code, Cowork, Codex, Gemini CLI, Hermes — in the folder where you want the files:"}),t&&f.jsx("p",{className:"gd-note",children:"Your files stay exactly where they are. Connecting a folder never moves, renames or overwrites anything in it — it uploads what is there and keeps it in sync."}),f.jsx(tp,{code:o}),f.jsx("p",{className:"gd-desc",children:"The agent installs the CLI, signs this machine in, and registers the sync hooks — asking before anything it changes."}),f.jsx("p",{className:"gd-desc",children:"Runs on macOS and Linux. Windows is not supported yet."}),f.jsxs("details",{className:"gd-manual",children:[f.jsx("summary",{children:"What exactly happens"}),f.jsxs("ul",{className:"gd-desc gd-list",children:[f.jsx("li",{children:"Sign-in uses a device code you approve in this browser — the folder itself never holds credentials."}),f.jsx("li",{children:"Sync hooks pull the latest before every agent turn, push edits seconds after they happen, and stamp each change with the session that made it; agent reads feed Insights. They register once per machine in your agent's own config, so every session is covered and nothing is written into the synced folder."}),f.jsx("li",{children:"Codex hooks are off by default: set [features] codex_hooks = true in ~/.codex/config.toml."})]})]}),f.jsxs("details",{className:"gd-manual",children:[f.jsx("summary",{children:"Or run it yourself"}),f.jsx("p",{className:"gd-desc",children:"Same result, in the folder you want the files. One command: init signs this device in, registers the sync hooks and starts syncing."}),f.jsx(tp,{code:l}),f.jsx("p",{className:"gd-desc",children:f.jsx("a",{href:"https://docs.beardrive.ai/manual/install/",target:"_blank",rel:"noreferrer",children:"Full manual setup guide →"})})]})]})]})}function tp({code:e}){const[t,r]=S.useState("Copy");return f.jsxs("pre",{className:"gd-code",children:[f.jsx("code",{children:e}),f.jsx("button",{className:"gd-copy",onClick:async()=>{r(await Ni(e)?"Copied":"Copy failed"),setTimeout(()=>r("Copy"),1400)},children:t})]})}function oI({onNew:e,canCreate:t}){return f.jsxs("div",{className:"onboard",children:[f.jsx("h1",{children:"Welcome to BearDrive"}),f.jsx("p",{children:"You're signed in, but you're not part of any project yet."}),t&&f.jsxs("div",{className:"ob-card ob-start",children:[f.jsx("h3",{children:"Start a project"}),f.jsx("p",{children:"Name it and pick what it starts from — a structure, or nothing at all. Then connect a folder on any machine and it stays in sync."}),f.jsx(xt,{variant:"primary",id:"ob-new",onClick:e,children:"New project"})]}),f.jsxs("div",{className:"ob-card ob-agent",children:[f.jsx("h3",{children:t?"Or let your agent do it":"Connect a new drive to your project"}),f.jsx("p",{children:"Paste into your coding agent — Claude Code, Cowork, Codex, Gemini CLI, Hermes — in the folder where you want the files. It creates the project and starts syncing:"}),f.jsx(tp,{code:"Follow "+HC+` diff --git a/internal/webapp/static/index.html b/internal/webapp/static/index.html index 4025ff6..c98296b 100644 --- a/internal/webapp/static/index.html +++ b/internal/webapp/static/index.html @@ -5,10 +5,10 @@ BearDrive - + - +