@stackable-labs/embeddables 1.39.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embeddables/src/components/CustomerProfile.d.ts +1 -1
- package/dist/embeddables/src/lib/extensionClassSafelist.d.ts +1 -1
- package/dist/embeddables.css +1 -1
- package/dist/react.js +2910 -2789
- package/dist/stackable-widget.external.js +39 -39
- package/dist/stackable-widget.js +37 -37
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(d,ve){typeof exports=="object"&&typeof module<"u"?ve(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],ve):(d=typeof globalThis<"u"?globalThis:d||self,ve(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,ve,k,$r){"use strict";var Zv=Object.defineProperty;var Jv=(d,ve,k)=>ve in d?Zv(d,ve,{enumerable:!0,configurable:!0,writable:!0,value:k}):d[ve]=k;var Jo=(d,ve,k)=>Jv(d,typeof ve!="symbol"?ve+"":ve,k);function Qo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const f=Qo(k),Bt=Qo($r),Cl='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-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-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--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-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.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-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.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-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--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-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@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}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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:"<percentage>";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:"<percentage>";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:"<length>";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:"<percentage>";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)}}',El=()=>{try{return"c1437676-5dbd-446f-bf5a-8463ea97daee"}catch{return"dev"}},et=new Map,Nl=async(e,t)=>{const r=et.get(e.id);if(r)return r;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const o=document.createElement("iframe");if(o.setAttribute("sandbox","allow-scripts allow-same-origin"),o.style.display="none",o.style.width="0",o.style.height="0",o.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),o.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=El();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
|
|
1
|
+
(function(d,be){typeof exports=="object"&&typeof module<"u"?be(require("react/jsx-runtime"),require("react-dom/client"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react/jsx-runtime","react-dom/client","react","react-dom"],be):(d=typeof globalThis<"u"?globalThis:d||self,be(d.jsxRuntime,d.ReactDOM,d.React,d.ReactDOM))})(this,(function(d,be,k,Fo){"use strict";var Zv=Object.defineProperty;var Jv=(d,be,k)=>be in d?Zv(d,be,{enumerable:!0,configurable:!0,writable:!0,value:k}):d[be]=k;var Qr=(d,be,k)=>Jv(d,typeof be!="symbol"?be+"":be,k);function en(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const f=en(k),Vt=en(Fo),El='/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@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-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-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-red-100:oklch(93.6% .032 17.717);--color-red-800:oklch(44.4% .177 26.899);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-800:oklch(47.3% .137 46.201);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-800:oklch(42.4% .199 265.638);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-800:oklch(45.9% .187 3.815);--color-gray-800:oklch(27.8% .033 256.848);--spacing:.25rem;--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-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-geist-sans,ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);--default-mono-font-family:var(--font-geist-mono,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground)}*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-colored:0 0 #0000;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*,:before,:after{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}:host{background-color:var(--background);color:var(--foreground)}}@layer components;@layer utilities{.\\@container{container-type:inline-size}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-8{right:calc(var(--spacing) * 8)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-24{bottom:calc(var(--spacing) * 24)}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.z-1000{z-index:1000}.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-auto{margin-inline:auto}.-mt-2\\.5{margin-top:calc(var(--spacing) * -2.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-4{margin-right:calc(var(--spacing) * 4)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.-ml-2\\.5{margin-left:calc(var(--spacing) * -2.5)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-32{height:calc(var(--spacing) * 32)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-\\[700px\\]{height:700px}.h-auto{height:auto}.h-full{height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\\.5{width:calc(var(--spacing) * .5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-\\[900px\\]{width:900px}.w-full{width:100%}.max-w-\\[200px\\]{max-width:200px}.min-w-0{min-width:calc(var(--spacing) * 0)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-border{border-color:var(--border)}.border-transparent{border-color:#0000}.border-zinc-200{border-color:#e4e4e4}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-foreground\\/35{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/35{background-color:color-mix(in oklab,var(--foreground) 35%,transparent)}}.bg-foreground\\/70{background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.bg-foreground\\/70{background-color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.bg-gray-100{background-color:#f3f4f6}.bg-muted{background-color:var(--muted)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-red-100{background-color:var(--color-red-100)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.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-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.\\!text-muted-foreground{color:var(--muted-foreground)!important}.text-amber-800{color:var(--color-amber-800)}.text-blue-800{color:var(--color-blue-800)}.text-destructive{color:var(--destructive)}.text-emerald-800{color:var(--color-emerald-800)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/70{color:color-mix(in oklab,var(--foreground) 70%,transparent)}}.text-foreground\\/75{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\\/75{color:color-mix(in oklab,var(--foreground) 75%,transparent)}}.text-gray-800{color:var(--color-gray-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-pink-800{color:var(--color-pink-800)}.text-purple-800{color:var(--color-purple-800)}.text-red-800{color:var(--color-red-800)}.text-zinc-300{color:#d4d4d4}.text-zinc-500{color:#727272}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.16\\)\\,0_0_0_1px_rgba\\(0\\,0\\,0\\,0\\.22\\)\\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#ffffff29), 0 0 0 1px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-background{--tw-ring-color:var(--background)}.ring-zinc-200{--tw-ring-color:oklch(92% 0 0)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.group-hover\\/resize\\:bg-foreground\\/55:is(:where(.group\\/resize):hover *){background-color:color-mix(in oklab,var(--foreground) 55%,transparent)}}.group-hover\\/resize\\:opacity-100:is(:where(.group\\/resize):hover *){opacity:1}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-accent\\/70:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/70:hover{background-color:color-mix(in oklab,var(--accent) 70%,transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-zinc-900:hover{color:#181818}.hover\\:opacity-100:hover{opacity:1}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--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-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-ring\\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 40%, transparent)}}.dark\\:border-zinc-300:is(.dark *){border-color:#d4d4d4}.dark\\:bg-background:is(.dark *){background-color:var(--background)}.dark\\:bg-white:is(.dark *){background-color:#fff}.dark\\:ring-zinc-300:is(.dark *){--tw-ring-color:oklch(87.1% 0 0)}@media(hover:hover){.dark\\:group-hover\\/resize\\:bg-white:is(.dark *):is(:where(.group\\/resize):hover *){background-color:#fff}}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-90[data-state=open]>svg{rotate:90deg}}@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}:host{--radius:.625rem;--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08)}:host([theme=dark]),:host(.dark){--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439)}@keyframes sparkle-swipe-in{0%{opacity:0;color:#facc15;filter:drop-shadow(-8px 8px #a855f700)}28%{opacity:1;color:#d8b4fe;filter:drop-shadow(-2px 2px 8px #a855f7cc)}55%{color:#a855f7;filter:drop-shadow(3px -3px 10px #a855f7f2)}to{opacity:1;color:#facc15;filter:drop-shadow(0 0 #a855f700)}}@keyframes sparkle-twinkle{0%,to{opacity:.82;filter:drop-shadow(0 0 #facc1500)}50%{opacity:1;filter:drop-shadow(0 0 7px #facc1580)}}.sparkle-icon{color:#facc15;vertical-align:middle;transform-origin:50%;will-change:transform,filter,color,opacity;line-height:1;animation:1.15s cubic-bezier(.22,1,.36,1) sparkle-swipe-in,2.1s ease-in-out 1.15s infinite sparkle-twinkle;display:inline-block;transform:rotate(10deg)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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:"<percentage>";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:"<percentage>";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:"<length>";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:"<percentage>";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)}}',Nl=()=>{try{return"29590fbb-ac70-4da6-94e3-663ddd274de4"}catch{return"dev"}},et=new Map,Tl=async(e,t)=>{const o=et.get(e.id);if(o)return o;if(!e.bundleUrl)return console.warn(`[SandboxManager] Extension ${e.id} is missing bundleUrl — skipping sandbox creation`),null;const r=document.createElement("iframe");if(r.setAttribute("sandbox","allow-scripts allow-same-origin"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="none",e.bundleUrl.startsWith("http")&&!e.bundleUrl.endsWith(".js")){const i=new URL(e.bundleUrl);i.searchParams.set("__extensionId",e.id),r.src=i.toString(),console.warn(`[SandboxManager] Creating dev sandbox for ${e.id}, injecting __extensionId via query param, url: ${i.toString()}`)}else{let i="";try{const u=Nl();i=await(await fetch(`${e.bundleUrl}?_b=${u}`)).text()}catch(u){console.error(`[SandboxManager] Failed to fetch bundle for ${e.id}:`,u)}const l=`<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
<script>var __STACKABLE_EXTENSION_ID__ = ${JSON.stringify(e.id)}; var process = { env: { NODE_ENV: "production" } };<\/script>
|
|
10
10
|
<script type="module">${i}<\/script>
|
|
11
11
|
</body>
|
|
12
|
-
</html>`;o.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(o);const a={extensionId:e.id,iframe:o,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(p=>p(l)))};return window.addEventListener("message",s),et.set(e.id,a),a},Ht=(e,t)=>{const r=et.get(e);if(!(r!=null&&r.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}r.iframe.contentWindow.postMessage(t,"*")},dt=e=>et.get(e),Tl=e=>{const t=et.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),et.delete(e))},_l=()=>et,en={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},ut=en,Tt=Object.keys(en),Pl=Object.fromEntries(Tt.map(e=>[e,ut[e].attributes]));Object.fromEntries(Tt.filter(e=>ut[e].attributeValues).map(e=>[e,ut[e].attributeValues]));const Al=Object.fromEntries(Tt.filter(e=>ut[e].children).map(e=>[e,ut[e].children]));Object.fromEntries(Tt.map(e=>[e,ut[e].category]));const Il={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke"},tn={ADMIN:"org:super_admin"},rn={ADMIN:"org:admin",OWNER:"org:owner"},Ml=[tn.ADMIN,rn.ADMIN,rn.OWNER];[...Object.values(tn),...Object.values(Ml)];const Ol=e=>{const t=async r=>{const o=r.data;if((o==null?void 0:o.type)!=="capability-request")return;const n=o;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(r.data));const a=n.extensionId;if(!a||!dt(a)){const l=[..._l().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=dt(a);if(!s)return;const i=Il[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};Ht(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};Ht(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};Ht(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},on=k.createContext({extensions:[],components:{},ready:!1}),Ll=({extensions:e,capabilityHandlers:t,components:r={},children:o})=>{const[n,a]=k.useState(!1),s=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>{if(!s.current)return;let l=!1;return(async()=>{const p=s.current;if(p){console.log("[ExtensionProvider] Initializing with",e.length,"extensions"),i.current=Ol(t);for(const c of e)c.enabled&&!l&&(console.log("[ExtensionProvider] Creating sandbox for",c.id,"bundleUrl:",c.bundleUrl),await Nl(c,p),console.log("[ExtensionProvider] Sandbox created for",c.id));l||(console.log("[ExtensionProvider] Ready"),a(!0))}})(),()=>{var p;l=!0;for(const c of e)Tl(c.id);(p=i.current)==null||p.call(i)}},[e,t]),d.jsxs(on.Provider,{value:{extensions:e,components:r,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),o]})},zl=()=>k.useContext(on),Dl=e=>Tt.includes(e),$l=(e,t={})=>{const{surfaceId:r,logPrefix:o="[NodeRenderer]"}=t,n=(a,s,i=0)=>{var m,b,g;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(k.Fragment,{children:(m=a.children)==null?void 0:m.map((v,w)=>n(v,s,w))},i);if(!Dl(a.tag))return console.warn(`${o} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${o} Unregistered UI tag: <${a.tag}>`),null):d.jsx(k.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>n(v,s,w))},i);const{filtered:u,stripped:p}=Fl(a.tag,a.attrs);p.length>0&&console.warn(`${o} Attributes not allowed on <${a.tag}>, stripped: ${p.join(", ")}`);const c=Bl(a.tag,a.children);if(c.length>0&&console.warn(`${o} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const v=a.actionId;u.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:r,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const x=s;x==null||x.postMessage({type:"action-invoke",surfaceId:r,actionId:v,value:w.target.value},"*")}}const h=(g=a.children)==null?void 0:g.map((v,w)=>n(v,s,w));return k.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return n},Fl=(e,t)=>{const r={},o=[];if(!t)return{filtered:r,stripped:o};const n=Pl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){r[a]=s;continue}n!=null&&n.includes(a)?r[a]=s:o.push(a)}return{filtered:r,stripped:o}},Bl=(e,t)=>{const r=Al[e];if(!r||!t)return[];const o=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||r.includes(n.tag)||o.push(n.tag));return o},Vt=({target:e,context:t,className:r,separator:o,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=zl(),[u,p]=k.useState({}),c=k.useRef(""),h=k.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),m=k.useMemo(()=>$l(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(k.useEffect(()=>{const v=h.map(x=>x.id).join(",");if(c.current!==v&&(c.current=v,p({})),!l||h.length===0)return;const w=x=>{const y=x.data;if(!(!y||typeof y!="object"||!h.some(T=>{const C=dt(T.id);return C&&x.source===C.iframe.contentWindow}))){if(y.type==="surface-update"&&y.surfaceId===e){const T=h.find(E=>{const N=dt(E.id);return N&&x.source===N.iframe.contentWindow});if(!T)return;const C=m(y.tree,x.source??null);p(E=>({...E,[T.id]:C}))}y.type==="surface-ready"&&y.surfaceId===e&&t&&h.forEach(T=>{var E;const C=dt(T.id);(E=C==null?void 0:C.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:t},"*")})}};return window.addEventListener("message",w),h.forEach(x=>{var S;const y=dt(x.id);(S=y==null?void 0:y.iframe.contentWindow)==null||S.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,m]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),g=b.length>0?b.flatMap((v,w,x)=>{const y=a?a({extensionId:v.id,children:v.children,index:w,total:x.length}):d.jsx(k.Fragment,{children:v.children},v.id),S=d.jsx(k.Fragment,{children:y},`extension:${v.id}`);if(w===0||!o)return[S];const T=x[w-1],C=typeof o=="function"?o({index:w,total:x.length,previousExtensionId:T.id,extensionId:v.id}):o;return[d.jsx(k.Fragment,{children:C},`separator:${T.id}:${v.id}:${w}`),S]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:r,children:g})};function Hl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const Vl=e=>{switch(e){case"success":return jl;case"info":return Gl;case"warning":return Rl;case"error":return Yl;default:return null}},Wl=Array(12).fill(0),Ul=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},Wl.map((r,o)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),jl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Gl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Yl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ql=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Xl=()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Fr=1;class Kl{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:o,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Fr++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:o}),{...l,...t,id:a,dismissible:i,title:o}):l):this.addToast({title:o,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=o!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],k.isValidElement(u))a=!1,this.create({id:o,type:"default",message:u});else if(Jl(u)&&!u.ok){a=!1;const c=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,h=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof r.error=="function"?await r.error(u):r.error,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:h,...b})}else if(r.success!==void 0){a=!1;const c=typeof r.success=="function"?await r.success(u):r.success,h=typeof r.description=="function"?await r.description(u):r.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:o,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],r.error!==void 0){a=!1;const p=typeof r.error=="function"?await r.error(u):r.error,c=typeof r.description=="function"?await r.description(u):r.description,m=typeof p=="object"&&!k.isValidElement(p)?p:{message:p};this.create({id:o,type:"error",description:c,...m})}}).finally(()=>{a&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof o!="string"&&typeof o!="number"?{unwrap:l}:Object.assign(o,{unwrap:l})},this.custom=(t,r)=>{const o=(r==null?void 0:r.id)||Fr++;return this.create({jsx:t(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const he=new Kl,Zl=(e,t)=>{const r=(t==null?void 0:t.id)||Fr++;return he.addToast({title:e,...t,id:r}),r},Jl=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ql=Zl,ec=()=>he.toasts,tc=()=>he.getActiveToasts(),ft=Object.assign(Ql,{success:he.success,info:he.info,warning:he.warning,error:he.error,custom:he.custom,message:he.message,promise:he.promise,dismiss:he.dismiss,loading:he.loading},{getHistory:ec,getToasts:tc});Hl("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Wt(e){return e.label!==void 0}const rc=3,oc="24px",nc="16px",nn=4e3,ac=356,sc=14,ic=45,lc=200;function Me(...e){return e.filter(Boolean).join(" ")}function cc(e){const[t,r]=e.split("-"),o=[];return t&&o.push(t),r&&o.push(r),o}const dc=e=>{var t,r,o,n,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:x,expanded:y,removeToast:S,defaultRichColors:T,closeButton:C,style:E,cancelButtonStyle:N,actionButtonStyle:_,className:O="",descriptionClassName:$="",duration:W,position:j,gap:Y,expandByDefault:Z,classNames:P,icons:z,closeButtonAriaLabel:L="Close toast"}=e,[Q,A]=k.useState(null),[se,ye]=k.useState(null),[R,re]=k.useState(!1),[U,ee]=k.useState(!1),[D,F]=k.useState(!1),[G,oe]=k.useState(!1),[J,X]=k.useState(!1),[le,ce]=k.useState(0),[lt,Je]=k.useState(0),Pe=k.useRef(c.duration||W||nn),Or=k.useRef(null),me=k.useRef(null),Vv=w===0,Wv=w+1<=g,xe=c.type,Ct=c.dismissible!==!1,Uv=c.className||"",jv=c.descriptionClassName||"",Lr=k.useMemo(()=>v.findIndex(q=>q.toastId===c.id)||0,[v,c.id]),Rv=k.useMemo(()=>{var q;return(q=c.closeButton)!=null?q:C},[c.closeButton,C]),vl=k.useMemo(()=>c.duration||W||nn,[c.duration,W]),Ko=k.useRef(0),Et=k.useRef(0),bl=k.useRef(0),Nt=k.useRef(null),[Gv,Yv]=j.split("-"),wl=k.useMemo(()=>v.reduce((q,de,pe)=>pe>=Lr?q:q+de.height,0),[v,Lr]),yl=Xl(),qv=c.invert||p,Zo=xe==="loading";Et.current=k.useMemo(()=>Lr*Y+wl,[Lr,wl]),k.useEffect(()=>{Pe.current=vl},[vl]),k.useEffect(()=>{re(!0)},[]),k.useEffect(()=>{const q=me.current;if(q){const de=q.getBoundingClientRect().height;return Je(de),b(pe=>[{toastId:c.id,height:de,position:c.position},...pe]),()=>b(pe=>pe.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),k.useLayoutEffect(()=>{if(!R)return;const q=me.current,de=q.style.height;q.style.height="auto";const pe=q.getBoundingClientRect().height;q.style.height=de,Je(pe),b(ke=>ke.find(ue=>ue.toastId===c.id)?ke.map(ue=>ue.toastId===c.id?{...ue,height:pe}:ue):[{toastId:c.id,height:pe,position:c.position},...ke])},[R,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const Qe=k.useCallback(()=>{ee(!0),ce(Et.current),b(q=>q.filter(de=>de.toastId!==c.id)),setTimeout(()=>{S(c)},lc)},[c,S,b,Et]);k.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let q;return y||m||yl?(()=>{if(bl.current<Ko.current){const ke=new Date().getTime()-Ko.current;Pe.current=Pe.current-ke}bl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(Ko.current=new Date().getTime(),q=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Qe()},Pe.current))})(),()=>clearTimeout(q)},[y,m,c,xe,yl,Qe]),k.useEffect(()=>{c.delete&&(Qe(),c.onDismiss==null||c.onDismiss.call(c,c))},[Qe,c.delete]);function Xv(){var q;if(z!=null&&z.loading){var de;return k.createElement("div",{className:Me(P==null?void 0:P.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":xe==="loading"},z.loading)}return k.createElement(Ul,{className:Me(P==null?void 0:P.loader,c==null||(q=c.classNames)==null?void 0:q.loader),visible:xe==="loading"})}const Kv=c.icon||(z==null?void 0:z[xe])||Vl(xe);var xl,kl;return k.createElement("li",{tabIndex:0,ref:me,className:Me(O,Uv,P==null?void 0:P.toast,c==null||(t=c.classNames)==null?void 0:t.toast,P==null?void 0:P.default,P==null?void 0:P[xe],c==null||(r=c.classNames)==null?void 0:r[xe]),"data-sonner-toast":"","data-rich-colors":(xl=c.richColors)!=null?xl:T,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":R,"data-promise":!!c.promise,"data-swiped":J,"data-removed":U,"data-visible":Wv,"data-y-position":Gv,"data-x-position":Yv,"data-index":w,"data-front":Vv,"data-swiping":D,"data-dismissible":Ct,"data-type":xe,"data-invert":qv,"data-swipe-out":G,"data-swipe-direction":se,"data-expanded":!!(y||Z&&R),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${U?le:Et.current}px`,"--initial-height":Z?"auto":`${lt}px`,...E,...c.style},onDragEnd:()=>{F(!1),A(null),Nt.current=null},onPointerDown:q=>{q.button!==2&&(Zo||!Ct||(Or.current=new Date,ce(Et.current),q.target.setPointerCapture(q.pointerId),q.target.tagName!=="BUTTON"&&(F(!0),Nt.current={x:q.clientX,y:q.clientY})))},onPointerUp:()=>{var q,de,pe;if(G||!Ct)return;Nt.current=null;const ke=Number(((q=me.current)==null?void 0:q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),zr=Number(((de=me.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((pe=Or.current)==null?void 0:pe.getTime()),Ce=Q==="x"?ke:zr,Dr=Math.abs(Ce)/ue;if(Math.abs(Ce)>=ic||Dr>.11){ce(Et.current),c.onDismiss==null||c.onDismiss.call(c,c),ye(Q==="x"?ke>0?"right":"left":zr>0?"down":"up"),Qe(),oe(!0);return}else{var Ae,Ie;(Ae=me.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=me.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}X(!1),F(!1),A(null)},onPointerMove:q=>{var de,pe,ke;if(!Nt.current||!Ct||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const ue=q.clientY-Nt.current.y,Ce=q.clientX-Nt.current.x;var Dr;const Ae=(Dr=e.swipeDirections)!=null?Dr:cc(j);!Q&&(Math.abs(Ce)>1||Math.abs(ue)>1)&&A(Math.abs(Ce)>Math.abs(ue)?"x":"y");let Ie={x:0,y:0};const Sl=ct=>1/(1.5+Math.abs(ct)/20);if(Q==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ue<0||Ae.includes("bottom")&&ue>0)Ie.y=ue;else{const ct=ue*Sl(ue);Ie.y=Math.abs(ct)<Math.abs(ue)?ct:ue}}else if(Q==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const ct=Ce*Sl(Ce);Ie.x=Math.abs(ct)<Math.abs(Ce)?ct:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&X(!0),(pe=me.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=me.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Rv&&!c.jsx&&xe!=="loading"?k.createElement("button",{"aria-label":L,"data-disabled":Zo,"data-close-button":!0,onClick:Zo||!Ct?()=>{}:()=>{Qe(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(P==null?void 0:P.closeButton,c==null||(o=c.classNames)==null?void 0:o.closeButton)},(kl=z==null?void 0:z.close)!=null?kl:ql):null,(xe||c.icon||c.promise)&&c.icon!==null&&((z==null?void 0:z[xe])!==null||c.icon)?k.createElement("div",{"data-icon":"",className:Me(P==null?void 0:P.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Xv():null,c.type!=="loading"?Kv:null):null,k.createElement("div",{"data-content":"",className:Me(P==null?void 0:P.content,c==null||(a=c.classNames)==null?void 0:a.content)},k.createElement("div",{"data-title":"",className:Me(P==null?void 0:P.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?k.createElement("div",{"data-description":"",className:Me($,jv,P==null?void 0:P.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),k.isValidElement(c.cancel)?c.cancel:c.cancel&&Wt(c.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:q=>{Wt(c.cancel)&&Ct&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,q),Qe())},className:Me(P==null?void 0:P.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,k.isValidElement(c.action)?c.action:c.action&&Wt(c.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||_,onClick:q=>{Wt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,q),!q.defaultPrevented&&Qe())},className:Me(P==null?void 0:P.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function an(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function uc(e,t){const r={};return[e,t].forEach((o,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?nc:oc;function l(u){["top","right","bottom","left"].forEach(p=>{r[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?r[`${s}-${u}`]=i:r[`${s}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(i)}),r}const fc=k.forwardRef(function(t,r){const{id:o,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:v=rc,toastOptions:w,dir:x=an(),gap:y=sc,icons:S,containerAriaLabel:T="Notifications"}=t,[C,E]=k.useState([]),N=k.useMemo(()=>o?C.filter(R=>R.toasterId===o):C.filter(R=>!R.toasterId),[C,o]),_=k.useMemo(()=>Array.from(new Set([a].concat(N.filter(R=>R.position).map(R=>R.position)))),[N,a]),[O,$]=k.useState([]),[W,j]=k.useState(!1),[Y,Z]=k.useState(!1),[P,z]=k.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),L=k.useRef(null),Q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=k.useRef(null),se=k.useRef(!1),ye=k.useCallback(R=>{E(re=>{var U;return(U=re.find(ee=>ee.id===R.id))!=null&&U.delete||he.dismiss(R.id),re.filter(({id:ee})=>ee!==R.id)})},[]);return k.useEffect(()=>he.subscribe(R=>{if(R.dismiss){requestAnimationFrame(()=>{E(re=>re.map(U=>U.id===R.id?{...U,delete:!0}:U))});return}setTimeout(()=>{$r.flushSync(()=>{E(re=>{const U=re.findIndex(ee=>ee.id===R.id);return U!==-1?[...re.slice(0,U),{...re[U],...R},...re.slice(U+1)]:[R,...re]})})})}),[C]),k.useEffect(()=>{if(h!=="system"){z(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const R=window.matchMedia("(prefers-color-scheme: dark)");try{R.addEventListener("change",({matches:re})=>{z(re?"dark":"light")})}catch{R.addListener(({matches:U})=>{try{z(U?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),k.useEffect(()=>{C.length<=1&&j(!1)},[C]),k.useEffect(()=>{const R=re=>{var U;if(s.every(F=>re[F]||re.code===F)){var D;j(!0),(D=L.current)==null||D.focus()}re.code==="Escape"&&(document.activeElement===L.current||(U=L.current)!=null&&U.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),k.useEffect(()=>{if(L.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,se.current=!1)}},[L.current]),k.createElement("section",{ref:r,"aria-label":`${T} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((R,re)=>{var U;const[ee,D]=R.split("-");return N.length?k.createElement("ol",{key:R,dir:x==="auto"?an():x,tabIndex:-1,ref:L,className:u,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":ee,"data-x-position":D,style:{"--front-toast-height":`${((U=O[0])==null?void 0:U.height)||0}px`,"--width":`${ac}px`,"--gap":`${y}px`,...g,...uc(p,c)},onBlur:F=>{se.current&&!F.currentTarget.contains(F.relatedTarget)&&(se.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||se.current||(se.current=!0,A.current=F.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{Y||j(!1)},onDragEnd:()=>j(!1),onPointerDown:F=>{F.target instanceof HTMLElement&&F.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},N.filter(F=>!F.position&&re===0||F.position===R).map((F,G)=>{var oe,J;return k.createElement(dc,{key:F.id,icons:S,index:G,toast:F,defaultRichColors:m,duration:(oe=w==null?void 0:w.duration)!=null?oe:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(J=w==null?void 0:w.closeButton)!=null?J:l,interacting:Y,position:R,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:ye,toasts:N.filter(X=>X.position==F.position),heights:O.filter(X=>X.position==F.position),setHeights:$,expandByDefault:i,gap:y,expanded:W,swipeDirections:t.swipeDirections})})):null}))}),pc=e=>e.startsWith("http")&&!e.endsWith(".js"),sn=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},hc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t+"=".repeat((4-t.length%4)%4);return atob(r)},gc=(e,t)=>{const r=e.indexOf(":");if(r===-1)return;const o=e.slice(0,r),n=e.slice(r+1);if(!(!o||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(hc(n));if(a.url&&sn(a.url))return{extensionId:o,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(sn(n))return{extensionId:o,bundleUrl:n,mode:t}}},ln=(e,t,r)=>{const o=e.getAll(t);if(o.length===0)return[];const n=[];for(const a of o){const s=a.split(",");for(const i of s){const l=gc(i,r);l&&n.push(l)}}return n},cn=e=>{const t=new URLSearchParams(e);try{const r=ln(t,"_stackable_dev","dev"),o=ln(t,"_stackable_staging","staging"),n=new Map;for(const a of r)n.set(a.extensionId,a);for(const a of o)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},mc=async(e,t)=>t.length===0?e:Promise.all(e.map(async r=>{const o=t.find(n=>n.extensionId===r.id);if(!o)return r;console.log(`[Stackable] Dev override active for ${r.id} → ${o.bundleUrl}`);try{const n=await fetch(`${o.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${r.id}`,a.permissions),{...r,bundleUrl:o.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${r.id}, using registry manifest`)}return{...r,bundleUrl:o.bundleUrl}}));/**
|
|
12
|
+
</html>`;r.srcdoc=l,console.warn(`[SandboxManager] Creating srcdoc sandbox for ${e.id}, srcdoc starts with: ${l.substring(0,300)}`)}t.appendChild(r);const a={extensionId:e.id,iframe:r,manifest:e.manifest,ready:!1,messageHandlers:new Set},s=i=>{const l=i.data;!l||typeof l!="object"||!("type"in l)||("extensionId"in l?l.extensionId:void 0)!==e.id||(l.type==="extension-ready"&&(a.ready=!0),a.messageHandlers.forEach(p=>p(l)))};return window.addEventListener("message",s),et.set(e.id,a),a},tt=(e,t)=>{const o=et.get(e);if(!(o!=null&&o.iframe.contentWindow)){console.warn(`Sandbox not found for extension: ${e}`);return}o.iframe.contentWindow.postMessage(t,"*")},ut=e=>et.get(e),_l=e=>{const t=et.get(e);t&&(t.iframe.remove(),t.messageHandlers.clear(),et.delete(e))},Bo=()=>et,tn={"ui-card":{description:"Card container for grouping related content",icon:"square",category:"layout",attributes:["className","onClick"],children:["ui-card-header","ui-card-content"]},"ui-card-content":{description:"Content area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-card-header":{description:"Header area within a Card",icon:"square",category:"layout",attributes:["className"]},"ui-button":{description:"Interactive button with variant and size options",icon:"mouse-pointer-click",category:"input",attributes:["variant","size","disabled","onClick","type","className","title"],attributeValues:{variant:["default","destructive","outline","secondary","ghost","link"],size:["default","xs","sm","lg","icon"]}},"ui-text":{description:"Paragraph text",icon:"type",category:"text",attributes:["className","tone"],attributeValues:{tone:["default","muted","destructive"]}},"ui-heading":{description:"Heading element (h1–h6)",icon:"heading",category:"text",attributes:["level","className"],attributeValues:{level:["1","2","3","4","5","6"]}},"ui-badge":{description:"Small label for status, category, or count",icon:"tag",category:"text",attributes:["variant","hue","tone","className"],attributeValues:{variant:["default","secondary","destructive","outline","ghost","link"],hue:["amber","blue","emerald","red","purple","pink","gray"],tone:["default","muted","destructive"]}},"ui-input":{description:"Single-line text input field",icon:"text-cursor-input",category:"input",attributes:["type","placeholder","value","onChange","disabled","className","id"]},"ui-textarea":{description:"Multi-line text input field",icon:"text",category:"input",attributes:["placeholder","value","onChange","disabled","rows","className","id"]},"ui-select":{description:"Dropdown select with options",icon:"chevrons-up-down",category:"input",attributes:["value","defaultValue","onChange","placeholder","disabled","className"],children:["ui-select-option"]},"ui-select-option":{description:"Option within a Select dropdown",icon:"chevrons-up-down",category:"input",attributes:["value","disabled","className"]},"ui-checkbox":{description:"Checkbox toggle for boolean values",icon:"square-check",category:"input",attributes:["checked","onChange","disabled","className","id"]},"ui-switch":{description:"Toggle switch for on/off states",icon:"toggle-left",category:"input",attributes:["checked","onChange","disabled","size","className","id"],attributeValues:{size:["sm","default"]}},"ui-label":{description:"Form label associated with an input",icon:"tag",category:"input",attributes:["htmlFor","className"]},"ui-radio-group":{description:"Group of radio buttons for single selection",icon:"circle-dot",category:"input",attributes:["value","defaultValue","onChange","className"],children:["ui-radio-group-item","ui-label","ui-inline"]},"ui-radio-group-item":{description:"Individual radio button within a RadioGroup",icon:"circle-dot",category:"input",attributes:["value","disabled","className","id"]},"ui-stack":{description:"Vertical or horizontal flex container with gap",icon:"rows-3",category:"layout",attributes:["gap","direction","className"],attributeValues:{direction:["row","column"],gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-inline":{description:"Horizontal flex container with centered items",icon:"columns-3",category:"layout",attributes:["gap","className"],attributeValues:{gap:["0","1","2","3","4","5","6","8","10","12"]}},"ui-separator":{description:"Horizontal divider line",icon:"minus",category:"layout",attributes:["className"]},"ui-tabs":{description:"Tabbed content container",icon:"panel-top",category:"navigation",attributes:["defaultValue","className"],children:["ui-tabs-list","ui-tabs-content"]},"ui-tabs-list":{description:"Container for tab triggers",icon:"panel-top",category:"navigation",attributes:["className"],children:["ui-tabs-trigger"]},"ui-tabs-trigger":{description:"Clickable tab label within TabsList",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-tabs-content":{description:"Content panel shown when its tab is active",icon:"panel-top",category:"navigation",attributes:["value","className"]},"ui-scroll-area":{description:"Scrollable content container",icon:"scroll",category:"layout",attributes:["className"]},"ui-avatar":{description:"User avatar with image and initials fallback",icon:"circle-user",category:"composite",attributes:["src","alt","className"]},"ui-icon":{description:"Icon from the allowed icon set",icon:"sparkles",category:"composite",attributes:["name","size","className"],attributeValues:{size:["sm","md","lg"]}},"ui-link":{description:"Hyperlink element",icon:"link",category:"navigation",attributes:["href","target","rel","className"]},"ui-menu":{description:"Card-based menu with clickable items",icon:"menu",category:"navigation",attributes:["title","className"],children:["ui-menu-item"]},"ui-menu-item":{description:"Clickable item within a Menu",icon:"menu",category:"navigation",attributes:["icon","label","description","onClick","className"]},"ui-skeleton":{description:"Loading placeholder with shimmer effect",icon:"loader",category:"feedback",attributes:["width","height","className"]},"ui-tooltip":{description:"Hover tooltip with text content",icon:"message-square",category:"feedback",attributes:["content","className"]},"ui-progress":{description:"Progress bar with percentage value",icon:"bar-chart",category:"feedback",attributes:["value","className"]},"ui-alert":{description:"Alert banner with icon and optional title",icon:"alert-circle",category:"feedback",attributes:["variant","title","className"],attributeValues:{variant:["default","destructive"]}},"ui-collapsible":{description:"Expandable/collapsible content section",icon:"chevrons-down-up",category:"composite",attributes:["defaultOpen","className"],children:["ui-collapsible-trigger","ui-collapsible-content"]},"ui-collapsible-trigger":{description:"Clickable trigger to toggle Collapsible",icon:"chevrons-down-up",category:"composite",attributes:["className"]},"ui-collapsible-content":{description:"Content revealed when Collapsible is open",icon:"chevrons-down-up",category:"composite",attributes:["className"]}},ft=tn,_t=Object.keys(tn),Pl=Object.fromEntries(_t.map(e=>[e,ft[e].attributes]));Object.fromEntries(_t.filter(e=>ft[e].attributeValues).map(e=>[e,ft[e].attributeValues]));const Al=Object.fromEntries(_t.filter(e=>ft[e].children).map(e=>[e,ft[e].children]));Object.fromEntries(_t.map(e=>[e,ft[e].category]));const Il={"context.read":"context:read","data.query":"data:query","data.fetch":"data:fetch","actions.toast":"actions:toast","actions.invoke":"actions:invoke","identity.read":"identity:read","identity.extend":"identity:extend"},on={ADMIN:"org:super_admin"},rn={ADMIN:"org:admin",OWNER:"org:owner"},Ml=[on.ADMIN,rn.ADMIN,rn.OWNER];[...Object.values(on),...Object.values(Ml)];const Ol=e=>{const t=async o=>{const r=o.data;if((r==null?void 0:r.type)!=="capability-request")return;const n=r;console.warn("[CapabilityRPC] raw message data:",JSON.stringify(o.data));const a=n.extensionId;if(!a||!ut(a)){const l=[...Bo().keys()];console.warn(`Received capability request from unknown source (extensionId: "${a??"undefined"}", registered: [${l.join(", ")}], capability: ${n.capability})`);return}const s=ut(a);if(!s)return;const i=Il[n.capability];if(i&&!s.manifest.permissions.includes(i)){const l={type:"capability-response",id:n.id,success:!1,error:`Permission denied: '${i}' not granted for extension '${a}'`};tt(a,l);return}try{let l;switch(n.capability){case"data.query":l=await e["data.query"](n.payload);break;case"data.fetch":l=await e["data.fetch"](a,n.payload);break;case"actions.toast":l=await e["actions.toast"](a,n.payload);break;case"actions.invoke":l=await e["actions.invoke"](n.payload);break;case"context.read":l=await e["context.read"]();break;case"identity.read":l=e["identity.read"]?await e["identity.read"]():null;break;case"identity.extend":l=e["identity.extend"]?await e["identity.extend"](a,n.payload):null;break;default:throw new Error(`Unknown capability: ${n.capability}`)}const u={type:"capability-response",id:n.id,success:!0,data:l};tt(a,u)}catch(l){const u={type:"capability-response",id:n.id,success:!1,error:l instanceof Error?l.message:"Unknown error"};tt(a,u)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},nn=k.createContext({extensions:[],components:{},ready:!1}),Ll=({extensions:e,capabilityHandlers:t,components:o={},children:r})=>{const[n,a]=k.useState(!1),s=k.useRef(null),i=k.useRef(null);return k.useEffect(()=>{if(!s.current)return;let l=!1;return(async()=>{const p=s.current;if(p){console.log("[ExtensionProvider] Initializing with",e.length,"extensions"),i.current=Ol(t);for(const c of e)c.enabled&&!l&&(console.log("[ExtensionProvider] Creating sandbox for",c.id,"bundleUrl:",c.bundleUrl),await Tl(c,p),console.log("[ExtensionProvider] Sandbox created for",c.id));l||(console.log("[ExtensionProvider] Ready"),a(!0))}})(),()=>{var p;l=!0;for(const c of e)_l(c.id);(p=i.current)==null||p.call(i)}},[e,t]),d.jsxs(nn.Provider,{value:{extensions:e,components:o,ready:n},children:[d.jsx("div",{ref:s,style:{display:"none"}}),r]})},zl=()=>k.useContext(nn),Dl=e=>_t.includes(e),$l=(e,t={})=>{const{surfaceId:o,logPrefix:r="[NodeRenderer]"}=t,n=(a,s,i=0)=>{var m,b,g;if(a.type==="text")return a.text||null;if(!a.tag)return null;if(a.tag==="__fragment")return d.jsx(k.Fragment,{children:(m=a.children)==null?void 0:m.map((v,w)=>n(v,s,w))},i);if(!Dl(a.tag))return console.warn(`${r} Unknown UI tag rejected: <${a.tag}>`),null;const l=e[a.tag];if(!l)return a.tag.startsWith("ui-")?(console.warn(`${r} Unregistered UI tag: <${a.tag}>`),null):d.jsx(k.Fragment,{children:(b=a.children)==null?void 0:b.map((v,w)=>n(v,s,w))},i);const{filtered:u,stripped:p}=Fl(a.tag,a.attrs);p.length>0&&console.warn(`${r} Attributes not allowed on <${a.tag}>, stripped: ${p.join(", ")}`);const c=Bl(a.tag,a.children);if(c.length>0&&console.warn(`${r} Invalid children in <${a.tag}>: ${c.join(", ")}`),a.actionId){const v=a.actionId;u.onClick=()=>{const w=s;w==null||w.postMessage({type:"action-invoke",surfaceId:o,actionId:v},"*")}}if(u["data-onchange-id"]){const v=u["data-onchange-id"];delete u["data-onchange-id"],u.onChange=w=>{const y=s;y==null||y.postMessage({type:"action-invoke",surfaceId:o,actionId:v,value:w.target.value},"*")}}const h=(g=a.children)==null?void 0:g.map((v,w)=>n(v,s,w));return k.createElement(l,{...u,key:i},h&&h.length>0?h:void 0)};return n},Fl=(e,t)=>{const o={},r=[];if(!t)return{filtered:o,stripped:r};const n=Pl[e];for(const[a,s]of Object.entries(t)){if(a==="data-onchange-id"){o[a]=s;continue}n!=null&&n.includes(a)?o[a]=s:r.push(a)}return{filtered:o,stripped:r}},Bl=(e,t)=>{const o=Al[e];if(!o||!t)return[];const r=[];for(const n of t)n.type!=="text"&&(!n.tag||n.tag==="__fragment"||o.includes(n.tag)||r.push(n.tag));return r},Wt=({target:e,context:t,className:o,separator:r,fallback:n=null,render:a})=>{const{extensions:s,components:i,ready:l}=zl(),[u,p]=k.useState({}),c=k.useRef(""),h=k.useMemo(()=>s.filter(v=>v.enabled&&v.manifest.targets.includes(e)),[s.map(v=>v.id).join(","),e]),m=k.useMemo(()=>$l(i,{surfaceId:e,logPrefix:"[ExtensionSlot]"}),[e,i]);if(k.useEffect(()=>{const v=h.map(y=>y.id).join(",");if(c.current!==v&&(c.current=v,p({})),!l||h.length===0)return;const w=y=>{const x=y.data;if(!(!x||typeof x!="object"||!h.some(T=>{const N=ut(T.id);return N&&y.source===N.iframe.contentWindow}))){if(x.type==="surface-update"&&x.surfaceId===e){const T=h.find(E=>{const C=ut(E.id);return C&&y.source===C.iframe.contentWindow});if(!T)return;const N=m(x.tree,y.source??null);p(E=>({...E,[T.id]:N}))}x.type==="surface-ready"&&x.surfaceId===e&&t&&h.forEach(T=>{var E;const N=ut(T.id);(E=N==null?void 0:N.iframe.contentWindow)==null||E.postMessage({type:"context-update",surfaceId:e,context:t},"*")})}};return window.addEventListener("message",w),h.forEach(y=>{var S;const x=ut(y.id);(S=x==null?void 0:x.iframe.contentWindow)==null||S.postMessage({type:"surface-render",surfaceId:e,context:t},"*")}),()=>{window.removeEventListener("message",w)}},[l,h,e,t,m]),!l)return null;if(h.length===0)return n?d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:n}):null;const b=h.map(v=>({id:v.id,children:u[v.id]})).filter(v=>!!v.children),g=b.length>0?b.flatMap((v,w,y)=>{const x=a?a({extensionId:v.id,children:v.children,index:w,total:y.length}):d.jsx(k.Fragment,{children:v.children},v.id),S=d.jsx(k.Fragment,{children:x},`extension:${v.id}`);if(w===0||!r)return[S];const T=y[w-1],N=typeof r=="function"?r({index:w,total:y.length,previousExtensionId:T.id,extensionId:v.id}):r;return[d.jsx(k.Fragment,{children:N},`separator:${T.id}:${v.id}:${w}`),S]}):n;return d.jsx("div",{"data-extension-slot":e,title:e,className:o,children:g})};function Hl(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const Vl=e=>{switch(e){case"success":return jl;case"info":return Gl;case"warning":return Rl;case"error":return Yl;default:return null}},Wl=Array(12).fill(0),Ul=({visible:e,className:t})=>k.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},k.createElement("div",{className:"sonner-spinner"},Wl.map((o,r)=>k.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),jl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Rl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Gl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Yl=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},k.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ql=k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},k.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),k.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Xl=()=>{const[e,t]=k.useState(document.hidden);return k.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Ho=1;class Kl{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:r,...n}=t,a=typeof(t==null?void 0:t.id)=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:Ho++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...n,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(r=>r({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let r;o.loading!==void 0&&(r=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=n.then(async u=>{if(s=["resolve",u],k.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(Jl(u)&&!u.ok){a=!1;const c=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(u instanceof Error){a=!1;const c=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...b})}else if(o.success!==void 0){a=!1;const c=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,b=typeof c=="object"&&!k.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...b})}}).catch(async u=>{if(s=["reject",u],o.error!==void 0){a=!1;const p=typeof o.error=="function"?await o.error(u):o.error,c=typeof o.description=="function"?await o.description(u):o.description,m=typeof p=="object"&&!k.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:c,...m})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),o.finally==null||o.finally.call(o)}),l=()=>new Promise((u,p)=>i.then(()=>s[0]==="reject"?p(s[1]):u(s[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,o)=>{const r=(o==null?void 0:o.id)||Ho++;return this.create({jsx:t(r),id:r,...o}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ge=new Kl,Zl=(e,t)=>{const o=(t==null?void 0:t.id)||Ho++;return ge.addToast({title:e,...t,id:o}),o},Jl=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ql=Zl,ec=()=>ge.toasts,tc=()=>ge.getActiveToasts(),pt=Object.assign(Ql,{success:ge.success,info:ge.info,warning:ge.warning,error:ge.error,custom:ge.custom,message:ge.message,promise:ge.promise,dismiss:ge.dismiss,loading:ge.loading},{getHistory:ec,getToasts:tc});Hl("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ut(e){return e.label!==void 0}const oc=3,rc="24px",nc="16px",an=4e3,ac=356,sc=14,ic=45,lc=200;function Me(...e){return e.filter(Boolean).join(" ")}function cc(e){const[t,o]=e.split("-"),r=[];return t&&r.push(t),o&&r.push(o),r}const dc=e=>{var t,o,r,n,a,s,i,l,u;const{invert:p,toast:c,unstyled:h,interacting:m,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:y,expanded:x,removeToast:S,defaultRichColors:T,closeButton:N,style:E,cancelButtonStyle:C,actionButtonStyle:P,className:_="",descriptionClassName:I="",duration:L,position:O,gap:z,expandByDefault:H,classNames:A,icons:$,closeButtonAriaLabel:D="Close toast"}=e,[Y,M]=k.useState(null),[ae,pe]=k.useState(null),[q,oe]=k.useState(!1),[G,ee]=k.useState(!1),[V,W]=k.useState(!1),[X,re]=k.useState(!1),[Q,Z]=k.useState(!1),[le,ce]=k.useState(0),[ct,Je]=k.useState(0),Pe=k.useRef(c.duration||L||an),Lo=k.useRef(null),ve=k.useRef(null),Vv=w===0,Wv=w+1<=g,xe=c.type,Et=c.dismissible!==!1,Uv=c.className||"",jv=c.descriptionClassName||"",zo=k.useMemo(()=>v.findIndex(K=>K.toastId===c.id)||0,[v,c.id]),Rv=k.useMemo(()=>{var K;return(K=c.closeButton)!=null?K:N},[c.closeButton,N]),bl=k.useMemo(()=>c.duration||L||an,[c.duration,L]),Zr=k.useRef(0),Nt=k.useRef(0),wl=k.useRef(0),Tt=k.useRef(null),[Gv,Yv]=O.split("-"),yl=k.useMemo(()=>v.reduce((K,de,he)=>he>=zo?K:K+de.height,0),[v,zo]),xl=Xl(),qv=c.invert||p,Jr=xe==="loading";Nt.current=k.useMemo(()=>zo*z+yl,[zo,yl]),k.useEffect(()=>{Pe.current=bl},[bl]),k.useEffect(()=>{oe(!0)},[]),k.useEffect(()=>{const K=ve.current;if(K){const de=K.getBoundingClientRect().height;return Je(de),b(he=>[{toastId:c.id,height:de,position:c.position},...he]),()=>b(he=>he.filter(ke=>ke.toastId!==c.id))}},[b,c.id]),k.useLayoutEffect(()=>{if(!q)return;const K=ve.current,de=K.style.height;K.style.height="auto";const he=K.getBoundingClientRect().height;K.style.height=de,Je(he),b(ke=>ke.find(ue=>ue.toastId===c.id)?ke.map(ue=>ue.toastId===c.id?{...ue,height:he}:ue):[{toastId:c.id,height:he,position:c.position},...ke])},[q,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const Qe=k.useCallback(()=>{ee(!0),ce(Nt.current),b(K=>K.filter(de=>de.toastId!==c.id)),setTimeout(()=>{S(c)},lc)},[c,S,b,Nt]);k.useEffect(()=>{if(c.promise&&xe==="loading"||c.duration===1/0||c.type==="loading")return;let K;return x||m||xl?(()=>{if(wl.current<Zr.current){const ke=new Date().getTime()-Zr.current;Pe.current=Pe.current-ke}wl.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(Zr.current=new Date().getTime(),K=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Qe()},Pe.current))})(),()=>clearTimeout(K)},[x,m,c,xe,xl,Qe]),k.useEffect(()=>{c.delete&&(Qe(),c.onDismiss==null||c.onDismiss.call(c,c))},[Qe,c.delete]);function Xv(){var K;if($!=null&&$.loading){var de;return k.createElement("div",{className:Me(A==null?void 0:A.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":xe==="loading"},$.loading)}return k.createElement(Ul,{className:Me(A==null?void 0:A.loader,c==null||(K=c.classNames)==null?void 0:K.loader),visible:xe==="loading"})}const Kv=c.icon||($==null?void 0:$[xe])||Vl(xe);var kl,Sl;return k.createElement("li",{tabIndex:0,ref:ve,className:Me(_,Uv,A==null?void 0:A.toast,c==null||(t=c.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[xe],c==null||(o=c.classNames)==null?void 0:o[xe]),"data-sonner-toast":"","data-rich-colors":(kl=c.richColors)!=null?kl:T,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":q,"data-promise":!!c.promise,"data-swiped":Q,"data-removed":G,"data-visible":Wv,"data-y-position":Gv,"data-x-position":Yv,"data-index":w,"data-front":Vv,"data-swiping":V,"data-dismissible":Et,"data-type":xe,"data-invert":qv,"data-swipe-out":X,"data-swipe-direction":ae,"data-expanded":!!(x||H&&q),"data-testid":c.testId,style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${G?le:Nt.current}px`,"--initial-height":H?"auto":`${ct}px`,...E,...c.style},onDragEnd:()=>{W(!1),M(null),Tt.current=null},onPointerDown:K=>{K.button!==2&&(Jr||!Et||(Lo.current=new Date,ce(Nt.current),K.target.setPointerCapture(K.pointerId),K.target.tagName!=="BUTTON"&&(W(!0),Tt.current={x:K.clientX,y:K.clientY})))},onPointerUp:()=>{var K,de,he;if(X||!Et)return;Tt.current=null;const ke=Number(((K=ve.current)==null?void 0:K.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Do=Number(((de=ve.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((he=Lo.current)==null?void 0:he.getTime()),Ce=Y==="x"?ke:Do,$o=Math.abs(Ce)/ue;if(Math.abs(Ce)>=ic||$o>.11){ce(Nt.current),c.onDismiss==null||c.onDismiss.call(c,c),pe(Y==="x"?ke>0?"right":"left":Do>0?"down":"up"),Qe(),re(!0);return}else{var Ae,Ie;(Ae=ve.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ie=ve.current)==null||Ie.style.setProperty("--swipe-amount-y","0px")}Z(!1),W(!1),M(null)},onPointerMove:K=>{var de,he,ke;if(!Tt.current||!Et||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const ue=K.clientY-Tt.current.y,Ce=K.clientX-Tt.current.x;var $o;const Ae=($o=e.swipeDirections)!=null?$o:cc(O);!Y&&(Math.abs(Ce)>1||Math.abs(ue)>1)&&M(Math.abs(Ce)>Math.abs(ue)?"x":"y");let Ie={x:0,y:0};const Cl=dt=>1/(1.5+Math.abs(dt)/20);if(Y==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ue<0||Ae.includes("bottom")&&ue>0)Ie.y=ue;else{const dt=ue*Cl(ue);Ie.y=Math.abs(dt)<Math.abs(ue)?dt:ue}}else if(Y==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&Ce<0||Ae.includes("right")&&Ce>0)Ie.x=Ce;else{const dt=Ce*Cl(Ce);Ie.x=Math.abs(dt)<Math.abs(Ce)?dt:Ce}(Math.abs(Ie.x)>0||Math.abs(Ie.y)>0)&&Z(!0),(he=ve.current)==null||he.style.setProperty("--swipe-amount-x",`${Ie.x}px`),(ke=ve.current)==null||ke.style.setProperty("--swipe-amount-y",`${Ie.y}px`)}},Rv&&!c.jsx&&xe!=="loading"?k.createElement("button",{"aria-label":D,"data-disabled":Jr,"data-close-button":!0,onClick:Jr||!Et?()=>{}:()=>{Qe(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Me(A==null?void 0:A.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(Sl=$==null?void 0:$.close)!=null?Sl:ql):null,(xe||c.icon||c.promise)&&c.icon!==null&&(($==null?void 0:$[xe])!==null||c.icon)?k.createElement("div",{"data-icon":"",className:Me(A==null?void 0:A.icon,c==null||(n=c.classNames)==null?void 0:n.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Xv():null,c.type!=="loading"?Kv:null):null,k.createElement("div",{"data-content":"",className:Me(A==null?void 0:A.content,c==null||(a=c.classNames)==null?void 0:a.content)},k.createElement("div",{"data-title":"",className:Me(A==null?void 0:A.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?k.createElement("div",{"data-description":"",className:Me(I,jv,A==null?void 0:A.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),k.isValidElement(c.cancel)?c.cancel:c.cancel&&Ut(c.cancel)?k.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||C,onClick:K=>{Ut(c.cancel)&&Et&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,K),Qe())},className:Me(A==null?void 0:A.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,k.isValidElement(c.action)?c.action:c.action&&Ut(c.action)?k.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||P,onClick:K=>{Ut(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,K),!K.defaultPrevented&&Qe())},className:Me(A==null?void 0:A.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function sn(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function uc(e,t){const o={};return[e,t].forEach((r,n)=>{const a=n===1,s=a?"--mobile-offset":"--offset",i=a?nc:rc;function l(u){["top","right","bottom","left"].forEach(p=>{o[`${s}-${p}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?o[`${s}-${u}`]=i:o[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),o}const fc=k.forwardRef(function(t,o){const{id:r,invert:n,position:a="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:p,mobileOffset:c,theme:h="light",richColors:m,duration:b,style:g,visibleToasts:v=oc,toastOptions:w,dir:y=sn(),gap:x=sc,icons:S,containerAriaLabel:T="Notifications"}=t,[N,E]=k.useState([]),C=k.useMemo(()=>r?N.filter(q=>q.toasterId===r):N.filter(q=>!q.toasterId),[N,r]),P=k.useMemo(()=>Array.from(new Set([a].concat(C.filter(q=>q.position).map(q=>q.position)))),[C,a]),[_,I]=k.useState([]),[L,O]=k.useState(!1),[z,H]=k.useState(!1),[A,$]=k.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=k.useRef(null),Y=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=k.useRef(null),ae=k.useRef(!1),pe=k.useCallback(q=>{E(oe=>{var G;return(G=oe.find(ee=>ee.id===q.id))!=null&&G.delete||ge.dismiss(q.id),oe.filter(({id:ee})=>ee!==q.id)})},[]);return k.useEffect(()=>ge.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{E(oe=>oe.map(G=>G.id===q.id?{...G,delete:!0}:G))});return}setTimeout(()=>{Fo.flushSync(()=>{E(oe=>{const G=oe.findIndex(ee=>ee.id===q.id);return G!==-1?[...oe.slice(0,G),{...oe[G],...q},...oe.slice(G+1)]:[q,...oe]})})})}),[N]),k.useEffect(()=>{if(h!=="system"){$(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:oe})=>{$(oe?"dark":"light")})}catch{q.addListener(({matches:G})=>{try{$(G?"dark":"light")}catch(ee){console.error(ee)}})}},[h]),k.useEffect(()=>{N.length<=1&&O(!1)},[N]),k.useEffect(()=>{const q=oe=>{var G;if(s.every(W=>oe[W]||oe.code===W)){var V;O(!0),(V=D.current)==null||V.focus()}oe.code==="Escape"&&(document.activeElement===D.current||(G=D.current)!=null&&G.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),k.useEffect(()=>{if(D.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,ae.current=!1)}},[D.current]),k.createElement("section",{ref:o,"aria-label":`${T} ${Y}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((q,oe)=>{var G;const[ee,V]=q.split("-");return C.length?k.createElement("ol",{key:q,dir:y==="auto"?sn():y,tabIndex:-1,ref:D,className:u,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":ee,"data-x-position":V,style:{"--front-toast-height":`${((G=_[0])==null?void 0:G.height)||0}px`,"--width":`${ac}px`,"--gap":`${x}px`,...g,...uc(p,c)},onBlur:W=>{ae.current&&!W.currentTarget.contains(W.relatedTarget)&&(ae.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||ae.current||(ae.current=!0,M.current=W.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{z||O(!1)},onDragEnd:()=>O(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||H(!0)},onPointerUp:()=>H(!1)},C.filter(W=>!W.position&&oe===0||W.position===q).map((W,X)=>{var re,Q;return k.createElement(dc,{key:W.id,icons:S,index:X,toast:W,defaultRichColors:m,duration:(re=w==null?void 0:w.duration)!=null?re:b,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:n,visibleToasts:v,closeButton:(Q=w==null?void 0:w.closeButton)!=null?Q:l,interacting:z,position:q,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:pe,toasts:C.filter(Z=>Z.position==W.position),heights:_.filter(Z=>Z.position==W.position),setHeights:I,expandByDefault:i,gap:x,expanded:L,swipeDirections:t.swipeDirections})})):null}))}),pc=e=>e.startsWith("http")&&!e.endsWith(".js"),ln=e=>{try{const{hostname:t}=new URL(e);return t==="localhost"||t==="127.0.0.1"||t.endsWith(".trycloudflare.com")||t.endsWith(".ngrok-free.app")}catch{return!1}},hc=e=>{const t=e.replace(/-/g,"+").replace(/_/g,"/"),o=t+"=".repeat((4-t.length%4)%4);return atob(o)},gc=(e,t)=>{const o=e.indexOf(":");if(o===-1)return;const r=e.slice(0,o),n=e.slice(o+1);if(!(!r||!n)){if(!n.startsWith("http")){try{const a=JSON.parse(hc(n));if(a.url&&ln(a.url))return{extensionId:r,bundleUrl:a.url,mode:t,token:a.token}}catch{}return}if(ln(n))return{extensionId:r,bundleUrl:n,mode:t}}},cn=(e,t,o)=>{const r=e.getAll(t);if(r.length===0)return[];const n=[];for(const a of r){const s=a.split(",");for(const i of s){const l=gc(i,o);l&&n.push(l)}}return n},dn=e=>{const t=new URLSearchParams(e);try{const o=cn(t,"_stackable_dev","dev"),r=cn(t,"_stackable_staging","staging"),n=new Map;for(const a of o)n.set(a.extensionId,a);for(const a of r)n.set(a.extensionId,a);return Array.from(n.values())}catch{return[]}},mc=async(e,t)=>t.length===0?e:Promise.all(e.map(async o=>{const r=t.find(n=>n.extensionId===o.id);if(!r)return o;console.log(`[Stackable] Dev override active for ${o.id} → ${r.bundleUrl}`);try{const n=await fetch(`${r.bundleUrl}/manifest.json`);if(n.ok){const a=await n.json();return console.log(`[Stackable] Dev manifest loaded for ${o.id}`,a.permissions),{...o,bundleUrl:r.bundleUrl,manifest:a}}}catch{console.warn(`[Stackable] Could not fetch dev manifest for ${o.id}, using registry manifest`)}return{...o,bundleUrl:r.bundleUrl}}));/**
|
|
13
13
|
* @license lucide-react v0.577.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/const
|
|
17
|
+
*/const un=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim();/**
|
|
18
18
|
* @license lucide-react v0.577.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const bc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r
|
|
27
|
+
*/const bc=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase());/**
|
|
28
28
|
* @license lucide-react v0.577.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/const
|
|
32
|
+
*/const fn=e=>{const t=bc(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
33
33
|
* @license lucide-react v0.577.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const xc=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:
|
|
47
|
+
*/const xc=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:n="",children:a,iconNode:s,...i},l)=>k.createElement("svg",{ref:l,...wc,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:un("lucide",n),...!a&&!yc(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,p])=>k.createElement(u,p)),...Array.isArray(a)?a:[a]]));/**
|
|
48
48
|
* @license lucide-react v0.577.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const ne=(e,t)=>{const
|
|
52
|
+
*/const ne=(e,t)=>{const o=k.forwardRef(({className:r,...n},a)=>k.createElement(xc,{ref:a,iconNode:t,className:un(`lucide-${vc(fn(e))}`,`lucide-${e}`,r),...n}));return o.displayName=fn(e),o};/**
|
|
53
53
|
* @license lucide-react v0.577.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const pn=ne("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
78
78
|
* @license lucide-react v0.577.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const hn=ne("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
83
83
|
* @license lucide-react v0.577.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const Vo=ne("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
93
93
|
* @license lucide-react v0.577.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const gn=ne("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
103
103
|
* @license lucide-react v0.577.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const mn=ne("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
108
108
|
* @license lucide-react v0.577.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
@@ -139,17 +139,17 @@
|
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const jt=ne("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
143
143
|
* @license lucide-react v0.577.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const Wo=ne("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
148
148
|
* @license lucide-react v0.577.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const Uo=ne("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
|
|
153
153
|
* @license lucide-react v0.577.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const vn=ne("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);/**
|
|
168
168
|
* @license lucide-react v0.577.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
@@ -209,47 +209,47 @@
|
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const vn=ne("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);function bn(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=bn(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function wn(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=bn(e))&&(o&&(o+=" "),o+=t);return o}const jc=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},Rc=(e,t)=>({classGroupId:e,validator:t}),yn=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),jt="-",xn=[],Gc="arbitrary..",Yc=e=>{const t=Xc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qc(s);const i=s.split(jt),l=i[0]===""&&i.length>1?1:0;return kn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=o[s],u=r[s];return l?u?jc(u,l):l:u||xn}return r[s]||xn}}},kn=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],a=r.nextPart.get(n);if(a){const u=kn(e,t+1,a);if(u)return u}const s=r.validators;if(s===null)return;const i=t===0?e.join(jt):e.slice(t).join(jt),l=s.length;for(let u=0;u<l;u++){const p=s[u];if(p.validator(i))return p.classGroupId}},qc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Gc+o:void 0})(),Xc=e=>{const{theme:t,classGroups:r}=e;return Kc(r,t)},Kc=(e,t)=>{const r=yn();for(const o in e){const n=e[o];Wr(n,r,o,t)}return r},Wr=(e,t,r,o)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];Zc(s,t,r,o)}},Zc=(e,t,r,o)=>{if(typeof e=="string"){Jc(e,t,r);return}if(typeof e=="function"){Qc(e,t,r,o);return}ed(e,t,r,o)},Jc=(e,t,r)=>{const o=e===""?t:Sn(t,e);o.classGroupId=r},Qc=(e,t,r,o)=>{if(td(e)){Wr(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(r,e))},ed=(e,t,r,o)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];Wr(l,Sn(t,i),r,o)}},Sn=(e,t)=>{let r=e;const o=t.split(jt),n=o.length;for(let a=0;a<n;a++){const s=o[a];let i=r.nextPart.get(s);i||(i=yn(),r.nextPart.set(s,i)),r=i}return r},td=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,rd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(a,s)=>{r[a]=s,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=o[a])!==void 0)return n(a,s),s},set(a,s){a in r?r[a]=s:n(a,s)}}},Ur="!",Cn=":",od=[],En=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),nd=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const a=[];let s=0,i=0,l=0,u;const p=n.length;for(let g=0;g<p;g++){const v=n[g];if(s===0&&i===0){if(v===Cn){a.push(n.slice(l,g)),l=g+1;continue}if(v==="/"){u=g;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,m=!1;c.endsWith(Ur)?(h=c.slice(0,-1),m=!0):c.startsWith(Ur)&&(h=c.slice(1),m=!0);const b=u&&u>l?u-l:void 0;return En(a,m,h,b)};if(t){const n=t+Cn,a=o;o=s=>s.startsWith(n)?a(s.slice(n.length)):En(od,!1,s,void 0,!0)}if(r){const n=o;o=a=>r({className:a,parseClassName:n})}return o},ad=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let a=0;a<r.length;a++){const s=r[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(s)):n.push(s)}return n.length>0&&(n.sort(),o.push(...n)),o}},sd=e=>({cache:rd(e.cacheSize),parseClassName:nd(e),sortModifiers:ad(e),...Yc(e)}),id=/\s+/,ld=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(id);let l="";for(let u=i.length-1;u>=0;u-=1){const p=i[u],{isExternal:c,modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=r(p);if(c){l=p+(l.length>0?" "+l:l);continue}let v=!!g,w=o(v?b.substring(0,g):b);if(!w){if(!v){l=p+(l.length>0?" "+l:l);continue}if(w=o(b),!w){l=p+(l.length>0?" "+l:l);continue}v=!1}const x=h.length===0?"":h.length===1?h[0]:a(h).join(":"),y=m?x+Ur:x,S=y+w;if(s.indexOf(S)>-1)continue;s.push(S);const T=n(w,v);for(let C=0;C<T.length;++C){const E=T[C];s.push(y+E)}l=p+(l.length>0?" "+l:l)}return l},cd=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Nn(r))&&(n&&(n+=" "),n+=o);return n},Nn=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Nn(e[o]))&&(r&&(r+=" "),r+=t);return r},dd=(e,...t)=>{let r,o,n,a;const s=l=>{const u=t.reduce((p,c)=>c(p),e());return r=sd(u),o=r.cache.get,n=r.cache.set,a=i,i(l)},i=l=>{const u=o(l);if(u)return u;const p=ld(l,r);return n(l,p),p};return a=s,(...l)=>a(cd(...l))},ud=[],ie=e=>{const t=r=>r[e]||ud;return t.isThemeGetter=!0,t},Tn=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_n=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,md=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>fd.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),jr=e=>e.endsWith("%")&&K(e.slice(0,-1)),Fe=e=>pd.test(e),Pn=()=>!0,bd=e=>hd.test(e)&&!gd.test(e),Rr=()=>!1,wd=e=>md.test(e),yd=e=>vd.test(e),xd=e=>!I(e)&&!M(e),kd=e=>Re(e,zn,Rr),I=e=>Tn.test(e),tt=e=>Re(e,Dn,bd),An=e=>Re(e,Ad,K),Sd=e=>Re(e,Fn,Pn),Cd=e=>Re(e,$n,Rr),In=e=>Re(e,On,Rr),Ed=e=>Re(e,Ln,yd),Rt=e=>Re(e,Bn,wd),M=e=>_n.test(e),_t=e=>rt(e,Dn),Nd=e=>rt(e,$n),Mn=e=>rt(e,On),Td=e=>rt(e,zn),_d=e=>rt(e,Ln),Gt=e=>rt(e,Bn,!0),Pd=e=>rt(e,Fn,!0),Re=(e,t,r)=>{const o=Tn.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},rt=(e,t,r=!1)=>{const o=_n.exec(e);return o?o[1]?t(o[1]):r:!1},On=e=>e==="position"||e==="percentage",Ln=e=>e==="image"||e==="url",zn=e=>e==="length"||e==="size"||e==="bg-size",Dn=e=>e==="length",Ad=e=>e==="number",$n=e=>e==="family-name",Fn=e=>e==="number"||e==="weight",Bn=e=>e==="shadow",Id=dd(()=>{const e=ie("color"),t=ie("font"),r=ie("text"),o=ie("font-weight"),n=ie("tracking"),a=ie("leading"),s=ie("breakpoint"),i=ie("container"),l=ie("spacing"),u=ie("radius"),p=ie("shadow"),c=ie("inset-shadow"),h=ie("text-shadow"),m=ie("drop-shadow"),b=ie("blur"),g=ie("perspective"),v=ie("aspect"),w=ie("ease"),x=ie("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),M,I],C=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],N=()=>[M,I,l],_=()=>[Ue,"full","auto",...N()],O=()=>[je,"none","subgrid",M,I],$=()=>["auto",{span:["full",je,M,I]},je,M,I],W=()=>[je,"auto",M,I],j=()=>["auto","min","max","fr",M,I],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...N()],z=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],L=()=>[Ue,"screen","full","dvw","lvw","svw","min","max","fit",...N()],Q=()=>[Ue,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],A=()=>[e,M,I],se=()=>[...S(),Mn,In,{position:[M,I]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",Td,kd,{size:[M,I]}],re=()=>[jr,_t,tt],U=()=>["","none","full",u,M,I],ee=()=>["",K,_t,tt],D=()=>["solid","dashed","dotted","double"],F=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[K,jr,Mn,In],oe=()=>["","none",b,M,I],J=()=>["none",K,M,I],X=()=>["none",K,M,I],le=()=>[K,M,I],ce=()=>[Ue,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fe],breakpoint:[Fe],color:[Pn],container:[Fe],"drop-shadow":[Fe],ease:["in","out","in-out"],font:[xd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fe],shadow:[Fe],spacing:["px",K],text:[Fe],"text-shadow":[Fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,I,M,v]}],container:["container"],columns:[{columns:[K,I,M,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{"inset-s":_(),start:_()}],end:[{"inset-e":_(),end:_()}],"inset-bs":[{"inset-bs":_()}],"inset-be":[{"inset-be":_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",M,I]}],basis:[{basis:[Ue,"full","auto",i,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Ue,"auto","initial","none",I]}],grow:[{grow:["",K,M,I]}],shrink:[{shrink:["",K,M,I]}],order:[{order:[je,"first","last","none",M,I]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[i,"screen",...z()]}],"min-w":[{"min-w":[i,"screen","none",...z()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,_t,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Pd,Sd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jr,I]}],"font-family":[{font:[Nd,Cd,t]}],"font-features":[{"font-features":[I]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,M,I]}],"line-clamp":[{"line-clamp":[K,"none",M,An]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",M,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",M,tt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",M,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,I]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,M,I],radial:["",M,I],conic:[je,M,I]},_d,Ed]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...D(),"hidden","none"]}],"divide-style":[{divide:[...D(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...D(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,M,I]}],"outline-w":[{outline:["",K,_t,tt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",p,Gt,Rt]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",c,Gt,Rt]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,tt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,Gt,Rt]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[K,M,I]}],"mix-blend":[{"mix-blend":[...F(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":F()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[K]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[M,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[K]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",M,I]}],filter:[{filter:["","none",M,I]}],blur:[{blur:oe()}],brightness:[{brightness:[K,M,I]}],contrast:[{contrast:[K,M,I]}],"drop-shadow":[{"drop-shadow":["","none",m,Gt,Rt]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",K,M,I]}],"hue-rotate":[{"hue-rotate":[K,M,I]}],invert:[{invert:["",K,M,I]}],saturate:[{saturate:[K,M,I]}],sepia:[{sepia:["",K,M,I]}],"backdrop-filter":[{"backdrop-filter":["","none",M,I]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[K,M,I]}],"backdrop-contrast":[{"backdrop-contrast":[K,M,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,M,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,M,I]}],"backdrop-invert":[{"backdrop-invert":["",K,M,I]}],"backdrop-opacity":[{"backdrop-opacity":[K,M,I]}],"backdrop-saturate":[{"backdrop-saturate":[K,M,I]}],"backdrop-sepia":[{"backdrop-sepia":["",K,M,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",M,I]}],ease:[{ease:["linear","initial",w,M,I]}],delay:[{delay:[K,M,I]}],animate:[{animate:["none",x,M,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,M,I]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[M,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M,I]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,I]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,_t,tt,An]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),B=(...e)=>Id(wn(e));function Pt({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:B("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Md({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:B("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function At({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:B("px-6",e),...t})}const Hn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Vn=wn,Yt=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return Vn(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const p=r==null?void 0:r[u],c=a==null?void 0:a[u];if(p===null)return null;const h=Hn(p)||Hn(c);return n[u][h]}),i=r&&Object.entries(r).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,p)=>{let{class:c,className:h,...m}=p;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,h]:u},[]);return Vn(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)};function Wn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Un(...e){return t=>{let r=!1;const o=e.map(n=>{const a=Wn(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){const a=o[n];typeof a=="function"?a():Wn(e[n],null)}}}}function te(...e){return f.useCallback(Un(...e),e)}function It(e){const t=Od(e),r=f.forwardRef((o,n)=>{const{children:a,...s}=o,i=f.Children.toArray(a),l=i.find(zd);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}var jn=It("Slot");function Od(e){const t=f.forwardRef((r,o)=>{const{children:n,...a}=r;if(f.isValidElement(n)){const s=$d(n),i=Dd(a,n.props);return n.type!==f.Fragment&&(i.ref=o?Un(o,s):s),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rn=Symbol("radix.slottable");function Ld(e){const t=({children:r})=>d.jsx(d.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Rn,t}function zd(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rn}function Dd(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function $d(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Fd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=Fd.reduce((e,t)=>{const r=It(`Primitive.${t}`),o=f.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Bd(e,t){e&&Bt.flushSync(()=>e.dispatchEvent(t))}var Gn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hd="VisuallyHidden",Yn=f.forwardRef((e,t)=>d.jsx(H.span,{...e,ref:t,style:{...Gn,...e.style}}));Yn.displayName=Hd;var Vd=Yn;function ge(e,t=[]){let r=[];function o(a,s){const i=f.createContext(s),l=r.length;r=[...r,s];const u=c=>{var w;const{scope:h,children:m,...b}=c,g=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=f.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};u.displayName=a+"Provider";function p(c,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||i,b=f.useContext(m);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const n=()=>{const a=r.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[o,Wd(n,...t)]}function Wd(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=o.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function qn(e){const t=e+"CollectionProvider",[r,o]=ge(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:w}=g,x=k.useRef(null),y=k.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:y,collectionRef:x,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=It(i),u=k.forwardRef((g,v)=>{const{scope:w,children:x}=g,y=a(i,w),S=te(v,y.collectionRef);return d.jsx(l,{ref:S,children:x})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=It(p),m=k.forwardRef((g,v)=>{const{scope:w,children:x,...y}=g,S=k.useRef(null),T=te(v,S),C=a(p,w);return k.useEffect(()=>(C.itemMap.set(S,{ref:S,...y}),()=>void C.itemMap.delete(S))),d.jsx(h,{[c]:"",ref:T,children:x})});m.displayName=p;function b(g){const v=a(e+"CollectionConsumer",g);return k.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const y=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((C,E)=>y.indexOf(C.ref.current)-y.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},b,o]}function V(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var ae=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ud=f[" useInsertionEffect ".trim().toString()]||ae;function Be({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){const[n,a,s]=jd({defaultProp:t,onChange:r}),i=e!==void 0,l=i?e:n;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${o} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=i},[i,o])}const u=f.useCallback(p=>{var c;if(i){const h=Rd(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function jd({defaultProp:e,onChange:t}){const[r,o]=f.useState(e),n=f.useRef(r),a=f.useRef(t);return Ud(()=>{a.current=t},[t]),f.useEffect(()=>{var s;n.current!==r&&((s=a.current)==null||s.call(a,r),n.current=r)},[r,n]),[r,o,a]}function Rd(e){return typeof e=="function"}function Gd(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Ee=e=>{const{present:t,children:r}=e,o=Yd(t),n=typeof r=="function"?r({present:o.isPresent}):f.Children.only(r),a=te(o.ref,qd(n));return typeof r=="function"||o.isPresent?f.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function Yd(e){const[t,r]=f.useState(),o=f.useRef(null),n=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Gd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=qt(o.current);a.current=i==="mounted"?u:"none"},[i]),ae(()=>{const u=o.current,p=n.current;if(p!==e){const h=a.current,m=qt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ae(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=m=>{const g=qt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=qt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function qt(e){return(e==null?void 0:e.animationName)||"none"}function qd(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Xd=f[" useId ".trim().toString()]||(()=>{}),Kd=0;function ot(e){const[t,r]=f.useState(Xd());return ae(()=>{r(o=>o??String(Kd++))},[e]),e||(t?`radix-${t}`:"")}var Xt="Collapsible",[Zd]=ge(Xt),[Jd,Gr]=Zd(Xt),Xn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=Be({prop:o,defaultProp:n??!1,onChange:s,caller:Xt});return d.jsx(Jd,{scope:r,disabled:a,contentId:ot(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(H.div,{"data-state":qr(l),"data-disabled":a?"":void 0,...i,ref:t})})});Xn.displayName=Xt;var Kn="CollapsibleTrigger",Zn=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,...o}=e,n=Gr(Kn,r);return d.jsx(H.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":qr(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:V(e.onClick,n.onOpenToggle)})});Zn.displayName=Kn;var Yr="CollapsibleContent",Jn=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Gr(Yr,e.__scopeCollapsible);return d.jsx(Ee,{present:r||n.open,children:({present:a})=>d.jsx(Qd,{...o,ref:t,present:a})})});Jn.displayName=Yr;var Qd=f.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:o,children:n,...a}=e,s=Gr(Yr,r),[i,l]=f.useState(o),u=f.useRef(null),p=te(t,u),c=f.useRef(0),h=c.current,m=f.useRef(0),b=m.current,g=s.open||i,v=f.useRef(g),w=f.useRef(void 0);return f.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),ae(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const y=x.getBoundingClientRect();c.current=y.height,m.current=y.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(o)}},[s.open,o]),d.jsx(H.div,{"data-state":qr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&n})});function qr(e){return e?"open":"closed"}var eu=Xn,tu=f.createContext(void 0);function Mt(e){const t=f.useContext(tu);return e||t||"ltr"}function fe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function ru(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e);f.useEffect(()=>{const o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var ou="DismissableLayer",Xr="dismissableLayer.update",nu="dismissableLayer.pointerDownOutside",au="dismissableLayer.focusOutside",Qn,ea=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kr=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(ea),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),b=te(t,E=>c(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=p?g.indexOf(p):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,T=lu(E=>{const N=E.target,_=[...u.branches].some(O=>O.contains(N));!S||_||(n==null||n(E),s==null||s(E),E.defaultPrevented||i==null||i())},h),C=cu(E=>{const N=E.target;[...u.branches].some(O=>O.contains(N))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},h);return ru(E=>{x===u.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),ta(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Qn)}},[p,h,r,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),ta())},[p,u]),f.useEffect(()=>{const E=()=>m({});return document.addEventListener(Xr,E),()=>document.removeEventListener(Xr,E)},[]),d.jsx(H.div,{...l,ref:b,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,C.onFocusCapture),onBlurCapture:V(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,T.onPointerDownCapture)})});Kr.displayName=ou;var su="DismissableLayerBranch",iu=f.forwardRef((e,t)=>{const r=f.useContext(ea),o=f.useRef(null),n=te(t,o);return f.useEffect(()=>{const a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),d.jsx(H.div,{...e,ref:n})});iu.displayName=su;function lu(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1),n=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!o.current){let l=function(){ra(nu,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function cu(e,t=globalThis==null?void 0:globalThis.document){const r=fe(e),o=f.useRef(!1);return f.useEffect(()=>{const n=a=>{a.target&&!o.current&&ra(au,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function ta(){const e=new CustomEvent(Xr);document.dispatchEvent(e)}function ra(e,t,r,{discrete:o}){const n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?Bd(n,a):n.dispatchEvent(a)}var Zr="focusScope.autoFocusOnMount",Jr="focusScope.autoFocusOnUnmount",oa={bubbles:!1,cancelable:!0},du="FocusScope",na=f.forwardRef((e,t)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=fe(n),p=fe(a),c=f.useRef(null),h=te(t,g=>l(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let g=function(y){if(m.paused||!i)return;const S=y.target;i.contains(S)?c.current=S:Ge(c.current,{select:!0})},v=function(y){if(m.paused||!i)return;const S=y.relatedTarget;S!==null&&(i.contains(S)||Ge(c.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const T of y)T.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[o,i,m.paused]),f.useEffect(()=>{if(i){ia.add(m);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Zr,oa);i.addEventListener(Zr,u),i.dispatchEvent(w),w.defaultPrevented||(uu(mu(aa(i)),{select:!0}),document.activeElement===g&&Ge(i))}return()=>{i.removeEventListener(Zr,u),setTimeout(()=>{const w=new CustomEvent(Jr,oa);i.addEventListener(Jr,p),i.dispatchEvent(w),w.defaultPrevented||Ge(g??document.body,{select:!0}),i.removeEventListener(Jr,p),ia.remove(m)},0)}}},[i,u,p,m]);const b=f.useCallback(g=>{if(!r&&!o||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[y,S]=fu(x);y&&S?!g.shiftKey&&w===S?(g.preventDefault(),r&&Ge(y,{select:!0})):g.shiftKey&&w===y&&(g.preventDefault(),r&&Ge(S,{select:!0})):w===x&&g.preventDefault()}},[r,o,m.paused]);return d.jsx(H.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});na.displayName=du;function uu(e,{select:t=!1}={}){const r=document.activeElement;for(const o of e)if(Ge(o,{select:t}),document.activeElement!==r)return}function fu(e){const t=aa(e),r=sa(t,e),o=sa(t.reverse(),e);return[r,o]}function aa(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function sa(e,t){for(const r of e)if(!pu(r,{upTo:t}))return r}function pu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hu(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&hu(e)&&t&&e.select()}}var ia=gu();function gu(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=la(e,t),e.unshift(t)},remove(t){var r;e=la(e,t),(r=e[0])==null||r.resume()}}}function la(e,t){const r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function mu(e){return e.filter(t=>t.tagName!=="A")}var vu="Portal",Qr=f.forwardRef((e,t)=>{var i;const{container:r,...o}=e,[n,a]=f.useState(!1);ae(()=>a(!0),[]);const s=r||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?$r.createPortal(d.jsx(H.div,{...o,ref:t}),s):null});Qr.displayName=vu;var eo=0;function bu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ca()),document.body.insertAdjacentElement("beforeend",e[1]??ca()),eo++,()=>{eo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eo--}},[])}function ca(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe=function(){return Oe=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Oe.apply(this,arguments)};function da(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function wu(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Kt="right-scroll-bar-position",Zt="width-before-scroll-bar",yu="with-scroll-bars-hidden",xu="--removed-body-scroll-bar-size";function to(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ku(e,t){var r=k.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var Su=typeof window<"u"?f.useLayoutEffect:f.useEffect,ua=new WeakMap;function Cu(e,t){var r=ku(null,function(o){return e.forEach(function(n){return to(n,o)})});return Su(function(){var o=ua.get(r);if(o){var n=new Set(o),a=new Set(e),s=r.current;n.forEach(function(i){a.has(i)||to(i,null)}),a.forEach(function(i){n.has(i)||to(i,s)})}ua.set(r,e)},[e]),r}function Eu(e){return e}function Nu(e,t){t===void 0&&(t=Eu);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,o);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(o=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){o=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),r}}}};return n}function Tu(e){e===void 0&&(e={});var t=Nu(null);return t.options=Oe({async:!0,ssr:!1},e),t}var fa=function(e){var t=e.sideCar,r=da(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return f.createElement(o,Oe({},r))};fa.isSideCarExport=!0;function _u(e,t){return e.useMedium(t),fa}var pa=Tu(),ro=function(){},Jt=f.forwardRef(function(e,t){var r=f.useRef(null),o=f.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),n=o[0],a=o[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,y=e.gapMode,S=da(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,C=Cu([r,t]),E=Oe(Oe({},S),n);return f.createElement(f.Fragment,null,p&&f.createElement(T,{sideCar:pa,removeScrollBar:u,shards:c,noRelative:m,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:r,gapMode:y}),s?f.cloneElement(f.Children.only(i),Oe(Oe({},E),{ref:C})):f.createElement(x,Oe({},E,{className:l,ref:C}),i))});Jt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jt.classNames={fullWidth:Zt,zeroRight:Kt};var Pu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Au(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pu();return t&&e.setAttribute("nonce",t),e}function Iu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ou=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Au())&&(Iu(t,r),Mu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lu=function(){var e=Ou();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},ha=function(){var e=Lu(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t},zu={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},Du=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[oo(r),oo(o),oo(n)]},$u=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zu;var t=Du(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}},Fu=ha(),pt="data-scroll-locked",Bu=function(e,t,r,o){var n=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
212
|
+
*/const bn=ne("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);function wn(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=wn(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function yn(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=wn(e))&&(r&&(r+=" "),r+=t);return r}const jc=(e,t)=>{const o=new Array(e.length+t.length);for(let r=0;r<e.length;r++)o[r]=e[r];for(let r=0;r<t.length;r++)o[e.length+r]=t[r];return o},Rc=(e,t)=>({classGroupId:e,validator:t}),xn=(e=new Map,t=null,o)=>({nextPart:e,validators:t,classGroupId:o}),Rt="-",kn=[],Gc="arbitrary..",Yc=e=>{const t=Xc(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return qc(s);const i=s.split(Rt),l=i[0]===""&&i.length>1?1:0;return Sn(i,l,t)},getConflictingClassGroupIds:(s,i)=>{if(i){const l=r[s],u=o[s];return l?u?jc(u,l):l:u||kn}return o[s]||kn}}},Sn=(e,t,o)=>{if(e.length-t===0)return o.classGroupId;const n=e[t],a=o.nextPart.get(n);if(a){const u=Sn(e,t+1,a);if(u)return u}const s=o.validators;if(s===null)return;const i=t===0?e.join(Rt):e.slice(t).join(Rt),l=s.length;for(let u=0;u<l;u++){const p=s[u];if(p.validator(i))return p.classGroupId}},qc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),o=t.indexOf(":"),r=t.slice(0,o);return r?Gc+r:void 0})(),Xc=e=>{const{theme:t,classGroups:o}=e;return Kc(o,t)},Kc=(e,t)=>{const o=xn();for(const r in e){const n=e[r];jo(n,o,r,t)}return o},jo=(e,t,o,r)=>{const n=e.length;for(let a=0;a<n;a++){const s=e[a];Zc(s,t,o,r)}},Zc=(e,t,o,r)=>{if(typeof e=="string"){Jc(e,t,o);return}if(typeof e=="function"){Qc(e,t,o,r);return}ed(e,t,o,r)},Jc=(e,t,o)=>{const r=e===""?t:Cn(t,e);r.classGroupId=o},Qc=(e,t,o,r)=>{if(td(e)){jo(e(r),t,o,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Rc(o,e))},ed=(e,t,o,r)=>{const n=Object.entries(e),a=n.length;for(let s=0;s<a;s++){const[i,l]=n[s];jo(l,Cn(t,i),o,r)}},Cn=(e,t)=>{let o=e;const r=t.split(Rt),n=r.length;for(let a=0;a<n;a++){const s=r[a];let i=o.nextPart.get(s);i||(i=xn(),o.nextPart.set(s,i)),o=i}return o},td=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,od=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),r=Object.create(null);const n=(a,s)=>{o[a]=s,t++,t>e&&(t=0,r=o,o=Object.create(null))};return{get(a){let s=o[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return n(a,s),s},set(a,s){a in o?o[a]=s:n(a,s)}}},Ro="!",En=":",rd=[],Nn=(e,t,o,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:r,isExternal:n}),nd=e=>{const{prefix:t,experimentalParseClassName:o}=e;let r=n=>{const a=[];let s=0,i=0,l=0,u;const p=n.length;for(let g=0;g<p;g++){const v=n[g];if(s===0&&i===0){if(v===En){a.push(n.slice(l,g)),l=g+1;continue}if(v==="/"){u=g;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const c=a.length===0?n:n.slice(l);let h=c,m=!1;c.endsWith(Ro)?(h=c.slice(0,-1),m=!0):c.startsWith(Ro)&&(h=c.slice(1),m=!0);const b=u&&u>l?u-l:void 0;return Nn(a,m,h,b)};if(t){const n=t+En,a=r;r=s=>s.startsWith(n)?a(s.slice(n.length)):Nn(rd,!1,s,void 0,!0)}if(o){const n=r;r=a=>o({className:a,parseClassName:n})}return r},ad=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((o,r)=>{t.set(o,1e6+r)}),o=>{const r=[];let n=[];for(let a=0;a<o.length;a++){const s=o[a],i=s[0]==="[",l=t.has(s);i||l?(n.length>0&&(n.sort(),r.push(...n),n=[]),r.push(s)):n.push(s)}return n.length>0&&(n.sort(),r.push(...n)),r}},sd=e=>({cache:od(e.cacheSize),parseClassName:nd(e),sortModifiers:ad(e),...Yc(e)}),id=/\s+/,ld=(e,t)=>{const{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=t,s=[],i=e.trim().split(id);let l="";for(let u=i.length-1;u>=0;u-=1){const p=i[u],{isExternal:c,modifiers:h,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}=o(p);if(c){l=p+(l.length>0?" "+l:l);continue}let v=!!g,w=r(v?b.substring(0,g):b);if(!w){if(!v){l=p+(l.length>0?" "+l:l);continue}if(w=r(b),!w){l=p+(l.length>0?" "+l:l);continue}v=!1}const y=h.length===0?"":h.length===1?h[0]:a(h).join(":"),x=m?y+Ro:y,S=x+w;if(s.indexOf(S)>-1)continue;s.push(S);const T=n(w,v);for(let N=0;N<T.length;++N){const E=T[N];s.push(x+E)}l=p+(l.length>0?" "+l:l)}return l},cd=(...e)=>{let t=0,o,r,n="";for(;t<e.length;)(o=e[t++])&&(r=Tn(o))&&(n&&(n+=" "),n+=r);return n},Tn=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Tn(e[r]))&&(o&&(o+=" "),o+=t);return o},dd=(e,...t)=>{let o,r,n,a;const s=l=>{const u=t.reduce((p,c)=>c(p),e());return o=sd(u),r=o.cache.get,n=o.cache.set,a=i,i(l)},i=l=>{const u=r(l);if(u)return u;const p=ld(l,o);return n(l,p),p};return a=s,(...l)=>a(cd(...l))},ud=[],ie=e=>{const t=o=>o[e]||ud;return t.isThemeGetter=!0,t},_n=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,md=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ue=e=>fd.test(e),J=e=>!!e&&!Number.isNaN(Number(e)),je=e=>!!e&&Number.isInteger(Number(e)),Go=e=>e.endsWith("%")&&J(e.slice(0,-1)),Fe=e=>pd.test(e),An=()=>!0,bd=e=>hd.test(e)&&!gd.test(e),Yo=()=>!1,wd=e=>md.test(e),yd=e=>vd.test(e),xd=e=>!F(e)&&!B(e),kd=e=>Re(e,Dn,Yo),F=e=>_n.test(e),ot=e=>Re(e,$n,bd),In=e=>Re(e,Ad,J),Sd=e=>Re(e,Bn,An),Cd=e=>Re(e,Fn,Yo),Mn=e=>Re(e,Ln,Yo),Ed=e=>Re(e,zn,yd),Gt=e=>Re(e,Hn,wd),B=e=>Pn.test(e),Pt=e=>rt(e,$n),Nd=e=>rt(e,Fn),On=e=>rt(e,Ln),Td=e=>rt(e,Dn),_d=e=>rt(e,zn),Yt=e=>rt(e,Hn,!0),Pd=e=>rt(e,Bn,!0),Re=(e,t,o)=>{const r=_n.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},rt=(e,t,o=!1)=>{const r=Pn.exec(e);return r?r[1]?t(r[1]):o:!1},Ln=e=>e==="position"||e==="percentage",zn=e=>e==="image"||e==="url",Dn=e=>e==="length"||e==="size"||e==="bg-size",$n=e=>e==="length",Ad=e=>e==="number",Fn=e=>e==="family-name",Bn=e=>e==="number"||e==="weight",Hn=e=>e==="shadow",Id=dd(()=>{const e=ie("color"),t=ie("font"),o=ie("text"),r=ie("font-weight"),n=ie("tracking"),a=ie("leading"),s=ie("breakpoint"),i=ie("container"),l=ie("spacing"),u=ie("radius"),p=ie("shadow"),c=ie("inset-shadow"),h=ie("text-shadow"),m=ie("drop-shadow"),b=ie("blur"),g=ie("perspective"),v=ie("aspect"),w=ie("ease"),y=ie("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...S(),B,F],N=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],C=()=>[B,F,l],P=()=>[Ue,"full","auto",...C()],_=()=>[je,"none","subgrid",B,F],I=()=>["auto",{span:["full",je,B,F]},je,B,F],L=()=>[je,"auto",B,F],O=()=>["auto","min","max","fr",B,F],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...C()],$=()=>[Ue,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],D=()=>[Ue,"screen","full","dvw","lvw","svw","min","max","fit",...C()],Y=()=>[Ue,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],M=()=>[e,B,F],ae=()=>[...S(),On,Mn,{position:[B,F]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",Td,kd,{size:[B,F]}],oe=()=>[Go,Pt,ot],G=()=>["","none","full",u,B,F],ee=()=>["",J,Pt,ot],V=()=>["solid","dashed","dotted","double"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[J,Go,On,Mn],re=()=>["","none",b,B,F],Q=()=>["none",J,B,F],Z=()=>["none",J,B,F],le=()=>[J,B,F],ce=()=>[Ue,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fe],breakpoint:[Fe],color:[An],container:[Fe],"drop-shadow":[Fe],ease:["in","out","in-out"],font:[xd],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fe],shadow:[Fe],spacing:["px",J],text:[Fe],"text-shadow":[Fe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ue,F,B,v]}],container:["container"],columns:[{columns:[J,F,B,i]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[je,"auto",B,F]}],basis:[{basis:[Ue,"full","auto",i,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[J,Ue,"auto","initial","none",F]}],grow:[{grow:["",J,B,F]}],shrink:[{shrink:["",J,B,F]}],order:[{order:[je,"first","last","none",B,F]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...D()]}],"min-inline-size":[{"min-inline":["auto",...D()]}],"max-inline-size":[{"max-inline":["none",...D()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[i,"screen",...$()]}],"min-w":[{"min-w":[i,"screen","none",...$()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",o,Pt,ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Pd,Sd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Go,F]}],"font-family":[{font:[Nd,Cd,t]}],"font-features":[{"font-features":[F]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,B,F]}],"line-clamp":[{"line-clamp":[J,"none",B,In]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",B,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:[J,"from-font","auto",B,ot]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[J,"auto",B,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},je,B,F],radial:["",B,F],conic:[je,B,F]},_d,Ed]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...V(),"hidden","none"]}],"divide-style":[{divide:[...V(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...V(),"none","hidden"]}],"outline-offset":[{"outline-offset":[J,B,F]}],"outline-w":[{outline:["",J,Pt,ot]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",p,Yt,Gt]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",c,Yt,Gt]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[J,ot]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,Yt,Gt]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[J,B,F]}],"mix-blend":[{"mix-blend":[...W(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":W()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[J]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[B,F]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[J]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,F]}],filter:[{filter:["","none",B,F]}],blur:[{blur:re()}],brightness:[{brightness:[J,B,F]}],contrast:[{contrast:[J,B,F]}],"drop-shadow":[{"drop-shadow":["","none",m,Yt,Gt]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",J,B,F]}],"hue-rotate":[{"hue-rotate":[J,B,F]}],invert:[{invert:["",J,B,F]}],saturate:[{saturate:[J,B,F]}],sepia:[{sepia:["",J,B,F]}],"backdrop-filter":[{"backdrop-filter":["","none",B,F]}],"backdrop-blur":[{"backdrop-blur":re()}],"backdrop-brightness":[{"backdrop-brightness":[J,B,F]}],"backdrop-contrast":[{"backdrop-contrast":[J,B,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",J,B,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[J,B,F]}],"backdrop-invert":[{"backdrop-invert":["",J,B,F]}],"backdrop-opacity":[{"backdrop-opacity":[J,B,F]}],"backdrop-saturate":[{"backdrop-saturate":[J,B,F]}],"backdrop-sepia":[{"backdrop-sepia":["",J,B,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[J,"initial",B,F]}],ease:[{ease:["linear","initial",w,B,F]}],delay:[{delay:[J,B,F]}],animate:[{animate:["none",y,B,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,B,F]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[B,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,F]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[J,Pt,ot,In]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),U=(...e)=>Id(yn(e));function At({className:e,...t}){return d.jsx("div",{"data-slot":"card",className:U("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Md({className:e,...t}){return d.jsx("div",{"data-slot":"card-header",className:U("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function It({className:e,...t}){return d.jsx("div",{"data-slot":"card-content",className:U("px-6",e),...t})}const Vn=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wn=yn,qt=(e,t)=>o=>{var r;if((t==null?void 0:t.variants)==null)return Wn(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:n,defaultVariants:a}=t,s=Object.keys(n).map(u=>{const p=o==null?void 0:o[u],c=a==null?void 0:a[u];if(p===null)return null;const h=Vn(p)||Vn(c);return n[u][h]}),i=o&&Object.entries(o).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,p)=>{let{class:c,className:h,...m}=p;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,h]:u},[]);return Wn(e,s,l,o==null?void 0:o.class,o==null?void 0:o.className)};function Un(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jn(...e){return t=>{let o=!1;const r=e.map(n=>{const a=Un(n,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let n=0;n<r.length;n++){const a=r[n];typeof a=="function"?a():Un(e[n],null)}}}}function te(...e){return f.useCallback(jn(...e),e)}function Mt(e){const t=Od(e),o=f.forwardRef((r,n)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(zd);if(l){const u=l.props.children,p=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:n,children:f.isValidElement(u)?f.cloneElement(u,void 0,p):null})}return d.jsx(t,{...s,ref:n,children:a})});return o.displayName=`${e}.Slot`,o}var Rn=Mt("Slot");function Od(e){const t=f.forwardRef((o,r)=>{const{children:n,...a}=o;if(f.isValidElement(n)){const s=$d(n),i=Dd(a,n.props);return n.type!==f.Fragment&&(i.ref=r?jn(r,s):s),f.cloneElement(n,i)}return f.Children.count(n)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gn=Symbol("radix.slottable");function Ld(e){const t=({children:o})=>d.jsx(d.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=Gn,t}function zd(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gn}function Dd(e,t){const o={...t};for(const r in t){const n=e[r],a=t[r];/^on[A-Z]/.test(r)?n&&a?o[r]=(...i)=>{const l=a(...i);return n(...i),l}:n&&(o[r]=n):r==="style"?o[r]={...n,...a}:r==="className"&&(o[r]=[n,a].filter(Boolean).join(" "))}return{...e,...o}}function $d(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Fd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],j=Fd.reduce((e,t)=>{const o=Mt(`Primitive.${t}`),r=f.forwardRef((n,a)=>{const{asChild:s,...i}=n,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Bd(e,t){e&&Vt.flushSync(()=>e.dispatchEvent(t))}var Yn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Hd="VisuallyHidden",qn=f.forwardRef((e,t)=>d.jsx(j.span,{...e,ref:t,style:{...Yn,...e.style}}));qn.displayName=Hd;var Vd=qn;function me(e,t=[]){let o=[];function r(a,s){const i=f.createContext(s),l=o.length;o=[...o,s];const u=c=>{var w;const{scope:h,children:m,...b}=c,g=((w=h==null?void 0:h[e])==null?void 0:w[l])||i,v=f.useMemo(()=>b,Object.values(b));return d.jsx(g.Provider,{value:v,children:m})};u.displayName=a+"Provider";function p(c,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||i,b=f.useContext(m);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,p]}const n=()=>{const a=o.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return n.scopeName=e,[r,Wd(n,...t)]}function Wd(...e){const t=e[0];if(e.length===1)return t;const o=()=>{const r=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}function Xn(e){const t=e+"CollectionProvider",[o,r]=me(t),[n,a]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:w}=g,y=k.useRef(null),x=k.useRef(new Map).current;return d.jsx(n,{scope:v,itemMap:x,collectionRef:y,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Mt(i),u=k.forwardRef((g,v)=>{const{scope:w,children:y}=g,x=a(i,w),S=te(v,x.collectionRef);return d.jsx(l,{ref:S,children:y})});u.displayName=i;const p=e+"CollectionItemSlot",c="data-radix-collection-item",h=Mt(p),m=k.forwardRef((g,v)=>{const{scope:w,children:y,...x}=g,S=k.useRef(null),T=te(v,S),N=a(p,w);return k.useEffect(()=>(N.itemMap.set(S,{ref:S,...x}),()=>void N.itemMap.delete(S))),d.jsx(h,{[c]:"",ref:T,children:y})});m.displayName=p;function b(g){const v=a(e+"CollectionConsumer",g);return k.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((N,E)=>x.indexOf(N.ref.current)-x.indexOf(E.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},b,r]}function R(e,t,{checkForDefaultPrevented:o=!0}={}){return function(n){if(e==null||e(n),o===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}var se=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ud=f[" useInsertionEffect ".trim().toString()]||se;function Be({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){const[n,a,s]=jd({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:n;{const p=f.useRef(e!==void 0);f.useEffect(()=>{const c=p.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=i},[i,r])}const u=f.useCallback(p=>{var c;if(i){const h=Rd(p)?p(e):p;h!==e&&((c=s.current)==null||c.call(s,h))}else a(p)},[i,e,a,s]);return[l,u]}function jd({defaultProp:e,onChange:t}){const[o,r]=f.useState(e),n=f.useRef(o),a=f.useRef(t);return Ud(()=>{a.current=t},[t]),f.useEffect(()=>{var s;n.current!==o&&((s=a.current)==null||s.call(a,o),n.current=o)},[o,n]),[o,r,a]}function Rd(e){return typeof e=="function"}function Gd(e,t){return f.useReducer((o,r)=>t[o][r]??o,e)}var Ee=e=>{const{present:t,children:o}=e,r=Yd(t),n=typeof o=="function"?o({present:r.isPresent}):f.Children.only(o),a=te(r.ref,qd(n));return typeof o=="function"||r.isPresent?f.cloneElement(n,{ref:a}):null};Ee.displayName="Presence";function Yd(e){const[t,o]=f.useState(),r=f.useRef(null),n=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=Gd(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Xt(r.current);a.current=i==="mounted"?u:"none"},[i]),se(()=>{const u=r.current,p=n.current;if(p!==e){const h=a.current,m=Xt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==m?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),se(()=>{if(t){let u;const p=t.ownerDocument.defaultView??window,c=m=>{const g=Xt(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=Xt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{p.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Xt(e){return(e==null?void 0:e.animationName)||"none"}function qd(e){var r,n;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var Xd=f[" useId ".trim().toString()]||(()=>{}),Kd=0;function nt(e){const[t,o]=f.useState(Xd());return se(()=>{o(r=>r??String(Kd++))},[e]),e||(t?`radix-${t}`:"")}var Kt="Collapsible",[Zd]=me(Kt),[Jd,qo]=Zd(Kt),Kn=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,open:r,defaultOpen:n,disabled:a,onOpenChange:s,...i}=e,[l,u]=Be({prop:r,defaultProp:n??!1,onChange:s,caller:Kt});return d.jsx(Jd,{scope:o,disabled:a,contentId:nt(),open:l,onOpenToggle:f.useCallback(()=>u(p=>!p),[u]),children:d.jsx(j.div,{"data-state":Ko(l),"data-disabled":a?"":void 0,...i,ref:t})})});Kn.displayName=Kt;var Zn="CollapsibleTrigger",Jn=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,...r}=e,n=qo(Zn,o);return d.jsx(j.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":Ko(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...r,ref:t,onClick:R(e.onClick,n.onOpenToggle)})});Jn.displayName=Zn;var Xo="CollapsibleContent",Qn=f.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=qo(Xo,e.__scopeCollapsible);return d.jsx(Ee,{present:o||n.open,children:({present:a})=>d.jsx(Qd,{...r,ref:t,present:a})})});Qn.displayName=Xo;var Qd=f.forwardRef((e,t)=>{const{__scopeCollapsible:o,present:r,children:n,...a}=e,s=qo(Xo,o),[i,l]=f.useState(r),u=f.useRef(null),p=te(t,u),c=f.useRef(0),h=c.current,m=f.useRef(0),b=m.current,g=s.open||i,v=f.useRef(g),w=f.useRef(void 0);return f.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),se(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();c.current=x.height,m.current=x.width,v.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),l(r)}},[s.open,r]),d.jsx(j.div,{"data-state":Ko(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:p,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&n})});function Ko(e){return e?"open":"closed"}var eu=Kn,tu=f.createContext(void 0);function Ot(e){const t=f.useContext(tu);return e||t||"ltr"}function fe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...o)=>{var r;return(r=t.current)==null?void 0:r.call(t,...o)},[])}function ou(e,t=globalThis==null?void 0:globalThis.document){const o=fe(e);f.useEffect(()=>{const r=n=>{n.key==="Escape"&&o(n)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var ru="DismissableLayer",Zo="dismissableLayer.update",nu="dismissableLayer.pointerDownOutside",au="dismissableLayer.focusOutside",ea,ta=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jo=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(ta),[p,c]=f.useState(null),h=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=f.useState({}),b=te(t,E=>c(E)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=p?g.indexOf(p):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=w,T=lu(E=>{const C=E.target,P=[...u.branches].some(_=>_.contains(C));!S||P||(n==null||n(E),s==null||s(E),E.defaultPrevented||i==null||i())},h),N=cu(E=>{const C=E.target;[...u.branches].some(_=>_.contains(C))||(a==null||a(E),s==null||s(E),E.defaultPrevented||i==null||i())},h);return ou(E=>{y===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),f.useEffect(()=>{if(p)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ea=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(p)),u.layers.add(p),oa(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ea)}},[p,h,o,u]),f.useEffect(()=>()=>{p&&(u.layers.delete(p),u.layersWithOutsidePointerEventsDisabled.delete(p),oa())},[p,u]),f.useEffect(()=>{const E=()=>m({});return document.addEventListener(Zo,E),()=>document.removeEventListener(Zo,E)},[]),d.jsx(j.div,{...l,ref:b,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,N.onFocusCapture),onBlurCapture:R(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,T.onPointerDownCapture)})});Jo.displayName=ru;var su="DismissableLayerBranch",iu=f.forwardRef((e,t)=>{const o=f.useContext(ta),r=f.useRef(null),n=te(t,r);return f.useEffect(()=>{const a=r.current;if(a)return o.branches.add(a),()=>{o.branches.delete(a)}},[o.branches]),d.jsx(j.div,{...e,ref:n})});iu.displayName=su;function lu(e,t=globalThis==null?void 0:globalThis.document){const o=fe(e),r=f.useRef(!1),n=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ra(nu,o,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function cu(e,t=globalThis==null?void 0:globalThis.document){const o=fe(e),r=f.useRef(!1);return f.useEffect(()=>{const n=a=>{a.target&&!r.current&&ra(au,o,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function oa(){const e=new CustomEvent(Zo);document.dispatchEvent(e)}function ra(e,t,o,{discrete:r}){const n=o.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),r?Bd(n,a):n.dispatchEvent(a)}var Qo="focusScope.autoFocusOnMount",er="focusScope.autoFocusOnUnmount",na={bubbles:!1,cancelable:!0},du="FocusScope",aa=f.forwardRef((e,t)=>{const{loop:o=!1,trapped:r=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=fe(n),p=fe(a),c=f.useRef(null),h=te(t,g=>l(g)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const S=x.target;i.contains(S)?c.current=S:Ge(c.current,{select:!0})},v=function(x){if(m.paused||!i)return;const S=x.relatedTarget;S!==null&&(i.contains(S)||Ge(c.current,{select:!0}))},w=function(x){if(document.activeElement===document.body)for(const T of x)T.removedNodes.length>0&&Ge(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const y=new MutationObserver(w);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),y.disconnect()}}},[r,i,m.paused]),f.useEffect(()=>{if(i){la.add(m);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(Qo,na);i.addEventListener(Qo,u),i.dispatchEvent(w),w.defaultPrevented||(uu(mu(sa(i)),{select:!0}),document.activeElement===g&&Ge(i))}return()=>{i.removeEventListener(Qo,u),setTimeout(()=>{const w=new CustomEvent(er,na);i.addEventListener(er,p),i.dispatchEvent(w),w.defaultPrevented||Ge(g??document.body,{select:!0}),i.removeEventListener(er,p),la.remove(m)},0)}}},[i,u,p,m]);const b=f.useCallback(g=>{if(!o&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const y=g.currentTarget,[x,S]=fu(y);x&&S?!g.shiftKey&&w===S?(g.preventDefault(),o&&Ge(x,{select:!0})):g.shiftKey&&w===x&&(g.preventDefault(),o&&Ge(S,{select:!0})):w===y&&g.preventDefault()}},[o,r,m.paused]);return d.jsx(j.div,{tabIndex:-1,...s,ref:h,onKeyDown:b})});aa.displayName=du;function uu(e,{select:t=!1}={}){const o=document.activeElement;for(const r of e)if(Ge(r,{select:t}),document.activeElement!==o)return}function fu(e){const t=sa(e),o=ia(t,e),r=ia(t.reverse(),e);return[o,r]}function sa(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const n=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||n?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function ia(e,t){for(const o of e)if(!pu(o,{upTo:t}))return o}function pu(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hu(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&hu(e)&&t&&e.select()}}var la=gu();function gu(){let e=[];return{add(t){const o=e[0];t!==o&&(o==null||o.pause()),e=ca(e,t),e.unshift(t)},remove(t){var o;e=ca(e,t),(o=e[0])==null||o.resume()}}}function ca(e,t){const o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function mu(e){return e.filter(t=>t.tagName!=="A")}var vu="Portal",tr=f.forwardRef((e,t)=>{var i;const{container:o,...r}=e,[n,a]=f.useState(!1);se(()=>a(!0),[]);const s=o||n&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Fo.createPortal(d.jsx(j.div,{...r,ref:t}),s):null});tr.displayName=vu;var or=0;function bu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??da()),document.body.insertAdjacentElement("beforeend",e[1]??da()),or++,()=>{or===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),or--}},[])}function da(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Oe=function(){return Oe=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},Oe.apply(this,arguments)};function ua(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(o[r[n]]=e[r[n]]);return o}function wu(e,t,o){if(o||arguments.length===2)for(var r=0,n=t.length,a;r<n;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zt="right-scroll-bar-position",Jt="width-before-scroll-bar",yu="with-scroll-bars-hidden",xu="--removed-body-scroll-bar-size";function rr(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ku(e,t){var o=k.useState(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var n=o.value;n!==r&&(o.value=r,o.callback(r,n))}}}})[0];return o.callback=t,o.facade}var Su=typeof window<"u"?f.useLayoutEffect:f.useEffect,fa=new WeakMap;function Cu(e,t){var o=ku(null,function(r){return e.forEach(function(n){return rr(n,r)})});return Su(function(){var r=fa.get(o);if(r){var n=new Set(r),a=new Set(e),s=o.current;n.forEach(function(i){a.has(i)||rr(i,null)}),a.forEach(function(i){n.has(i)||rr(i,s)})}fa.set(o,e)},[e]),o}function Eu(e){return e}function Nu(e,t){t===void 0&&(t=Eu);var o=[],r=!1,n={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(a){var s=t(a,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;o.length;){var s=o;o=[],s.forEach(a)}o={push:function(i){return a(i)},filter:function(){return o}}},assignMedium:function(a){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(a),s=o}var l=function(){var p=s;s=[],p.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(p){s.push(p),u()},filter:function(p){return s=s.filter(p),o}}}};return n}function Tu(e){e===void 0&&(e={});var t=Nu(null);return t.options=Oe({async:!0,ssr:!1},e),t}var pa=function(e){var t=e.sideCar,o=ua(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Oe({},o))};pa.isSideCarExport=!0;function _u(e,t){return e.useMedium(t),pa}var ha=Tu(),nr=function(){},Qt=f.forwardRef(function(e,t){var o=f.useRef(null),r=f.useState({onScrollCapture:nr,onWheelCapture:nr,onTouchMoveCapture:nr}),n=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,x=e.gapMode,S=ua(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=h,N=Cu([o,t]),E=Oe(Oe({},S),n);return f.createElement(f.Fragment,null,p&&f.createElement(T,{sideCar:ha,removeScrollBar:u,shards:c,noRelative:m,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:o,gapMode:x}),s?f.cloneElement(f.Children.only(i),Oe(Oe({},E),{ref:N})):f.createElement(y,Oe({},E,{className:l,ref:N}),i))});Qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qt.classNames={fullWidth:Jt,zeroRight:Zt};var Pu=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Au(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Pu();return t&&e.setAttribute("nonce",t),e}function Iu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ou=function(){var e=0,t=null;return{add:function(o){e==0&&(t=Au())&&(Iu(t,o),Mu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lu=function(){var e=Ou();return function(t,o){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}},ga=function(){var e=Lu(),t=function(o){var r=o.styles,n=o.dynamic;return e(r,n),null};return t},zu={left:0,top:0,right:0,gap:0},ar=function(e){return parseInt(e||"",10)||0},Du=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[ar(o),ar(r),ar(n)]},$u=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zu;var t=Du(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}},Fu=ga(),ht="data-scroll-locked",Bu=function(e,t,o,r){var n=e.left,a=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
|
|
213
213
|
.`.concat(yu,` {
|
|
214
|
-
overflow: hidden `).concat(
|
|
215
|
-
padding-right: `).concat(i,"px ").concat(
|
|
214
|
+
overflow: hidden `).concat(r,`;
|
|
215
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
216
216
|
}
|
|
217
|
-
body[`).concat(
|
|
218
|
-
overflow: hidden `).concat(
|
|
217
|
+
body[`).concat(ht,`] {
|
|
218
|
+
overflow: hidden `).concat(r,`;
|
|
219
219
|
overscroll-behavior: contain;
|
|
220
|
-
`).concat([t&&"position: relative ".concat(
|
|
220
|
+
`).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
|
|
221
221
|
padding-left: `.concat(n,`px;
|
|
222
222
|
padding-top: `).concat(a,`px;
|
|
223
223
|
padding-right: `).concat(s,`px;
|
|
224
224
|
margin-left:0;
|
|
225
225
|
margin-top:0;
|
|
226
|
-
margin-right: `).concat(i,"px ").concat(
|
|
227
|
-
`),
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.`).concat(Kt,` {
|
|
231
|
-
right: `).concat(i,"px ").concat(o,`;
|
|
226
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
227
|
+
`),o==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
232
228
|
}
|
|
233
229
|
|
|
234
230
|
.`).concat(Zt,` {
|
|
235
|
-
|
|
231
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
236
232
|
}
|
|
237
233
|
|
|
238
|
-
.`).concat(
|
|
239
|
-
right:
|
|
234
|
+
.`).concat(Jt,` {
|
|
235
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
240
236
|
}
|
|
241
237
|
|
|
242
238
|
.`).concat(Zt," .").concat(Zt,` {
|
|
243
|
-
|
|
239
|
+
right: 0 `).concat(r,`;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.`).concat(Jt," .").concat(Jt,` {
|
|
243
|
+
margin-right: 0 `).concat(r,`;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
-
body[`).concat(
|
|
246
|
+
body[`).concat(ht,`] {
|
|
247
247
|
`).concat(xu,": ").concat(i,`px;
|
|
248
248
|
}
|
|
249
|
-
`)},
|
|
249
|
+
`)},ma=function(){var e=parseInt(document.body.getAttribute(ht)||"0",10);return isFinite(e)?e:0},Hu=function(){f.useEffect(function(){return document.body.setAttribute(ht,(ma()+1).toString()),function(){var e=ma()-1;e<=0?document.body.removeAttribute(ht):document.body.setAttribute(ht,e.toString())}},[])},Vu=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,n=r===void 0?"margin":r;Hu();var a=f.useMemo(function(){return $u(n)},[n]);return f.createElement(Fu,{styles:Bu(a,!t,n,o?"":"!important")})},sr=!1;if(typeof window<"u")try{var eo=Object.defineProperty({},"passive",{get:function(){return sr=!0,!0}});window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{sr=!1}var gt=sr?{passive:!1}:!1,Wu=function(e){return e.tagName==="TEXTAREA"},va=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!Wu(e)&&o[t]==="visible")},Uu=function(e){return va(e,"overflowY")},ju=function(e){return va(e,"overflowX")},ba=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=wa(e,r);if(n){var a=ya(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},Ru=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},Gu=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},wa=function(e,t){return e==="v"?Uu(t):ju(t)},ya=function(e,t){return e==="v"?Ru(t):Gu(t)},Yu=function(e,t){return e==="h"&&t==="rtl"?-1:1},qu=function(e,t,o,r,n){var a=Yu(e,window.getComputedStyle(t).direction),s=a*r,i=o.target,l=t.contains(i),u=!1,p=s>0,c=0,h=0;do{if(!i)break;var m=ya(e,i),b=m[0],g=m[1],v=m[2],w=g-v-a*b;(b||w)&&wa(e,i)&&(c+=w,h+=b);var y=i.parentNode;i=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(p&&Math.abs(c)<1||!p&&Math.abs(h)<1)&&(u=!0),u},to=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xa=function(e){return[e.deltaX,e.deltaY]},ka=function(e){return e&&"current"in e?e.current:e},Xu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ku=function(e){return`
|
|
250
250
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
251
251
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
252
|
-
`)},Zu=0,
|
|
252
|
+
`)},Zu=0,mt=[];function Ju(e){var t=f.useRef([]),o=f.useRef([0,0]),r=f.useRef(),n=f.useState(Zu++)[0],a=f.useState(ga)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=wu([e.lockRef.current],(e.shards||[]).map(ka),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var w=to(g),y=o.current,x="deltaX"in g?g.deltaX:y[0]-w[0],S="deltaY"in g?g.deltaY:y[1]-w[1],T,N=g.target,E=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&E==="h"&&N.type==="range")return!1;var C=window.getSelection(),P=C&&C.anchorNode,_=P?P===N||P.contains(N):!1;if(_)return!1;var I=ba(E,N);if(!I)return!0;if(I?T=E:(T=E==="v"?"h":"v",I=ba(E,N)),!I)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=T),!T)return!0;var L=r.current||T;return qu(L,v,g,L==="h"?x:S)},[]),l=f.useCallback(function(g){var v=g;if(!(!mt.length||mt[mt.length-1]!==a)){var w="deltaY"in v?xa(v):to(v),y=t.current.filter(function(T){return T.name===v.type&&(T.target===v.target||v.target===T.shadowParent)&&Xu(T.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var x=(s.current.shards||[]).map(ka).filter(Boolean).filter(function(T){return T.contains(v.target)}),S=x.length>0?i(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(g,v,w,y){var x={name:g,delta:v,target:w,should:y,shadowParent:Qu(w)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),p=f.useCallback(function(g){o.current=to(g),r.current=void 0},[]),c=f.useCallback(function(g){u(g.type,xa(g),g.target,i(g,e.lockRef.current))},[]),h=f.useCallback(function(g){u(g.type,to(g),g.target,i(g,e.lockRef.current))},[]);f.useEffect(function(){return mt.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,gt),document.addEventListener("touchmove",l,gt),document.addEventListener("touchstart",p,gt),function(){mt=mt.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,gt),document.removeEventListener("touchmove",l,gt),document.removeEventListener("touchstart",p,gt)}},[]);var m=e.removeScrollBar,b=e.inert;return f.createElement(f.Fragment,null,b?f.createElement(a,{styles:Ku(n)}):null,m?f.createElement(Vu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ef=_u(ha,Ju);var Sa=f.forwardRef(function(e,t){return f.createElement(Qt,Oe({},e,{ref:t,sideCar:ef}))});Sa.classNames=Qt.classNames;var tf=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vt=new WeakMap,oo=new WeakMap,ro={},ir=0,Ca=function(e){return e&&(e.host||Ca(e.parentNode))},of=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=Ca(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},rf=function(e,t,o,r){var n=of(t,Array.isArray(e)?e:[e]);ro[o]||(ro[o]=new WeakMap);var a=ro[o],s=[],i=new Set,l=new Set(n),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};n.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(i.has(h))p(h);else try{var m=h.getAttribute(r),b=m!==null&&m!=="false",g=(vt.get(h)||0)+1,v=(a.get(h)||0)+1;vt.set(h,g),a.set(h,v),s.push(h),g===1&&b&&oo.set(h,!0),v===1&&h.setAttribute(o,"true"),b||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return p(t),i.clear(),ir++,function(){s.forEach(function(c){var h=vt.get(c)-1,m=a.get(c)-1;vt.set(c,h),a.set(c,m),h||(oo.has(c)||c.removeAttribute(r),oo.delete(c)),m||c.removeAttribute(o)}),ir--,ir||(vt=new WeakMap,vt=new WeakMap,oo=new WeakMap,ro={})}},nf=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),n=tf(e);return n?(r.push.apply(r,Array.from(n.querySelectorAll("[aria-live], script"))),rf(r,n,o,"aria-hidden")):function(){return null}},lr={exports:{}},cr={};/**
|
|
253
253
|
* @license React
|
|
254
254
|
* use-sync-external-store-shim.production.js
|
|
255
255
|
*
|
|
@@ -257,16 +257,16 @@
|
|
|
257
257
|
*
|
|
258
258
|
* This source code is licensed under the MIT license found in the
|
|
259
259
|
* LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/var Ca;function af(){if(Ca)return io;Ca=1;var e=k;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var m=h(),b=o({inst:{value:m,getSnapshot:h}}),g=b[0].inst,v=b[1];return a(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[c,m,h]),n(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(m),m}function l(c){var h=c.getSnapshot;c=c.value;try{var m=h();return!r(c,m)}catch{return!0}}function u(c,h){return h()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return io.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,io}var Ea;function sf(){return Ea||(Ea=1,so.exports=af()),so.exports}var lf=sf();function cf(){return lf.useSyncExternalStore(df,()=>!0,()=>!1)}function df(){return()=>{}}var lo="Avatar",[uf]=ge(lo),[ff,Na]=uf(lo),Ta=f.forwardRef((e,t)=>{const{__scopeAvatar:r,...o}=e,[n,a]=f.useState("idle");return d.jsx(ff,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(H.span,{...o,ref:t})})});Ta.displayName=lo;var _a="AvatarImage",Pa=f.forwardRef((e,t)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,s=Na(_a,r),i=pf(o,a),l=fe(u=>{n(u),s.onImageLoadingStatusChange(u)});return ae(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(H.img,{...a,ref:t,src:o}):null});Pa.displayName=_a;var Aa="AvatarFallback",Ia=f.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:o,...n}=e,a=Na(Aa,r),[s,i]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const l=window.setTimeout(()=>i(!0),o);return()=>window.clearTimeout(l)}},[o]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(H.span,{...n,ref:t}):null});Ia.displayName=Aa;function Ma(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function pf(e,{referrerPolicy:t,crossOrigin:r}){const o=cf(),n=f.useRef(null),a=o?(n.current||(n.current=new window.Image),n.current):null,[s,i]=f.useState(()=>Ma(a,e));return ae(()=>{i(Ma(a,e))},[a,e]),ae(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),p=l("error");return a.addEventListener("load",u),a.addEventListener("error",p),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",p)}},[a,r,t]),s}var hf=Ta,gf=Pa,mf=Ia;function or(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function nr(e){const[t,r]=f.useState(void 0);return ae(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var ar="Checkbox",[vf]=ge(ar),[bf,co]=vf(ar);function wf(e){const{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:p="on",internal_do_not_use_render:c}=e,[h,m]=Be({prop:r,defaultProp:n??!1,onChange:l,caller:ar}),[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useRef(!1),y=b?!!s||!!b.closest("form"):!0,S={checked:h,disabled:a,setChecked:m,control:b,setControl:g,name:i,form:s,value:p,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:y,bubbleInput:v,setBubbleInput:w};return d.jsx(bf,{scope:t,...S,children:yf(c)?c(S):o})}var Oa="CheckboxTrigger",La=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:p,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:b}=co(Oa,e),g=te(n,p),v=f.useRef(l);return f.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const x=()=>c(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[a,c]),d.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":Ha(l),"data-disabled":i?"":void 0,disabled:i,value:s,...o,ref:g,onKeyDown:V(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:V(r,w=>{c(x=>Ye(x)?!0:!x),b&&m&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});La.displayName=Oa;var za=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:p,...c}=e;return d.jsx(wf,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:o,form:p,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(La,{...c,ref:t,__scopeCheckbox:r}),h&&d.jsx(Ba,{__scopeCheckbox:r})]})})});za.displayName=ar;var Da="CheckboxIndicator",$a=f.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,a=co(Da,r);return d.jsx(Ee,{present:o||Ye(a.checked)||a.checked===!0,children:d.jsx(H.span,{"data-state":Ha(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});$a.displayName=Da;var Fa="CheckboxBubbleInput",Ba=f.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:p,form:c,bubbleInput:h,setBubbleInput:m}=co(Fa,e),b=te(r,m),g=or(a),v=nr(o);f.useEffect(()=>{const x=h;if(!x)return;const y=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(y,"checked").set,C=!n.current;if(g!==a&&T){const E=new Event("click",{bubbles:C});x.indeterminate=Ye(a),T.call(x,Ye(a)?!1:a),x.dispatchEvent(E)}},[h,g,a,n]);const w=f.useRef(Ye(a)?!1:a);return d.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:p,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ba.displayName=Fa;function yf(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Ha(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const xf=["top","right","bottom","left"],qe=Math.min,be=Math.max,sr=Math.round,ir=Math.floor,Le=e=>({x:e,y:e}),kf={left:"right",right:"left",bottom:"top",top:"bottom"};function uo(e,t,r){return be(e,qe(t,r))}function He(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function fo(e){return e==="x"?"y":"x"}function po(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ho(e){return fo(ze(e))}function Sf(e,t,r){r===void 0&&(r=!1);const o=vt(e),n=ho(e),a=po(n);let s=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=lr(s)),[s,lr(s)]}function Cf(e){const t=lr(e);return[go(e),t,go(t)]}function go(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Va=["left","right"],Wa=["right","left"],Ef=["top","bottom"],Nf=["bottom","top"];function Tf(e,t,r){switch(e){case"top":case"bottom":return r?t?Wa:Va:t?Va:Wa;case"left":case"right":return t?Ef:Nf;default:return[]}}function _f(e,t,r,o){const n=vt(e);let a=Tf(Ve(e),r==="start",o);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(go)))),a}function lr(e){const t=Ve(e);return kf[t]+e.slice(t.length)}function Pf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ua(e){return typeof e!="number"?Pf(e):{top:e,right:e,bottom:e,left:e}}function cr(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function ja(e,t,r){let{reference:o,floating:n}=e;const a=ze(t),s=ho(t),i=po(s),l=Ve(t),u=a==="y",p=o.x+o.width/2-n.width/2,c=o.y+o.height/2-n.height/2,h=o[i]/2-n[i]/2;let m;switch(l){case"top":m={x:p,y:o.y-n.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:c};break;case"left":m={x:o.x-n.width,y:c};break;default:m={x:o.x,y:o.y}}switch(vt(t)){case"start":m[s]-=h*(r&&u?-1:1);break;case"end":m[s]+=h*(r&&u?-1:1);break}return m}async function Af(e,t){var r;t===void 0&&(t={});const{x:o,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:m=0}=He(t,e),b=Ua(m),v=i[h?c==="floating"?"reference":"floating":c],w=cr(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),x=c==="floating"?{x:o,y:n,width:s.floating.width,height:s.floating.height}:s.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},T=cr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-T.top+b.top)/S.y,bottom:(T.bottom-w.bottom+b.bottom)/S.y,left:(w.left-T.left+b.left)/S.x,right:(T.right-w.right+b.right)/S.x}}const If=50,Mf=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:s}=r,i=s.detectOverflow?s:{...s,detectOverflow:Af},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:c}=ja(u,o,l),h=o,m=0;const b={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:w,fn:x}=v,{x:y,y:S,data:T,reset:C}=await x({x:p,y:c,initialPlacement:o,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});p=y??p,c=S??c,b[w]={...b[w],...T},C&&m<If&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:p,y:c}=ja(u,h,l)),g=-1)}return{x:p,y:c,placement:h,strategy:n,middlewareData:b}},Of=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=He(e,t)||{};if(u==null)return{};const c=Ua(p),h={x:r,y:o},m=ho(n),b=po(m),g=await s.getDimensions(u),v=m==="y",w=v?"top":"left",x=v?"bottom":"right",y=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[m]-h[m]-a.floating[b],T=h[m]-a.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=C?C[y]:0;(!E||!await(s.isElement==null?void 0:s.isElement(C)))&&(E=i.floating[y]||a.floating[b]);const N=S/2-T/2,_=E/2-g[b]/2-1,O=qe(c[w],_),$=qe(c[x],_),W=O,j=E-g[b]-$,Y=E/2-g[b]/2+N,Z=uo(W,Y,j),P=!l.arrow&&vt(n)!=null&&Y!==Z&&a.reference[b]/2-(Y<W?O:$)-g[b]/2<0,z=P?Y<W?Y-W:Y-j:0;return{[m]:h[m]+z,data:{[m]:Z,centerOffset:Y-Z-z,...P&&{alignmentOffset:z}},reset:P}}}),Lf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=He(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const w=Ve(n),x=ze(i),y=Ve(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(y||!g?[lr(i)]:Cf(i)),C=b!=="none";!h&&C&&T.push(..._f(i,g,b,S));const E=[i,...T],N=await l.detectOverflow(t,v),_=[];let O=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(N[w]),c){const Y=Sf(n,s,S);_.push(N[Y[0]],N[Y[1]])}if(O=[...O,{placement:n,overflows:_}],!_.every(Y=>Y<=0)){var $,W;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,Z=E[Y];if(Z&&(!(c==="alignment"?x!==ze(Z):!1)||O.every(L=>ze(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:Y,overflows:O},reset:{placement:Z}};let P=(W=O.filter(z=>z.overflows[0]<=0).sort((z,L)=>z.overflows[1]-L.overflows[1])[0])==null?void 0:W.placement;if(!P)switch(m){case"bestFit":{var j;const z=(j=O.filter(L=>{if(C){const Q=ze(L.placement);return Q===x||Q==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(Q=>Q>0).reduce((Q,A)=>Q+A,0)]).sort((L,Q)=>L[1]-Q[1])[0])==null?void 0:j[0];z&&(P=z);break}case"initialPlacement":P=i;break}if(n!==P)return{reset:{placement:P}}}return{}}}};function Ra(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ga(e){return xf.some(t=>e[t]>=0)}const zf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:o}=t,{strategy:n="referenceHidden",...a}=He(e,t);switch(n){case"referenceHidden":{const s=await o.detectOverflow(t,{...a,elementContext:"reference"}),i=Ra(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ga(i)}}}case"escaped":{const s=await o.detectOverflow(t,{...a,altBoundary:!0}),i=Ra(s,r.floating);return{data:{escapedOffsets:i,escaped:Ga(i)}}}default:return{}}}}},Ya=new Set(["left","top"]);async function Df(e,t){const{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),s=Ve(r),i=vt(r),l=ze(r)==="y",u=Ya.has(s)?-1:1,p=a&&l?-1:1,c=He(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof b=="number"&&(m=i==="end"?b*-1:b),l?{x:m*p,y:h*u}:{x:h*u,y:m*p}}const $f=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await Df(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(o=i.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ff=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x,y}=w;return{x,y}}},...u}=He(e,t),p={x:r,y:o},c=await a.detectOverflow(t,u),h=ze(Ve(n)),m=fo(h);let b=p[m],g=p[h];if(s){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=b+c[w],S=b-c[x];b=uo(y,b,S)}if(i){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=g+c[w],S=g-c[x];g=uo(y,g,S)}const v=l.fn({...t,[m]:b,[h]:g});return{...v,data:{x:v.x-r,y:v.y-o,enabled:{[m]:s,[h]:i}}}}}},Bf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=He(e,t),p={x:r,y:o},c=ze(n),h=fo(c);let m=p[h],b=p[c];const g=He(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const y=h==="y"?"height":"width",S=a.reference[h]-a.floating[y]+v.mainAxis,T=a.reference[h]+a.reference[y]-v.mainAxis;m<S?m=S:m>T&&(m=T)}if(u){var w,x;const y=h==="y"?"width":"height",S=Ya.has(Ve(n)),T=a.reference[c]-a.floating[y]+(S&&((w=s.offset)==null?void 0:w[c])||0)+(S?0:v.crossAxis),C=a.reference[c]+a.reference[y]+(S?0:((x=s.offset)==null?void 0:x[c])||0)-(S?v.crossAxis:0);b<T?b=T:b>C&&(b=C)}return{[h]:m,[c]:b}}}},Hf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=He(e,t),p=await s.detectOverflow(t,u),c=Ve(n),h=vt(n),m=ze(n)==="y",{width:b,height:g}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=h==="end"?"top":"bottom");const x=g-p.top-p.bottom,y=b-p.left-p.right,S=qe(g-p[v],x),T=qe(b-p[w],y),C=!t.middlewareData.shift;let E=S,N=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=x),C&&!h){const O=be(p.left,0),$=be(p.right,0),W=be(p.top,0),j=be(p.bottom,0);m?N=b-2*(O!==0||$!==0?O+$:be(p.left,p.right)):E=g-2*(W!==0||j!==0?W+j:be(p.top,p.bottom))}await l({...t,availableWidth:N,availableHeight:E});const _=await s.getDimensions(i.floating);return b!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function dr(){return typeof window<"u"}function bt(e){return qa(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(qa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qa(e){return dr()?e instanceof Node||e instanceof we(e).Node:!1}function Ne(e){return dr()?e instanceof Element||e instanceof we(e).Element:!1}function We(e){return dr()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function Xa(e){return!dr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}function Ot(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&n!=="inline"&&n!=="contents"}function Vf(e){return/^(table|td|th)$/.test(bt(e))}function ur(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Wf=/transform|translate|scale|rotate|perspective|filter/,Uf=/paint|layout|strict|content/,nt=e=>!!e&&e!=="none";let mo;function vo(e){const t=Ne(e)?Te(e):e;return nt(t.transform)||nt(t.translate)||nt(t.scale)||nt(t.rotate)||nt(t.perspective)||!bo()&&(nt(t.backdropFilter)||nt(t.filter))||Wf.test(t.willChange||"")||Uf.test(t.contain||"")}function jf(e){let t=Xe(e);for(;We(t)&&!wt(t);){if(vo(t))return t;if(ur(t))return null;t=Xe(t)}return null}function bo(){return mo==null&&(mo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mo}function wt(e){return/^(html|body|#document)$/.test(bt(e))}function Te(e){return we(e).getComputedStyle(e)}function fr(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xa(e)&&e.host||De(e);return Xa(t)?t.host:t}function Ka(e){const t=Xe(e);return wt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Ot(t)?t:Ka(t)}function Lt(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=Ka(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),s=we(n);if(a){const i=wo(s);return t.concat(s,s.visualViewport||[],Ot(n)?n:[],i&&r?Lt(i):[])}else return t.concat(n,Lt(n,[],r))}function wo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Za(e){const t=Te(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=We(e),a=n?e.offsetWidth:r,s=n?e.offsetHeight:o,i=sr(r)!==a||sr(o)!==s;return i&&(r=a,o=s),{width:r,height:o,$:i}}function yo(e){return Ne(e)?e:e.contextElement}function yt(e){const t=yo(e);if(!We(t))return Le(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:a}=Za(t);let s=(a?sr(r.width):r.width)/o,i=(a?sr(r.height):r.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Rf=Le(0);function Ja(e){const t=we(e);return!bo()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gf(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==we(e)?!1:t}function at(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),a=yo(e);let s=Le(1);t&&(o?Ne(o)&&(s=yt(o)):s=yt(e));const i=Gf(a,r,o)?Ja(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,p=n.width/s.x,c=n.height/s.y;if(a){const h=we(a),m=o&&Ne(o)?we(o):o;let b=h,g=wo(b);for(;g&&o&&m!==b;){const v=yt(g),w=g.getBoundingClientRect(),x=Te(g),y=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=y,u+=S,b=we(g),g=wo(b)}}return cr({width:p,height:c,x:l,y:u})}function pr(e,t){const r=fr(e).scrollLeft;return t?t.left+r:at(De(e)).left+r}function Qa(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-pr(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function Yf(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const a=n==="fixed",s=De(o),i=t?ur(t.floating):!1;if(o===s||i&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Le(1);const p=Le(0),c=We(o);if((c||!c&&!a)&&((bt(o)!=="body"||Ot(s))&&(l=fr(o)),c)){const m=at(o);u=yt(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const h=s&&!c&&!a?Qa(s,l):Le(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:r.y*u.y-l.scrollTop*u.y+p.y+h.y}}function qf(e){return Array.from(e.getClientRects())}function Xf(e){const t=De(e),r=fr(e),o=e.ownerDocument.body,n=be(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=be(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-r.scrollLeft+pr(e);const i=-r.scrollTop;return Te(o).direction==="rtl"&&(s+=be(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:s,y:i}}const es=25;function Kf(e,t){const r=we(e),o=De(e),n=r.visualViewport;let a=o.clientWidth,s=o.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const p=bo();(!p||p&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=pr(o);if(u<=0){const p=o.ownerDocument,c=p.body,h=getComputedStyle(c),m=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(o.clientWidth-c.clientWidth-m);b<=es&&(a-=b)}else u<=es&&(a+=u);return{width:a,height:s,x:i,y:l}}function Zf(e,t){const r=at(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=We(e)?yt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:s,height:i,x:l,y:u}}function ts(e,t,r){let o;if(t==="viewport")o=Kf(e,r);else if(t==="document")o=Xf(De(e));else if(Ne(t))o=Zf(t,r);else{const n=Ja(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cr(o)}function rs(e,t){const r=Xe(e);return r===t||!Ne(r)||wt(r)?!1:Te(r).position==="fixed"||rs(r,t)}function Jf(e,t){const r=t.get(e);if(r)return r;let o=Lt(e,[],!1).filter(i=>Ne(i)&&bt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Xe(e):e;for(;Ne(s)&&!wt(s);){const i=Te(s),l=vo(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Ot(s)&&!l&&rs(e,s))?o=o.filter(p=>p!==s):n=i,s=Xe(s)}return t.set(e,o),o}function Qf(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const s=[...r==="clippingAncestors"?ur(t)?[]:Jf(t,this._c):[].concat(r),o],i=ts(t,s[0],n);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const m=ts(t,s[h],n);l=be(m.top,l),u=qe(m.right,u),p=qe(m.bottom,p),c=be(m.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function ep(e){const{width:t,height:r}=Za(e);return{width:t,height:r}}function tp(e,t,r){const o=We(t),n=De(t),a=r==="fixed",s=at(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=pr(n)}if(o||!o&&!a)if((bt(t)!=="body"||Ot(n))&&(i=fr(t)),o){const m=at(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else n&&u();a&&!o&&n&&u();const p=n&&!o&&!a?Qa(n,i):Le(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function xo(e){return Te(e).position==="static"}function os(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return De(e)===r&&(r=r.ownerDocument.body),r}function ns(e,t){const r=we(e);if(ur(e))return r;if(!We(e)){let n=Xe(e);for(;n&&!wt(n);){if(Ne(n)&&!xo(n))return n;n=Xe(n)}return r}let o=os(e,t);for(;o&&Vf(o)&&xo(o);)o=os(o,t);return o&&wt(o)&&xo(o)&&!vo(o)?r:o||jf(e)||r}const rp=async function(e){const t=this.getOffsetParent||ns,r=this.getDimensions,o=await r(e.floating);return{reference:tp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function op(e){return Te(e).direction==="rtl"}const np={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:De,getClippingRect:Qf,getOffsetParent:ns,getElementRects:rp,getClientRects:qf,getDimensions:ep,getScale:yt,isElement:Ne,isRTL:op};function as(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ap(e,t){let r=null,o;const n=De(e);function a(){var i;clearTimeout(o),(i=r)==null||i.disconnect(),r=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:m}=u;if(i||t(),!h||!m)return;const b=ir(c),g=ir(n.clientWidth-(p+h)),v=ir(n.clientHeight-(c+m)),w=ir(p),y={rootMargin:-b+"px "+-g+"px "+-v+"px "+-w+"px",threshold:be(0,qe(1,l))||1};let S=!0;function T(C){const E=C[0].intersectionRatio;if(E!==l){if(!S)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!as(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(T,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(T,y)}r.observe(e)}return s(!0),a}function sp(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=yo(e),p=n||a?[...u?Lt(u):[],...t?Lt(t):[]]:[];p.forEach(w=>{n&&w.addEventListener("scroll",r,{passive:!0}),a&&w.addEventListener("resize",r)});const c=u&&i?ap(u,r):null;let h=-1,m=null;s&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),r()}),u&&!l&&m.observe(u),t&&m.observe(t));let b,g=l?at(e):null;l&&v();function v(){const w=at(e);g&&!as(g,w)&&r(),g=w,b=requestAnimationFrame(v)}return r(),()=>{var w;p.forEach(x=>{n&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),c==null||c(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const ip=$f,lp=Ff,cp=Lf,dp=Hf,up=zf,ss=Of,fp=Bf,pp=(e,t,r)=>{const o=new Map,n={platform:np,...r},a={...n.platform,_c:o};return Mf(e,t,{...n,platform:a})};var hp=typeof document<"u",gp=function(){},hr=hp?k.useLayoutEffect:gp;function gr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!gr(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){const a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!gr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function is(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ls(e,t){const r=is(e);return Math.round(t*r)/r}function ko(e){const t=f.useRef(e);return hr(()=>{t.current=e}),t}function mp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(o);gr(h,o)||m(o);const[b,g]=f.useState(null),[v,w]=f.useState(null),x=f.useCallback(L=>{L!==C.current&&(C.current=L,g(L))},[]),y=f.useCallback(L=>{L!==E.current&&(E.current=L,w(L))},[]),S=a||b,T=s||v,C=f.useRef(null),E=f.useRef(null),N=f.useRef(p),_=l!=null,O=ko(l),$=ko(n),W=ko(u),j=f.useCallback(()=>{if(!C.current||!E.current)return;const L={placement:t,strategy:r,middleware:h};$.current&&(L.platform=$.current),pp(C.current,E.current,L).then(Q=>{const A={...Q,isPositioned:W.current!==!1};Y.current&&!gr(N.current,A)&&(N.current=A,Bt.flushSync(()=>{c(A)}))})},[h,t,r,$,W]);hr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(L=>({...L,isPositioned:!1})))},[u]);const Y=f.useRef(!1);hr(()=>(Y.current=!0,()=>{Y.current=!1}),[]),hr(()=>{if(S&&(C.current=S),T&&(E.current=T),S&&T){if(O.current)return O.current(S,T,j);j()}},[S,T,j,O,_]);const Z=f.useMemo(()=>({reference:C,floating:E,setReference:x,setFloating:y}),[x,y]),P=f.useMemo(()=>({reference:S,floating:T}),[S,T]),z=f.useMemo(()=>{const L={position:r,left:0,top:0};if(!P.floating)return L;const Q=ls(P.floating,p.x),A=ls(P.floating,p.y);return i?{...L,transform:"translate("+Q+"px, "+A+"px)",...is(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:A}},[r,i,P.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:j,refs:Z,elements:P,floatingStyles:z}),[p,j,Z,P,z])}const vp=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?ss({element:o.current,padding:n}).fn(r):{}:o?ss({element:o,padding:n}).fn(r):{}}}},bp=(e,t)=>{const r=ip(e);return{name:r.name,fn:r.fn,options:[e,t]}},wp=(e,t)=>{const r=lp(e);return{name:r.name,fn:r.fn,options:[e,t]}},yp=(e,t)=>({fn:fp(e).fn,options:[e,t]}),xp=(e,t)=>{const r=cp(e);return{name:r.name,fn:r.fn,options:[e,t]}},kp=(e,t)=>{const r=dp(e);return{name:r.name,fn:r.fn,options:[e,t]}},Sp=(e,t)=>{const r=up(e);return{name:r.name,fn:r.fn,options:[e,t]}},Cp=(e,t)=>{const r=vp(e);return{name:r.name,fn:r.fn,options:[e,t]}};var Ep="Arrow",cs=f.forwardRef((e,t)=>{const{children:r,width:o=10,height:n=5,...a}=e;return d.jsx(H.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});cs.displayName=Ep;var Np=cs,So="Popper",[ds,mr]=ge(So),[Tp,us]=ds(So),fs=e=>{const{__scopePopper:t,children:r}=e,[o,n]=f.useState(null);return d.jsx(Tp,{scope:t,anchor:o,onAnchorChange:n,children:r})};fs.displayName=So;var ps="PopperAnchor",hs=f.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,a=us(ps,r),s=f.useRef(null),i=te(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(o==null?void 0:o.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:d.jsx(H.div,{...n,ref:i})});hs.displayName=ps;var Co="PopperContent",[_p,Pp]=ds(Co),gs=f.forwardRef((e,t)=>{var D,F,G,oe,J,X;const{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=us(Co,r),[w,x]=f.useState(null),y=te(t,le=>x(le)),[S,T]=f.useState(null),C=nr(S),E=(C==null?void 0:C.width)??0,N=(C==null?void 0:C.height)??0,_=o+(a!=="center"?"-"+a:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(u)?u:[u],W=$.length>0,j={padding:O,boundary:$.filter(Ip),altBoundary:W},{refs:Y,floatingStyles:Z,placement:P,isPositioned:z,middlewareData:L}=mp({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>sp(...le,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[bp({mainAxis:n+N,alignmentAxis:s}),l&&wp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?yp():void 0,...j}),l&&xp({...j}),kp({...j,apply:({elements:le,rects:ce,availableWidth:lt,availableHeight:Je})=>{const{width:Pe,height:Or}=ce.reference,me=le.floating.style;me.setProperty("--radix-popper-available-width",`${lt}px`),me.setProperty("--radix-popper-available-height",`${Je}px`),me.setProperty("--radix-popper-anchor-width",`${Pe}px`),me.setProperty("--radix-popper-anchor-height",`${Or}px`)}}),S&&Cp({element:S,padding:i}),Mp({arrowWidth:E,arrowHeight:N}),h&&Sp({strategy:"referenceHidden",...j})]}),[Q,A]=bs(P),se=fe(b);ae(()=>{z&&(se==null||se())},[z,se]);const ye=(D=L.arrow)==null?void 0:D.x,R=(F=L.arrow)==null?void 0:F.y,re=((G=L.arrow)==null?void 0:G.centerOffset)!==0,[U,ee]=f.useState();return ae(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:z?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(oe=L.transformOrigin)==null?void 0:oe.x,(J=L.transformOrigin)==null?void 0:J.y].join(" "),...((X=L.hide)==null?void 0:X.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(_p,{scope:r,placedSide:Q,onArrowChange:T,arrowX:ye,arrowY:R,shouldHideArrow:re,children:d.jsx(H.div,{"data-side":Q,"data-align":A,...g,ref:y,style:{...g.style,animation:z?void 0:"none"}})})})});gs.displayName=Co;var ms="PopperArrow",Ap={top:"bottom",right:"left",bottom:"top",left:"right"},vs=f.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,a=Pp(ms,o),s=Ap[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Np,{...n,ref:r,style:{...n.style,display:"block"}})})});vs.displayName=ms;function Ip(e){return e!==null}var Mp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;const{placement:r,rects:o,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=bs(r),c={start:"0%",center:"50%",end:"100%"}[p],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,m=(((x=n.arrow)==null?void 0:x.y)??0)+l/2;let b="",g="";return u==="bottom"?(b=s?c:`${h}px`,g=`${-l}px`):u==="top"?(b=s?c:`${h}px`,g=`${o.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=s?c:`${m}px`):u==="left"&&(b=`${o.floating.width+l}px`,g=s?c:`${m}px`),{data:{x:b,y:g}}}});function bs(e){const[t,r="center"]=e.split("-");return[t,r]}var ws=fs,ys=hs,xs=gs,ks=vs,Eo="rovingFocusGroup.onEntryFocus",Op={bubbles:!1,cancelable:!0},zt="RovingFocusGroup",[No,Ss,Lp]=qn(zt),[zp,vr]=ge(zt,[Lp]),[Dp,$p]=zp(zt),Cs=f.forwardRef((e,t)=>d.jsx(No.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(No.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Fp,{...e,ref:t})})}));Cs.displayName=zt;var Fp=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),m=te(t,h),b=Mt(a),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:zt}),[w,x]=f.useState(!1),y=fe(u),S=Ss(r),T=f.useRef(!1),[C,E]=f.useState(0);return f.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(Eo,y),()=>N.removeEventListener(Eo,y)},[y]),d.jsx(Dp,{scope:r,orientation:o,dir:b,loop:n,currentTabStopId:g,onItemFocus:f.useCallback(N=>v(N),[v]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(N=>N+1),[]),onFocusableItemRemove:f.useCallback(()=>E(N=>N-1),[]),children:d.jsx(H.div,{tabIndex:w||C===0?-1:0,"data-orientation":o,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{T.current=!0}),onFocus:V(e.onFocus,N=>{const _=!T.current;if(N.target===N.currentTarget&&_&&!w){const O=new CustomEvent(Eo,Op);if(N.currentTarget.dispatchEvent(O),!O.defaultPrevented){const $=S().filter(P=>P.focusable),W=$.find(P=>P.active),j=$.find(P=>P.id===g),Z=[W,j,...$].filter(Boolean).map(P=>P.ref.current);Ts(Z,p)}}T.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),Es="RovingFocusGroupItem",Ns=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=ot(),u=a||l,p=$p(Es,r),c=p.currentTabStopId===u,h=Ss(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=p;return f.useEffect(()=>{if(o)return m(),()=>b()},[o,m,b]),d.jsx(No.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:d.jsx(H.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,v=>{o?p.onItemFocus(u):v.preventDefault()}),onFocus:V(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:V(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Vp(v,p.orientation,p.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=h().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")y.reverse();else if(w==="prev"||w==="next"){w==="prev"&&y.reverse();const S=y.indexOf(v.currentTarget);y=p.loop?Wp(y,S+1):y.slice(S+1)}setTimeout(()=>Ts(y))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Ns.displayName=Es;var Bp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vp(e,t,r){const o=Hp(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Bp[o]}function Ts(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function Wp(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var _s=Cs,Ps=Ns,Up="Label",As=f.forwardRef((e,t)=>d.jsx(H.label,{...e,ref:t,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));As.displayName=Up;var jp=As;function To(e,[t,r]){return Math.min(r,Math.max(t,e))}var _o="Progress",Po=100,[Rp]=ge(_o),[Gp,Yp]=Rp(_o),Is=f.forwardRef((e,t)=>{const{__scopeProgress:r,value:o=null,max:n,getValueLabel:a=qp,...s}=e;(n||n===0)&&!zs(n)&&console.error(Xp(`${n}`,"Progress"));const i=zs(n)?n:Po;o!==null&&!Ds(o,i)&&console.error(Kp(`${o}`,"Progress"));const l=Ds(o,i)?o:null,u=br(l)?a(l,i):void 0;return d.jsx(Gp,{scope:r,value:l,max:i,children:d.jsx(H.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":br(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ls(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Is.displayName=_o;var Ms="ProgressIndicator",Os=f.forwardRef((e,t)=>{const{__scopeProgress:r,...o}=e,n=Yp(Ms,r);return d.jsx(H.div,{"data-state":Ls(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...o,ref:t})});Os.displayName=Ms;function qp(e,t){return`${Math.round(e/t*100)}%`}function Ls(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function br(e){return typeof e=="number"}function zs(e){return br(e)&&!isNaN(e)&&e>0}function Ds(e,t){return br(e)&&!isNaN(e)&&e<=t&&e>=0}function Xp(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Po}\`.`}function Kp(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
260
|
+
*/var Ea;function af(){if(Ea)return cr;Ea=1;var e=k;function t(c,h){return c===h&&(c!==0||1/c===1/h)||c!==c&&h!==h}var o=typeof Object.is=="function"?Object.is:t,r=e.useState,n=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,h){var m=h(),b=r({inst:{value:m,getSnapshot:h}}),g=b[0].inst,v=b[1];return a(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[c,m,h]),n(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(m),m}function l(c){var h=c.getSnapshot;c=c.value;try{var m=h();return!o(c,m)}catch{return!0}}function u(c,h){return h()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return cr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,cr}var Na;function sf(){return Na||(Na=1,lr.exports=af()),lr.exports}var lf=sf();function cf(){return lf.useSyncExternalStore(df,()=>!0,()=>!1)}function df(){return()=>{}}var dr="Avatar",[uf]=me(dr),[ff,Ta]=uf(dr),_a=f.forwardRef((e,t)=>{const{__scopeAvatar:o,...r}=e,[n,a]=f.useState("idle");return d.jsx(ff,{scope:o,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:d.jsx(j.span,{...r,ref:t})})});_a.displayName=dr;var Pa="AvatarImage",Aa=f.forwardRef((e,t)=>{const{__scopeAvatar:o,src:r,onLoadingStatusChange:n=()=>{},...a}=e,s=Ta(Pa,o),i=pf(r,a),l=fe(u=>{n(u),s.onImageLoadingStatusChange(u)});return se(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(j.img,{...a,ref:t,src:r}):null});Aa.displayName=Pa;var Ia="AvatarFallback",Ma=f.forwardRef((e,t)=>{const{__scopeAvatar:o,delayMs:r,...n}=e,a=Ta(Ia,o),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(j.span,{...n,ref:t}):null});Ma.displayName=Ia;function Oa(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function pf(e,{referrerPolicy:t,crossOrigin:o}){const r=cf(),n=f.useRef(null),a=r?(n.current||(n.current=new window.Image),n.current):null,[s,i]=f.useState(()=>Oa(a,e));return se(()=>{i(Oa(a,e))},[a,e]),se(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),p=l("error");return a.addEventListener("load",u),a.addEventListener("error",p),t&&(a.referrerPolicy=t),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",u),a.removeEventListener("error",p)}},[a,o,t]),s}var hf=_a,gf=Aa,mf=Ma;function no(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ao(e){const[t,o]=f.useState(void 0);return se(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const a=n[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var so="Checkbox",[vf]=me(so),[bf,ur]=vf(so);function wf(e){const{__scopeCheckbox:t,checked:o,children:r,defaultChecked:n,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:p="on",internal_do_not_use_render:c}=e,[h,m]=Be({prop:o,defaultProp:n??!1,onChange:l,caller:so}),[b,g]=f.useState(null),[v,w]=f.useState(null),y=f.useRef(!1),x=b?!!s||!!b.closest("form"):!0,S={checked:h,disabled:a,setChecked:m,control:b,setControl:g,name:i,form:s,value:p,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ye(n)?!1:n,isFormControl:x,bubbleInput:v,setBubbleInput:w};return d.jsx(bf,{scope:t,...S,children:yf(c)?c(S):r})}var La="CheckboxTrigger",za=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},n)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:p,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:b}=ur(La,e),g=te(n,p),v=f.useRef(l);return f.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>c(v.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,c]),d.jsx(j.button,{type:"button",role:"checkbox","aria-checked":Ye(l)?"mixed":l,"aria-required":u,"data-state":Va(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:R(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:R(o,w=>{c(y=>Ye(y)?!0:!y),b&&m&&(h.current=w.isPropagationStopped(),h.current||w.stopPropagation())})})});za.displayName=La;var Da=f.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:p,...c}=e;return d.jsx(wf,{__scopeCheckbox:o,checked:n,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:p,value:l,internal_do_not_use_render:({isFormControl:h})=>d.jsxs(d.Fragment,{children:[d.jsx(za,{...c,ref:t,__scopeCheckbox:o}),h&&d.jsx(Ha,{__scopeCheckbox:o})]})})});Da.displayName=so;var $a="CheckboxIndicator",Fa=f.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:r,...n}=e,a=ur($a,o);return d.jsx(Ee,{present:r||Ye(a.checked)||a.checked===!0,children:d.jsx(j.span,{"data-state":Va(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});Fa.displayName=$a;var Ba="CheckboxBubbleInput",Ha=f.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:p,form:c,bubbleInput:h,setBubbleInput:m}=ur(Ba,e),b=te(o,m),g=no(a),v=ao(r);f.useEffect(()=>{const y=h;if(!y)return;const x=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(x,"checked").set,N=!n.current;if(g!==a&&T){const E=new Event("click",{bubbles:N});y.indeterminate=Ye(a),T.call(y,Ye(a)?!1:a),y.dispatchEvent(E)}},[h,g,a,n]);const w=f.useRef(Ye(a)?!1:a);return d.jsx(j.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:p,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ha.displayName=Ba;function yf(e){return typeof e=="function"}function Ye(e){return e==="indeterminate"}function Va(e){return Ye(e)?"indeterminate":e?"checked":"unchecked"}const xf=["top","right","bottom","left"],qe=Math.min,we=Math.max,io=Math.round,lo=Math.floor,Le=e=>({x:e,y:e}),kf={left:"right",right:"left",bottom:"top",top:"bottom"};function fr(e,t,o){return we(e,qe(t,o))}function He(e,t){return typeof e=="function"?e(t):e}function Ve(e){return e.split("-")[0]}function bt(e){return e.split("-")[1]}function pr(e){return e==="x"?"y":"x"}function hr(e){return e==="y"?"height":"width"}function ze(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function gr(e){return pr(ze(e))}function Sf(e,t,o){o===void 0&&(o=!1);const r=bt(e),n=gr(e),a=hr(n);let s=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=co(s)),[s,co(s)]}function Cf(e){const t=co(e);return[mr(e),t,mr(t)]}function mr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Wa=["left","right"],Ua=["right","left"],Ef=["top","bottom"],Nf=["bottom","top"];function Tf(e,t,o){switch(e){case"top":case"bottom":return o?t?Ua:Wa:t?Wa:Ua;case"left":case"right":return t?Ef:Nf;default:return[]}}function _f(e,t,o,r){const n=bt(e);let a=Tf(Ve(e),o==="start",r);return n&&(a=a.map(s=>s+"-"+n),t&&(a=a.concat(a.map(mr)))),a}function co(e){const t=Ve(e);return kf[t]+e.slice(t.length)}function Pf(e){return{top:0,right:0,bottom:0,left:0,...e}}function ja(e){return typeof e!="number"?Pf(e):{top:e,right:e,bottom:e,left:e}}function uo(e){const{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function Ra(e,t,o){let{reference:r,floating:n}=e;const a=ze(t),s=gr(t),i=hr(s),l=Ve(t),u=a==="y",p=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2,h=r[i]/2-n[i]/2;let m;switch(l){case"top":m={x:p,y:r.y-n.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:c};break;case"left":m={x:r.x-n.width,y:c};break;default:m={x:r.x,y:r.y}}switch(bt(t)){case"start":m[s]-=h*(o&&u?-1:1);break;case"end":m[s]+=h*(o&&u?-1:1);break}return m}async function Af(e,t){var o;t===void 0&&(t={});const{x:r,y:n,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:c="floating",altBoundary:h=!1,padding:m=0}=He(t,e),b=ja(m),v=i[h?c==="floating"?"reference":"floating":c],w=uo(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(v)))==null||o?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:p,strategy:l})),y=c==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},T=uo(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:x,strategy:l}):y);return{top:(w.top-T.top+b.top)/S.y,bottom:(T.bottom-w.bottom+b.bottom)/S.y,left:(w.left-T.left+b.left)/S.x,right:(T.right-w.right+b.right)/S.x}}const If=50,Mf=async(e,t,o)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=o,i=s.detectOverflow?s:{...s,detectOverflow:Af},l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:c}=Ra(u,r,l),h=r,m=0;const b={};for(let g=0;g<a.length;g++){const v=a[g];if(!v)continue;const{name:w,fn:y}=v,{x,y:S,data:T,reset:N}=await y({x:p,y:c,initialPlacement:r,placement:h,strategy:n,middlewareData:b,rects:u,platform:i,elements:{reference:e,floating:t}});p=x??p,c=S??c,b[w]={...b[w],...T},N&&m<If&&(m++,typeof N=="object"&&(N.placement&&(h=N.placement),N.rects&&(u=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:n}):N.rects),{x:p,y:c}=Ra(u,h,l)),g=-1)}return{x:p,y:c,placement:h,strategy:n,middlewareData:b}},Of=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:r,placement:n,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:p=0}=He(e,t)||{};if(u==null)return{};const c=ja(p),h={x:o,y:r},m=gr(n),b=hr(m),g=await s.getDimensions(u),v=m==="y",w=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[m]-h[m]-a.floating[b],T=h[m]-a.reference[m],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=N?N[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(N)))&&(E=i.floating[x]||a.floating[b]);const C=S/2-T/2,P=E/2-g[b]/2-1,_=qe(c[w],P),I=qe(c[y],P),L=_,O=E-g[b]-I,z=E/2-g[b]/2+C,H=fr(L,z,O),A=!l.arrow&&bt(n)!=null&&z!==H&&a.reference[b]/2-(z<L?_:I)-g[b]/2<0,$=A?z<L?z-L:z-O:0;return{[m]:h[m]+$,data:{[m]:H,centerOffset:z-H-$,...A&&{alignmentOffset:$}},reset:A}}}),Lf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;const{placement:n,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=He(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const w=Ve(n),y=ze(i),x=Ve(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(x||!g?[co(i)]:Cf(i)),N=b!=="none";!h&&N&&T.push(..._f(i,g,b,S));const E=[i,...T],C=await l.detectOverflow(t,v),P=[];let _=((r=a.flip)==null?void 0:r.overflows)||[];if(p&&P.push(C[w]),c){const z=Sf(n,s,S);P.push(C[z[0]],C[z[1]])}if(_=[..._,{placement:n,overflows:P}],!P.every(z=>z<=0)){var I,L;const z=(((I=a.flip)==null?void 0:I.index)||0)+1,H=E[z];if(H&&(!(c==="alignment"?y!==ze(H):!1)||_.every(D=>ze(D.placement)===y?D.overflows[0]>0:!0)))return{data:{index:z,overflows:_},reset:{placement:H}};let A=(L=_.filter($=>$.overflows[0]<=0).sort(($,D)=>$.overflows[1]-D.overflows[1])[0])==null?void 0:L.placement;if(!A)switch(m){case"bestFit":{var O;const $=(O=_.filter(D=>{if(N){const Y=ze(D.placement);return Y===y||Y==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(Y=>Y>0).reduce((Y,M)=>Y+M,0)]).sort((D,Y)=>D[1]-Y[1])[0])==null?void 0:O[0];$&&(A=$);break}case"initialPlacement":A=i;break}if(n!==A)return{reset:{placement:A}}}return{}}}};function Ga(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ya(e){return xf.some(t=>e[t]>=0)}const zf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:o,platform:r}=t,{strategy:n="referenceHidden",...a}=He(e,t);switch(n){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),i=Ga(s,o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ya(i)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),i=Ga(s,o.floating);return{data:{escapedOffsets:i,escaped:Ya(i)}}}default:return{}}}}},qa=new Set(["left","top"]);async function Df(e,t){const{placement:o,platform:r,elements:n}=e,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=Ve(o),i=bt(o),l=ze(o)==="y",u=qa.has(s)?-1:1,p=a&&l?-1:1,c=He(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof b=="number"&&(m=i==="end"?b*-1:b),l?{x:m*p,y:h*u}:{x:h*u,y:m*p}}const $f=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;const{x:n,y:a,placement:s,middlewareData:i}=t,l=await Df(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ff=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:r,placement:n,platform:a}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:l={fn:w=>{let{x:y,y:x}=w;return{x:y,y:x}}},...u}=He(e,t),p={x:o,y:r},c=await a.detectOverflow(t,u),h=ze(Ve(n)),m=pr(h);let b=p[m],g=p[h];if(s){const w=m==="y"?"top":"left",y=m==="y"?"bottom":"right",x=b+c[w],S=b-c[y];b=fr(x,b,S)}if(i){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+c[w],S=g-c[y];g=fr(x,g,S)}const v=l.fn({...t,[m]:b,[h]:g});return{...v,data:{x:v.x-o,y:v.y-r,enabled:{[m]:s,[h]:i}}}}}},Bf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:o,y:r,placement:n,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=He(e,t),p={x:o,y:r},c=ze(n),h=pr(c);let m=p[h],b=p[c];const g=He(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=h==="y"?"height":"width",S=a.reference[h]-a.floating[x]+v.mainAxis,T=a.reference[h]+a.reference[x]-v.mainAxis;m<S?m=S:m>T&&(m=T)}if(u){var w,y;const x=h==="y"?"width":"height",S=qa.has(Ve(n)),T=a.reference[c]-a.floating[x]+(S&&((w=s.offset)==null?void 0:w[c])||0)+(S?0:v.crossAxis),N=a.reference[c]+a.reference[x]+(S?0:((y=s.offset)==null?void 0:y[c])||0)-(S?v.crossAxis:0);b<T?b=T:b>N&&(b=N)}return{[h]:m,[c]:b}}}},Hf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;const{placement:n,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=He(e,t),p=await s.detectOverflow(t,u),c=Ve(n),h=bt(n),m=ze(n)==="y",{width:b,height:g}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=h===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=h==="end"?"top":"bottom");const y=g-p.top-p.bottom,x=b-p.left-p.right,S=qe(g-p[v],y),T=qe(b-p[w],x),N=!t.middlewareData.shift;let E=S,C=T;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=y),N&&!h){const _=we(p.left,0),I=we(p.right,0),L=we(p.top,0),O=we(p.bottom,0);m?C=b-2*(_!==0||I!==0?_+I:we(p.left,p.right)):E=g-2*(L!==0||O!==0?L+O:we(p.top,p.bottom))}await l({...t,availableWidth:C,availableHeight:E});const P=await s.getDimensions(i.floating);return b!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function fo(){return typeof window<"u"}function wt(e){return Xa(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(Xa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xa(e){return fo()?e instanceof Node||e instanceof ye(e).Node:!1}function Ne(e){return fo()?e instanceof Element||e instanceof ye(e).Element:!1}function We(e){return fo()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function Ka(e){return!fo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}function Lt(e){const{overflow:t,overflowX:o,overflowY:r,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Vf(e){return/^(table|td|th)$/.test(wt(e))}function po(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Wf=/transform|translate|scale|rotate|perspective|filter/,Uf=/paint|layout|strict|content/,at=e=>!!e&&e!=="none";let vr;function br(e){const t=Ne(e)?Te(e):e;return at(t.transform)||at(t.translate)||at(t.scale)||at(t.rotate)||at(t.perspective)||!wr()&&(at(t.backdropFilter)||at(t.filter))||Wf.test(t.willChange||"")||Uf.test(t.contain||"")}function jf(e){let t=Xe(e);for(;We(t)&&!yt(t);){if(br(t))return t;if(po(t))return null;t=Xe(t)}return null}function wr(){return vr==null&&(vr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vr}function yt(e){return/^(html|body|#document)$/.test(wt(e))}function Te(e){return ye(e).getComputedStyle(e)}function ho(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(wt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ka(e)&&e.host||De(e);return Ka(t)?t.host:t}function Za(e){const t=Xe(e);return yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:We(t)&&Lt(t)?t:Za(t)}function zt(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);const n=Za(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),s=ye(n);if(a){const i=yr(s);return t.concat(s,s.visualViewport||[],Lt(n)?n:[],i&&o?zt(i):[])}else return t.concat(n,zt(n,[],o))}function yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ja(e){const t=Te(e);let o=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const n=We(e),a=n?e.offsetWidth:o,s=n?e.offsetHeight:r,i=io(o)!==a||io(r)!==s;return i&&(o=a,r=s),{width:o,height:r,$:i}}function xr(e){return Ne(e)?e:e.contextElement}function xt(e){const t=xr(e);if(!We(t))return Le(1);const o=t.getBoundingClientRect(),{width:r,height:n,$:a}=Ja(t);let s=(a?io(o.width):o.width)/r,i=(a?io(o.height):o.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Rf=Le(0);function Qa(e){const t=ye(e);return!wr()||!t.visualViewport?Rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Gf(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ye(e)?!1:t}function st(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);const n=e.getBoundingClientRect(),a=xr(e);let s=Le(1);t&&(r?Ne(r)&&(s=xt(r)):s=xt(e));const i=Gf(a,o,r)?Qa(a):Le(0);let l=(n.left+i.x)/s.x,u=(n.top+i.y)/s.y,p=n.width/s.x,c=n.height/s.y;if(a){const h=ye(a),m=r&&Ne(r)?ye(r):r;let b=h,g=yr(b);for(;g&&r&&m!==b;){const v=xt(g),w=g.getBoundingClientRect(),y=Te(g),x=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,u*=v.y,p*=v.x,c*=v.y,l+=x,u+=S,b=ye(g),g=yr(b)}}return uo({width:p,height:c,x:l,y:u})}function go(e,t){const o=ho(e).scrollLeft;return t?t.left+o:st(De(e)).left+o}function es(e,t){const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-go(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Yf(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e;const a=n==="fixed",s=De(r),i=t?po(t.floating):!1;if(r===s||i&&a)return o;let l={scrollLeft:0,scrollTop:0},u=Le(1);const p=Le(0),c=We(r);if((c||!c&&!a)&&((wt(r)!=="body"||Lt(s))&&(l=ho(r)),c)){const m=st(r);u=xt(r),p.x=m.x+r.clientLeft,p.y=m.y+r.clientTop}const h=s&&!c&&!a?es(s,l):Le(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+p.x+h.x,y:o.y*u.y-l.scrollTop*u.y+p.y+h.y}}function qf(e){return Array.from(e.getClientRects())}function Xf(e){const t=De(e),o=ho(e),r=e.ownerDocument.body,n=we(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=we(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+go(e);const i=-o.scrollTop;return Te(r).direction==="rtl"&&(s+=we(t.clientWidth,r.clientWidth)-n),{width:n,height:a,x:s,y:i}}const ts=25;function Kf(e,t){const o=ye(e),r=De(e),n=o.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(n){a=n.width,s=n.height;const p=wr();(!p||p&&t==="fixed")&&(i=n.offsetLeft,l=n.offsetTop)}const u=go(r);if(u<=0){const p=r.ownerDocument,c=p.body,h=getComputedStyle(c),m=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-c.clientWidth-m);b<=ts&&(a-=b)}else u<=ts&&(a+=u);return{width:a,height:s,x:i,y:l}}function Zf(e,t){const o=st(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,a=We(e)?xt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=n*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function os(e,t,o){let r;if(t==="viewport")r=Kf(e,o);else if(t==="document")r=Xf(De(e));else if(Ne(t))r=Zf(t,o);else{const n=Qa(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uo(r)}function rs(e,t){const o=Xe(e);return o===t||!Ne(o)||yt(o)?!1:Te(o).position==="fixed"||rs(o,t)}function Jf(e,t){const o=t.get(e);if(o)return o;let r=zt(e,[],!1).filter(i=>Ne(i)&&wt(i)!=="body"),n=null;const a=Te(e).position==="fixed";let s=a?Xe(e):e;for(;Ne(s)&&!yt(s);){const i=Te(s),l=br(s);!l&&i.position==="fixed"&&(n=null),(a?!l&&!n:!l&&i.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Lt(s)&&!l&&rs(e,s))?r=r.filter(p=>p!==s):n=i,s=Xe(s)}return t.set(e,r),r}function Qf(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e;const s=[...o==="clippingAncestors"?po(t)?[]:Jf(t,this._c):[].concat(o),r],i=os(t,s[0],n);let l=i.top,u=i.right,p=i.bottom,c=i.left;for(let h=1;h<s.length;h++){const m=os(t,s[h],n);l=we(m.top,l),u=qe(m.right,u),p=qe(m.bottom,p),c=we(m.left,c)}return{width:u-c,height:p-l,x:c,y:l}}function ep(e){const{width:t,height:o}=Ja(e);return{width:t,height:o}}function tp(e,t,o){const r=We(t),n=De(t),a=o==="fixed",s=st(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=go(n)}if(r||!r&&!a)if((wt(t)!=="body"||Lt(n))&&(i=ho(t)),r){const m=st(t,!0,a,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else n&&u();a&&!r&&n&&u();const p=n&&!r&&!a?es(n,i):Le(0),c=s.left+i.scrollLeft-l.x-p.x,h=s.top+i.scrollTop-l.y-p.y;return{x:c,y:h,width:s.width,height:s.height}}function kr(e){return Te(e).position==="static"}function ns(e,t){if(!We(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return De(e)===o&&(o=o.ownerDocument.body),o}function as(e,t){const o=ye(e);if(po(e))return o;if(!We(e)){let n=Xe(e);for(;n&&!yt(n);){if(Ne(n)&&!kr(n))return n;n=Xe(n)}return o}let r=ns(e,t);for(;r&&Vf(r)&&kr(r);)r=ns(r,t);return r&&yt(r)&&kr(r)&&!br(r)?o:r||jf(e)||o}const op=async function(e){const t=this.getOffsetParent||as,o=this.getDimensions,r=await o(e.floating);return{reference:tp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rp(e){return Te(e).direction==="rtl"}const np={convertOffsetParentRelativeRectToViewportRelativeRect:Yf,getDocumentElement:De,getClippingRect:Qf,getOffsetParent:as,getElementRects:op,getClientRects:qf,getDimensions:ep,getScale:xt,isElement:Ne,isRTL:rp};function ss(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ap(e,t){let o=null,r;const n=De(e);function a(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:p,top:c,width:h,height:m}=u;if(i||t(),!h||!m)return;const b=lo(c),g=lo(n.clientWidth-(p+h)),v=lo(n.clientHeight-(c+m)),w=lo(p),x={rootMargin:-b+"px "+-g+"px "+-v+"px "+-w+"px",threshold:we(0,qe(1,l))||1};let S=!0;function T(N){const E=N[0].intersectionRatio;if(E!==l){if(!S)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!ss(u,e.getBoundingClientRect())&&s(),S=!1}try{o=new IntersectionObserver(T,{...x,root:n.ownerDocument})}catch{o=new IntersectionObserver(T,x)}o.observe(e)}return s(!0),a}function sp(e,t,o,r){r===void 0&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=xr(e),p=n||a?[...u?zt(u):[],...t?zt(t):[]]:[];p.forEach(w=>{n&&w.addEventListener("scroll",o,{passive:!0}),a&&w.addEventListener("resize",o)});const c=u&&i?ap(u,o):null;let h=-1,m=null;s&&(m=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),o()}),u&&!l&&m.observe(u),t&&m.observe(t));let b,g=l?st(e):null;l&&v();function v(){const w=st(e);g&&!ss(g,w)&&o(),g=w,b=requestAnimationFrame(v)}return o(),()=>{var w;p.forEach(y=>{n&&y.removeEventListener("scroll",o),a&&y.removeEventListener("resize",o)}),c==null||c(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const ip=$f,lp=Ff,cp=Lf,dp=Hf,up=zf,is=Of,fp=Bf,pp=(e,t,o)=>{const r=new Map,n={platform:np,...o},a={...n.platform,_c:r};return Mf(e,t,{...n,platform:a})};var hp=typeof document<"u",gp=function(){},mo=hp?k.useLayoutEffect:gp;function vo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!vo(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){const a=n[r];if(!(a==="_owner"&&e.$$typeof)&&!vo(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ls(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cs(e,t){const o=ls(e);return Math.round(t*o)/o}function Sr(e){const t=f.useRef(e);return mo(()=>{t.current=e}),t}function mp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[p,c]=f.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(r);vo(h,r)||m(r);const[b,g]=f.useState(null),[v,w]=f.useState(null),y=f.useCallback(D=>{D!==N.current&&(N.current=D,g(D))},[]),x=f.useCallback(D=>{D!==E.current&&(E.current=D,w(D))},[]),S=a||b,T=s||v,N=f.useRef(null),E=f.useRef(null),C=f.useRef(p),P=l!=null,_=Sr(l),I=Sr(n),L=Sr(u),O=f.useCallback(()=>{if(!N.current||!E.current)return;const D={placement:t,strategy:o,middleware:h};I.current&&(D.platform=I.current),pp(N.current,E.current,D).then(Y=>{const M={...Y,isPositioned:L.current!==!1};z.current&&!vo(C.current,M)&&(C.current=M,Vt.flushSync(()=>{c(M)}))})},[h,t,o,I,L]);mo(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,c(D=>({...D,isPositioned:!1})))},[u]);const z=f.useRef(!1);mo(()=>(z.current=!0,()=>{z.current=!1}),[]),mo(()=>{if(S&&(N.current=S),T&&(E.current=T),S&&T){if(_.current)return _.current(S,T,O);O()}},[S,T,O,_,P]);const H=f.useMemo(()=>({reference:N,floating:E,setReference:y,setFloating:x}),[y,x]),A=f.useMemo(()=>({reference:S,floating:T}),[S,T]),$=f.useMemo(()=>{const D={position:o,left:0,top:0};if(!A.floating)return D;const Y=cs(A.floating,p.x),M=cs(A.floating,p.y);return i?{...D,transform:"translate("+Y+"px, "+M+"px)",...ls(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:Y,top:M}},[o,i,A.floating,p.x,p.y]);return f.useMemo(()=>({...p,update:O,refs:H,elements:A,floatingStyles:$}),[p,O,H,A,$])}const vp=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:r,padding:n}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?is({element:r.current,padding:n}).fn(o):{}:r?is({element:r,padding:n}).fn(o):{}}}},bp=(e,t)=>{const o=ip(e);return{name:o.name,fn:o.fn,options:[e,t]}},wp=(e,t)=>{const o=lp(e);return{name:o.name,fn:o.fn,options:[e,t]}},yp=(e,t)=>({fn:fp(e).fn,options:[e,t]}),xp=(e,t)=>{const o=cp(e);return{name:o.name,fn:o.fn,options:[e,t]}},kp=(e,t)=>{const o=dp(e);return{name:o.name,fn:o.fn,options:[e,t]}},Sp=(e,t)=>{const o=up(e);return{name:o.name,fn:o.fn,options:[e,t]}},Cp=(e,t)=>{const o=vp(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Ep="Arrow",ds=f.forwardRef((e,t)=>{const{children:o,width:r=10,height:n=5,...a}=e;return d.jsx(j.svg,{...a,ref:t,width:r,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});ds.displayName=Ep;var Np=ds,Cr="Popper",[us,bo]=me(Cr),[Tp,fs]=us(Cr),ps=e=>{const{__scopePopper:t,children:o}=e,[r,n]=f.useState(null);return d.jsx(Tp,{scope:t,anchor:r,onAnchorChange:n,children:o})};ps.displayName=Cr;var hs="PopperAnchor",gs=f.forwardRef((e,t)=>{const{__scopePopper:o,virtualRef:r,...n}=e,a=fs(hs,o),s=f.useRef(null),i=te(t,s),l=f.useRef(null);return f.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&a.onAnchorChange(l.current)}),r?null:d.jsx(j.div,{...n,ref:i})});gs.displayName=hs;var Er="PopperContent",[_p,Pp]=us(Er),ms=f.forwardRef((e,t)=>{var V,W,X,re,Q,Z;const{__scopePopper:o,side:r="bottom",sideOffset:n=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:p=0,sticky:c="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=fs(Er,o),[w,y]=f.useState(null),x=te(t,le=>y(le)),[S,T]=f.useState(null),N=ao(S),E=(N==null?void 0:N.width)??0,C=(N==null?void 0:N.height)??0,P=r+(a!=="center"?"-"+a:""),_=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(u)?u:[u],L=I.length>0,O={padding:_,boundary:I.filter(Ip),altBoundary:L},{refs:z,floatingStyles:H,placement:A,isPositioned:$,middlewareData:D}=mp({strategy:"fixed",placement:P,whileElementsMounted:(...le)=>sp(...le,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[bp({mainAxis:n+C,alignmentAxis:s}),l&&wp({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?yp():void 0,...O}),l&&xp({...O}),kp({...O,apply:({elements:le,rects:ce,availableWidth:ct,availableHeight:Je})=>{const{width:Pe,height:Lo}=ce.reference,ve=le.floating.style;ve.setProperty("--radix-popper-available-width",`${ct}px`),ve.setProperty("--radix-popper-available-height",`${Je}px`),ve.setProperty("--radix-popper-anchor-width",`${Pe}px`),ve.setProperty("--radix-popper-anchor-height",`${Lo}px`)}}),S&&Cp({element:S,padding:i}),Mp({arrowWidth:E,arrowHeight:C}),h&&Sp({strategy:"referenceHidden",...O})]}),[Y,M]=ws(A),ae=fe(b);se(()=>{$&&(ae==null||ae())},[$,ae]);const pe=(V=D.arrow)==null?void 0:V.x,q=(W=D.arrow)==null?void 0:W.y,oe=((X=D.arrow)==null?void 0:X.centerOffset)!==0,[G,ee]=f.useState();return se(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(re=D.transformOrigin)==null?void 0:re.x,(Q=D.transformOrigin)==null?void 0:Q.y].join(" "),...((Z=D.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(_p,{scope:o,placedSide:Y,onArrowChange:T,arrowX:pe,arrowY:q,shouldHideArrow:oe,children:d.jsx(j.div,{"data-side":Y,"data-align":M,...g,ref:x,style:{...g.style,animation:$?void 0:"none"}})})})});ms.displayName=Er;var vs="PopperArrow",Ap={top:"bottom",right:"left",bottom:"top",left:"right"},bs=f.forwardRef(function(t,o){const{__scopePopper:r,...n}=t,a=Pp(vs,r),s=Ap[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Np,{...n,ref:o,style:{...n.style,display:"block"}})})});bs.displayName=vs;function Ip(e){return e!==null}var Mp=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:o,rects:r,middlewareData:n}=t,s=((v=n.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,p]=ws(o),c={start:"0%",center:"50%",end:"100%"}[p],h=(((w=n.arrow)==null?void 0:w.x)??0)+i/2,m=(((y=n.arrow)==null?void 0:y.y)??0)+l/2;let b="",g="";return u==="bottom"?(b=s?c:`${h}px`,g=`${-l}px`):u==="top"?(b=s?c:`${h}px`,g=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=s?c:`${m}px`):u==="left"&&(b=`${r.floating.width+l}px`,g=s?c:`${m}px`),{data:{x:b,y:g}}}});function ws(e){const[t,o="center"]=e.split("-");return[t,o]}var ys=ps,xs=gs,ks=ms,Ss=bs,Nr="rovingFocusGroup.onEntryFocus",Op={bubbles:!1,cancelable:!0},Dt="RovingFocusGroup",[Tr,Cs,Lp]=Xn(Dt),[zp,wo]=me(Dt,[Lp]),[Dp,$p]=zp(Dt),Es=f.forwardRef((e,t)=>d.jsx(Tr.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Tr.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Fp,{...e,ref:t})})}));Es.displayName=Dt;var Fp=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:n=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...c}=e,h=f.useRef(null),m=te(t,h),b=Ot(a),[g,v]=Be({prop:s,defaultProp:i??null,onChange:l,caller:Dt}),[w,y]=f.useState(!1),x=fe(u),S=Cs(o),T=f.useRef(!1),[N,E]=f.useState(0);return f.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(Nr,x),()=>C.removeEventListener(Nr,x)},[x]),d.jsx(Dp,{scope:o,orientation:r,dir:b,loop:n,currentTabStopId:g,onItemFocus:f.useCallback(C=>v(C),[v]),onItemShiftTab:f.useCallback(()=>y(!0),[]),onFocusableItemAdd:f.useCallback(()=>E(C=>C+1),[]),onFocusableItemRemove:f.useCallback(()=>E(C=>C-1),[]),children:d.jsx(j.div,{tabIndex:w||N===0?-1:0,"data-orientation":r,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{T.current=!0}),onFocus:R(e.onFocus,C=>{const P=!T.current;if(C.target===C.currentTarget&&P&&!w){const _=new CustomEvent(Nr,Op);if(C.currentTarget.dispatchEvent(_),!_.defaultPrevented){const I=S().filter(A=>A.focusable),L=I.find(A=>A.active),O=I.find(A=>A.id===g),H=[L,O,...I].filter(Boolean).map(A=>A.ref.current);_s(H,p)}}T.current=!1}),onBlur:R(e.onBlur,()=>y(!1))})})}),Ns="RovingFocusGroupItem",Ts=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:n=!1,tabStopId:a,children:s,...i}=e,l=nt(),u=a||l,p=$p(Ns,o),c=p.currentTabStopId===u,h=Cs(o),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=p;return f.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),d.jsx(Tr.ItemSlot,{scope:o,id:u,focusable:r,active:n,children:d.jsx(j.span,{tabIndex:c?0:-1,"data-orientation":p.orientation,...i,ref:t,onMouseDown:R(e.onMouseDown,v=>{r?p.onItemFocus(u):v.preventDefault()}),onFocus:R(e.onFocus,()=>p.onItemFocus(u)),onKeyDown:R(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){p.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Vp(v,p.orientation,p.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")x.reverse();else if(w==="prev"||w==="next"){w==="prev"&&x.reverse();const S=x.indexOf(v.currentTarget);x=p.loop?Wp(x,S+1):x.slice(S+1)}setTimeout(()=>_s(x))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Ts.displayName=Ns;var Bp={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Hp(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Vp(e,t,o){const r=Hp(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Bp[r]}function _s(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Wp(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var Ps=Es,As=Ts,Up="Label",Is=f.forwardRef((e,t)=>d.jsx(j.label,{...e,ref:t,onMouseDown:o=>{var n;o.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));Is.displayName=Up;var jp=Is;function _r(e,[t,o]){return Math.min(o,Math.max(t,e))}var Pr="Progress",Ar=100,[Rp]=me(Pr),[Gp,Yp]=Rp(Pr),Ms=f.forwardRef((e,t)=>{const{__scopeProgress:o,value:r=null,max:n,getValueLabel:a=qp,...s}=e;(n||n===0)&&!Ds(n)&&console.error(Xp(`${n}`,"Progress"));const i=Ds(n)?n:Ar;r!==null&&!$s(r,i)&&console.error(Kp(`${r}`,"Progress"));const l=$s(r,i)?r:null,u=yo(l)?a(l,i):void 0;return d.jsx(Gp,{scope:o,value:l,max:i,children:d.jsx(j.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":yo(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":zs(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Ms.displayName=Pr;var Os="ProgressIndicator",Ls=f.forwardRef((e,t)=>{const{__scopeProgress:o,...r}=e,n=Yp(Os,o);return d.jsx(j.div,{"data-state":zs(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...r,ref:t})});Ls.displayName=Os;function qp(e,t){return`${Math.round(e/t*100)}%`}function zs(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yo(e){return typeof e=="number"}function Ds(e){return yo(e)&&!isNaN(e)&&e>0}function $s(e,t){return yo(e)&&!isNaN(e)&&e<=t&&e>=0}function Xp(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ar}\`.`}function Kp(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
261
261
|
- a positive number
|
|
262
|
-
- less than the value passed to \`max\` (or ${
|
|
262
|
+
- less than the value passed to \`max\` (or ${Ar} if no \`max\` prop is set)
|
|
263
263
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
264
264
|
|
|
265
|
-
Defaulting to \`null\`.`}var Zp=Is,Jp=Os,Ao="Radio",[Qp,$s]=ge(Ao),[eh,th]=Qp(Ao),Fs=f.forwardRef((e,t)=>{const{__scopeRadio:r,name:o,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...p}=e,[c,h]=f.useState(null),m=te(t,v=>h(v)),b=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(eh,{scope:r,checked:n,disabled:s,children:[d.jsx(H.button,{type:"button",role:"radio","aria-checked":n,"data-state":Ws(n),"data-disabled":s?"":void 0,disabled:s,value:i,...p,ref:m,onClick:V(e.onClick,v=>{n||l==null||l(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&d.jsx(Vs,{control:c,bubbles:!b.current,name:o,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Fs.displayName=Ao;var Bs="RadioIndicator",Hs=f.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:o,...n}=e,a=th(Bs,r);return d.jsx(Ee,{present:o||a.checked,children:d.jsx(H.span,{"data-state":Ws(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});Hs.displayName=Bs;var rh="RadioBubbleInput",Vs=f.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=or(r),u=nr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Vs.displayName=rh;function Ws(e){return e?"checked":"unchecked"}var oh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],wr="RadioGroup",[nh]=ge(wr,[vr,$s]),Us=vr(),js=$s(),[ah,sh]=nh(wr),Rs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:o,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:p=!0,onValueChange:c,...h}=e,m=Us(r),b=Mt(u),[g,v]=Be({prop:a,defaultProp:n??null,onChange:c,caller:wr});return d.jsx(ah,{scope:r,name:o,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(_s,{asChild:!0,...m,orientation:l,dir:b,loop:p,children:d.jsx(H.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Rs.displayName=wr;var Gs="RadioGroupItem",Ys=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:o,...n}=e,a=sh(Gs,r),s=a.disabled||o,i=Us(r),l=js(r),u=f.useRef(null),p=te(t,u),c=a.value===n.value,h=f.useRef(!1);return f.useEffect(()=>{const m=g=>{oh.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(Ps,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Fs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:p,onCheck:()=>a.onValueChange(n.value),onKeyDown:V(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:V(n.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});Ys.displayName=Gs;var ih="RadioGroupIndicator",qs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...o}=e,n=js(r);return d.jsx(Hs,{...n,...o,ref:t})});qs.displayName=ih;var lh=Rs,ch=Ys,dh=qs;function uh(e,t){return f.useReducer((r,o)=>t[r][o]??r,e)}var Io="ScrollArea",[Xs]=ge(Io),[fh,Se]=Xs(Io),Ks=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=f.useState(null),[u,p]=f.useState(null),[c,h]=f.useState(null),[m,b]=f.useState(null),[g,v]=f.useState(null),[w,x]=f.useState(0),[y,S]=f.useState(0),[T,C]=f.useState(!1),[E,N]=f.useState(!1),_=te(t,$=>l($)),O=Mt(n);return d.jsx(fh,{scope:r,type:o,dir:O,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:p,content:c,onContentChange:h,scrollbarX:m,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:E,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeightChange:S,children:d.jsx(H.div,{dir:O,...s,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});Ks.displayName=Io;var Zs="ScrollAreaViewport",Js=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:o,nonce:n,...a}=e,s=Se(Zs,r),i=f.useRef(null),l=te(t,i,s.onViewportChange);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(H.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});Js.displayName=Zs;var $e="ScrollAreaScrollbar",Qs=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return f.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(ph,{...o,ref:t,forceMount:r}):n.type==="scroll"?d.jsx(hh,{...o,ref:t,forceMount:r}):n.type==="auto"?d.jsx(ei,{...o,ref:t,forceMount:r}):n.type==="always"?d.jsx(Mo,{...o,ref:t}):null});Qs.displayName=$e;var ph=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),[a,s]=f.useState(!1);return f.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},p=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",p),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:r||a,children:d.jsx(ei,{"data-state":a?"visible":"hidden",...o,ref:t})})}),hh=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Sr(()=>l("SCROLL_END"),100),[i,l]=uh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),f.useEffect(()=>{const u=n.viewport,p=a?"scrollLeft":"scrollTop";if(u){let c=u[p];const h=()=>{const m=u[p];c!==m&&(l("SCROLL"),s()),c=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:r||i!=="hidden",children:d.jsx(Mo,{"data-state":i==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:V(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ei=f.forwardRef((e,t)=>{const r=Se($e,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,s]=f.useState(!1),i=e.orientation==="horizontal",l=Sr(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,p=r.viewport.offsetHeight<r.viewport.scrollHeight;s(i?u:p)}},10);return xt(r.viewport,l),xt(r.content,l),d.jsx(Ee,{present:o||a,children:d.jsx(Mo,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Mo=f.forwardRef((e,t)=>{const{orientation:r="vertical",...o}=e,n=Se($e,e.__scopeScrollArea),a=f.useRef(null),s=f.useRef(0),[i,l]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ai(i.viewport,i.content),p={...o,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,m){return yh(h,s.current,i,m)}return r==="horizontal"?d.jsx(gh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,m=si(h,i,n.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):r==="vertical"?d.jsx(mh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,m=si(h,i);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),gh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarXChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"horizontal",...n,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":kr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+p.deltaX;e.onWheelScroll(h),li(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:xr(s.paddingLeft),paddingEnd:xr(s.paddingRight)}})}})}),mh=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:o,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarYChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"vertical",...n,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":kr(r)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollTop+p.deltaY;e.onWheelScroll(h),li(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:xr(s.paddingTop),paddingEnd:xr(s.paddingBottom)}})}})}),[vh,ti]=Xs($e),ri=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:p,onResize:c,...h}=e,m=Se($e,r),[b,g]=f.useState(null),v=te(t,_=>g(_)),w=f.useRef(null),x=f.useRef(""),y=m.viewport,S=o.content-o.viewport,T=fe(p),C=fe(l),E=Sr(c,10);function N(_){if(w.current){const O=_.clientX-w.current.left,$=_.clientY-w.current.top;u({x:O,y:$})}}return f.useEffect(()=>{const _=O=>{const $=O.target;(b==null?void 0:b.contains($))&&T(O,S)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[y,b,S,T]),f.useEffect(C,[o,C]),xt(b,E),xt(m.content,E),d.jsx(vh,{scope:r,scrollbar:b,hasThumb:n,onThumbChange:fe(a),onThumbPointerUp:fe(s),onThumbPositionChange:C,onThumbPointerDown:fe(i),children:d.jsx(H.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:V(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),w.current=b.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),N(_))}),onPointerMove:V(e.onPointerMove,N),onPointerUp:V(e.onPointerUp,_=>{const O=_.target;O.hasPointerCapture(_.pointerId)&&O.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),yr="ScrollAreaThumb",oi=f.forwardRef((e,t)=>{const{forceMount:r,...o}=e,n=ti(yr,e.__scopeScrollArea);return d.jsx(Ee,{present:r||n.hasThumb,children:d.jsx(bh,{ref:t,...o})})}),bh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:o,...n}=e,a=Se(yr,r),s=ti(yr,r),{onThumbPositionChange:i}=s,l=te(t,c=>s.onThumbChange(c)),u=f.useRef(void 0),p=Sr(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(p(),!u.current){const m=xh(c,i);u.current=m,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,p,i]),d.jsx(H.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:V(e.onPointerDownCapture,c=>{const m=c.target.getBoundingClientRect(),b=c.clientX-m.left,g=c.clientY-m.top;s.onThumbPointerDown({x:b,y:g})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});oi.displayName=yr;var Oo="ScrollAreaCorner",ni=f.forwardRef((e,t)=>{const r=Se(Oo,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?d.jsx(wh,{...e,ref:t}):null});ni.displayName=Oo;var wh=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...o}=e,n=Se(Oo,r),[a,s]=f.useState(0),[i,l]=f.useState(0),u=!!(a&&i);return xt(n.scrollbarX,()=>{var c;const p=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(p),l(p)}),xt(n.scrollbarY,()=>{var c;const p=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(p),s(p)}),u?d.jsx(H.div,{...o,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xr(e){return e?parseInt(e,10):0}function ai(e,t){const r=e/t;return isNaN(r)?0:r}function kr(e){const t=ai(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function yh(e,t,r,o="ltr"){const n=kr(r),a=n/2,s=t||a,i=n-s,l=r.scrollbar.paddingStart+s,u=r.scrollbar.size-r.scrollbar.paddingEnd-i,p=r.content-r.viewport,c=o==="ltr"?[0,p]:[p*-1,0];return ii([l,u],c)(e)}function si(e,t,r="ltr"){const o=kr(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-o,l=r==="ltr"?[0,s]:[s*-1,0],u=To(e,l);return ii([0,s],[0,i])(u)}function ii(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function li(e,t){return e>0&&e<t}var xh=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,i=r.top!==a.top;(s||i)&&t(),r=a,o=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(o)};function Sr(e,t){const r=fe(e),o=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),f.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function xt(e,t){const r=fe(t);ae(()=>{let o=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var kh=Ks,Sh=Js,Ch=ni,Eh=[" ","Enter","ArrowUp","ArrowDown"],Nh=[" ","Enter"],st="Select",[Cr,Er,Th]=qn(st),[kt]=ge(st,[Th,mr]),Nr=mr(),[_h,Ke]=kt(st),[Ph,Ah]=kt(st),ci=e=>{const{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:m,form:b}=e,g=Nr(t),[v,w]=f.useState(null),[x,y]=f.useState(null),[S,T]=f.useState(!1),C=Mt(u),[E,N]=Be({prop:o,defaultProp:n??!1,onChange:a,caller:st}),[_,O]=Be({prop:s,defaultProp:i,onChange:l,caller:st}),$=f.useRef(null),W=v?b||!!v.closest("form"):!0,[j,Y]=f.useState(new Set),Z=Array.from(j).map(P=>P.props.value).join(";");return d.jsx(ws,{...g,children:d.jsxs(_h,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:ot(),value:_,onValueChange:O,open:E,onOpenChange:N,dir:C,triggerPointerDownPosRef:$,disabled:h,children:[d.jsx(Cr.Provider,{scope:t,children:d.jsx(Ph,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(P=>{Y(z=>new Set(z).add(P))},[]),onNativeOptionRemove:f.useCallback(P=>{Y(z=>{const L=new Set(z);return L.delete(P),L})},[]),children:r})}),W?d.jsxs(Ii,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:c,value:_,onChange:P=>O(P.target.value),disabled:h,form:b,children:[_===void 0?d.jsx("option",{value:""}):null,Array.from(j)]},Z):null]})})};ci.displayName=st;var di="SelectTrigger",ui=f.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:o=!1,...n}=e,a=Nr(r),s=Ke(di,r),i=s.disabled||o,l=te(t,s.onTriggerChange),u=Er(r),p=f.useRef("touch"),[c,h,m]=Oi(g=>{const v=u().filter(y=>!y.disabled),w=v.find(y=>y.value===s.value),x=Li(v,g,w);x!==void 0&&s.onValueChange(x.value)}),b=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(ys,{asChild:!0,...a,children:d.jsx(H.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Mi(s.value)?"":void 0,...n,ref:l,onClick:V(n.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&b(g)}),onPointerDown:V(n.onPointerDown,g=>{p.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:V(n.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&Eh.includes(g.key)&&(b(),g.preventDefault())})})})});ui.displayName=di;var fi="SelectValue",pi=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,children:a,placeholder:s="",...i}=e,l=Ke(fi,r),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=te(t,l.onValueNodeChange);return ae(()=>{u(p)},[u,p]),d.jsx(H.span,{...i,ref:c,style:{pointerEvents:"none"},children:Mi(l.value)?d.jsx(d.Fragment,{children:s}):a})});pi.displayName=fi;var Ih="SelectIcon",hi=f.forwardRef((e,t)=>{const{__scopeSelect:r,children:o,...n}=e;return d.jsx(H.span,{"aria-hidden":!0,...n,ref:t,children:o||"▼"})});hi.displayName=Ih;var Mh="SelectPortal",gi=e=>d.jsx(Qr,{asChild:!0,...e});gi.displayName=Mh;var it="SelectContent",mi=f.forwardRef((e,t)=>{const r=Ke(it,e.__scopeSelect),[o,n]=f.useState();if(ae(()=>{n(new DocumentFragment)},[]),!r.open){const a=o;return a?Bt.createPortal(d.jsx(vi,{scope:e.__scopeSelect,children:d.jsx(Cr.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(bi,{...e,ref:t})});mi.displayName=it;var _e=10,[vi,Ze]=kt(it),Oh="SelectContentImpl",Lh=It("SelectContent.RemoveScroll"),bi=f.forwardRef((e,t)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ke(it,r),[y,S]=f.useState(null),[T,C]=f.useState(null),E=te(t,D=>S(D)),[N,_]=f.useState(null),[O,$]=f.useState(null),W=Er(r),[j,Y]=f.useState(!1),Z=f.useRef(!1);f.useEffect(()=>{if(y)return nf(y)},[y]),bu();const P=f.useCallback(D=>{const[F,...G]=W().map(X=>X.ref.current),[oe]=G.slice(-1),J=document.activeElement;for(const X of D)if(X===J||(X==null||X.scrollIntoView({block:"nearest"}),X===F&&T&&(T.scrollTop=0),X===oe&&T&&(T.scrollTop=T.scrollHeight),X==null||X.focus(),document.activeElement!==J))return},[W,T]),z=f.useCallback(()=>P([N,y]),[P,N,y]);f.useEffect(()=>{j&&z()},[j,z]);const{onOpenChange:L,triggerPointerDownPosRef:Q}=x;f.useEffect(()=>{if(y){let D={x:0,y:0};const F=oe=>{var J,X;D={x:Math.abs(Math.round(oe.pageX)-(((J=Q.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((X=Q.current)==null?void 0:X.y)??0))}},G=oe=>{D.x<=10&&D.y<=10?oe.preventDefault():y.contains(oe.target)||L(!1),document.removeEventListener("pointermove",F),Q.current=null};return Q.current!==null&&(document.addEventListener("pointermove",F),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerup",G,{capture:!0})}}},[y,L,Q]),f.useEffect(()=>{const D=()=>L(!1);return window.addEventListener("blur",D),window.addEventListener("resize",D),()=>{window.removeEventListener("blur",D),window.removeEventListener("resize",D)}},[L]);const[A,se]=Oi(D=>{const F=W().filter(J=>!J.disabled),G=F.find(J=>J.ref.current===document.activeElement),oe=Li(F,D,G);oe&&setTimeout(()=>oe.ref.current.focus())}),ye=f.useCallback((D,F,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===F||oe)&&(_(D),oe&&(Z.current=!0))},[x.value]),R=f.useCallback(()=>y==null?void 0:y.focus(),[y]),re=f.useCallback((D,F,G)=>{const oe=!Z.current&&!G;(x.value!==void 0&&x.value===F||oe)&&$(D)},[x.value]),U=o==="popper"?Lo:wi,ee=U===Lo?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(vi,{scope:r,content:y,viewport:T,onViewportChange:C,itemRefCallback:ye,selectedItem:N,onItemLeave:R,itemTextRefCallback:re,focusSelectedItem:z,selectedItemText:O,position:o,isPositioned:j,searchRef:A,children:d.jsx(ka,{as:Lh,allowPinchZoom:!0,children:d.jsx(na,{asChild:!0,trapped:x.open,onMountAutoFocus:D=>{D.preventDefault()},onUnmountAutoFocus:V(n,D=>{var F;(F=x.trigger)==null||F.focus({preventScroll:!0}),D.preventDefault()}),children:d.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:D=>D.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(U,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:D=>D.preventDefault(),...w,...ee,onPlaced:()=>Y(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:V(w.onKeyDown,D=>{const F=D.ctrlKey||D.altKey||D.metaKey;if(D.key==="Tab"&&D.preventDefault(),!F&&D.key.length===1&&se(D.key),["ArrowUp","ArrowDown","Home","End"].includes(D.key)){let oe=W().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(D.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(D.key)){const J=D.target,X=oe.indexOf(J);oe=oe.slice(X+1)}setTimeout(()=>P(oe)),D.preventDefault()}})})})})})})});bi.displayName=Oh;var zh="SelectItemAlignedPosition",wi=f.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:o,...n}=e,a=Ke(it,r),s=Ze(it,r),[i,l]=f.useState(null),[u,p]=f.useState(null),c=te(t,E=>p(E)),h=Er(r),m=f.useRef(!1),b=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=s,y=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&w){const E=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),O=w.getBoundingClientRect();if(a.dir!=="rtl"){const J=O.left-N.left,X=_.left-J,le=E.left-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=To(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.left=Pe+"px"}else{const J=N.right-O.right,X=window.innerWidth-_.right-J,le=window.innerWidth-E.right-X,ce=E.width+le,lt=Math.max(ce,N.width),Je=window.innerWidth-_e,Pe=To(X,[_e,Math.max(_e,Je-lt)]);i.style.minWidth=ce+"px",i.style.right=Pe+"px"}const $=h(),W=window.innerHeight-_e*2,j=g.scrollHeight,Y=window.getComputedStyle(u),Z=parseInt(Y.borderTopWidth,10),P=parseInt(Y.paddingTop,10),z=parseInt(Y.borderBottomWidth,10),L=parseInt(Y.paddingBottom,10),Q=Z+P+j+L+z,A=Math.min(v.offsetHeight*5,Q),se=window.getComputedStyle(g),ye=parseInt(se.paddingTop,10),R=parseInt(se.paddingBottom,10),re=E.top+E.height/2-_e,U=W-re,ee=v.offsetHeight/2,D=v.offsetTop+ee,F=Z+P+D,G=Q-F;if(F<=re){const J=$.length>0&&v===$[$.length-1].ref.current;i.style.bottom="0px";const X=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(U,ee+(J?R:0)+X+z),ce=F+le;i.style.height=ce+"px"}else{const J=$.length>0&&v===$[0].ref.current;i.style.top="0px";const le=Math.max(re,Z+g.offsetTop+(J?ye:0)+ee)+G;i.style.height=le+"px",g.scrollTop=F-re+g.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=A+"px",i.style.maxHeight=W+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,u,g,v,w,a.dir,o]);ae(()=>y(),[y]);const[S,T]=f.useState();ae(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const C=f.useCallback(E=>{E&&b.current===!0&&(y(),x==null||x(),b.current=!1)},[y,x]);return d.jsx($h,{scope:r,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(H.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});wi.displayName=zh;var Dh="SelectPopperPosition",Lo=f.forwardRef((e,t)=>{const{__scopeSelect:r,align:o="start",collisionPadding:n=_e,...a}=e,s=Nr(r);return d.jsx(xs,{...s,...a,ref:t,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Lo.displayName=Dh;var[$h,zo]=kt(it,{}),Do="SelectViewport",yi=f.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:o,...n}=e,a=Ze(Do,r),s=zo(Do,r),i=te(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(Cr.Slot,{scope:r,children:d.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:V(n.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const m=Math.abs(l.current-p.scrollTop);if(m>0){const b=window.innerHeight-_e*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(g,v);if(w<b){const x=w+m,y=Math.min(b,x),S=x-y;c.style.height=y+"px",c.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});yi.displayName=Do;var xi="SelectGroup",[Fh,Bh]=kt(xi),Hh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=ot();return d.jsx(Fh,{scope:r,id:n,children:d.jsx(H.div,{role:"group","aria-labelledby":n,...o,ref:t})})});Hh.displayName=xi;var ki="SelectLabel",Vh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Bh(ki,r);return d.jsx(H.div,{id:n.id,...o,ref:t})});Vh.displayName=ki;var Tr="SelectItem",[Wh,Si]=kt(Tr),Ci=f.forwardRef((e,t)=>{const{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...s}=e,i=Ke(Tr,r),l=Ze(Tr,r),u=i.value===o,[p,c]=f.useState(a??""),[h,m]=f.useState(!1),b=te(t,x=>{var y;return(y=l.itemRefCallback)==null?void 0:y.call(l,x,o,n)}),g=ot(),v=f.useRef("touch"),w=()=>{n||(i.onValueChange(o),i.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Wh,{scope:r,value:o,disabled:n,textId:g,isSelected:u,onItemTextChange:f.useCallback(x=>{c(y=>y||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(Cr.ItemSlot,{scope:r,value:o,disabled:n,textValue:p,children:d.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:V(s.onFocus,()=>m(!0)),onBlur:V(s.onBlur,()=>m(!1)),onClick:V(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:V(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:V(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:V(s.onPointerMove,x=>{var y;v.current=x.pointerType,n?(y=l.onItemLeave)==null||y.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(s.onPointerLeave,x=>{var y;x.currentTarget===document.activeElement&&((y=l.onItemLeave)==null||y.call(l))}),onKeyDown:V(s.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(Nh.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Ci.displayName=Tr;var Dt="SelectItemText",Ei=f.forwardRef((e,t)=>{const{__scopeSelect:r,className:o,style:n,...a}=e,s=Ke(Dt,r),i=Ze(Dt,r),l=Si(Dt,r),u=Ah(Dt,r),[p,c]=f.useState(null),h=te(t,w=>c(w),l.onItemTextChange,w=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.call(i,w,l.value,l.disabled)}),m=p==null?void 0:p.textContent,b=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return ae(()=>(g(b),()=>v(b)),[g,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(H.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Bt.createPortal(a.children,s.valueNode):null]})});Ei.displayName=Dt;var Ni="SelectItemIndicator",Ti=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return Si(Ni,r).isSelected?d.jsx(H.span,{"aria-hidden":!0,...o,ref:t}):null});Ti.displayName=Ni;var $o="SelectScrollUpButton",_i=f.forwardRef((e,t)=>{const r=Ze($o,e.__scopeSelect),o=zo($o,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ai,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});_i.displayName=$o;var Fo="SelectScrollDownButton",Pi=f.forwardRef((e,t)=>{const r=Ze(Fo,e.__scopeSelect),o=zo(Fo,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,o.onScrollButtonChange);return ae(()=>{if(r.viewport&&r.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=r.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[r.viewport,r.isPositioned]),n?d.jsx(Ai,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=r;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Pi.displayName=Fo;var Ai=f.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ze("SelectScrollButton",r),s=f.useRef(null),i=Er(r),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),ae(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(H.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:V(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:V(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:V(n.onPointerLeave,()=>{l()})})}),Uh="SelectSeparator",jh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e;return d.jsx(H.div,{"aria-hidden":!0,...o,ref:t})});jh.displayName=Uh;var Bo="SelectArrow",Rh=f.forwardRef((e,t)=>{const{__scopeSelect:r,...o}=e,n=Nr(r),a=Ke(Bo,r),s=Ze(Bo,r);return a.open&&s.position==="popper"?d.jsx(ks,{...n,...o,ref:t}):null});Rh.displayName=Bo;var Gh="SelectBubbleInput",Ii=f.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{const n=f.useRef(null),a=te(o,n),s=or(t);return f.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(H.select,{...r,style:{...Gn,...r.style},ref:a,defaultValue:t})});Ii.displayName=Gh;function Mi(e){return e===""||e===void 0}function Oi(e){const t=fe(e),r=f.useRef(""),o=f.useRef(0),n=f.useCallback(s=>{const i=r.current+s;t(i),(function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function Li(e,t,r){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Yh(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==r));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function Yh(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var qh=ci,Xh=ui,Kh=pi,Zh=hi,Jh=gi,Qh=mi,eg=yi,tg=Ci,rg=Ei,og=Ti,ng=_i,ag=Pi,sg="Separator",zi="horizontal",ig=["horizontal","vertical"],Di=f.forwardRef((e,t)=>{const{decorative:r,orientation:o=zi,...n}=e,a=lg(o)?o:zi,i=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(H.div,{"data-orientation":a,...i,...n,ref:t})});Di.displayName=sg;function lg(e){return ig.includes(e)}var cg=Di,_r="Switch",[dg]=ge(_r),[ug,fg]=dg(_r),$i=f.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:p,...c}=e,[h,m]=f.useState(null),b=te(t,y=>m(y)),g=f.useRef(!1),v=h?p||!!h.closest("form"):!0,[w,x]=Be({prop:n,defaultProp:a??!1,onChange:u,caller:_r});return d.jsxs(ug,{scope:r,checked:w,disabled:i,children:[d.jsx(H.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Vi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:V(e.onClick,y=>{x(S=>!S),v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),v&&d.jsx(Hi,{control:h,bubbles:!g.current,name:o,value:l,checked:w,required:s,disabled:i,form:p,style:{transform:"translateX(-100%)"}})]})});$i.displayName=_r;var Fi="SwitchThumb",Bi=f.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=fg(Fi,r);return d.jsx(H.span,{"data-state":Vi(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});Bi.displayName=Fi;var pg="SwitchBubbleInput",Hi=f.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=or(r),u=nr(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==r&&m){const b=new Event("click",{bubbles:o});m.call(p,r),p.dispatchEvent(b)}},[l,r,o]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Hi.displayName=pg;function Vi(e){return e?"checked":"unchecked"}var hg=$i,gg=Bi,Pr="Tabs",[mg]=ge(Pr,[vr]),Wi=vr(),[vg,Ho]=mg(Pr),Ui=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=Mt(i),[c,h]=Be({prop:o,onChange:n,defaultProp:a??"",caller:Pr});return d.jsx(vg,{scope:r,baseId:ot(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(H.div,{dir:p,"data-orientation":s,...u,ref:t})})});Ui.displayName=Pr;var ji="TabsList",Ri=f.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...n}=e,a=Ho(ji,r),s=Wi(r);return d.jsx(_s,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:o,children:d.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Ri.displayName=ji;var Gi="TabsTrigger",Yi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,s=Ho(Gi,r),i=Wi(r),l=Ki(s.baseId,o),u=Zi(s.baseId,o),p=o===s.value;return d.jsx(Ps,{asChild:!0,...i,focusable:!n,active:p,children:d.jsx(H.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:V(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(o):c.preventDefault()}),onKeyDown:V(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(o)}),onFocus:V(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!n&&c&&s.onValueChange(o)})})})});Yi.displayName=Gi;var qi="TabsContent",Xi=f.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,forceMount:n,children:a,...s}=e,i=Ho(qi,r),l=Ki(i.baseId,o),u=Zi(i.baseId,o),p=o===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||p,children:({present:h})=>d.jsx(H.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});Xi.displayName=qi;function Ki(e,t){return`${e}-trigger-${t}`}function Zi(e,t){return`${e}-content-${t}`}var bg=Ui,wg=Ri,yg=Yi,xg=Xi,[Ar]=ge("Tooltip",[mr]),Ir=mr(),Ji="TooltipProvider",kg=700,Vo="tooltip.open",[Sg,Wo]=Ar(Ji),Qi=e=>{const{__scopeTooltip:t,delayDuration:r=kg,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Sg,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};Qi.displayName=Ji;var $t="Tooltip",[Cg,Ft]=Ar($t),el=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Wo($t,e.__scopeTooltip),u=Ir(t),[p,c]=f.useState(null),h=ot(),m=f.useRef(0),b=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[w,x]=Be({prop:o,defaultProp:n??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Vo))):l.onClose(),a==null||a(E)},caller:$t}),y=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,x(!0)},[x]),T=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),C=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,x(!0),m.current=0},g)},[g,x]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(ws,{...u,children:d.jsx(Cg,{scope:t,contentId:h,open:w,stateAttribute:y,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?C():S()},[l.isOpenDelayedRef,C,S]),onTriggerLeave:f.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:S,onClose:T,disableHoverableContent:b,children:r})})};el.displayName=$t;var Uo="TooltipTrigger",tl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Ft(Uo,r),a=Wo(Uo,r),s=Ir(r),i=f.useRef(null),l=te(t,i,n.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ys,{asChild:!0,...s,children:d.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:V(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:V(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:V(e.onBlur,n.onClose),onClick:V(e.onClick,n.onClose)})})});tl.displayName=Uo;var jo="TooltipPortal",[Eg,Ng]=Ar(jo,{forceMount:void 0}),rl=e=>{const{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Ft(jo,t);return d.jsx(Eg,{scope:t,forceMount:r,children:d.jsx(Ee,{present:r||a.open,children:d.jsx(Qr,{asChild:!0,container:n,children:o})})})};rl.displayName=jo;var St="TooltipContent",ol=f.forwardRef((e,t)=>{const r=Ng(St,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,s=Ft(St,e.__scopeTooltip);return d.jsx(Ee,{present:o||s.open,children:s.disableHoverableContent?d.jsx(nl,{side:n,...a,ref:t}):d.jsx(Tg,{side:n,...a,ref:t})})}),Tg=f.forwardRef((e,t)=>{const r=Ft(St,e.__scopeTooltip),o=Wo(St,e.__scopeTooltip),n=f.useRef(null),a=te(t,n),[s,i]=f.useState(null),{trigger:l,onClose:u}=r,p=n.current,{onPointerInTransitChange:c}=o,h=f.useCallback(()=>{i(null),c(!1)},[c]),m=f.useCallback((b,g)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},x=Ig(w,v.getBoundingClientRect()),y=Mg(w,x),S=Og(g.getBoundingClientRect()),T=zg([...y,...S]);i(T),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const b=v=>m(v,p),g=v=>m(v,l);return l.addEventListener("pointerleave",b),p.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",g)}}},[l,p,m,h]),f.useEffect(()=>{if(s){const b=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),y=!Lg(w,s);x?h():y&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,p,s,u,h]),d.jsx(nl,{...e,ref:a})}),[_g,Pg]=Ar($t,{isInside:!1}),Ag=Ld("TooltipContent"),nl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Ft(St,r),u=Ir(r),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(Vo,p),()=>document.removeEventListener(Vo,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(Kr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(xs,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Ag,{children:o}),d.jsx(_g,{scope:r,isInside:!0,children:d.jsx(Vd,{id:l.contentId,role:"tooltip",children:n||o})})]})})});ol.displayName=St;var al="TooltipArrow",sl=f.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=Ir(r);return Pg(al,r).isInside?null:d.jsx(ks,{...n,...o,ref:t})});sl.displayName=al;function Ig(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Mg(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Og(e){const{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function Lg(e,t){const{x:r,y:o}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>o!=h>o&&r<(c-u)*(o-p)/(h-p)+u&&(n=!n)}return n}function zg(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Dg(t)}function Dg(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const n=e[o];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var $g=Qi,Fg=el,Bg=tl,Hg=rl,Vg=ol,Wg=sl;const Ug=Yt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all cursor-pointer outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function il({className:e,variant:t="default",size:r="default",asChild:o=!1,...n}){const a=o?jn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":r,className:B(Ug({variant:t,size:r,className:e})),...n})}const jg={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},Rg=Yt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] 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 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Gg({className:e,variant:t="default",hue:r,asChild:o=!1,...n}){const a=o?jn:"span",s=r?jg[r]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:B(Rg({variant:t}),s,e),...n})}function Yg({className:e,type:t,...r}){return d.jsx("input",{type:t,"data-slot":"input",className:B("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 qg({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:B("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground 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 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function Xg({...e}){return d.jsx(qh,{"data-slot":"select",...e})}function Kg({...e}){return d.jsx(Kh,{"data-slot":"select-value",...e})}function Zg({className:e,size:t="default",children:r,...o}){return d.jsxs(Xh,{"data-slot":"select-trigger","data-size":t,className:B("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),...o,children:[r,d.jsx(Zh,{asChild:!0,children:d.jsx(pn,{className:"size-4 opacity-50"})})]})}function Jg({className:e,children:t,position:r="item-aligned",align:o="center",...n}){return d.jsx(Jh,{children:d.jsxs(Qh,{"data-slot":"select-content",className:B("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:o,...n,children:[d.jsx(em,{}),d.jsx(eg,{className:B("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(tm,{})]})})}function Qg({className:e,children:t,...r}){return d.jsxs(tg,{"data-slot":"select-item",className:B("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:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(og,{children:d.jsx(fn,{className:"size-4"})})}),d.jsx(rg,{children:t})]})}function em({className:e,...t}){return d.jsx(ng,{"data-slot":"select-scroll-up-button",className:B("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Tc,{className:"size-4"})})}function tm({className:e,...t}){return d.jsx(ag,{"data-slot":"select-scroll-down-button",className:B("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(pn,{className:"size-4"})})}function rm({className:e,...t}){return d.jsx(za,{"data-slot":"checkbox",className:B("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-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-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:d.jsx($a,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(fn,{className:"size-3.5"})})})}function om({className:e,size:t="default",...r}){return d.jsx(hg,{"data-slot":"switch","data-size":t,className:B("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...r,children:d.jsx(gg,{"data-slot":"switch-thumb",className:B("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function nm({className:e,...t}){return d.jsx(jp,{"data-slot":"label",className:B("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 am({className:e,...t}){return d.jsx(lh,{"data-slot":"radio-group",className:B("grid gap-3",e),...t})}function sm({className:e,...t}){return d.jsx(ch,{"data-slot":"radio-group-item",className:B("aspect-square size-4 shrink-0 rounded-full border border-input text-primary 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 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:d.jsx(dh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ac,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function im({className:e,orientation:t="horizontal",decorative:r=!0,...o}){return d.jsx(cg,{"data-slot":"separator",decorative:r,orientation:t,className:B("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function lm({className:e,orientation:t="horizontal",...r}){return d.jsx(bg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:B("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...r})}const cm=Yt("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function dm({className:e,variant:t="default",...r}){return d.jsx(wg,{"data-slot":"tabs-list","data-variant":t,className:B(cm({variant:t}),e),...r})}function um({className:e,...t}){return d.jsx(yg,{"data-slot":"tabs-trigger",className:B("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function fm({className:e,...t}){return d.jsx(xg,{"data-slot":"tabs-content",className:B("flex-1 outline-none",e),...t})}function pm({className:e,children:t,...r}){return d.jsxs(kh,{"data-slot":"scroll-area",className:B("relative",e),...r,children:[d.jsx(Sh,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),d.jsx(hm,{}),d.jsx(Ch,{})]})}function hm({className:e,orientation:t="vertical",...r}){return d.jsx(Qs,{"data-slot":"scroll-area-scrollbar",orientation:t,className:B("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:d.jsx(oi,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Ro({className:e,size:t="default",...r}){return d.jsx(hf,{"data-slot":"avatar","data-size":t,className:B("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...r})}function Go({className:e,...t}){return d.jsx(gf,{"data-slot":"avatar-image",className:B("aspect-square size-full",e),...t})}function Yo({className:e,...t}){return d.jsx(mf,{"data-slot":"avatar-fallback",className:B("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function gm({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:B("animate-pulse rounded-md bg-accent",e),...t})}function mm({delayDuration:e=0,...t}){return d.jsx($g,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vm({...e}){return d.jsx(Fg,{"data-slot":"tooltip",...e})}function bm({...e}){return d.jsx(Bg,{"data-slot":"tooltip-trigger",...e})}function wm({className:e,sideOffset:t=0,children:r,...o}){return d.jsx(Hg,{children:d.jsxs(Vg,{"data-slot":"tooltip-content",sideOffset:t,className:B("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 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",e),...o,children:[r,d.jsx(Wg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function ym({className:e,value:t,...r}){return d.jsx(Zp,{"data-slot":"progress",className:B("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:d.jsx(Jp,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const xm=Yt("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function km({className:e,variant:t,...r}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:B(xm({variant:t}),e),...r})}function Sm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:B("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Cm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:B("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Em({...e}){return d.jsx(eu,{"data-slot":"collapsible",...e})}function Nm({...e}){return d.jsx(Zn,{"data-slot":"collapsible-trigger",...e})}function Tm({...e}){return d.jsx(Jn,{"data-slot":"collapsible-content",...e})}const ll={"arrow-left":Sc,calendar:Ec,"check-circle-2":gn,"chevron-left":Nc,"chevron-right":Br,clock:Ic,"credit-card":Mc,"external-link":Oc,"help-circle":_c,info:Ut,"loader-2":Hr,mail:Vr,"map-pin":Lc,"message-circle":zc,"message-square":mn,package:$c,phone:Fc,search:Bc,"shopping-bag":Hc,sparkles:Vc,truck:Uc,user:vn,"x-circle":Pc,"alert-circle":hn,"book-open":Cc},cl={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},dl={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},ul=e=>typeof e=="number"?cl[String(e)]??"gap-2":typeof e=="string"?cl[e.trim()]??"gap-2":"gap-2",_m=({children:e,className:t,onClick:r})=>d.jsx(Pt,{className:t,onClick:r,children:e}),Pm=({children:e,className:t})=>d.jsx(At,{className:t,children:e}),Am=({children:e,className:t})=>d.jsx(Md,{className:t,children:e}),Im=({children:e,className:t,onClick:r,variant:o,size:n,disabled:a,title:s})=>d.jsx(il,{className:t,variant:o,size:n,onClick:r,disabled:a,title:s,children:e}),Mm=({children:e,className:t,variant:r,hue:o,tone:n})=>d.jsx(Gg,{className:B(dl[n]??"",t),variant:r,hue:o,children:e}),Om=({className:e,onChange:t,...r})=>d.jsx(Yg,{className:e,onChange:t,...r}),Lm=({className:e,onChange:t,...r})=>d.jsx(qg,{className:e,onChange:t,...r}),zm=({children:e,className:t,value:r,defaultValue:o,onChange:n,placeholder:a,disabled:s})=>d.jsxs(Xg,{value:r,defaultValue:o,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:s,children:[d.jsx(Zg,{className:t,children:d.jsx(Kg,{placeholder:a})}),d.jsx(Jg,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Dm=({children:e,value:t,disabled:r,className:o})=>d.jsx(Qg,{value:t,disabled:r,className:o,children:e}),$m=({checked:e,onChange:t,disabled:r,className:o,id:n})=>{const a=e!==void 0,s=t;return d.jsx(rm,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:r,className:o,id:n})},Fm=({checked:e,onChange:t,disabled:r,size:o,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(om,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:r,size:o,className:n,id:a})},Bm=({children:e,htmlFor:t,className:r})=>d.jsx(nm,{htmlFor:t,className:r,children:e}),Hm=({children:e,value:t,defaultValue:r,onChange:o,className:n})=>d.jsx(am,{value:t,defaultValue:r,onValueChange:a=>{const s=o;s==null||s({target:{value:a}})},className:n,children:e}),Vm=({value:e,disabled:t,className:r,id:o})=>d.jsx(sm,{value:e,disabled:t,className:r,id:o}),Wm=({className:e})=>d.jsx(im,{className:e}),Um=({children:e,defaultValue:t,className:r})=>{const[o,n]=k.useState(t);return d.jsx(lm,{value:o,onValueChange:n,className:r,children:e})},jm=({children:e,className:t})=>d.jsx(dm,{className:t,children:e}),Rm=({children:e,value:t,className:r})=>d.jsx(um,{className:r,value:t,children:e}),Gm=({children:e,value:t,className:r})=>d.jsx(fm,{className:r,value:t,children:e}),Ym=({children:e,className:t})=>d.jsx(pm,{className:t,children:e}),qm=({src:e,alt:t,className:r})=>{var o;return d.jsxs(Ro,{className:r,children:[d.jsx(Go,{src:e,alt:t}),d.jsx(Yo,{children:((o=t==null?void 0:t.charAt(0))==null?void 0:o.toUpperCase())||"?"})]})},Xm=({width:e,height:t,className:r})=>d.jsx(gm,{className:r,style:{width:e,height:t}}),Km=({children:e,content:t,className:r})=>d.jsx(mm,{children:d.jsxs(vm,{children:[d.jsx(bm,{asChild:!0,children:d.jsx("span",{className:r,children:e})}),d.jsx(wm,{children:d.jsx("p",{children:String(t)})})]})}),Zm=({value:e,className:t})=>d.jsx(ym,{value:typeof e=="string"?Number(e):e,className:t}),Jm={default:Ut,destructive:hn},Qm=({children:e,variant:t,title:r,className:o})=>{const n=t,a=Jm[n||"default"]||Ut;return d.jsxs(km,{variant:n,className:o,children:[d.jsx(a,{className:"size-4"}),r?d.jsx(Sm,{children:String(r)}):null,e?d.jsx(Cm,{children:e}):null]})},ev=({children:e,defaultOpen:t,className:r})=>d.jsx(Em,{defaultOpen:t==="true"||t===!0,className:r,children:e}),tv=({children:e,className:t})=>d.jsxs(Nm,{className:B("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Br,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),rv=({children:e,className:t})=>d.jsx(Tm,{className:t,children:e}),ov=({children:e,className:t,tone:r})=>d.jsx("p",{className:B("text-sm",dl[r]??"",t),children:e}),nv=({children:e,className:t,level:r})=>{const o=`h${r||"2"}`;return d.jsx(o,{className:B("font-semibold tracking-tight",t),children:e})},av=({children:e,className:t,direction:r,gap:o})=>{const n=r==="row"?"flex-row":"flex-col",a=ul(o);return d.jsx("div",{className:B("flex",n,a,t),children:e})},sv=({children:e,className:t,gap:r})=>{const o=ul(r);return d.jsx("div",{className:B("flex flex-row items-center",o,t),children:e})},iv=({children:e,className:t,href:r,target:o,rel:n})=>d.jsx("a",{href:r,target:o,rel:n,className:t,children:e}),lv=({title:e,children:t,className:r})=>d.jsxs(Pt,{className:B("overflow-hidden p-0 gap-0 shadow-sm",r),children:[e?d.jsx(At,{className:"px-6 py-3",children:d.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,d.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),cv=({icon:e,label:t,description:r,onClick:o,className:n})=>{const a=e,s="size-5",i=a?ll[a]:null;return d.jsxs("button",{type:"button",className:B("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",n),onClick:o,children:[i&&d.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),d.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?d.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,r?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(r)}):null]}),d.jsx(Br,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},dv=({name:e,size:t,className:r})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=ll[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:B(n,i,r)}):d.jsx("span",{className:B("inline-block",n,i,r),"data-icon":a})},uv=()=>({"ui-card":_m,"ui-card-content":Pm,"ui-card-header":Am,"ui-button":Im,"ui-text":ov,"ui-heading":nv,"ui-badge":Mm,"ui-input":Om,"ui-textarea":Lm,"ui-select":zm,"ui-select-option":Dm,"ui-checkbox":$m,"ui-switch":Fm,"ui-label":Bm,"ui-radio-group":Hm,"ui-radio-group-item":Vm,"ui-stack":av,"ui-inline":sv,"ui-separator":Wm,"ui-tabs":Um,"ui-tabs-list":jm,"ui-tabs-trigger":Rm,"ui-tabs-content":Gm,"ui-scroll-area":Ym,"ui-avatar":qm,"ui-icon":dv,"ui-link":iv,"ui-menu-item":cv,"ui-menu":lv,"ui-skeleton":Xm,"ui-tooltip":Km,"ui-progress":Zm,"ui-alert":Qm,"ui-collapsible":ev,"ui-collapsible-trigger":tv,"ui-collapsible-content":rv}),fl="/api/ecommerce",pl=async(e,t)=>{const r=t?`${t.replace(/\/$/,"")}${fl}`:fl,o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await o.json();if(!o.ok)throw new Error(n.error||"API request failed");return n.data},fv=({className:e})=>d.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),hl="stackable-dev-badge-styles",pv=()=>{if(typeof document>"u"||document.getElementById(hl))return;const e=document.createElement("style");e.id=hl,e.textContent=`
|
|
265
|
+
Defaulting to \`null\`.`}var Zp=Ms,Jp=Ls,Ir="Radio",[Qp,Fs]=me(Ir),[eh,th]=Qp(Ir),Bs=f.forwardRef((e,t)=>{const{__scopeRadio:o,name:r,checked:n=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...p}=e,[c,h]=f.useState(null),m=te(t,v=>h(v)),b=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(eh,{scope:o,checked:n,disabled:s,children:[d.jsx(j.button,{type:"button",role:"radio","aria-checked":n,"data-state":Us(n),"data-disabled":s?"":void 0,disabled:s,value:i,...p,ref:m,onClick:R(e.onClick,v=>{n||l==null||l(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&d.jsx(Ws,{control:c,bubbles:!b.current,name:r,value:i,checked:n,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Bs.displayName=Ir;var Hs="RadioIndicator",Vs=f.forwardRef((e,t)=>{const{__scopeRadio:o,forceMount:r,...n}=e,a=th(Hs,o);return d.jsx(Ee,{present:r||a.checked,children:d.jsx(j.span,{"data-state":Us(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t})})});Vs.displayName=Hs;var oh="RadioBubbleInput",Ws=f.forwardRef(({__scopeRadio:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=no(o),u=ao(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&m){const b=new Event("click",{bubbles:r});m.call(p,o),p.dispatchEvent(b)}},[l,o,r]),d.jsx(j.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ws.displayName=oh;function Us(e){return e?"checked":"unchecked"}var rh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],xo="RadioGroup",[nh]=me(xo,[wo,Fs]),js=wo(),Rs=Fs(),[ah,sh]=nh(xo),Gs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:o,name:r,defaultValue:n,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:p=!0,onValueChange:c,...h}=e,m=js(o),b=Ot(u),[g,v]=Be({prop:a,defaultProp:n??null,onChange:c,caller:xo});return d.jsx(ah,{scope:o,name:r,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(Ps,{asChild:!0,...m,orientation:l,dir:b,loop:p,children:d.jsx(j.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:b,...h,ref:t})})})});Gs.displayName=xo;var Ys="RadioGroupItem",qs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:o,disabled:r,...n}=e,a=sh(Ys,o),s=a.disabled||r,i=js(o),l=Rs(o),u=f.useRef(null),p=te(t,u),c=a.value===n.value,h=f.useRef(!1);return f.useEffect(()=>{const m=g=>{rh.includes(g.key)&&(h.current=!0)},b=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),d.jsx(As,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Bs,{disabled:s,required:a.required,checked:c,...l,...n,name:a.name,ref:p,onCheck:()=>a.onValueChange(n.value),onKeyDown:R(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:R(n.onFocus,()=>{var m;h.current&&((m=u.current)==null||m.click())})})})});qs.displayName=Ys;var ih="RadioGroupIndicator",Xs=f.forwardRef((e,t)=>{const{__scopeRadioGroup:o,...r}=e,n=Rs(o);return d.jsx(Vs,{...n,...r,ref:t})});Xs.displayName=ih;var lh=Gs,ch=qs,dh=Xs;function uh(e,t){return f.useReducer((o,r)=>t[o][r]??o,e)}var Mr="ScrollArea",[Ks]=me(Mr),[fh,Se]=Ks(Mr),Zs=f.forwardRef((e,t)=>{const{__scopeScrollArea:o,type:r="hover",dir:n,scrollHideDelay:a=600,...s}=e,[i,l]=f.useState(null),[u,p]=f.useState(null),[c,h]=f.useState(null),[m,b]=f.useState(null),[g,v]=f.useState(null),[w,y]=f.useState(0),[x,S]=f.useState(0),[T,N]=f.useState(!1),[E,C]=f.useState(!1),P=te(t,I=>l(I)),_=Ot(n);return d.jsx(fh,{scope:o,type:r,dir:_,scrollHideDelay:a,scrollArea:i,viewport:u,onViewportChange:p,content:c,onContentChange:h,scrollbarX:m,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:N,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:E,onScrollbarYEnabledChange:C,onCornerWidthChange:y,onCornerHeightChange:S,children:d.jsx(j.div,{dir:_,...s,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});Zs.displayName=Mr;var Js="ScrollAreaViewport",Qs=f.forwardRef((e,t)=>{const{__scopeScrollArea:o,children:r,nonce:n,...a}=e,s=Se(Js,o),i=f.useRef(null),l=te(t,i,s.onViewportChange);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),d.jsx(j.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:d.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Qs.displayName=Js;var $e="ScrollAreaScrollbar",ei=f.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=n,i=e.orientation==="horizontal";return f.useEffect(()=>(i?a(!0):s(!0),()=>{i?a(!1):s(!1)}),[i,a,s]),n.type==="hover"?d.jsx(ph,{...r,ref:t,forceMount:o}):n.type==="scroll"?d.jsx(hh,{...r,ref:t,forceMount:o}):n.type==="auto"?d.jsx(ti,{...r,ref:t,forceMount:o}):n.type==="always"?d.jsx(Or,{...r,ref:t}):null});ei.displayName=$e;var ph=f.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),[a,s]=f.useState(!1);return f.useEffect(()=>{const i=n.scrollArea;let l=0;if(i){const u=()=>{window.clearTimeout(l),s(!0)},p=()=>{l=window.setTimeout(()=>s(!1),n.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",p),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",p)}}},[n.scrollArea,n.scrollHideDelay]),d.jsx(Ee,{present:o||a,children:d.jsx(ti,{"data-state":a?"visible":"hidden",...r,ref:t})})}),hh=f.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=Se($e,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Eo(()=>l("SCROLL_END"),100),[i,l]=uh("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,n.scrollHideDelay,l]),f.useEffect(()=>{const u=n.viewport,p=a?"scrollLeft":"scrollTop";if(u){let c=u[p];const h=()=>{const m=u[p];c!==m&&(l("SCROLL"),s()),c=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[n.viewport,a,l,s]),d.jsx(Ee,{present:o||i!=="hidden",children:d.jsx(Or,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:R(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ti=f.forwardRef((e,t)=>{const o=Se($e,e.__scopeScrollArea),{forceMount:r,...n}=e,[a,s]=f.useState(!1),i=e.orientation==="horizontal",l=Eo(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,p=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:p)}},10);return kt(o.viewport,l),kt(o.content,l),d.jsx(Ee,{present:r||a,children:d.jsx(Or,{"data-state":a?"visible":"hidden",...n,ref:t})})}),Or=f.forwardRef((e,t)=>{const{orientation:o="vertical",...r}=e,n=Se($e,e.__scopeScrollArea),a=f.useRef(null),s=f.useRef(0),[i,l]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=si(i.viewport,i.content),p={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:h=>s.current=h};function c(h,m){return yh(h,s.current,i,m)}return o==="horizontal"?d.jsx(gh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollLeft,m=ii(h,i,n.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollLeft=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollLeft=c(h,n.dir))}}):o==="vertical"?d.jsx(mh,{...p,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){const h=n.viewport.scrollTop,m=ii(h,i);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{n.viewport&&(n.viewport.scrollTop=h)},onDragScroll:h=>{n.viewport&&(n.viewport.scrollTop=c(h))}}):null}),gh=f.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarXChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"horizontal",...n,ref:u,sizes:o,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Co(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollLeft+p.deltaX;e.onWheelScroll(h),ci(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:So(s.paddingLeft),paddingEnd:So(s.paddingRight)}})}})}),mh=f.forwardRef((e,t)=>{const{sizes:o,onSizesChange:r,...n}=e,a=Se($e,e.__scopeScrollArea),[s,i]=f.useState(),l=f.useRef(null),u=te(t,l,a.onScrollbarYChange);return f.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),d.jsx(ri,{"data-orientation":"vertical",...n,ref:u,sizes:o,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Co(o)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,c)=>{if(a.viewport){const h=a.viewport.scrollTop+p.deltaY;e.onWheelScroll(h),ci(h,c)&&p.preventDefault()}},onResize:()=>{l.current&&a.viewport&&s&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:So(s.paddingTop),paddingEnd:So(s.paddingBottom)}})}})}),[vh,oi]=Ks($e),ri=f.forwardRef((e,t)=>{const{__scopeScrollArea:o,sizes:r,hasThumb:n,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:p,onResize:c,...h}=e,m=Se($e,o),[b,g]=f.useState(null),v=te(t,P=>g(P)),w=f.useRef(null),y=f.useRef(""),x=m.viewport,S=r.content-r.viewport,T=fe(p),N=fe(l),E=Eo(c,10);function C(P){if(w.current){const _=P.clientX-w.current.left,I=P.clientY-w.current.top;u({x:_,y:I})}}return f.useEffect(()=>{const P=_=>{const I=_.target;(b==null?void 0:b.contains(I))&&T(_,S)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[x,b,S,T]),f.useEffect(N,[r,N]),kt(b,E),kt(m.content,E),d.jsx(vh,{scope:o,scrollbar:b,hasThumb:n,onThumbChange:fe(a),onThumbPointerUp:fe(s),onThumbPositionChange:N,onThumbPointerDown:fe(i),children:d.jsx(j.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:R(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),w.current=b.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),C(P))}),onPointerMove:R(e.onPointerMove,C),onPointerUp:R(e.onPointerUp,P=>{const _=P.target;_.hasPointerCapture(P.pointerId)&&_.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=y.current,m.viewport&&(m.viewport.style.scrollBehavior=""),w.current=null})})})}),ko="ScrollAreaThumb",ni=f.forwardRef((e,t)=>{const{forceMount:o,...r}=e,n=oi(ko,e.__scopeScrollArea);return d.jsx(Ee,{present:o||n.hasThumb,children:d.jsx(bh,{ref:t,...r})})}),bh=f.forwardRef((e,t)=>{const{__scopeScrollArea:o,style:r,...n}=e,a=Se(ko,o),s=oi(ko,o),{onThumbPositionChange:i}=s,l=te(t,c=>s.onThumbChange(c)),u=f.useRef(void 0),p=Eo(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const c=a.viewport;if(c){const h=()=>{if(p(),!u.current){const m=xh(c,i);u.current=m,i()}};return i(),c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[a.viewport,p,i]),d.jsx(j.div,{"data-state":s.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:R(e.onPointerDownCapture,c=>{const m=c.target.getBoundingClientRect(),b=c.clientX-m.left,g=c.clientY-m.top;s.onThumbPointerDown({x:b,y:g})}),onPointerUp:R(e.onPointerUp,s.onThumbPointerUp)})});ni.displayName=ko;var Lr="ScrollAreaCorner",ai=f.forwardRef((e,t)=>{const o=Se(Lr,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?d.jsx(wh,{...e,ref:t}):null});ai.displayName=Lr;var wh=f.forwardRef((e,t)=>{const{__scopeScrollArea:o,...r}=e,n=Se(Lr,o),[a,s]=f.useState(0),[i,l]=f.useState(0),u=!!(a&&i);return kt(n.scrollbarX,()=>{var c;const p=((c=n.scrollbarX)==null?void 0:c.offsetHeight)||0;n.onCornerHeightChange(p),l(p)}),kt(n.scrollbarY,()=>{var c;const p=((c=n.scrollbarY)==null?void 0:c.offsetWidth)||0;n.onCornerWidthChange(p),s(p)}),u?d.jsx(j.div,{...r,ref:t,style:{width:a,height:i,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function So(e){return e?parseInt(e,10):0}function si(e,t){const o=e/t;return isNaN(o)?0:o}function Co(e){const t=si(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function yh(e,t,o,r="ltr"){const n=Co(o),a=n/2,s=t||a,i=n-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,p=o.content-o.viewport,c=r==="ltr"?[0,p]:[p*-1,0];return li([l,u],c)(e)}function ii(e,t,o="ltr"){const r=Co(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,s=t.content-t.viewport,i=a-r,l=o==="ltr"?[0,s]:[s*-1,0],u=_r(e,l);return li([0,s],[0,i])(u)}function li(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function ci(e,t){return e>0&&e<t}var xh=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function n(){const a={left:e.scrollLeft,top:e.scrollTop},s=o.left!==a.left,i=o.top!==a.top;(s||i)&&t(),o=a,r=window.requestAnimationFrame(n)})(),()=>window.cancelAnimationFrame(r)};function Eo(e,t){const o=fe(e),r=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),f.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function kt(e,t){const o=fe(t);se(()=>{let r=0;if(e){const n=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return n.observe(e),()=>{window.cancelAnimationFrame(r),n.unobserve(e)}}},[e,o])}var kh=Zs,Sh=Qs,Ch=ai,Eh=[" ","Enter","ArrowUp","ArrowDown"],Nh=[" ","Enter"],it="Select",[No,To,Th]=Xn(it),[St]=me(it,[Th,bo]),_o=bo(),[_h,Ke]=St(it),[Ph,Ah]=St(it),di=e=>{const{__scopeSelect:t,children:o,open:r,defaultOpen:n,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:p,autoComplete:c,disabled:h,required:m,form:b}=e,g=_o(t),[v,w]=f.useState(null),[y,x]=f.useState(null),[S,T]=f.useState(!1),N=Ot(u),[E,C]=Be({prop:r,defaultProp:n??!1,onChange:a,caller:it}),[P,_]=Be({prop:s,defaultProp:i,onChange:l,caller:it}),I=f.useRef(null),L=v?b||!!v.closest("form"):!0,[O,z]=f.useState(new Set),H=Array.from(O).map(A=>A.props.value).join(";");return d.jsx(ys,{...g,children:d.jsxs(_h,{required:m,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:T,contentId:nt(),value:P,onValueChange:_,open:E,onOpenChange:C,dir:N,triggerPointerDownPosRef:I,disabled:h,children:[d.jsx(No.Provider,{scope:t,children:d.jsx(Ph,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(A=>{z($=>new Set($).add(A))},[]),onNativeOptionRemove:f.useCallback(A=>{z($=>{const D=new Set($);return D.delete(A),D})},[]),children:o})}),L?d.jsxs(Mi,{"aria-hidden":!0,required:m,tabIndex:-1,name:p,autoComplete:c,value:P,onChange:A=>_(A.target.value),disabled:h,form:b,children:[P===void 0?d.jsx("option",{value:""}):null,Array.from(O)]},H):null]})})};di.displayName=it;var ui="SelectTrigger",fi=f.forwardRef((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...n}=e,a=_o(o),s=Ke(ui,o),i=s.disabled||r,l=te(t,s.onTriggerChange),u=To(o),p=f.useRef("touch"),[c,h,m]=Li(g=>{const v=u().filter(x=>!x.disabled),w=v.find(x=>x.value===s.value),y=zi(v,g,w);y!==void 0&&s.onValueChange(y.value)}),b=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(xs,{asChild:!0,...a,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Oi(s.value)?"":void 0,...n,ref:l,onClick:R(n.onClick,g=>{g.currentTarget.focus(),p.current!=="mouse"&&b(g)}),onPointerDown:R(n.onPointerDown,g=>{p.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:R(n.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&Eh.includes(g.key)&&(b(),g.preventDefault())})})})});fi.displayName=ui;var pi="SelectValue",hi=f.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,children:a,placeholder:s="",...i}=e,l=Ke(pi,o),{onValueNodeHasChildrenChange:u}=l,p=a!==void 0,c=te(t,l.onValueNodeChange);return se(()=>{u(p)},[u,p]),d.jsx(j.span,{...i,ref:c,style:{pointerEvents:"none"},children:Oi(l.value)?d.jsx(d.Fragment,{children:s}):a})});hi.displayName=pi;var Ih="SelectIcon",gi=f.forwardRef((e,t)=>{const{__scopeSelect:o,children:r,...n}=e;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:t,children:r||"▼"})});gi.displayName=Ih;var Mh="SelectPortal",mi=e=>d.jsx(tr,{asChild:!0,...e});mi.displayName=Mh;var lt="SelectContent",vi=f.forwardRef((e,t)=>{const o=Ke(lt,e.__scopeSelect),[r,n]=f.useState();if(se(()=>{n(new DocumentFragment)},[]),!o.open){const a=r;return a?Vt.createPortal(d.jsx(bi,{scope:e.__scopeSelect,children:d.jsx(No.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(wi,{...e,ref:t})});vi.displayName=lt;var _e=10,[bi,Ze]=St(lt),Oh="SelectContentImpl",Lh=Mt("SelectContent.RemoveScroll"),wi=f.forwardRef((e,t)=>{const{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v,...w}=e,y=Ke(lt,o),[x,S]=f.useState(null),[T,N]=f.useState(null),E=te(t,V=>S(V)),[C,P]=f.useState(null),[_,I]=f.useState(null),L=To(o),[O,z]=f.useState(!1),H=f.useRef(!1);f.useEffect(()=>{if(x)return nf(x)},[x]),bu();const A=f.useCallback(V=>{const[W,...X]=L().map(Z=>Z.ref.current),[re]=X.slice(-1),Q=document.activeElement;for(const Z of V)if(Z===Q||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===W&&T&&(T.scrollTop=0),Z===re&&T&&(T.scrollTop=T.scrollHeight),Z==null||Z.focus(),document.activeElement!==Q))return},[L,T]),$=f.useCallback(()=>A([C,x]),[A,C,x]);f.useEffect(()=>{O&&$()},[O,$]);const{onOpenChange:D,triggerPointerDownPosRef:Y}=y;f.useEffect(()=>{if(x){let V={x:0,y:0};const W=re=>{var Q,Z;V={x:Math.abs(Math.round(re.pageX)-(((Q=Y.current)==null?void 0:Q.x)??0)),y:Math.abs(Math.round(re.pageY)-(((Z=Y.current)==null?void 0:Z.y)??0))}},X=re=>{V.x<=10&&V.y<=10?re.preventDefault():x.contains(re.target)||D(!1),document.removeEventListener("pointermove",W),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,D,Y]),f.useEffect(()=>{const V=()=>D(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[D]);const[M,ae]=Li(V=>{const W=L().filter(Q=>!Q.disabled),X=W.find(Q=>Q.ref.current===document.activeElement),re=zi(W,V,X);re&&setTimeout(()=>re.ref.current.focus())}),pe=f.useCallback((V,W,X)=>{const re=!H.current&&!X;(y.value!==void 0&&y.value===W||re)&&(P(V),re&&(H.current=!0))},[y.value]),q=f.useCallback(()=>x==null?void 0:x.focus(),[x]),oe=f.useCallback((V,W,X)=>{const re=!H.current&&!X;(y.value!==void 0&&y.value===W||re)&&I(V)},[y.value]),G=r==="popper"?zr:yi,ee=G===zr?{side:i,sideOffset:l,align:u,alignOffset:p,arrowPadding:c,collisionBoundary:h,collisionPadding:m,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(bi,{scope:o,content:x,viewport:T,onViewportChange:N,itemRefCallback:pe,selectedItem:C,onItemLeave:q,itemTextRefCallback:oe,focusSelectedItem:$,selectedItemText:_,position:r,isPositioned:O,searchRef:M,children:d.jsx(Sa,{as:Lh,allowPinchZoom:!0,children:d.jsx(aa,{asChild:!0,trapped:y.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:R(n,V=>{var W;(W=y.trigger)==null||W.focus({preventScroll:!0}),V.preventDefault()}),children:d.jsx(Jo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:V=>V.preventDefault(),...w,...ee,onPlaced:()=>z(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:R(w.onKeyDown,V=>{const W=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!W&&V.key.length===1&&ae(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let re=L().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(V.key)&&(re=re.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const Q=V.target,Z=re.indexOf(Q);re=re.slice(Z+1)}setTimeout(()=>A(re)),V.preventDefault()}})})})})})})});wi.displayName=Oh;var zh="SelectItemAlignedPosition",yi=f.forwardRef((e,t)=>{const{__scopeSelect:o,onPlaced:r,...n}=e,a=Ke(lt,o),s=Ze(lt,o),[i,l]=f.useState(null),[u,p]=f.useState(null),c=te(t,E=>p(E)),h=To(o),m=f.useRef(!1),b=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=s,x=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&w){const E=a.trigger.getBoundingClientRect(),C=u.getBoundingClientRect(),P=a.valueNode.getBoundingClientRect(),_=w.getBoundingClientRect();if(a.dir!=="rtl"){const Q=_.left-C.left,Z=P.left-Q,le=E.left-Z,ce=E.width+le,ct=Math.max(ce,C.width),Je=window.innerWidth-_e,Pe=_r(Z,[_e,Math.max(_e,Je-ct)]);i.style.minWidth=ce+"px",i.style.left=Pe+"px"}else{const Q=C.right-_.right,Z=window.innerWidth-P.right-Q,le=window.innerWidth-E.right-Z,ce=E.width+le,ct=Math.max(ce,C.width),Je=window.innerWidth-_e,Pe=_r(Z,[_e,Math.max(_e,Je-ct)]);i.style.minWidth=ce+"px",i.style.right=Pe+"px"}const I=h(),L=window.innerHeight-_e*2,O=g.scrollHeight,z=window.getComputedStyle(u),H=parseInt(z.borderTopWidth,10),A=parseInt(z.paddingTop,10),$=parseInt(z.borderBottomWidth,10),D=parseInt(z.paddingBottom,10),Y=H+A+O+D+$,M=Math.min(v.offsetHeight*5,Y),ae=window.getComputedStyle(g),pe=parseInt(ae.paddingTop,10),q=parseInt(ae.paddingBottom,10),oe=E.top+E.height/2-_e,G=L-oe,ee=v.offsetHeight/2,V=v.offsetTop+ee,W=H+A+V,X=Y-W;if(W<=oe){const Q=I.length>0&&v===I[I.length-1].ref.current;i.style.bottom="0px";const Z=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(G,ee+(Q?q:0)+Z+$),ce=W+le;i.style.height=ce+"px"}else{const Q=I.length>0&&v===I[0].ref.current;i.style.top="0px";const le=Math.max(oe,H+g.offsetTop+(Q?pe:0)+ee)+X;i.style.height=le+"px",g.scrollTop=W-oe+g.offsetTop}i.style.margin=`${_e}px 0`,i.style.minHeight=M+"px",i.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,a.trigger,a.valueNode,i,u,g,v,w,a.dir,r]);se(()=>x(),[x]);const[S,T]=f.useState();se(()=>{u&&T(window.getComputedStyle(u).zIndex)},[u]);const N=f.useCallback(E=>{E&&b.current===!0&&(x(),y==null||y(),b.current=!1)},[x,y]);return d.jsx($h,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(j.div,{...n,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});yi.displayName=zh;var Dh="SelectPopperPosition",zr=f.forwardRef((e,t)=>{const{__scopeSelect:o,align:r="start",collisionPadding:n=_e,...a}=e,s=_o(o);return d.jsx(ks,{...s,...a,ref:t,align:r,collisionPadding:n,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});zr.displayName=Dh;var[$h,Dr]=St(lt,{}),$r="SelectViewport",xi=f.forwardRef((e,t)=>{const{__scopeSelect:o,nonce:r,...n}=e,a=Ze($r,o),s=Dr($r,o),i=te(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(No.Slot,{scope:o,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:R(n.onScroll,u=>{const p=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&c){const m=Math.abs(l.current-p.scrollTop);if(m>0){const b=window.innerHeight-_e*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(g,v);if(w<b){const y=w+m,x=Math.min(b,y),S=y-x;c.style.height=x+"px",c.style.bottom==="0px"&&(p.scrollTop=S>0?S:0,c.style.justifyContent="flex-end")}}}l.current=p.scrollTop})})})]})});xi.displayName=$r;var ki="SelectGroup",[Fh,Bh]=St(ki),Hh=f.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=nt();return d.jsx(Fh,{scope:o,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...r,ref:t})})});Hh.displayName=ki;var Si="SelectLabel",Vh=f.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=Bh(Si,o);return d.jsx(j.div,{id:n.id,...r,ref:t})});Vh.displayName=Si;var Po="SelectItem",[Wh,Ci]=St(Po),Ei=f.forwardRef((e,t)=>{const{__scopeSelect:o,value:r,disabled:n=!1,textValue:a,...s}=e,i=Ke(Po,o),l=Ze(Po,o),u=i.value===r,[p,c]=f.useState(a??""),[h,m]=f.useState(!1),b=te(t,y=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,y,r,n)}),g=nt(),v=f.useRef("touch"),w=()=>{n||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Wh,{scope:o,value:r,disabled:n,textId:g,isSelected:u,onItemTextChange:f.useCallback(y=>{c(x=>x||((y==null?void 0:y.textContent)??"").trim())},[]),children:d.jsx(No.ItemSlot,{scope:o,value:r,disabled:n,textValue:p,children:d.jsx(j.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:b,onFocus:R(s.onFocus,()=>m(!0)),onBlur:R(s.onBlur,()=>m(!1)),onClick:R(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:R(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:R(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:R(s.onPointerMove,y=>{var x;v.current=y.pointerType,n?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(s.onPointerLeave,y=>{var x;y.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:R(s.onKeyDown,y=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(Nh.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Ei.displayName=Po;var $t="SelectItemText",Ni=f.forwardRef((e,t)=>{const{__scopeSelect:o,className:r,style:n,...a}=e,s=Ke($t,o),i=Ze($t,o),l=Ci($t,o),u=Ah($t,o),[p,c]=f.useState(null),h=te(t,w=>c(w),l.onItemTextChange,w=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,w,l.value,l.disabled)}),m=p==null?void 0:p.textContent,b=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return se(()=>(g(b),()=>v(b)),[g,v,b]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:l.textId,...a,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Vt.createPortal(a.children,s.valueNode):null]})});Ni.displayName=$t;var Ti="SelectItemIndicator",_i=f.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return Ci(Ti,o).isSelected?d.jsx(j.span,{"aria-hidden":!0,...r,ref:t}):null});_i.displayName=Ti;var Fr="SelectScrollUpButton",Pi=f.forwardRef((e,t)=>{const o=Ze(Fr,e.__scopeSelect),r=Dr(Fr,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx(Ii,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Pi.displayName=Fr;var Br="SelectScrollDownButton",Ai=f.forwardRef((e,t)=>{const o=Ze(Br,e.__scopeSelect),r=Dr(Br,e.__scopeSelect),[n,a]=f.useState(!1),s=te(t,r.onScrollButtonChange);return se(()=>{if(o.viewport&&o.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,p=Math.ceil(l.scrollTop)<u;a(p)};const l=o.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[o.viewport,o.isPositioned]),n?d.jsx(Ii,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Ai.displayName=Br;var Ii=f.forwardRef((e,t)=>{const{__scopeSelect:o,onAutoScroll:r,...n}=e,a=Ze("SelectScrollButton",o),s=f.useRef(null),i=To(o),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),se(()=>{var p;const u=i().find(c=>c.ref.current===document.activeElement);(p=u==null?void 0:u.ref.current)==null||p.scrollIntoView({block:"nearest"})},[i]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:R(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:R(n.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:R(n.onPointerLeave,()=>{l()})})}),Uh="SelectSeparator",jh=f.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e;return d.jsx(j.div,{"aria-hidden":!0,...r,ref:t})});jh.displayName=Uh;var Hr="SelectArrow",Rh=f.forwardRef((e,t)=>{const{__scopeSelect:o,...r}=e,n=_o(o),a=Ke(Hr,o),s=Ze(Hr,o);return a.open&&s.position==="popper"?d.jsx(Ss,{...n,...r,ref:t}):null});Rh.displayName=Hr;var Gh="SelectBubbleInput",Mi=f.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{const n=f.useRef(null),a=te(r,n),s=no(t);return f.useEffect(()=>{const i=n.current;if(!i)return;const l=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&p){const c=new Event("change",{bubbles:!0});p.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(j.select,{...o,style:{...Yn,...o.style},ref:a,defaultValue:t})});Mi.displayName=Gh;function Oi(e){return e===""||e===void 0}function Li(e){const t=fe(e),o=f.useRef(""),r=f.useRef(0),n=f.useCallback(s=>{const i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),a=f.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,n,a]}function zi(e,t,o){const n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let s=Yh(e,Math.max(a,0));n.length===1&&(s=s.filter(u=>u!==o));const l=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==o?l:void 0}function Yh(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var qh=di,Xh=fi,Kh=hi,Zh=gi,Jh=mi,Qh=vi,eg=xi,tg=Ei,og=Ni,rg=_i,ng=Pi,ag=Ai,sg="Separator",Di="horizontal",ig=["horizontal","vertical"],$i=f.forwardRef((e,t)=>{const{decorative:o,orientation:r=Di,...n}=e,a=lg(r)?r:Di,i=o?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return d.jsx(j.div,{"data-orientation":a,...i,...n,ref:t})});$i.displayName=sg;function lg(e){return ig.includes(e)}var cg=$i,Ao="Switch",[dg]=me(Ao),[ug,fg]=dg(Ao),Fi=f.forwardRef((e,t)=>{const{__scopeSwitch:o,name:r,checked:n,defaultChecked:a,required:s,disabled:i,value:l="on",onCheckedChange:u,form:p,...c}=e,[h,m]=f.useState(null),b=te(t,x=>m(x)),g=f.useRef(!1),v=h?p||!!h.closest("form"):!0,[w,y]=Be({prop:n,defaultProp:a??!1,onChange:u,caller:Ao});return d.jsxs(ug,{scope:o,checked:w,disabled:i,children:[d.jsx(j.button,{type:"button",role:"switch","aria-checked":w,"aria-required":s,"data-state":Wi(w),"data-disabled":i?"":void 0,disabled:i,value:l,...c,ref:b,onClick:R(e.onClick,x=>{y(S=>!S),v&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),v&&d.jsx(Vi,{control:h,bubbles:!g.current,name:r,value:l,checked:w,required:s,disabled:i,form:p,style:{transform:"translateX(-100%)"}})]})});Fi.displayName=Ao;var Bi="SwitchThumb",Hi=f.forwardRef((e,t)=>{const{__scopeSwitch:o,...r}=e,n=fg(Bi,o);return d.jsx(j.span,{"data-state":Wi(n.checked),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Hi.displayName=Bi;var pg="SwitchBubbleInput",Vi=f.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...n},a)=>{const s=f.useRef(null),i=te(s,a),l=no(o),u=ao(t);return f.useEffect(()=>{const p=s.current;if(!p)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==o&&m){const b=new Event("click",{bubbles:r});m.call(p,o),p.dispatchEvent(b)}},[l,o,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...n,tabIndex:-1,ref:i,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Vi.displayName=pg;function Wi(e){return e?"checked":"unchecked"}var hg=Fi,gg=Hi,Io="Tabs",[mg]=me(Io,[wo]),Ui=wo(),[vg,Vr]=mg(Io),ji=f.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,onValueChange:n,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,p=Ot(i),[c,h]=Be({prop:r,onChange:n,defaultProp:a??"",caller:Io});return d.jsx(vg,{scope:o,baseId:nt(),value:c,onValueChange:h,orientation:s,dir:p,activationMode:l,children:d.jsx(j.div,{dir:p,"data-orientation":s,...u,ref:t})})});ji.displayName=Io;var Ri="TabsList",Gi=f.forwardRef((e,t)=>{const{__scopeTabs:o,loop:r=!0,...n}=e,a=Vr(Ri,o),s=Ui(o);return d.jsx(Ps,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(j.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});Gi.displayName=Ri;var Yi="TabsTrigger",qi=f.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,disabled:n=!1,...a}=e,s=Vr(Yi,o),i=Ui(o),l=Zi(s.baseId,r),u=Ji(s.baseId,r),p=r===s.value;return d.jsx(As,{asChild:!0,...i,focusable:!n,active:p,children:d.jsx(j.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":u,"data-state":p?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:R(e.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:R(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:R(e.onFocus,()=>{const c=s.activationMode!=="manual";!p&&!n&&c&&s.onValueChange(r)})})})});qi.displayName=Yi;var Xi="TabsContent",Ki=f.forwardRef((e,t)=>{const{__scopeTabs:o,value:r,forceMount:n,children:a,...s}=e,i=Vr(Xi,o),l=Zi(i.baseId,r),u=Ji(i.baseId,r),p=r===i.value,c=f.useRef(p);return f.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Ee,{present:n||p,children:({present:h})=>d.jsx(j.div,{"data-state":p?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&a})})});Ki.displayName=Xi;function Zi(e,t){return`${e}-trigger-${t}`}function Ji(e,t){return`${e}-content-${t}`}var bg=ji,wg=Gi,yg=qi,xg=Ki,[Mo]=me("Tooltip",[bo]),Oo=bo(),Qi="TooltipProvider",kg=700,Wr="tooltip.open",[Sg,Ur]=Mo(Qi),el=e=>{const{__scopeTooltip:t,delayDuration:o=kg,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(Sg,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:n,children:a})};el.displayName=Qi;var Ft="Tooltip",[Cg,Bt]=Mo(Ft),tl=e=>{const{__scopeTooltip:t,children:o,open:r,defaultOpen:n,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Ur(Ft,e.__scopeTooltip),u=Oo(t),[p,c]=f.useState(null),h=nt(),m=f.useRef(0),b=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[w,y]=Be({prop:r,defaultProp:n??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Wr))):l.onClose(),a==null||a(E)},caller:Ft}),x=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,y(!0)},[y]),T=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),N=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,y(!0),m.current=0},g)},[g,y]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(ys,{...u,children:d.jsx(Cg,{scope:t,contentId:h,open:w,stateAttribute:x,trigger:p,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?N():S()},[l.isOpenDelayedRef,N,S]),onTriggerLeave:f.useCallback(()=>{b?T():(window.clearTimeout(m.current),m.current=0)},[T,b]),onOpen:S,onClose:T,disableHoverableContent:b,children:o})})};tl.displayName=Ft;var jr="TooltipTrigger",ol=f.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Bt(jr,o),a=Ur(jr,o),s=Oo(o),i=f.useRef(null),l=te(t,i,n.onTriggerChange),u=f.useRef(!1),p=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(xs,{asChild:!0,...s,children:d.jsx(j.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!p.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),p.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{n.onTriggerLeave(),p.current=!1}),onPointerDown:R(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:R(e.onBlur,n.onClose),onClick:R(e.onClick,n.onClose)})})});ol.displayName=jr;var Rr="TooltipPortal",[Eg,Ng]=Mo(Rr,{forceMount:void 0}),rl=e=>{const{__scopeTooltip:t,forceMount:o,children:r,container:n}=e,a=Bt(Rr,t);return d.jsx(Eg,{scope:t,forceMount:o,children:d.jsx(Ee,{present:o||a.open,children:d.jsx(tr,{asChild:!0,container:n,children:r})})})};rl.displayName=Rr;var Ct="TooltipContent",nl=f.forwardRef((e,t)=>{const o=Ng(Ct,e.__scopeTooltip),{forceMount:r=o.forceMount,side:n="top",...a}=e,s=Bt(Ct,e.__scopeTooltip);return d.jsx(Ee,{present:r||s.open,children:s.disableHoverableContent?d.jsx(al,{side:n,...a,ref:t}):d.jsx(Tg,{side:n,...a,ref:t})})}),Tg=f.forwardRef((e,t)=>{const o=Bt(Ct,e.__scopeTooltip),r=Ur(Ct,e.__scopeTooltip),n=f.useRef(null),a=te(t,n),[s,i]=f.useState(null),{trigger:l,onClose:u}=o,p=n.current,{onPointerInTransitChange:c}=r,h=f.useCallback(()=>{i(null),c(!1)},[c]),m=f.useCallback((b,g)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=Ig(w,v.getBoundingClientRect()),x=Mg(w,y),S=Og(g.getBoundingClientRect()),T=zg([...x,...S]);i(T),c(!0)},[c]);return f.useEffect(()=>()=>h(),[h]),f.useEffect(()=>{if(l&&p){const b=v=>m(v,p),g=v=>m(v,l);return l.addEventListener("pointerleave",b),p.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),p.removeEventListener("pointerleave",g)}}},[l,p,m,h]),f.useEffect(()=>{if(s){const b=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},y=(l==null?void 0:l.contains(v))||(p==null?void 0:p.contains(v)),x=!Lg(w,s);y?h():x&&(h(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,p,s,u,h]),d.jsx(al,{...e,ref:a})}),[_g,Pg]=Mo(Ft,{isInside:!1}),Ag=Ld("TooltipContent"),al=f.forwardRef((e,t)=>{const{__scopeTooltip:o,children:r,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=Bt(Ct,o),u=Oo(o),{onClose:p}=l;return f.useEffect(()=>(document.addEventListener(Wr,p),()=>document.removeEventListener(Wr,p)),[p]),f.useEffect(()=>{if(l.trigger){const c=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&p()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,p]),d.jsx(Jo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:p,children:d.jsxs(ks,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(Ag,{children:r}),d.jsx(_g,{scope:o,isInside:!0,children:d.jsx(Vd,{id:l.contentId,role:"tooltip",children:n||r})})]})})});nl.displayName=Ct;var sl="TooltipArrow",il=f.forwardRef((e,t)=>{const{__scopeTooltip:o,...r}=e,n=Oo(o);return Pg(sl,o).isInside?null:d.jsx(Ss,{...n,...r,ref:t})});il.displayName=sl;function Ig(e,t){const o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(o,r,n,a)){case a:return"left";case n:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Mg(e,t,o=5){const r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function Og(e){const{top:t,right:o,bottom:r,left:n}=e;return[{x:n,y:t},{x:o,y:t},{x:o,y:r},{x:n,y:r}]}function Lg(e,t){const{x:o,y:r}=e;let n=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,p=i.y,c=l.x,h=l.y;p>r!=h>r&&o<(c-u)*(r-p)/(h-p)+u&&(n=!n)}return n}function zg(e){const t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),Dg(t)}function Dg(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))t.pop();else break}t.push(n)}t.pop();const o=[];for(let r=e.length-1;r>=0;r--){const n=e[r];for(;o.length>=2;){const a=o[o.length-1],s=o[o.length-2];if((a.x-s.x)*(n.y-s.y)>=(a.y-s.y)*(n.x-s.x))o.pop();else break}o.push(n)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var $g=el,Fg=tl,Bg=ol,Hg=rl,Vg=nl,Wg=il;const Ug=qt("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all cursor-pointer outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ll({className:e,variant:t="default",size:o="default",asChild:r=!1,...n}){const a=r?Rn:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":o,className:U(Ug({variant:t,size:o,className:e})),...n})}const jg={amber:"bg-amber-100 text-amber-800",blue:"bg-blue-100 text-blue-800",emerald:"bg-emerald-100 text-emerald-800",red:"bg-red-100 text-red-800",purple:"bg-purple-100 text-purple-800",pink:"bg-pink-100 text-pink-800",gray:"bg-gray-100 text-gray-800"},Rg=qt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] 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 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Gg({className:e,variant:t="default",hue:o,asChild:r=!1,...n}){const a=r?Rn:"span",s=o?jg[o]:void 0;return d.jsx(a,{"data-slot":"badge","data-variant":t,className:U(Rg({variant:t}),s,e),...n})}function Yg({className:e,type:t,...o}){return d.jsx("input",{type:t,"data-slot":"input",className:U("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),...o})}function qg({className:e,...t}){return d.jsx("textarea",{"data-slot":"textarea",className:U("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground 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 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function Xg({...e}){return d.jsx(qh,{"data-slot":"select",...e})}function Kg({...e}){return d.jsx(Kh,{"data-slot":"select-value",...e})}function Zg({className:e,size:t="default",children:o,...r}){return d.jsxs(Xh,{"data-slot":"select-trigger","data-size":t,className:U("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),...r,children:[o,d.jsx(Zh,{asChild:!0,children:d.jsx(hn,{className:"size-4 opacity-50"})})]})}function Jg({className:e,children:t,position:o="item-aligned",align:r="center",...n}){return d.jsx(Jh,{children:d.jsxs(Qh,{"data-slot":"select-content",className:U("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",o==="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:o,align:r,...n,children:[d.jsx(em,{}),d.jsx(eg,{className:U("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),d.jsx(tm,{})]})})}function Qg({className:e,children:t,...o}){return d.jsxs(tg,{"data-slot":"select-item",className:U("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),...o,children:[d.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(rg,{children:d.jsx(pn,{className:"size-4"})})}),d.jsx(og,{children:t})]})}function em({className:e,...t}){return d.jsx(ng,{"data-slot":"select-scroll-up-button",className:U("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Tc,{className:"size-4"})})}function tm({className:e,...t}){return d.jsx(ag,{"data-slot":"select-scroll-down-button",className:U("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(hn,{className:"size-4"})})}function om({className:e,...t}){return d.jsx(Da,{"data-slot":"checkbox",className:U("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-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-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",e),...t,children:d.jsx(Fa,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:d.jsx(pn,{className:"size-3.5"})})})}function rm({className:e,size:t="default",...o}){return d.jsx(hg,{"data-slot":"switch","data-size":t,className:U("peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",e),...o,children:d.jsx(gg,{"data-slot":"switch-thumb",className:U("pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground")})})}function nm({className:e,...t}){return d.jsx(jp,{"data-slot":"label",className:U("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 am({className:e,...t}){return d.jsx(lh,{"data-slot":"radio-group",className:U("grid gap-3",e),...t})}function sm({className:e,...t}){return d.jsx(ch,{"data-slot":"radio-group-item",className:U("aspect-square size-4 shrink-0 rounded-full border border-input text-primary 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 dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t,children:d.jsx(dh,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:d.jsx(Ac,{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"})})})}function im({className:e,orientation:t="horizontal",decorative:o=!0,...r}){return d.jsx(cg,{"data-slot":"separator",decorative:o,orientation:t,className:U("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function lm({className:e,orientation:t="horizontal",...o}){return d.jsx(bg,{"data-slot":"tabs","data-orientation":t,orientation:t,className:U("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...o})}const cm=qt("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function dm({className:e,variant:t="default",...o}){return d.jsx(wg,{"data-slot":"tabs-list","data-variant":t,className:U(cm({variant:t}),e),...o})}function um({className:e,...t}){return d.jsx(yg,{"data-slot":"tabs-trigger",className:U("cursor-pointer relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function fm({className:e,...t}){return d.jsx(xg,{"data-slot":"tabs-content",className:U("flex-1 outline-none",e),...t})}function pm({className:e,children:t,...o}){return d.jsxs(kh,{"data-slot":"scroll-area",className:U("relative",e),...o,children:[d.jsx(Sh,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),d.jsx(hm,{}),d.jsx(Ch,{})]})}function hm({className:e,orientation:t="vertical",...o}){return d.jsx(ei,{"data-slot":"scroll-area-scrollbar",orientation:t,className:U("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...o,children:d.jsx(ni,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Gr({className:e,size:t="default",...o}){return d.jsx(hf,{"data-slot":"avatar","data-size":t,className:U("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",e),...o})}function Yr({className:e,...t}){return d.jsx(gf,{"data-slot":"avatar-image",className:U("aspect-square size-full",e),...t})}function qr({className:e,...t}){return d.jsx(mf,{"data-slot":"avatar-fallback",className:U("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...t})}function gm({className:e,...t}){return d.jsx("div",{"data-slot":"skeleton",className:U("animate-pulse rounded-md bg-accent",e),...t})}function mm({delayDuration:e=0,...t}){return d.jsx($g,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vm({...e}){return d.jsx(Fg,{"data-slot":"tooltip",...e})}function bm({...e}){return d.jsx(Bg,{"data-slot":"tooltip-trigger",...e})}function wm({className:e,sideOffset:t=0,children:o,...r}){return d.jsx(Hg,{children:d.jsxs(Vg,{"data-slot":"tooltip-content",sideOffset:t,className:U("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 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",e),...r,children:[o,d.jsx(Wg,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function ym({className:e,value:t,...o}){return d.jsx(Zp,{"data-slot":"progress",className:U("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...o,children:d.jsx(Jp,{"data-slot":"progress-indicator",className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const xm=qt("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function km({className:e,variant:t,...o}){return d.jsx("div",{"data-slot":"alert",role:"alert",className:U(xm({variant:t}),e),...o})}function Sm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-title",className:U("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function Cm({className:e,...t}){return d.jsx("div",{"data-slot":"alert-description",className:U("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Em({...e}){return d.jsx(eu,{"data-slot":"collapsible",...e})}function Nm({...e}){return d.jsx(Jn,{"data-slot":"collapsible-trigger",...e})}function Tm({...e}){return d.jsx(Qn,{"data-slot":"collapsible-content",...e})}const cl={"arrow-left":Sc,calendar:Ec,"check-circle-2":mn,"chevron-left":Nc,"chevron-right":Vo,clock:Ic,"credit-card":Mc,"external-link":Oc,"help-circle":_c,info:jt,"loader-2":Wo,mail:Uo,"map-pin":Lc,"message-circle":zc,"message-square":vn,package:$c,phone:Fc,search:Bc,"shopping-bag":Hc,sparkles:Vc,truck:Uc,user:bn,"x-circle":Pc,"alert-circle":gn,"book-open":Cc},dl={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8",10:"gap-10",12:"gap-12"},ul={default:"text-foreground",muted:"text-muted-foreground",destructive:"text-destructive"},fl=e=>typeof e=="number"?dl[String(e)]??"gap-2":typeof e=="string"?dl[e.trim()]??"gap-2":"gap-2",_m=({children:e,className:t,onClick:o})=>d.jsx(At,{className:t,onClick:o,children:e}),Pm=({children:e,className:t})=>d.jsx(It,{className:t,children:e}),Am=({children:e,className:t})=>d.jsx(Md,{className:t,children:e}),Im=({children:e,className:t,onClick:o,variant:r,size:n,disabled:a,title:s})=>d.jsx(ll,{className:t,variant:r,size:n,onClick:o,disabled:a,title:s,children:e}),Mm=({children:e,className:t,variant:o,hue:r,tone:n})=>d.jsx(Gg,{className:U(ul[n]??"",t),variant:o,hue:r,children:e}),Om=({className:e,onChange:t,...o})=>d.jsx(Yg,{className:e,onChange:t,...o}),Lm=({className:e,onChange:t,...o})=>d.jsx(qg,{className:e,onChange:t,...o}),zm=({children:e,className:t,value:o,defaultValue:r,onChange:n,placeholder:a,disabled:s})=>d.jsxs(Xg,{value:o,defaultValue:r,onValueChange:i=>{const l=n;l==null||l({target:{value:i}})},disabled:s,children:[d.jsx(Zg,{className:t,children:d.jsx(Kg,{placeholder:a})}),d.jsx(Jg,{style:{zIndex:"calc(var(--widget-z, 1000) + 1)"},children:e})]}),Dm=({children:e,value:t,disabled:o,className:r})=>d.jsx(Qg,{value:t,disabled:o,className:r,children:e}),$m=({checked:e,onChange:t,disabled:o,className:r,id:n})=>{const a=e!==void 0,s=t;return d.jsx(om,{...a?{checked:e==="true"||e===!0}:{},onCheckedChange:i=>s==null?void 0:s({target:{value:String(i)}}),disabled:o,className:r,id:n})},Fm=({checked:e,onChange:t,disabled:o,size:r,className:n,id:a})=>{const s=e!==void 0,i=t;return d.jsx(rm,{...s?{checked:e==="true"||e===!0}:{},onCheckedChange:l=>i==null?void 0:i({target:{value:String(l)}}),disabled:o,size:r,className:n,id:a})},Bm=({children:e,htmlFor:t,className:o})=>d.jsx(nm,{htmlFor:t,className:o,children:e}),Hm=({children:e,value:t,defaultValue:o,onChange:r,className:n})=>d.jsx(am,{value:t,defaultValue:o,onValueChange:a=>{const s=r;s==null||s({target:{value:a}})},className:n,children:e}),Vm=({value:e,disabled:t,className:o,id:r})=>d.jsx(sm,{value:e,disabled:t,className:o,id:r}),Wm=({className:e})=>d.jsx(im,{className:e}),Um=({children:e,defaultValue:t,className:o})=>{const[r,n]=k.useState(t);return d.jsx(lm,{value:r,onValueChange:n,className:o,children:e})},jm=({children:e,className:t})=>d.jsx(dm,{className:t,children:e}),Rm=({children:e,value:t,className:o})=>d.jsx(um,{className:o,value:t,children:e}),Gm=({children:e,value:t,className:o})=>d.jsx(fm,{className:o,value:t,children:e}),Ym=({children:e,className:t})=>d.jsx(pm,{className:t,children:e}),qm=({src:e,alt:t,className:o})=>{var r;return d.jsxs(Gr,{className:o,children:[d.jsx(Yr,{src:e,alt:t}),d.jsx(qr,{children:((r=t==null?void 0:t.charAt(0))==null?void 0:r.toUpperCase())||"?"})]})},Xm=({width:e,height:t,className:o})=>d.jsx(gm,{className:o,style:{width:e,height:t}}),Km=({children:e,content:t,className:o})=>d.jsx(mm,{children:d.jsxs(vm,{children:[d.jsx(bm,{asChild:!0,children:d.jsx("span",{className:o,children:e})}),d.jsx(wm,{children:d.jsx("p",{children:String(t)})})]})}),Zm=({value:e,className:t})=>d.jsx(ym,{value:typeof e=="string"?Number(e):e,className:t}),Jm={default:jt,destructive:gn},Qm=({children:e,variant:t,title:o,className:r})=>{const n=t,a=Jm[n||"default"]||jt;return d.jsxs(km,{variant:n,className:r,children:[d.jsx(a,{className:"size-4"}),o?d.jsx(Sm,{children:String(o)}):null,e?d.jsx(Cm,{children:e}):null]})},ev=({children:e,defaultOpen:t,className:o})=>d.jsx(Em,{defaultOpen:t==="true"||t===!0,className:o,children:e}),tv=({children:e,className:t})=>d.jsxs(Nm,{className:U("flex items-center gap-1 cursor-pointer text-sm font-medium [&[data-state=open]>svg]:rotate-90",t),children:[d.jsx(Vo,{className:"size-4 shrink-0 transition-transform duration-200"}),e]}),ov=({children:e,className:t})=>d.jsx(Tm,{className:t,children:e}),rv=({children:e,className:t,tone:o})=>d.jsx("p",{className:U("text-sm",ul[o]??"",t),children:e}),nv=({children:e,className:t,level:o})=>{const r=`h${o||"2"}`;return d.jsx(r,{className:U("font-semibold tracking-tight",t),children:e})},av=({children:e,className:t,direction:o,gap:r})=>{const n=o==="row"?"flex-row":"flex-col",a=fl(r);return d.jsx("div",{className:U("flex",n,a,t),children:e})},sv=({children:e,className:t,gap:o})=>{const r=fl(o);return d.jsx("div",{className:U("flex flex-row items-center",r,t),children:e})},iv=({children:e,className:t,href:o,target:r,rel:n})=>d.jsx("a",{href:o,target:r,rel:n,className:t,children:e}),lv=({title:e,children:t,className:o})=>d.jsxs(At,{className:U("overflow-hidden p-0 gap-0 shadow-sm",o),children:[e?d.jsx(It,{className:"px-6 py-3",children:d.jsx("h3",{className:"text-xs font-semibold tracking-wider text-muted-foreground",children:String(e)})}):null,d.jsx("div",{className:"flex flex-col gap-0 divide-y divide-border",children:t})]}),cv=({icon:e,label:t,description:o,onClick:r,className:n})=>{const a=e,s="size-5",i=a?cl[a]:null;return d.jsxs("button",{type:"button",className:U("w-full h-auto px-6 py-6 flex items-center gap-2 justify-start cursor-pointer text-left rounded-none transition-colors hover:bg-accent/70",n),onClick:r,children:[i&&d.jsx(i,{className:`${s} shrink-0 text-muted-foreground`}),d.jsxs("div",{className:"flex flex-col gap-0 flex-1 min-w-0 items-start",children:[t?d.jsx("p",{className:"font-medium text-sm text-foreground",children:String(t)}):null,o?d.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:String(o)}):null]}),d.jsx(Vo,{className:"mr-1 size-4 shrink-0 text-muted-foreground"})]})},dv=({name:e,size:t,className:o})=>{const n={sm:"size-3",md:"size-5",lg:"size-6"}[t]??"size-4",a=e,s=cl[a],i=a==="sparkles"?"sparkle-icon":"";return s?d.jsx(s,{className:U(n,i,o)}):d.jsx("span",{className:U("inline-block",n,i,o),"data-icon":a})},uv=()=>({"ui-card":_m,"ui-card-content":Pm,"ui-card-header":Am,"ui-button":Im,"ui-text":rv,"ui-heading":nv,"ui-badge":Mm,"ui-input":Om,"ui-textarea":Lm,"ui-select":zm,"ui-select-option":Dm,"ui-checkbox":$m,"ui-switch":Fm,"ui-label":Bm,"ui-radio-group":Hm,"ui-radio-group-item":Vm,"ui-stack":av,"ui-inline":sv,"ui-separator":Wm,"ui-tabs":Um,"ui-tabs-list":jm,"ui-tabs-trigger":Rm,"ui-tabs-content":Gm,"ui-scroll-area":Ym,"ui-avatar":qm,"ui-icon":dv,"ui-link":iv,"ui-menu-item":cv,"ui-menu":lv,"ui-skeleton":Xm,"ui-tooltip":Km,"ui-progress":Zm,"ui-alert":Qm,"ui-collapsible":ev,"ui-collapsible-trigger":tv,"ui-collapsible-content":ov}),pl="/api/ecommerce",hl=async(e,t)=>{const o=t?`${t.replace(/\/$/,"")}${pl}`:pl,r=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await r.json();if(!r.ok)throw new Error(n.error||"API request failed");return n.data},fv=({className:e})=>d.jsxs("svg",{width:"100%",height:"100%",viewBox:"0 0 190 190",version:"1.1",className:e,children:[d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M344.73,67.03C344.73,30.01 314.72,0 277.7,0C240.68,0 210.67,30.01 210.67,67.03L255.36,67.03C255.36,54.69 265.36,44.69 277.7,44.69C290.04,44.69 300.05,54.69 300.05,67.03L344.73,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M300.04,67.03C300.04,54.69 290.05,44.69 277.7,44.69C265.35,44.69 255.36,54.69 255.36,67.03L300.04,67.03Z",fill:"rgb(232,218,234)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M166,67.03C166,104.05 196.01,134.06 233.03,134.06C270.05,134.06 300.06,104.05 300.06,67.03L255.37,67.03C255.37,79.37 245.37,89.37 233.03,89.37C220.69,89.37 210.69,79.37 210.69,67.03L166,67.03Z",fill:"rgb(15,13,25)"})}),d.jsx("g",{transform:"matrix(1,0,0,1,-160.365,27.97)",children:d.jsx("path",{d:"M210.68,67.03C210.68,79.37 220.68,89.37 233.03,89.37C245.38,89.37 255.37,79.37 255.37,67.03L210.68,67.03Z",fill:"rgb(252,248,161)"})})]}),gl="stackable-dev-badge-styles",pv=()=>{if(typeof document>"u"||document.getElementById(gl))return;const e=document.createElement("style");e.id=gl,e.textContent=`
|
|
266
266
|
@keyframes stackable-icon-wiggle {
|
|
267
267
|
0% { transform: rotate(0deg); }
|
|
268
268
|
70% { transform: rotate(200deg); }
|
|
269
269
|
85% { transform: rotate(175deg); }
|
|
270
270
|
100% { transform: rotate(180deg); }
|
|
271
271
|
}
|
|
272
|
-
`,document.head.appendChild(e)},hv=e=>{const t=e.some(o=>o.mode==="staging"),r=e.some(o=>o.mode==="dev");return t&&r?"Dev + Staging":t?"Staging Mode":"Dev Mode"},gv=e=>e.mode==="staging"?"STAGING":"DEV",mv=({className:e="",extensions:t=[],tokenErrors:r=new Map})=>{const[o,n]=k.useState([]),[a,s]=k.useState(!1),[i,l]=k.useState(!1),[u,p]=k.useState(!1),c=k.useRef(null),h=r.size>0;if(k.useEffect(()=>{pv()},[]),k.useEffect(()=>{if(!h)return;const b=()=>{p(!0),setTimeout(()=>p(!1),600)};b();const g=setInterval(b,4e3);return()=>clearInterval(g)},[h]),k.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=cn(window.location.search);n(v)};b();const g=()=>b();return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[]),o.length===0)return null;const m=b=>{if(b.stopPropagation(),typeof window>"u")return;const g=new URL(window.location.href);g.searchParams.delete("_stackable_dev"),g.searchParams.delete("_stackable_staging"),window.location.href=g.toString()};return d.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||u?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&d.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${h?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:o.map((b,g)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:g<o.length-1?"1px solid #f3f4f6":"none"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[d.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:b.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:b.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:gv(b)}),d.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((v=t.find(w=>w.id===b.extensionId))==null?void 0:v.manifest.name)||b.extensionId})]}),d.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:b.bundleUrl,children:["→ ",b.bundleUrl]}),r.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",r.get(b.extensionId)]})]},b.extensionId)})}),d.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:h?"#dc2626":"#eab308",color:h?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[d.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||u?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:d.jsx(fv,{className:"w-6 h-6"})}),d.jsx("span",{children:hv(o)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",o.length," extension",o.length>1?"s":"",")"]}),d.jsx("button",{onClick:m,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},vv=800,Mr=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,bv=async(e,t,r,o)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=o.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,p=Mr(t,"/proxy-token"),c=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:m}=await c.json();n.set(s.id,{token:h,encryptionKey:m})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},wv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),yv=({instanceId:e,apiBase:t,hostBase:r,appId:o,children:n,customerId:a,customerEmail:s})=>{const[i,l]=k.useState([]),[u,p]=k.useState([]),[c,h]=k.useState(new Map),[m,b]=k.useState(new Map),[g,v]=k.useState(!1);k.useEffect(()=>{(async()=>{const y=e;try{if(!y){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),l([]),v(!0);return}if(!t||!o){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),l([]),v(!0);return}const S=await fetch(Mr(t,`/instances/${o}/${y}`));if(!S.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${y}`),l([]),v(!0);return}const T=await S.json(),C=cn(typeof window<"u"?window.location.search:""),E=await mc(T,C),{tokens:N,errors:_}=await bv(E,t,o,C);l(E),p(C),h(new Map(N)),b(_)}catch(S){console.error("Failed to load extensions:",S)}finally{v(!0)}})()},[e,o,t]),k.useEffect(()=>{if(!t||!o||i.length===0)return;const y=setInterval(async()=>{const S=[];await Promise.all(i.filter(T=>T.manifest.permissions.includes("data:fetch")).map(async T=>{const C=u.find($=>$.extensionId===T.id),E=C==null?void 0:C.token,N=C==null?void 0:C.mode,_=Mr(t,"/proxy-token"),O=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:T.id,...N&&{mode:N},...E&&{devSessionToken:E}})});if(O.ok){const{token:$,encryptionKey:W}=await O.json();S.push([T.id,{token:$,encryptionKey:W}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${T.id} (${O.status}) — using stale token`)})),S.length>0&&h(T=>{const C=new Map(T);for(const[E,N]of S)C.set(E,N);return C})},3300*1e3);return()=>clearInterval(y)},[i,u,t,o]),k.useEffect(()=>{if(c.size===0)return;const x=y=>{const S=y.data;if((S==null?void 0:S.type)!=="extension-ready")return;const T=S.extensionId,C=i.find(_=>_.id===T);if(!(C!=null&&C.bundleUrl))return;const E=u.find(_=>_.extensionId===T);if(pc(C.bundleUrl)&&(E==null?void 0:E.mode)!=="staging")return;const N=c.get(T);N&&Ht(T,{type:"extension-encryption-key",encryptionKey:N.encryptionKey})};return window.addEventListener("message",x),()=>window.removeEventListener("message",x)},[i,u,c]);const w=k.useMemo(()=>({"data.query":async x=>pl(x,r),"data.fetch":async(x,y)=>{const S=c.get(x);if(!S)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const T=wv(y)?y:{url:y.url,method:y.method??"GET",headers:y.headers??{},body:y.body??null},C=Mr(t,"/proxy"),E=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":x,"X-Application-Id":o??"",Authorization:`Bearer ${S.token}`},body:JSON.stringify(T)}),N=await E.json();return{status:N.status??E.status,ok:N.ok??E.ok,data:N.data}},"actions.toast":async(x,y)=>{const S={...y.description&&{description:y.description},...y.duration&&{duration:y.duration},...y.position&&{position:y.position},...y.dismissible!=null&&{dismissible:y.dismissible},...y.closeButton!=null&&{closeButton:y.closeButton}};if(y.fetch){const T=E=>new Promise(N=>setTimeout(N,E)),C=Promise.all([w["data.fetch"](x,y.fetch),T(vv)]).then(([E])=>E);ft.promise(C,{loading:y.loading??y.message,success:y.success??y.message,error:y.error??"Something went wrong",...S});return}switch(y.type){case"success":{ft.success(y.message,S);break}case"error":{ft.error(y.message,S);break}case"warning":{ft.warning(y.message,S);break}case"info":{ft.info(y.message,S);break}default:ft(y.message,S)}},"actions.invoke":async x=>(window.dispatchEvent(new CustomEvent(`ext-action-${x.action}`,{detail:x})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??""})}),[t,o,r,a,s,c]);return g?d.jsxs(d.Fragment,{children:[d.jsx(Ll,{extensions:i,capabilityHandlers:w,components:uv(),children:n}),d.jsx(mv,{extensions:i,tokenErrors:m})]}):null};var xv=(e,t,r,o,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function p(m){(Array.isArray(e)?e:[e]).forEach(b=>{let g=b==="class",v=g&&a?n.map(w=>a[w]||w):n;g?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(b,m)}),c(m)}function c(m){i&&u.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)p(o);else try{let m=localStorage.getItem(t)||r,b=s&&m==="system"?h():m;p(b)}catch{}},kv=f.createContext(void 0),Sv={setTheme:e=>{},themes:[]},Cv=()=>{var e;return(e=f.useContext(kv))!=null?e:Sv};f.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:o,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let p=JSON.stringify([r,t,a,e,i,s,o,n]).slice(1,-1);return f.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${xv.toString()})(${p})`}})});const Ev=({...e})=>{const{theme:t="system"}=Cv();return d.jsx(fc,{theme:t,className:"toaster group",icons:{success:d.jsx(gn,{className:"size-4"}),info:d.jsx(Ut,{className:"size-4"}),warning:d.jsx(Wc,{className:"size-4"}),error:d.jsx(Dc,{className:"size-4"}),loading:d.jsx(Hr,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Nv={dark:"dark",light:"widget-theme-light"},Tv={dark:"dark",light:"light"},_v=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Nv[t],style:{position:"relative",transform:"translateZ(0)"},children:[d.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:d.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),d.jsx(Ev,{position:"bottom-center",theme:Tv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Pv=({onClick:e,icon:t=kc})=>d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(il,{className:"h-12 w-12 rounded-full",size:"icon",onClick:e,children:d.jsx(t,{className:"h-6 w-6"})})}),Av=({children:e,icon:t,theme:r})=>{const[o,n]=k.useState(!1),[a,s]=k.useState(!0),i=k.useCallback(()=>{n(l=>!l)},[]);return k.useEffect(()=>{const l=()=>n(m=>!m),u=()=>n(!0),p=()=>n(!1),c=()=>s(!0),h=()=>{n(!1),s(!1)};return window.addEventListener("ext-action-toggle",l),window.addEventListener("ext-action-open",u),window.addEventListener("ext-action-close",p),window.addEventListener("ext-action-show",c),window.addEventListener("ext-action-hide",h),()=>{window.removeEventListener("ext-action-open",u),window.removeEventListener("ext-action-close",p),window.removeEventListener("ext-action-toggle",l),window.removeEventListener("ext-action-show",c),window.removeEventListener("ext-action-hide",h)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Pv,{onClick:i,icon:t}),o&&d.jsx("div",{"data-id":"widget-container",className:"overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl",style:{"--widget-z":1e3},children:d.jsx(_v,{theme:r,children:e})})]})},Iv=({href:e,children:t})=>d.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),Mv=(e,t)=>{const[r,o]=k.useState(null),[n,a]=k.useState(!1),[s,i]=k.useState(null);return k.useEffect(()=>{if(!e){o(null);return}(async()=>{a(!0),i(null);try{const u=await pl({action:"getCustomer",customerId:e},t);o(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:r,loading:n,error:s}},Ov=({customerId:e,customerEmail:t,hostBase:r,children:o})=>{var l,u;const{customer:n,loading:a,error:s}=Mv(e,r);if(a)return d.jsx(Pt,{className:"border-none shadow-none bg-transparent",children:d.jsx(At,{className:"flex items-center justify-center p-6",children:d.jsx(Hr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const p=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=p.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(Pt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(At,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Ro,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Go,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(p)}&background=7c3aed&color=fff&size=128`,alt:p}),d.jsx(Yo,{className:"text-lg",children:c})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:p})]}),t&&d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(Vr,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:o})]})]}),d.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(Pt,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(At,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Ro,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Go,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(Yo,{className:"text-lg",children:i})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:n.name})]}),d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(Vr,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:o})]})]})})})},gl=(e,t)=>{k.useEffect(()=>{const r=t.current;if(!r)return;let o=document.getElementById(e);o||(o=document.createElement("div"),o.id=e,o.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(o));const n=new MutationObserver(()=>{for(;o.firstChild;)r.appendChild(document.adoptNode(o.firstChild))});return n.observe(o,{childList:!0,subtree:!0}),()=>{n.disconnect(),o==null||o.remove()}},[e,t])},Lv=({customization:e})=>{const t=k.useRef(null);return gl("widget_conversations",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},zv=({customization:e})=>{const t=k.useRef(null);return gl("widget_messages",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},qo=25,Xo=75,Dv=({header:e,buttons:t,hostBase:r,customerId:o="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(qo,Math.min(Xo,a)),[i,l]=k.useState("account"),[u,p]=k.useState(s),[c,h]=k.useState(!1),[m,b]=k.useState(!1),[g,v]=k.useState(!1),w=k.useRef(null),x=k.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",conversationList:{targetElement:"#widget_conversations"},messageLog:{targetElement:"#widget_messages"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},conversationList:{hideHeader:!0,hideNewConversationButton:!0},messageLog:{hideHeader:!0}}),!0),[]);k.useEffect(()=>{if(x()){b(!0);return}const C=setInterval(()=>{x()&&(b(!0),clearInterval(C))},100),E=setTimeout(()=>{clearInterval(C),console.warn("Zendesk widget failed to load after 10 seconds")},1e4);return()=>{clearInterval(C),clearTimeout(E)}},[x]);const y=k.useCallback(C=>{const{detail:E}=C;!window.zE||!(E!=null&&E.payload)||window.zE("messenger:ui","newConversation",E.payload)},[]);k.useEffect(()=>(window.addEventListener("ext-action-newConversation",y),()=>{window.removeEventListener("ext-action-newConversation",y)}),[y]),k.useEffect(()=>{if(!g)return;const C=N=>{if(!w.current)return;const _=w.current.getBoundingClientRect();if((c?_.width:_.height)===0)return;const $=c?(N.clientX-_.left)/_.width*100:(N.clientY-_.top)/_.height*100,W=Math.max(qo,Math.min(Xo,$));p(W)},E=()=>{v(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",C),window.addEventListener("mouseup",E),window.addEventListener("blur",E),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",E),window.removeEventListener("blur",E),document.body.style.cursor="",document.body.style.userSelect=""}},[g,c]),k.useEffect(()=>{if(!w.current)return;const C=w.current,E=()=>{const _=getComputedStyle(C).flexDirection==="row";h(_)};E();const N=new ResizeObserver(E);return N.observe(C),()=>{N.disconnect()}},[]);const S=k.useCallback(C=>{if(C.detail===2){p(s);return}C.preventDefault(),v(!0)},[s]),T={customerId:o,customerEmail:n};return d.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[d.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),d.jsxs("div",{ref:w,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${u}%`},children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsx("h2",{className:"font-semibold text-sm text-foreground",children:i==="account"?"My Account":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex mr-1 gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[t,d.jsx("button",{onClick:()=>l("account"),className:B("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",i==="account"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Account",children:d.jsx(vn,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>l("conversations"),className:B("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",i==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(mn,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:B("flex flex-col gap-2",i==="conversations"&&"hidden"),children:[d.jsx(Ov,{customerId:o,customerEmail:n,hostBase:r,children:d.jsx(Vt,{target:"slot.header",context:T,className:"flex-none"})}),d.jsx(Vt,{target:"slot.content",context:T,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:B("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",i==="account"&&"hidden"),children:d.jsx(Lv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:`${100-u}%`},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:d.jsx(zv,{})}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[d.jsx(Vt,{target:"slot.footer",context:T,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Iv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Vt,{target:"slot.footer-links",context:T,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:C,index:E})=>d.jsxs(d.Fragment,{children:[E===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),C]})})]})]}),d.jsx("div",{className:B("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${u}%`}:{top:`${u}%`},onMouseDown:S,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":qo,"aria-valuemax":Xo,"aria-valuenow":Math.round(u),children:d.jsx("div",{className:B("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",g?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),g&&d.jsx("div",{className:B("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>v(!1)})]})]})},$v="ze-snippet",ml=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Fv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:r=!1,scriptId:o=$v}=t;window.zEMessenger={autorender:r};const n=document.getElementById(o);if(n){if(n.getAttribute("src")===ml(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=o,i.src=ml(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Bv=({snippetKey:e,instanceId:t,hostBase:r,apiBase:o,appId:n,theme:a,customerId:s,customerEmail:i})=>{const l=a==="dark"||a==="light"?a:"inherit";return k.useEffect(()=>{e&&Fv(e).catch(u=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",u)})},[e]),d.jsx(yv,{instanceId:t,hostBase:r,apiBase:o,appId:n,customerId:s,customerEmail:i,children:d.jsx(Av,{theme:l,children:d.jsx(Dv,{hostBase:r,customerId:s,customerEmail:i,primaryPercent:40})})})};class Hv extends HTMLElement{constructor(){super();Jo(this,"mountNode");Jo(this,"root");const r=this.attachShadow({mode:"open"}),o=document.createElement("style");o.textContent=Cl,r.appendChild(o),this.mountNode=document.createElement("div"),r.appendChild(this.mountNode)}static get observedAttributes(){return["instance","host-base","api-base","app-id","theme","customer-id","customer-email","snippet-key"]}connectedCallback(){this.root=ve.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var r;(r=this.root)==null||r.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const r=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",r==="dark"),this.root.render(d.jsx(Bv,{hostBase:this.getAttribute("host-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",theme:r,instanceId:this.getAttribute("instance")??"",snippetKey:this.getAttribute("snippet-key")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Hv)}));
|
|
272
|
+
`,document.head.appendChild(e)},hv=e=>{const t=e.some(r=>r.mode==="staging"),o=e.some(r=>r.mode==="dev");return t&&o?"Dev + Staging":t?"Staging Mode":"Dev Mode"},gv=e=>e.mode==="staging"?"STAGING":"DEV",mv=({className:e="",extensions:t=[],tokenErrors:o=new Map})=>{const[r,n]=k.useState([]),[a,s]=k.useState(!1),[i,l]=k.useState(!1),[u,p]=k.useState(!1),c=k.useRef(null),h=o.size>0;if(k.useEffect(()=>{pv()},[]),k.useEffect(()=>{if(!h)return;const b=()=>{p(!0),setTimeout(()=>p(!1),600)};b();const g=setInterval(b,4e3);return()=>clearInterval(g)},[h]),k.useEffect(()=>{if(typeof window>"u")return;const b=()=>{const v=dn(window.location.search);n(v)};b();const g=()=>b();return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[]),r.length===0)return null;const m=b=>{if(b.stopPropagation(),typeof window>"u")return;const g=new URL(window.location.href);g.searchParams.delete("_stackable_dev"),g.searchParams.delete("_stackable_staging"),window.location.href=g.toString()};return d.jsxs("div",{className:e,style:{position:"fixed",bottom:"16px",left:"50%",transform:i||u?"translate(-50%, -2px)":"translate(-50%, 0)",zIndex:2147483647,fontFamily:"system-ui, -apple-system, sans-serif",transition:"transform 0.15s ease",display:"flex",flexDirection:"column",alignItems:"center"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[a&&d.jsx("div",{style:{backgroundColor:"#fff",border:"1px solid #e5e7eb",borderBottom:`1px solid ${h?"#dc2626":"#eab308"}`,borderRadius:"8px 8px 0 0",boxShadow:"0 -4px 16px -4px rgba(0,0,0,0.12), 0 -2px 6px -4px rgba(0,0,0,0.08)",padding:"8px 0",width:"420px",maxWidth:"90vw"},children:r.map((b,g)=>{var v;return d.jsxs("div",{style:{padding:"8px 12px",borderBottom:g<r.length-1?"1px solid #f3f4f6":"none"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[d.jsx("span",{style:{fontSize:"10px",fontWeight:700,color:b.mode==="staging"?"#7c3aed":"#b45309",backgroundColor:b.mode==="staging"?"#ede9fe":"#fef3c7",padding:"1px 5px",borderRadius:"3px",letterSpacing:"0.05em",fontFamily:"ui-monospace, SFMono-Regular, monospace"},children:gv(b)}),d.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"#111",fontFamily:"ui-monospace, SFMono-Regular, monospace",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:((v=t.find(w=>w.id===b.extensionId))==null?void 0:v.manifest.name)||b.extensionId})]}),d.jsxs("div",{style:{fontSize:"11px",color:"#6b7280",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:b.bundleUrl,children:["→ ",b.bundleUrl]}),o.get(b.extensionId)&&d.jsxs("div",{style:{fontSize:"11px",color:"#dc2626",fontFamily:"ui-monospace, SFMono-Regular, monospace",marginTop:"3px"},children:["⚠ ",o.get(b.extensionId)]})]},b.extensionId)})}),d.jsxs("div",{onClick:()=>s(!a),style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:h?"#dc2626":"#eab308",color:h?"#fff":"#000",padding:"8px 12px",borderRadius:a?"0 0 8px 8px":"8px",boxShadow:i?"0 12px 24px -4px rgba(0,0,0,0.18), 0 6px 10px -4px rgba(0,0,0,0.12)":"0 8px 16px -4px rgba(0,0,0,0.12), 0 4px 6px -4px rgba(0,0,0,0.08)",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",transition:"box-shadow 0.15s ease, border-radius 0.1s ease"},children:[d.jsx("span",{ref:c,style:{display:"inline-flex",animation:i&&!a||u?"stackable-icon-wiggle 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both":"none"},children:d.jsx(fv,{className:"w-6 h-6"})}),d.jsx("span",{children:hv(r)}),d.jsxs("span",{style:{fontSize:"12px",opacity:.75},children:["(",r.length," extension",r.length>1?"s":"",")"]}),d.jsx("button",{onClick:m,style:{marginLeft:"4px",backgroundColor:"rgba(0, 0, 0, 0.15)",border:"none",borderRadius:"4px",cursor:"pointer",padding:"2px 8px",fontSize:"12px",fontWeight:500,color:"inherit",fontFamily:"inherit",transition:"background-color 0.1s ease"},onMouseOver:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.25)"},onMouseOut:b=>{b.currentTarget.style.backgroundColor="rgba(0, 0, 0, 0.15)"},children:"Clear"})]})]})},vv=800,Ht=(e,t)=>e?`${e.replace(/\/$/,"")}${t}`:t,bv=async(e,t,o,r)=>{const n=new Map,a=new Map;return await Promise.all(e.filter(s=>s.manifest.permissions.includes("data:fetch")).map(async s=>{const i=r.find(h=>h.extensionId===s.id),l=i==null?void 0:i.token,u=i==null?void 0:i.mode,p=Ht(t,"/proxy-token"),c=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:o,extensionId:s.id,...u&&{mode:u},...l&&{devSessionToken:l}})});if(c.ok){const{token:h,encryptionKey:m}=await c.json();n.set(s.id,{token:h,encryptionKey:m})}else{let h=`Proxy token failed (${c.status})`;u&&!l?h="Session token missing — re-run CLI":u&&(h="Session expired or invalid — re-run CLI"),a.set(s.id,h),console.warn(`[embeddables] Failed to obtain proxy token for extension ${s.id} (${c.status}) — ${h}`)}})),{tokens:n,errors:a}},wv=e=>typeof e=="object"&&e!==null&&e.encrypted===!0&&Array.isArray(e.data),yv=({instanceId:e,apiBase:t,hostBase:o,appId:r,children:n,customerId:a,customerEmail:s})=>{const[i,l]=k.useState([]),[u,p]=k.useState([]),[c,h]=k.useState(new Map),[m,b]=k.useState(new Map),[g,v]=k.useState(!1),[w,y]=k.useState({authenticated:!1,user:null});k.useEffect(()=>{(async()=>{const _=e;try{if(!_){console.warn("[ExtensionSetup] No instanceId provided; loading no extensions"),l([]),v(!0);return}if(!t||!r){console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"),l([]),v(!0);return}const I=await fetch(Ht(t,`/instances/${r}/${_}`));if(!I.ok){console.warn(`[ExtensionSetup] Instance not found or failed to load: ${_}`),l([]),v(!0);return}const L=await I.json(),O=dn(typeof window<"u"?window.location.search:""),z=await mc(L,O),{tokens:H,errors:A}=await bv(z,t,r,O);l(z),p(O),h(new Map(H)),b(A)}catch(I){console.error("Failed to load extensions:",I)}finally{v(!0)}})()},[e,r,t]),k.useEffect(()=>{if(!t||!r||i.length===0)return;const _=setInterval(async()=>{const I=[];await Promise.all(i.filter(L=>L.manifest.permissions.includes("data:fetch")).map(async L=>{const O=u.find(D=>D.extensionId===L.id),z=O==null?void 0:O.token,H=O==null?void 0:O.mode,A=Ht(t,"/proxy-token"),$=await fetch(A,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({appId:r,extensionId:L.id,...H&&{mode:H},...z&&{devSessionToken:z}})});if($.ok){const{token:D,encryptionKey:Y}=await $.json();I.push([L.id,{token:D,encryptionKey:Y}])}else console.warn(`[embeddables] Proxy token refresh failed for extension ${L.id} (${$.status}) — using stale token`)})),I.length>0&&h(L=>{const O=new Map(L);for(const[z,H]of I)O.set(z,H);return O})},3300*1e3);return()=>clearInterval(_)},[i,u,t,r]),k.useEffect(()=>{if(c.size===0)return;const P=_=>{const I=_.data;if((I==null?void 0:I.type)!=="extension-ready")return;const L=I.extensionId,O=i.find(A=>A.id===L);if(!(O!=null&&O.bundleUrl))return;const z=u.find(A=>A.extensionId===L);if(pc(O.bundleUrl)&&(z==null?void 0:z.mode)!=="staging")return;const H=c.get(L);H&&tt(L,{type:"extension-encryption-key",encryptionKey:H.encryptionKey})};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[i,u,c]);const x=k.useCallback((P,_)=>{const I=Bo();for(const[L,O]of I)O.manifest.permissions.includes("identity:subscribe")&&tt(L,{type:"extension-event",eventType:P,payload:{type:P,state:_,timestamp:new Date().toISOString()}})},[]),S=k.useCallback(async P=>{const _=Bo(),I=[];for(const[O,z]of _){if(!z.manifest.permissions.includes("identity:extend"))continue;const H=new Promise(A=>{const $=`enrich_${O}_${Date.now()}`,D=Y=>{var ae;const M=Y.data;(M==null?void 0:M.type)!=="capability-response"||M.id!==$||(window.removeEventListener("message",D),M.success&&((ae=M.data)!=null&&ae.additionalClaims)?A(M.data.additionalClaims):A({}))};window.addEventListener("message",D),setTimeout(()=>{window.removeEventListener("message",D),A({})},5e3),tt(O,{type:"capability-response",id:$,success:!0,data:{type:"identity.extend",claims:P}})});I.push(H)}if(I.length===0)return{};const L=await Promise.all(I);return Object.assign({},...L)},[]),T=k.useCallback(async P=>{if(!t||!r||!e)return null;try{const _=await fetch(Ht(t,"/identity/sign"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...P,appId:r,instanceId:e})});if(!_.ok)return console.warn(`[embeddables] Identity sign failed (${_.status})`),null;const{token:I}=await _.json();return I}catch(_){return console.warn("[embeddables] Identity sign request failed:",_),null}},[t,r,e]),N=k.useCallback(P=>{const _=window.zE;_&&_("messenger","loginUser",async I=>{I(P)})},[]),E=k.useCallback(()=>{const P=window.zE;P&&P("messenger","logoutUser")},[]);k.useEffect(()=>{const P=()=>{const I=document.getElementById("stackable-identity");if(I)try{const L=JSON.parse(I.textContent??"{}"),O={authenticated:!0,user:{id:String(L.customerId??""),email:L.customerEmail,name:L.customerName,provider:"shopify"}};y(z=>{var A,$;if(z.authenticated&&((A=z.user)==null?void 0:A.id)===(($=O.user)==null?void 0:$.id))return z;const H=O.user;return(async()=>{const{email:D,name:Y}=H,M={external_id:String(H.id)},ae=await S({...M,email:D,name:Y}),pe=await T({...M,...ae,email:D,name:Y});pe&&N(pe)})(),x("identity.login",O),O})}catch{console.warn("[embeddables] Failed to parse #stackable-identity JSON")}else y(L=>{if(!L.authenticated)return L;const O={authenticated:!1,user:null};return E(),x("identity.logout",O),O})};P();const _=new MutationObserver(P);return _.observe(document.head,{childList:!0,subtree:!0}),_.observe(document.body,{childList:!0,subtree:!0}),()=>_.disconnect()},[x,S,T,N,E]),k.useEffect(()=>{if(!w.authenticated)return;const P=_=>{const I=_.data;if((I==null?void 0:I.type)!=="extension-ready")return;const L=I.extensionId,O=i.find(z=>z.id===L);O!=null&&O.manifest.permissions.includes("identity:subscribe")&&tt(L,{type:"extension-event",eventType:"identity.login",payload:{type:"identity.login",state:w,timestamp:new Date().toISOString()}})};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[w,i]);const C=k.useMemo(()=>({"data.query":async P=>hl(P,o),"data.fetch":async(P,_)=>{const I=c.get(P);if(!I)return{status:0,ok:!1,data:{error:"data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"}};const L=wv(_)?_:{url:_.url,method:_.method??"GET",headers:_.headers??{},body:_.body??null},O=Ht(t,"/proxy"),z=await fetch(O,{method:"POST",headers:{"Content-Type":"application/json","X-Extension-Id":P,"X-Application-Id":r??"",Authorization:`Bearer ${I.token}`},body:JSON.stringify(L)}),H=await z.json();return{status:H.status??z.status,ok:H.ok??z.ok,data:H.data}},"actions.toast":async(P,_)=>{const I={..._.description&&{description:_.description},..._.duration&&{duration:_.duration},..._.position&&{position:_.position},..._.dismissible!=null&&{dismissible:_.dismissible},..._.closeButton!=null&&{closeButton:_.closeButton}};if(_.fetch){const L=z=>new Promise(H=>setTimeout(H,z)),O=Promise.all([C["data.fetch"](P,_.fetch),L(vv)]).then(([z])=>z);pt.promise(O,{loading:_.loading??_.message,success:_.success??_.message,error:_.error??"Something went wrong",...I});return}switch(_.type){case"success":{pt.success(_.message,I);break}case"error":{pt.error(_.message,I);break}case"warning":{pt.warning(_.message,I);break}case"info":{pt.info(_.message,I);break}default:pt(_.message,I)}},"actions.invoke":async P=>(window.dispatchEvent(new CustomEvent(`ext-action-${P.action}`,{detail:P})),{success:!0}),"context.read":async()=>({customerId:a??"",customerEmail:s??""}),"identity.read":async()=>w}),[t,r,o,a,s,c,w]);return g?d.jsxs(d.Fragment,{children:[d.jsx(Ll,{extensions:i,capabilityHandlers:C,components:uv(),children:n}),d.jsx(mv,{extensions:i,tokenErrors:m})]}):null};var xv=(e,t,o,r,n,a,s,i)=>{let l=document.documentElement,u=["light","dark"];function p(m){(Array.isArray(e)?e:[e]).forEach(b=>{let g=b==="class",v=g&&a?n.map(w=>a[w]||w):n;g?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(b,m)}),c(m)}function c(m){i&&u.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)p(r);else try{let m=localStorage.getItem(t)||o,b=s&&m==="system"?h():m;p(b)}catch{}},kv=f.createContext(void 0),Sv={setTheme:e=>{},themes:[]},Cv=()=>{var e;return(e=f.useContext(kv))!=null?e:Sv};f.memo(({forcedTheme:e,storageKey:t,attribute:o,enableSystem:r,enableColorScheme:n,defaultTheme:a,value:s,themes:i,nonce:l,scriptProps:u})=>{let p=JSON.stringify([o,t,a,e,i,s,r,n]).slice(1,-1);return f.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${xv.toString()})(${p})`}})});const Ev=({...e})=>{const{theme:t="system"}=Cv();return d.jsx(fc,{theme:t,className:"toaster group",icons:{success:d.jsx(mn,{className:"size-4"}),info:d.jsx(jt,{className:"size-4"}),warning:d.jsx(Wc,{className:"size-4"}),error:d.jsx(Dc,{className:"size-4"}),loading:d.jsx(Wo,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Nv={dark:"dark",light:"widget-theme-light"},Tv={dark:"dark",light:"light"},_v=({children:e,theme:t="inherit"})=>d.jsxs("div",{"data-id":"widget-body",className:Nv[t],style:{position:"relative",transform:"translateZ(0)"},children:[d.jsx("div",{className:"h-[700px] w-[900px] overflow-hidden rounded-md ring ring-zinc-200 dark:ring-zinc-300",children:d.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden rounded-md bg-muted dark:bg-background text-foreground",children:e})}),d.jsx(Ev,{position:"bottom-center",theme:Tv[t]??"system",toastOptions:{descriptionClassName:"!text-muted-foreground"}})]}),Pv=({onClick:e,icon:t=kc})=>d.jsx("div",{className:"fixed bottom-8 right-8 z-50",children:d.jsx(ll,{className:"h-12 w-12 rounded-full",size:"icon",onClick:e,children:d.jsx(t,{className:"h-6 w-6"})})}),Av=({children:e,icon:t,theme:o})=>{const[r,n]=k.useState(!1),[a,s]=k.useState(!0),i=k.useCallback(()=>{n(l=>!l)},[]);return k.useEffect(()=>{const l=()=>n(m=>!m),u=()=>n(!0),p=()=>n(!1),c=()=>s(!0),h=()=>{n(!1),s(!1)};return window.addEventListener("ext-action-toggle",l),window.addEventListener("ext-action-open",u),window.addEventListener("ext-action-close",p),window.addEventListener("ext-action-show",c),window.addEventListener("ext-action-hide",h),()=>{window.removeEventListener("ext-action-open",u),window.removeEventListener("ext-action-close",p),window.removeEventListener("ext-action-toggle",l),window.removeEventListener("ext-action-show",c),window.removeEventListener("ext-action-hide",h)}},[]),d.jsxs(d.Fragment,{children:[a&&d.jsx(Pv,{onClick:i,icon:t}),r&&d.jsx("div",{"data-id":"widget-container",className:"overflow-hidden fixed bottom-24 right-8 z-1000 rounded-md shadow-xl",style:{"--widget-z":1e3},children:d.jsx(_v,{theme:o,children:e})})]})},Iv=({href:e,children:t})=>d.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-zinc-500 opacity-80 transition-colors hover:text-zinc-900 hover:opacity-100",children:t}),Mv=(e,t)=>{const[o,r]=k.useState(null),[n,a]=k.useState(!1),[s,i]=k.useState(null);return k.useEffect(()=>{if(!e){r(null);return}(async()=>{a(!0),i(null);try{const u=await hl({action:"getCustomer",customerId:e},t);r(u)}catch(u){i(u)}finally{a(!1)}})()},[e,t]),{customer:o,loading:n,error:s}},Ov=({customerId:e,customerEmail:t,hostBase:o,children:r})=>{var l,u;const{customer:n,loading:a,error:s}=Mv(e,o);if(a)return d.jsx(At,{className:"border-none shadow-none bg-transparent",children:d.jsx(It,{className:"flex items-center justify-center p-6",children:d.jsx(Wo,{className:"h-6 w-6 animate-spin text-muted-foreground"})})});if(s||!n){const p=t?t.split("@")[0]:e?`Customer ${e.slice(-4)}`:"Customer",c=p.split(/[\s._-]+/).map(h=>h[0]).join("").slice(0,2).toUpperCase();return d.jsx(At,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsxs(It,{className:"p-4 pb-0 pt-2",children:[d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Gr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Yr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(p)}&background=7c3aed&color=fff&size=128`,alt:p}),d.jsx(qr,{className:"text-lg",children:c})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:p})]}),t&&d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(Uo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:t})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]}),d.jsx("p",{className:"pt-2 text-center text-xs text-muted-foreground",children:"Using fallback profile (customer API returned no data)"})]})})}const i=`${((l=n.first_name)==null?void 0:l[0])||""}${((u=n.last_name)==null?void 0:u[0])||""}`;return d.jsx(At,{className:"border-none px-0 py-0 mb-4 shadow-none bg-transparent",children:d.jsx(It,{className:"p-4 pb-0 pt-2",children:d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsxs(Gr,{className:"h-16 w-16 mb-2 ring-2 ring-background shadow-sm",children:[d.jsx(Yr,{src:`https://ui-avatars.com/api/?name=${encodeURIComponent(n.name)}&background=7c3aed&color=fff&size=128`,alt:n.name}),d.jsx(qr,{className:"text-lg",children:i})]}),d.jsxs("div",{className:"text-center w-full space-y-1",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-foreground/70 font-medium tracking-wide",children:"Welcome,"}),d.jsx("h2",{className:"text-lg font-bold text-foreground leading-tight",children:n.name})]}),d.jsx("div",{className:"pt-2 flex flex-col items-center gap-1",children:d.jsxs("div",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-foreground/75",children:[d.jsx(Uo,{className:"h-3 w-3","aria-hidden":"true"}),d.jsx("span",{className:"truncate max-w-[200px]",children:n.email})]})}),d.jsx("div",{className:"py-1 rounded-lg flex justify-center gap-1",children:r})]})]})})})},ml=(e,t)=>{k.useEffect(()=>{const o=t.current;if(!o)return;let r=document.getElementById(e);r||(r=document.createElement("div"),r.id=e,r.style.cssText="position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;",document.body.appendChild(r));const n=new MutationObserver(()=>{for(;r.firstChild;)o.appendChild(document.adoptNode(r.firstChild))});return n.observe(r,{childList:!0,subtree:!0}),()=>{n.disconnect(),r==null||r.remove()}},[e,t])},Lv=({customization:e})=>{const t=k.useRef(null);return ml("widget_conversations",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{conversationList:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},zv=({customization:e})=>{const t=k.useRef(null);return ml("widget_messages",t),k.useEffect(()=>{!window.zE||!t.current||e&&window.zE("messenger:set","customization",{messageLog:e})},[e]),d.jsx("div",{ref:t,className:"h-full overflow-hidden"})},Xr=25,Kr=75,Dv=({header:e,buttons:t,hostBase:o,customerId:r="",customerEmail:n="",primaryPercent:a=50})=>{const s=Math.max(Xr,Math.min(Kr,a)),[i,l]=k.useState("account"),[u,p]=k.useState(s),[c,h]=k.useState(!1),[m,b]=k.useState(!1),[g,v]=k.useState(!1),w=k.useRef(null),y=k.useCallback(()=>!window.zE||!document.getElementById("widget_conversations")||!document.getElementById("widget_messages")?!1:(window.zE("messenger","render",{mode:"embedded",conversationList:{targetElement:"#widget_conversations"},messageLog:{targetElement:"#widget_messages"}}),window.zE("messenger:set","customization",{common:{hideHeader:!1},conversationList:{hideHeader:!0,hideNewConversationButton:!0},messageLog:{hideHeader:!0}}),!0),[]);k.useEffect(()=>{if(y()){b(!0);return}const N=setInterval(()=>{y()&&(b(!0),clearInterval(N))},100),E=setTimeout(()=>{clearInterval(N),console.warn("Zendesk widget failed to load after 10 seconds")},1e4);return()=>{clearInterval(N),clearTimeout(E)}},[y]);const x=k.useCallback(N=>{const{detail:E}=N;!window.zE||!(E!=null&&E.payload)||window.zE("messenger:ui","newConversation",E.payload)},[]);k.useEffect(()=>(window.addEventListener("ext-action-newConversation",x),()=>{window.removeEventListener("ext-action-newConversation",x)}),[x]),k.useEffect(()=>{if(!g)return;const N=C=>{if(!w.current)return;const P=w.current.getBoundingClientRect();if((c?P.width:P.height)===0)return;const I=c?(C.clientX-P.left)/P.width*100:(C.clientY-P.top)/P.height*100,L=Math.max(Xr,Math.min(Kr,I));p(L)},E=()=>{v(!1),document.body.style.cursor="",document.body.style.userSelect=""};return document.body.style.cursor=c?"col-resize":"row-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",N),window.addEventListener("mouseup",E),window.addEventListener("blur",E),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",E),window.removeEventListener("blur",E),document.body.style.cursor="",document.body.style.userSelect=""}},[g,c]),k.useEffect(()=>{if(!w.current)return;const N=w.current,E=()=>{const P=getComputedStyle(N).flexDirection==="row";h(P)};E();const C=new ResizeObserver(E);return C.observe(N),()=>{C.disconnect()}},[]);const S=k.useCallback(N=>{if(N.detail===2){p(s);return}N.preventDefault(),v(!0)},[s]),T={customerId:r,customerEmail:n};return d.jsxs("div",{"data-component":"zendesk-wrapper",className:"flex-1 flex flex-col z-10 overflow-hidden",style:{containerType:"inline-size"},children:[d.jsx("style",{children:'@container (min-width: 42rem) { [data-component="zendesk-wrapper"] > [data-id="panel-layout"] { flex-direction: row; } }'}),d.jsxs("div",{ref:w,"data-id":"panel-layout",className:"relative flex-1 overflow-hidden flex flex-col",children:[d.jsxs("div",{"data-id":"primary-panel",className:"min-h-0 min-w-0 flex-none overflow-hidden flex flex-col",style:{flexBasis:`${u}%`},children:[d.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[d.jsx("h2",{className:"font-semibold text-sm text-foreground",children:i==="account"?"My Account":"My Conversations"}),d.jsxs("div",{className:"flex items-center gap-1",children:[e&&d.jsx("div",{className:"flex mr-1 gap-1",children:e}),d.jsxs("div",{className:"flex rounded-lg bg-muted p-1",children:[t,d.jsx("button",{onClick:()=>l("account"),className:U("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",i==="account"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"My Account",children:d.jsx(bn,{className:"h-4 w-4"})}),d.jsx("button",{onClick:()=>l("conversations"),className:U("rounded-md border border-transparent p-1.5 transition-colors hover:cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",i==="conversations"?"border-border bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:"Conversations",children:d.jsx(vn,{className:"h-4 w-4"})})]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto p-4 relative",children:[d.jsxs("div",{className:U("flex flex-col gap-2",i==="conversations"&&"hidden"),children:[d.jsx(Ov,{customerId:r,customerEmail:n,hostBase:o,children:d.jsx(Wt,{target:"slot.header",context:T,className:"flex-none"})}),d.jsx(Wt,{target:"slot.content",context:T,className:"flex flex-col gap-2"})]}),d.jsx("div",{className:U("h-full rounded-xl border border-zinc-200 bg-white p-2 shadow-sm dark:border-zinc-300",i==="account"&&"hidden"),children:d.jsx(Lv,{})})]})]}),d.jsxs("div",{"data-id":"secondary-panel",className:"min-h-0 min-w-0 flex-none flex flex-col bg-white",style:{flexBasis:`${100-u}%`},children:[d.jsx("div",{className:"flex-1 overflow-hidden",children:d.jsx(zv,{})}),d.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 py-1 mr-4 text-xs text-zinc-500",children:[d.jsx(Wt,{target:"slot.footer",context:T,className:"flex items-center gap-1",fallback:d.jsxs(d.Fragment,{children:[d.jsx("div",{children:"powered by"}),d.jsx(Iv,{href:"https://zendesk.com",children:"Zendesk"})]})}),d.jsx(Wt,{target:"slot.footer-links",context:T,className:"flex items-center gap-1",separator:d.jsx("span",{className:"text-zinc-300",children:"/"}),render:({children:N,index:E})=>d.jsxs(d.Fragment,{children:[E===0&&d.jsx("span",{className:"text-zinc-300",children:"+"}),N]})})]})]}),d.jsx("div",{className:U("group/resize absolute z-20 flex items-center justify-center",c?"top-0 bottom-0 w-3 -ml-2.5 cursor-col-resize":"w-full h-3 -mt-2.5 cursor-row-resize"),style:c?{left:`${u}%`}:{top:`${u}%`},onMouseDown:S,role:"separator","aria-label":"Resize panels","aria-orientation":c?"vertical":"horizontal","aria-valuemin":Xr,"aria-valuemax":Kr,"aria-valuenow":Math.round(u),children:d.jsx("div",{className:U("rounded-full bg-foreground/35 dark:bg-white shadow-[0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_rgba(0,0,0,0.22)] transition-all",c?"h-20 w-0.5":"h-0.5 w-20",g?"bg-foreground/70 dark:bg-white opacity-100":"opacity-70 group-hover/resize:bg-foreground/55 dark:group-hover/resize:bg-white group-hover/resize:opacity-100")})}),g&&d.jsx("div",{className:U("absolute inset-0 z-40",c?"cursor-col-resize":"cursor-row-resize"),onMouseUp:()=>v(!1)})]})]})},$v="ze-snippet",vl=e=>`https://static.zdassets.com/ekr/snippet.js?key=${encodeURIComponent(e)}`,Fv=(e,t={})=>{if(typeof window>"u"||typeof document>"u"||!e)return Promise.resolve();const{autorender:o=!1,scriptId:r=$v}=t;window.zEMessenger={autorender:o};const n=document.getElementById(r);if(n){if(n.getAttribute("src")===vl(e))return Promise.resolve();n.remove()}return new Promise((a,s)=>{const i=document.createElement("script");i.id=r,i.src=vl(e),i.async=!0,i.onload=()=>a(),i.onerror=()=>s(new Error("Failed to load Zendesk snippet")),document.head.appendChild(i)})},Bv=({snippetKey:e,instanceId:t,hostBase:o,apiBase:r,appId:n,theme:a,customerId:s,customerEmail:i})=>{const l=a==="dark"||a==="light"?a:"inherit";return k.useEffect(()=>{e&&Fv(e).catch(u=>{console.error("[StackableWidget] Failed to load Zendesk snippet:",u)})},[e]),d.jsx(yv,{instanceId:t,hostBase:o,apiBase:r,appId:n,customerId:s,customerEmail:i,children:d.jsx(Av,{theme:l,children:d.jsx(Dv,{hostBase:o,customerId:s,customerEmail:i,primaryPercent:40})})})};class Hv extends HTMLElement{constructor(){super();Qr(this,"mountNode");Qr(this,"root");const o=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=El,o.appendChild(r),this.mountNode=document.createElement("div"),o.appendChild(this.mountNode)}static get observedAttributes(){return["instance","host-base","api-base","app-id","theme","customer-id","customer-email","snippet-key"]}connectedCallback(){this.root=be.createRoot(this.mountNode),this.renderWidget()}disconnectedCallback(){var o;(o=this.root)==null||o.unmount(),this.root=void 0}attributeChangedCallback(){this.renderWidget()}renderWidget(){if(!this.root)return;const o=this.getAttribute("theme")??"";this.mountNode.classList.toggle("dark",o==="dark"),this.root.render(d.jsx(Bv,{hostBase:this.getAttribute("host-base")??"",apiBase:this.getAttribute("api-base")??void 0,appId:this.getAttribute("app-id")??"",theme:o,instanceId:this.getAttribute("instance")??"",snippetKey:this.getAttribute("snippet-key")??"",customerId:this.getAttribute("customer-id")??void 0,customerEmail:this.getAttribute("customer-email")??void 0}))}}customElements.get("stackable-widget")||customElements.define("stackable-widget",Hv)}));
|